What is the standard way to represent "business-logic users" in CouchDB? -
i'm new couchdb , still reading tutorials. question if normal way represent every user of application new database user, seems explained way everywhere look?
let's have online game many different players - create new "database user" every player registers? or make own database "players" , create sign-in logic in app? not being used document-driven db's seems strange me not distinguish between db-users , users of application...
you either way. first couchdb users
users in couchdb stored in special
_usersdatabasedatabase permissions handled special _security document. specific every database.
in security documents add users have stored in
_usersdatabase previously.
so can create database per user. before doing ask if data store in each database independent. because can't run map reduce queries across databases. if planning aggregation across data different users approach not work.
couchdb can app level authentication. since couchdb uses cookie based authentication:
- store "business logic users" in special
_usersdatabase. - authenticate _session endpoint.
- extract cookie header , sent application headers.
all logic authentication implemented couchdb. have got manipulate headers. send cookie application , when authenticating couchdb send couchdb's headers.
if prefer write entire session management in application fine too. in case store users in database , verify exist before authenticating them. database.
the benefit of using couchdb is secure default --using pbkdf2 encryption scheme encrypt passwords.
Comments
Post a Comment