cassandra 鉴权
2024-10-10 17:51:05
1. 修改cassandra.yaml配置文件。启用用户密码登录形式。
authenticator: PasswordAuthenticator
authorizer: CassandraAuthorizer
2. 启动cassandra,cqlsh工具使用默认角色cassandra/cassandra登录。
./cqlsh 191.0.0.101 -u cassandra -p cassandra
3. 创建超级用户,密码。
CREATE ROLE root WITH PASSWORD = 'root' AND LOGIN = true AND SUPERUSER = true;
4. 使用超级用户登录。
./cqlsh 191.0.0.101 -u root -p root
5. 安全起见,删除默认用户cassandra。
drop user cassandra;
6. 创建普通用户。
CREATE ROLE xxx WITH PASSWORD = 'xxx' AND LOGIN = true;
7. 为普通用户授权。
GRANT CREATE ON KEYSPACE nnel TO xxx;
GRANT ALTER ON KEYSPACE nnel TO xxx;
GRANT DROP ON KEYSPACE nnel TO xxx;
GRANT SELECT ON KEYSPACE nnel TO xxx;
GRANT MODIFY ON KEYSPACE nnel TO xxx;
8. 查看用户权限。
LIST ALL PERMISSIONS OF xxx;
最新文章
- mysql安装及配置服务
- ubuntu下安装mysql及卸载mysql方法
- linux install matlab2014a
- Linux 设置定时任务crontab命令
- LeetCode:Move Zeroes
- HDU 4681 String 最长公共子序列
- jQuery 的 $(";someobjectid”).event() 的绑定
- 使用PHP脚本来写Daemon程序
- swift和 oc 混编2-备
- Deep Learning(深度学习)学习笔记整理系列之(六)
- 2的幂次方(power)
- 浅谈EL
- RadioButton与监听
- String字符串的操作
- 2018-09-13 代码翻译尝试-使用Roaster解析和生成Java源码
- IIS的启动与停止命令
- Spark机器学习(上)
- Java 多线程重排序的探究
- Android studio 中,遇到报错:ERROR: x86_64 emulation currently requires hardware acceleration! CPU acceleration status:HAXM must be updated(version 1.1.1<;6.0.1)的解决方法
- React Native 组件之TouchableHightLight