system databases #9

benoitc opened this Issue May 18, 2012 · 2 comments

2 participants


Hi all,

I would like to introduce a new kind of databases in the couch core. This database would take care about databases metadata, users, hooks, replications tasks and such. Something similar to postgres system catalogs:

Such databases would be only accessible by admins and HTTP resources. Normal users won't have direct access to them. Only through the HTTP API.

I'm looking for a way to name them. I don't want to prefix them by "_" to distinct db resources from normal paths.

After discussing on IRC, current choices are available:

  1. rc_* : rc for rcouch.
  2. sys_
  3. rcouch/ : wwith the problem that such path will need to be encoded for admins accessing at api level (not a big problem though)

So far 1 & 3 have my preferences. Having branding ini the name is a better than a generic name like sys there. Maybe 3 should be choosed over the 1 because it gives more informations and doesn't pollute other namespaces.

Thoughs? Please +1 your solution or provides an another :)

@benoitc benoitc was assigned May 18, 2012

'+ 1' for rc_*

I don't like idea or url encoding the slash or giving anymore meaning to db name


I like small prefixes so +1 for rc_* as well.

@benoitc benoitc added a commit that closed this issue May 18, 2012
@benoitc benoitc support system dbs. close #9 .
Systems databases are databases only available and visible by admins.
All systems databases are prefixed by `rc_` .


    $ curl -XPUT
    {"error":"unauthorized","reason":"You are not a server admin."}
    $ curl -XPUT http://admin:test@
    $ curl http://admin:test@
    $ curl
    $ curl -XPUT http://admin:test@ -d'{}'
    {"error":"file_exists","reason":"The database could not be created,
the file already exists."}
    $ curl -XPUT http://admin:test@
    $ curl -XPUT
-d'{}'{"error":"unauthorized","reason":"You are not authorized to access
this db."}
    $ curl{"error":"unauthorized","reason":"You
are not authorized to access this db."}
    $ curl http://admin:test@
@benoitc benoitc closed this in 29560d9 May 18, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment