Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to hash BrowserID usernames #5

Open
gertcuykens opened this issue Nov 1, 2011 · 1 comment
Open

Add option to hash BrowserID usernames #5

gertcuykens opened this issue Nov 1, 2011 · 1 comment

Comments

@gertcuykens
Copy link

If you hash the name how can you know which one you need to assign other roles too?

{
"type": "user",
"name": "22sda98s7das9t9t6a9sd6atsd9t97asdt7",
"roles": ["browserid","admin"],
"salt": "1d57abebf2c94fb0a851dad9ae372ea2",
"browserid": true
}

is it not better to just make _users not accessible

@jhs
Copy link
Member

jhs commented Nov 6, 2011

I think there are workarounds for all of this; however, ultimately the only solution IMO is to make _users inaccessible. I have not confirmed, but I believe there might also be problems with couches sharing subsets of each others' users databases. If I trust you and you trust me, then I should be able to replicate down all of your users docs from e.g. the @example.com domain. If the hash is based on a per-server salt, then document IDs will not be identical, and so that won't work.

Closing off the _users db works really well with this plugin. CouchDB will open the _users database (as an admin) for two reasons:

  1. When you try to authenticate, it will check against your doc
  2. When you create a BrowserID account

The major reason to leave _users open is for account creation, and BrowserID obviates that.

Even account creation can occur with a private _users database, if I can get my inbox db patch merged into Apache CouchDB: https://issues.apache.org/jira/browse/COUCHDB-1287 then people can still drop new accounts in the DB but not read them back, and thus not be able to enumerate users and email addresses on the system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants