You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Thomas GUILLET <gu...@gmail.com> on 2017/01/11 11:52:48 UTC

CouchDB per user

Hi all,

I am trying to set up CouchDB 2.0 with couchdb_peruser enabled. I saw (in
previous email in the archive) that it haven't been tested with 2.0. At the
same time, tests are passing but when using CouchDB normally user creation
does not trigger a database creation.

I investigated the logic behind and the mechanisms is only working when
users are added to the node-only _users database. Users added to the
cluster are not watched for systematic database creation.

The current set up is relatively strange, as user databases (userdb-xxxx)
are added to the cluster but not to the local node (they are sharded).

Currently, couch_peruser relies on couch_changes:handle_db_changes which is
local-node specific and I do not find an equivalent for the cluster.

I hack together an updated version of couch_peruser that spawn_opt an
couch_changes:handle_db_changes for each local shard of the cluster
authentication_db.

Would that approach be ok ?
It there any point in keeping the current logic working ? (Local users but
clustered user dbs.)

I am pretty new at CouchDB and at Erlang so pardon my basic understanding
of the different mechanisms.


Thanks a lot,
Thomas