6

I'm only just starting to learn Couchbase. I'd like to set up a username/password combination to be able to use within my node.js app to connect to a particular bucket - I've been looking around on the net but am finding so little information that I'm starting to think that I've got this all wrong.

Is it possible to set up user accounts within couchbase clusters that have bucket-specific privileges?

Thanks

Katya S
  • 1,321
  • 3
  • 17
  • 31

1 Answers1

10

Let's start from the beginning. First of all couchbase has one (only one at this time) administrator account. It can access all buckets, create and delete them. It's like superuser account (i.e. in PostgreSql it called postgres by default).

Now let's move on to buckets. Bucket is some analogue of database in RDBMS. It also has username and password (note, that bucket username = bucket name). So client that authorize using bucket name and bucket password can only access to operations to this bucket. Usally one application needs only one bucket.

So if you're looking for possibility to create one couchbase user that can access some subset of buckets - there is no option for this (at least now). Now it's only possible to use admin account to access all buckets and one individual account per bucket.

m03geek
  • 2,508
  • 1
  • 21
  • 41
  • Just what I needed to know, thank you! Bucket-level access control is good enough for me. I just went to have a look at the web admin interface, and in the bucket cannot find anywhere where you'd set a password - do you know how/where to do it? Thank you – Katya S Dec 03 '13 at 10:09
  • Bucket password is set when you [create bucket](http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-admin-web-console-data-buckets-createedit.html). In "Access control" select "Standart port" and fill password input. – m03geek Dec 03 '13 at 11:39