Couchbase Bucket authentication error(Couchbase 存储桶身份验证错误)
问题描述
使用 Couchbase 5.0 及其 Java 客户端 2.0.3,出现以下错误.
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.com/documentation/server/current/sdk/java/managing-connections.html
如上所述,使用基本的本地配置,只需两行代码:
As explained, with a basic local configuration, it's just a matter of two lines of code:
这应该会打开 localhost 集群(实际上是这样),然后打开一个名为hero"的存储桶,它实际上存在于我的 Couchbase 服务器中.
That should open the localhost cluster (it actually does) and afterwards open a bucket called "hero", which actually exists in my Couchbase server.
但是,我不断收到以下错误:
Nevertheless, I keep getting the following error:
不知何故,它正在询问存储桶的密码.但是Couchbase的bucket级别没有密码配置.
Somehow it's asking a password for the bucket. But there is no configuration of password at bucket levels in Couchbase.
有人知道吗?
推荐答案
在 Couchbase Server 5.0 中,引入了基于角色的访问控制.您现在必须创建一个名称与存储桶名称匹配的用户,并在打开存储桶时使用该用户的密码.用户必须具有对存储桶具有访问权限的角色.
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.
有关更多信息,请参阅此 Couchbase 论坛帖子:V5.0 - 新的基于角色的身份验证 - 存储桶密码等
See this Couchbase forum post for more information: V5.0 - NEW Role-Based Authentication - Bucket Passwords, etc
SDK 用户
- 继续使用您当前的 SDK 版本访问存在用户、具有适当权限且与该存储桶同名的存储桶.
- 升级到最新的 SDK 版本以访问现在可用的更新的身份验证和用户管理功能.
这篇关于Couchbase 存储桶身份验证错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!