Couchbase Bucket authentication error

前端 未结 1 588
一整个雨季
一整个雨季 2021-01-19 06:57

Using Couchbase 5.0 and its Java client 2.0.3, I have the following error.

Just following these instructions to open a bucket:

https://developer.couchbase.co

1条回答
  •  盖世英雄少女心
    2021-01-19 07:11

    In Couchbase Server 5.0, role-based access controls were introduced. You must now create a user with a name that matches the bucket name and use that user's password when opening the bucket. The user must have a role with access rights to the bucket.

    Cluster cluster = CouchbaseCluster.create();
    Bucket bucket = cluster.openBucket("hero", "password");
    

    See this Couchbase forum post for more information: V5.0 - NEW Role-Based Authentication - Bucket Passwords, etc

    SDK Users

    • Continue to use your current SDK versions to access buckets where there is a user, with proper permissions, with the same name as the bucket.
    • Upgrade to the latest SDK versions to access the newer Authentication and User Management functions that are now available.

    0 讨论(0)
提交回复
热议问题