You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Pete Vander Giessen (JIRA)" <ji...@apache.org> on 2011/08/01 20:36:09 UTC

[jira] [Created] (COUCHDB-1238) CouchDB uses _users db for storing oauth credentials

CouchDB uses _users db for storing oauth credentials
----------------------------------------------------

                 Key: COUCHDB-1238
                 URL: https://issues.apache.org/jira/browse/COUCHDB-1238
             Project: CouchDB
          Issue Type: New Feature
          Components: Database Core
    Affects Versions: 1.1.1
            Reporter: Pete Vander Giessen
             Fix For: 1.1.1


We want to store oauth credentials in the _users db, rather than in the .ini. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1238) CouchDB uses _users db for storing oauth credentials

Posted by "Pete Vander Giessen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13090431#comment-13090431 ] 

Pete Vander Giessen commented on COUCHDB-1238:
----------------------------------------------

@Filipe (just realized that I misspelled your name twice in my last comment; fixed now -- sorry): you are the expert. Any changes that you deem necessary are fine by me :-) (And reading through the code, it looks like all the changes you made make things better.)

Let me know if I need to do anything else on this one -- happy to help in any way I can.

> CouchDB uses _users db for storing oauth credentials
> ----------------------------------------------------
>
>                 Key: COUCHDB-1238
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1238
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Database Core
>    Affects Versions: 1.1
>            Reporter: Pete Vander Giessen
>            Assignee: Filipe Manana
>             Fix For: 1.2
>
>         Attachments: git_commits_as_patch.zip, oauth_users_db_patch.zip
>
>
> We want to store oauth credentials in the _users db, rather than in the .ini. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1238) CouchDB uses _users db for storing oauth credentials

Posted by "Filipe Manana (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13078322#comment-13078322 ] 

Filipe Manana commented on COUCHDB-1238:
----------------------------------------

Thanks again Pete.
Yes, a manual merge is going to be needed in order to extract that optimization :(

> CouchDB uses _users db for storing oauth credentials
> ----------------------------------------------------
>
>                 Key: COUCHDB-1238
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1238
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Database Core
>    Affects Versions: 1.1
>            Reporter: Pete Vander Giessen
>             Fix For: 1.2
>
>         Attachments: git_commits_as_patch.zip
>
>
> We want to store oauth credentials in the _users db, rather than in the .ini. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1238) CouchDB uses _users db for storing oauth credentials

Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13073666#comment-13073666 ] 

Paul Joseph Davis commented on COUCHDB-1238:
--------------------------------------------

Can this get cleaned up to a patch or two? Or even a GitHub compare view link to see it as a single diff to get a first impression?

> CouchDB uses _users db for storing oauth credentials
> ----------------------------------------------------
>
>                 Key: COUCHDB-1238
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1238
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Database Core
>    Affects Versions: 1.1.1
>            Reporter: Pete Vander Giessen
>             Fix For: 1.1.1
>
>         Attachments: git_commits_as_patch.zip
>
>
> We want to store oauth credentials in the _users db, rather than in the .ini. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1238) CouchDB uses _users db for storing oauth credentials

Posted by "Filipe Manana (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13088484#comment-13088484 ] 

Filipe Manana commented on COUCHDB-1238:
----------------------------------------

Thanks Pete, you're help is very much appreciated :)
I'll have a look at it soon.

> CouchDB uses _users db for storing oauth credentials
> ----------------------------------------------------
>
>                 Key: COUCHDB-1238
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1238
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Database Core
>    Affects Versions: 1.1
>            Reporter: Pete Vander Giessen
>            Assignee: Filipe Manana
>             Fix For: 1.2
>
>         Attachments: git_commits_as_patch.zip, oauth_users_db_patch.zip
>
>
> We want to store oauth credentials in the _users db, rather than in the .ini. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (COUCHDB-1238) CouchDB uses _users db for storing oauth credentials

Posted by "Pete Vander Giessen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pete Vander Giessen updated COUCHDB-1238:
-----------------------------------------

    Attachment: git_commits_as_patch.zip

Attached are a series of patches representing a git merge of fdmanana's work to the 1.1.x tree, followed by a rebase, and another merge, to catch up to commits made after I had done the initial merge. 

I also set couch to use the handler fdmanana created by default. 

