javascript - How to handle users in `_users` database with many applications in the same CouchDB instance? -


according matt woodward's blog, in the definitive guide couchdb authentication , security points out things couchdb i'm not sure understand completly.

  1. he says:

    "basically way security works in couchdb users stored in _users database (or elsewhere if like; can changed in config file)...".

so, users of whole couchdb stored in single database, right? means if have more 1 application running in different databases within same couchdb i'd have handle users want access both application, correct?

  1. he says

    "database readers can read documents , views on specific database, , have no other permissions".

    then, adds

    "by default databases read/write enabled anonymous users, if define database admins on database".

so anonymous users can or can't read documents in specific database?

i'll start out saying articles, while still informative, several years old , possibly outdated. recommend reading through official documentation if trying learn couchdb.

now answer question. (more information security here , here)

in couchdb, security can incrementally build developing application. default open, , lock things down adding configuration. (in think pretty intuitive fashion)

by default, couchdb in "admin party" mode, means can read , write anything. (because every user, including anonymous users, treated admins)

once add any admin users server, (via configuration, not _users database) party over. means actions can only performed admin's you've explicitly defined. (such creating databases, setting config, etc)

in state, anonymous users can still read/write normal documents in database has been created. (design documents can modified admins) if ready start locking down individual databases, can specifying users/roles in security object given database.

when people use term "database reader", mean user has been added "member" in security object. (either username, or role) specifying members or admins in security object database, users have permissions inside database, others disallowed.

to summarize, anonymous users can read/write default. once admin designated, security tightens , actions can done admin. if specify database members/admins, security database tightens more, allowing users read database.


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -