TMAegis
Plus de règles pour mariadb

TMA-MARIADB-9.2

Ensure 'MASTER_SSL_VERIFY_SERVER_CERT' is enabled

ÉlevéeNiveau 1Automatiséemariadb

Description

On the MariaDB REPLICA, the setting MASTER_SSL_VERIFY_SERVER_CERT indicates whether the REPLICA should perform server certificate verification of the PRIMARY's certificate. Checks every replication connection in SHOW ALL REPLICAS STATUS; passes on servers that are not replicas. Runs mariadb -NBe with the client defaults: as root on the server the unix_socket plugin usually authenticates; otherwise put an administrative account in ~/.my.cnf (mode 0600), not MYSQL_PWD (see 1.4/1.6).

Méthode de vérification

Méthode d'audit: Requête SQL

sql_query
out=$(mariadb -Ee "SHOW ALL REPLICAS STATUS" 2>/dev/null) || exit 1; printf '%s\n' "$out" | awk -F': ' '/Master_SSL_Verify_Server_Cert:/{if($2!="Yes")b++} END{print b?"noncompliant":"compliant"}'
Sortie attendue
compliant

Méthode de correction

Méthode de correction: Recommandation ou correctif d'infrastructure

STOP REPLICA; CHANGE MASTER TO MASTER_SSL_VERIFY_SERVER_CERT = 1; START REPLICA; (per connection name for multi-source replication).

Propriétés

Systèmes d'exploitation
Tous
Étiquettes
mariadbdatabasereplicationtls
Référence
CIS MariaDB 10.11 Benchmark v1.0.0 - 9.2 Ensure 'MASTER_SSL_VERIFY_SERVER_CERT' is enabled

Vérifier cet hôte

Exécutez cette commande sur une machine que vous êtes autorisé à auditer. L'analyse est en lecture seule.

shell
tmaegis scan --target mariadb