Reputation: 35
I am trying to connect to couchbase which is installed on linux server using Spring data 2.2.8 release. Our Couchbase db is Enterprise Edition 5.0.0 build 2873.
There is cluster user id and password which i am not able to pass from AbstractCouchbaseConfiguration method and getting 401 error (Unknown ResponseStatus with Protocol HTTP: 401).
But when i tried with java sdk with below code i am able to connect successfully.
Cluster cluster = CouchbaseCluster.create(“servername”);
cluster.authenticate(“userid”, “password”);
Bucket bucket = cluster.openBucket(“bucket”);
Could you please help me to understand what i am doing wrong with Spring data.
Upvotes: 3
Views: 737
Reputation: 1894
Simply create a user with the same name as the bucket and set the password there, as I also answered in this other post.
As mentioned there, the docs should cover this and if there's anything confusing there, please click the "feedback" button and offer what could be improved!
https://developer.couchbase.com/documentation/server/5.0/security/security-authorization.html https://developer.couchbase.com/documentation/server/5.0/security/concepts-rba-for-apps.html https://developer.couchbase.com/documentation/server/5.0/security/security-resources-under-access-control.html
Upvotes: 2