Apache Cassandra
TMA-CASSANDRA-3.1
Ensure the cassandra and superuser roles are separate
Description
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).
Méthode de vérification
Méthode d'audit: Requête SQL
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- Sortie attendue
0
Méthode de correction
Méthode de correction: Recommandation ou correctif d'infrastructure
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;
Propriétés
- Systèmes d'exploitation
- Tous
- Étiquettes
- cassandraauthenticationprivileges
- Référence
- CIS Apache Cassandra 5.0 Benchmark v1.1.0 - 3.1 Ensure the cassandra and superuser roles are separate
Vérifier cet hôte
Exécutez cette commande sur une machine que vous êtes autorisé à auditer. L'analyse est en lecture seule.
tmaegis scan --target cassandra