> CouchDB uses _users db for storing oauth credentials
> ----------------------------------------------------
>
>                 Key: COUCHDB-1238
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1238
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Database Core
>    Affects Versions: 1.1.1
>            Reporter: Pete Vander Giessen
>             Fix For: 1.1.1
>
>         Attachments: git_commits_as_patch.zip
>
>
> We want to store oauth credentials in the _users db, rather than in the .ini. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1238) CouchDB uses _users db for storing oauth credentials

Posted by "Filipe Manana (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13073780#comment-13073780 ] 

Filipe Manana commented on COUCHDB-1238:
----------------------------------------

Pete,
Thank you very much for doing it and testing it on the field.
I'll look at the patches soon and on no objections I'll commit them to trunk only (it's quite a big new feature for 1.1.1).

> CouchDB uses _users db for storing oauth credentials
> ----------------------------------------------------
>
>                 Key: COUCHDB-1238
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1238
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Database Core
>    Affects Versions: 1.1.1
>            Reporter: Pete Vander Giessen
>             Fix For: 1.1.1
>
>         Attachments: git_commits_as_patch.zip
>
>
> We want to store oauth credentials in the _users db, rather than in the .ini. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (COUCHDB-1238) CouchDB uses _users db for storing oauth credentials

Posted by "Robert Newson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Newson updated COUCHDB-1238:
-----------------------------------

    Affects Version/s:     (was: 1.1.1)
                       1.1
        Fix Version/s:     (was: 1.1.1)
                       1.2

clarifying that new features go to 1.2, not 1.1.x

> CouchDB uses _users db for storing oauth credentials
> ----------------------------------------------------
>
>                 Key: COUCHDB-1238
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1238
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Database Core
>    Affects Versions: 1.1
>            Reporter: Pete Vander Giessen
>             Fix For: 1.2
>
>         Attachments: git_commits_as_patch.zip
>
>
> We want to store oauth credentials in the _users db, rather than in the .ini. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1238) CouchDB uses _users db for storing oauth credentials

Posted by "Filipe Manana (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13180698#comment-13180698 ] 

Filipe Manana commented on COUCHDB-1238:
----------------------------------------

Applied to master and branch 1.2.x (revisions d01faab3f464ff0806f4ad9f4166ca7a498a4866 and e768eb2d504824fa209cc19330850dd2244e541b).

Some documentation left in the commit message and soon more to be added to the wiki.
                
> CouchDB uses _users db for storing oauth credentials
> ----------------------------------------------------
>
>                 Key: COUCHDB-1238
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1238
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Database Core
>    Affects Versions: 1.1
>            Reporter: Pete Vander Giessen
>            Assignee: Filipe Manana
>             Fix For: 1.2
>
>         Attachments: git_commits_as_patch.zip, oauth_users_db_patch.zip
>
>
> We want to store oauth credentials in the _users db, rather than in the .ini. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1238) CouchDB uses _users db for storing oauth credentials

Posted by "Pete Vander Giessen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13076039#comment-13076039 ] 

Pete Vander Giessen commented on COUCHDB-1238:
----------------------------------------------

I promised Jan that I'd work on this today. It looks like the scope has exploded a bit, though :-p

Filipe's more elegant solution is probably the one to use, but it is in a codebase that won't merge cleanly with the main project. I'd be happy to make a go at doing a merge by hand at some point, but I'm crunching for a deadline at work. My brain is pretty melty tonight, and may be pretty melty for the rest of the week ... sorry about that :-/



> CouchDB uses _users db for storing oauth credentials
> ----------------------------------------------------
>
>                 Key: COUCHDB-1238
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1238
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Database Core
>    Affects Versions: 1.1
>            Reporter: Pete Vander Giessen
>             Fix For: 1.2
>
>         Attachments: git_commits_as_patch.zip
>
>
> We want to store oauth credentials in the _users db, rather than in the .ini. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (COUCHDB-1238) CouchDB uses _users db for storing oauth credentials

Posted by "Jan Lehnardt (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jan Lehnardt closed COUCHDB-1238.
---------------------------------

    Resolution: Fixed
    
> CouchDB uses _users db for storing oauth credentials
> ----------------------------------------------------
>
>                 Key: COUCHDB-1238
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1238
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Database Core
>    Affects Versions: 1.1
>            Reporter: Pete Vander Giessen
>            Assignee: Filipe Manana
>             Fix For: 1.2
>
>         Attachments: git_commits_as_patch.zip, oauth_users_db_patch.zip
>
>
> We want to store oauth credentials in the _users db, rather than in the .ini. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1238) CouchDB uses _users db for storing oauth credentials

