Couchbase Server Login Authentication


#1

I tried to use the following code to make the DB connection between my web application to Couchbase DB server and the result is successfully.

// Connect to localhost
Cluster cluster = CouchbaseCluster.create();

// Open the default bucket and the “beer-sample” one
Bucket defaultBucket = cluster.openBucket();
Bucket beerSampleBucket = cluster.openBucket(“beer-sample”);

// Disconnect and clear all allocated resources
cluster.disconnect();

Currently, I just need to provide the server and bucket names for making the DB connection between my App.

My question is, do we need to setup a login account for the DB login authentication?


#2

Hey @saitat,

In the Couchbase Server administrator dashboard, you’re able to assign passwords to your Couchbase buckets. If you’ve chosen to do this, then in your application layer you would provide a bucket password in addition to your server address and bucket name.

Does this answer your question?

Best,


#3

Yes , this is what I want, many thanks…

How about couchbase lite, is there any password protected feature too?


#4

Are you asking about CB Lite or Sync Gateway?

Regarding Sync Gateway, there are 2 ports you can connect to. 4984 is the public port exposed to the internet and 4985 the admin port only accessible on the internal network where SG is running. If you have an app server that connects to 4985, the easiest is to deploy it alongside SG. If you need to connect to port 4985 from the public network you can use ssh tunnelling.

James


#5

I’m asking CB lite with password protection, thanks


#6

Ah ok. There’s no password to access the database.
There is an experimental feature on iOS to encrypt the database, see this guide for more info.
This feature is not available in the .NET/Android SDK yet.

James


#7

OK…So there is no CB lite encrypt feature on .NET/Android at this moment?