Apache Cassandra
TMA-CASSANDRA-3.1
Ensure the cassandra and superuser roles are separate
高级别 1自动化cassandra
说明
The default installation of Cassandra includes a superuser role named cassandra. This necessitates the creation of a separate role to be the superuser role. Runs cqlsh against CQLSH_HOST/CQLSH_PORT (default 127.0.0.1:9042) with credentials from ~/.cassandra/cqlshrc ([authentication] username/password) of a superuser. Passes when the default cassandra role is not a superuser; also review the remaining superuser roles (3.8).
检查方式
审计方法: SQL 查询
sql_query
out=$(cqlsh -e 'SELECT role FROM system_auth.roles WHERE is_superuser = True ALLOW FILTERING;' 2>/dev/null) || exit 1; printf '%s\n' "$out" | grep -cE '^[[:space:]]*cassandra[[:space:]]*$' || true- 预期输出
0
修复方式
修复方法: 操作指南或基础设施补丁
CREATE ROLE <admin> WITH PASSWORD = '<strong>' AND LOGIN = true AND SUPERUSER = true; GRANT ALL PERMISSIONS ON ALL KEYSPACES TO <admin>; log in as it and run ALTER ROLE cassandra WITH SUPERUSER = false AND LOGIN = false;
属性
- 操作系统
- 任意
- 标签
- cassandraauthenticationprivileges
- 参考
- CIS Apache Cassandra 5.0 Benchmark v1.1.0 - 3.1 Ensure the cassandra and superuser roles are separate
检查本机
请在您有权审计的机器上运行此命令。扫描为只读操作。
shell
tmaegis scan --target cassandra