You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by garrensmith <gi...@git.apache.org> on 2014/06/18 16:01:18 UTC

[GitHub] couchdb pull request: Fauxton: Create fx roles

GitHub user garrensmith opened a pull request:

    https://github.com/apache/couchdb/pull/249

    Fauxton: Create fx roles

    Fauxton auth works by checking what roles a user has and then decide if
    they have access to a specific route. The only problem is a regular user
    might get created but not have any roles. Unlike an admin user who get
    assigned all the roles on creation.
    
    The idea behind this is that certain routes should require a user to be
    logged in but not necessary have any roles eg. #changePassword route.
    
    This allows for a standard fauxton role that all logged in users get given so that
    we can check via the roles if they are logged

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/garrensmith/couchdb create_fauxton_role

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb/pull/249.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #249
    
----
commit 8b22969b3354a479c33acd823ceeaa731f12d8ac
Author: Garren Smith <ga...@gmail.com>
Date:   2014-06-18T13:55:03Z

    Fauxton: Create fx roles
    
    Fauxton auth works by checking what roles a user has and then decide if
    they have access to a specific route. The only problem is a regular user
    might get created but not have any roles. Unlike an admin user who get
    assigned all the roles on creation.
    
    The idea behind this is that certain routes should require a user to be
    logged in but not necessary have any roles eg. #changePassword route.
    
    This allows for a standard fauxton role that all logged in users get given so that
    we can check via the roles if they are logged

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb pull request: Fauxton: Create fx roles

Posted by robertkowalski <gi...@git.apache.org>.
Github user robertkowalski commented on the pull request:

    https://github.com/apache/couchdb/pull/249#issuecomment-46622913
  
    I think I am okay with it, I also have no better idea just now for a quick fix.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb pull request: Fauxton: Create fx roles

Posted by garrensmith <gi...@git.apache.org>.
Github user garrensmith closed the pull request at:

    https://github.com/apache/couchdb/pull/249


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb pull request: Fauxton: Create fx roles

Posted by garrensmith <gi...@git.apache.org>.
Github user garrensmith commented on the pull request:

    https://github.com/apache/couchdb/pull/249#issuecomment-46526591
  
    The `isLoggedIn` can work but the problem is we need to define via the auth roles in a `RouteObject` that this route needs to the user to be logged in. The only way to do that is via the roles.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb pull request: Fauxton: Create fx roles

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb/pull/249#issuecomment-46452387
  
    Errhm..I just read the `auth/resources.js` code and found there nice function `isLoggedIn` - why not to use it instead of fake role to control access to "Change Password" page?



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb pull request: Fauxton: Create fx roles

Posted by garrensmith <gi...@git.apache.org>.
Github user garrensmith commented on the pull request:

    https://github.com/apache/couchdb/pull/249#issuecomment-46815114
  
    Great thanks. Merged.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb pull request: Fauxton: Create fx roles

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb/pull/249#issuecomment-46621933
  
    @robertkowalski not auth, but set of default roles I believe. The code caused the issue was ported from Cloudant fork and it forces check user for some special roles.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb pull request: Fauxton: Create fx roles

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb/pull/249#issuecomment-46441436
  
    How about just `_fauxton` ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb pull request: Fauxton: Create fx roles

Posted by robertkowalski <gi...@git.apache.org>.
Github user robertkowalski commented on the pull request:

    https://github.com/apache/couchdb/pull/249#issuecomment-46621690
  
    Will auth change with the BigCouch merge?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb pull request: Fauxton: Create fx roles

Posted by garrensmith <gi...@git.apache.org>.
Github user garrensmith commented on the pull request:

    https://github.com/apache/couchdb/pull/249#issuecomment-46449548
  
    Correct I haven’t added it to databases and replication yet. I can do that. I first wanted to get some opinions on this approach. Its not the prettiest approach but I don’t want to spend too much time on auth until the Big Couch merge is over. So this should be “good enough” for now.
    
    On 18 Jun 2014, at 4:44 PM, Alexander Shorin <no...@github.com> wrote:
    
    > Also, am I right that you'd only fixed access to "Change Password" page? Because access to databases/replication still asks to log in (even if you're).
    > 
    > —
    > Reply to this email directly or view it on GitHub.
    > 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb pull request: Fauxton: Create fx roles

Posted by garrensmith <gi...@git.apache.org>.
Github user garrensmith commented on the pull request:

    https://github.com/apache/couchdb/pull/249#issuecomment-46442856
  
    I would prefer to prefix it so we can add other roles later if need be.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb pull request: Fauxton: Create fx roles

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb/pull/249#issuecomment-46443518
  
    I'd wouldn't be so optimistic since this mostly looks like a hack. But anyway, leading `_` guarantees that no admin will create collision with your role to grant some actions on fauxton to specific users - CouchDB will not allow that, and `_fauxton` by itself is good prefix too. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb pull request: Fauxton: Create fx roles

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb/pull/249#issuecomment-46444751
  
    Also, am I right that you'd only fixed access to "Change Password" page? Because access to databases/replication still asks to log in (even if you're).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---