Posted by "Filipe Manana (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13088909#comment-13088909 ] 

Filipe Manana commented on COUCHDB-1238:
----------------------------------------

Pete, I rebased the patch with latest trunk and made some necessary small reorganizations to make it more compliant with the current codebase.
Let me know if you agree with it.

I also added a documentation comment in the .ini file.
Here's the modified patch:
https://github.com/fdmanana/couchdb/compare/oauth_users_db

I'll wait for peer review

> CouchDB uses _users db for storing oauth credentials
> ----------------------------------------------------
>
>                 Key: COUCHDB-1238
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1238
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Database Core
>    Affects Versions: 1.1
>            Reporter: Pete Vander Giessen
>            Assignee: Filipe Manana
>             Fix For: 1.2
>
>         Attachments: git_commits_as_patch.zip, oauth_users_db_patch.zip
>
>
> We want to store oauth credentials in the _users db, rather than in the .ini. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (COUCHDB-1238) CouchDB uses _users db for storing oauth credentials

Posted by "Filipe Manana (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Filipe Manana reassigned COUCHDB-1238:
--------------------------------------

    Assignee: Filipe Manana

> CouchDB uses _users db for storing oauth credentials
> ----------------------------------------------------
>
>                 Key: COUCHDB-1238
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1238
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Database Core
>    Affects Versions: 1.1
>            Reporter: Pete Vander Giessen
>            Assignee: Filipe Manana
>             Fix For: 1.2
>
>         Attachments: git_commits_as_patch.zip
>
>
> We want to store oauth credentials in the _users db, rather than in the .ini. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (COUCHDB-1238) CouchDB uses _users db for storing oauth credentials

Posted by "Pete Vander Giessen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pete Vander Giessen updated COUCHDB-1238:
-----------------------------------------

    Attachment: oauth_users_db_patch.zip

Per request, I ported Filipe's oauth users db code from ubuntuone to couch. In the attached zip (oauth_uses_db_patch.zip) is an updated couch_httpd_oauth.erl, a .patch of the changes, and a test file called oauth_users_db.js. 

What this code is: Felipe's code, with the ubuntuone specific delegation stuff stripped out. My Erlang fu is still pretty weak, so I may have done slightly naive stuff. Felipe: if you'd give it a once over to make sure nothing looks too terrible, I'd appreciate it. 

Note: I was having a hard time getting the new spidermonkey to compile on my box (OSX Snow Leopard). If anybody has any pointers to useful tips on getting it to work, I'd really appreciate them, too. Since there aren't any differences between trunk and 1.1.x in couch_httpd_oauth.erl, I went ahead and wrote and tested this against 1.1.x. It should work just fine in trunk. I'm going to work on getting trunk to compile to make doubly sure, but since the code very probably works just fine, I wanted to get it posted here, without further delay. 

> CouchDB uses _users db for storing oauth credentials
> ----------------------------------------------------
>
>                 Key: COUCHDB-1238
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1238
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Database Core
>    Affects Versions: 1.1
>            Reporter: Pete Vander Giessen
>            Assignee: Filipe Manana
>             Fix For: 1.2
>
>         Attachments: git_commits_as_patch.zip, oauth_users_db_patch.zip
>
>
> We want to store oauth credentials in the _users db, rather than in the .ini. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1238) CouchDB uses _users db for storing oauth credentials

Posted by "Filipe Manana (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13075988#comment-13075988 ] 

Filipe Manana commented on COUCHDB-1238:
----------------------------------------

Pete, I had a quick look at them.

It seems you extracted an early version that uses 2 separate views. Later on (and after having added other ubuntuone specific features), it was simplified to use a single view, that maps consumer key and access token to secrets and username. The relevant commit, branch oauth_delegation, is this one:

https://github.com/fdmanana/ubuntuone-couchdb-server/commit/83d5045f867d019345fc5fd078710eb83189b12b#L2R405

Do you think you can integrate it as well? :) Anything that's related to delegation should go away, as it's a completely different feature. I know it might be hairy to extract this optimization from the branch :(
Thanks a lot, and let me know if you need some guidance



> CouchDB uses _users db for storing oauth credentials
> ----------------------------------------------------
>
>                 Key: COUCHDB-1238
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1238
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Database Core
>    Affects Versions: 1.1
>            Reporter: Pete Vander Giessen
>             Fix For: 1.2
>
>         Attachments: git_commits_as_patch.zip
>
>
> We want to store oauth credentials in the _users db, rather than in the .ini. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira