Couchbase bucket with password is not working in couchbase server 4.0

@balaji.j @rafael.felix @simonbasle -

QueryRequest.AddCredentials won’t work until MB-16964 is fixed on the server, however the workaround is to just use the bucket credentials and limit your query scope to the bucket you are authenticated against:


So, basically this:

bucket = _cluster.OpenBucket("mybucket", CouchbaseBucketPassword);
var result = bucket.Query(new QueryRequest("SELECT * FROM `mybucket`;"));

is all you need to do to query against an authenticated bucket assuming your client version >= 2.2.4.

-Jeff