按照 Cassandra 2.2 中新的基于角色的访问控制,尝试创建一个可以使用密码登录的新角色(以前的用户)失败,遵循 here 中的文档.
具体来说,以下语句提供了后续错误:
创建角色 pam,密码 = 'abc123' 且登录 = true;
InvalidRequest:code=2200 [无效查询] message="org.apache.cassandra.auth.CassandraRoleManager 不支持 PASSWORD"
上下文。全新 Cassandra 2.2 安装有 3 个节点。表 system_auth 仅包含以下表:resource_role_permissons_index role_permissions role_members 角色 -- 并且不包含旧版 auth 表,这是升级时的警告。
最佳答案
您是否在节点中使用 IAuthenticator?切换到使用PasswordAuthenticator来支持使用密码。
以下摘自 CassandraRoleManager 页面:https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/auth/CassandraRoleManager.java
Alternative IAuthenticator implementations may be used in conjunction with * CassandraRoleManager, but WITH PASSWORD = 'password' will not be supported * in CREATE/ALTER ROLE statements.
关于cassandra - 在 Cassandra 2.2 中,无法创建包含密码的角色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31820914/