TMAegis
tdsql のその他のルール

TMA-TDSQL-4.12

Ensure Connection-Control Failed-Login Delay Is Enabled

中レベル 1自動tdsql

説明

TDSQL MySQL instances integrate the upstream connection_control plugin (SQLEngine/plugin/connection_control/connection_control.cc), which imposes an increasing delay on a client connection after consecutive failed logins, mitigating brute-force attacks. Runs the mysql client against the TDSQL data node selected by TDSQL_MYSQL_OPTS (e.g. "-h10.0.0.5 -P4001 -utdsql_audit"); keep the password in ~/.my.cnf or a login path rather than MYSQL_PWD or the command line (see 1.4 and 1.5). Passes when the CONNECTION_CONTROL plugin is ACTIVE and connection_control_failed_connections_threshold is greater than 0; review the min/max connection delays against policy.

チェック方法

監査方法: SQL クエリ

sql_query
pl=$(mysql ${TDSQL_MYSQL_OPTS:-} -NBe "SELECT COUNT(*) FROM information_schema.plugins WHERE PLUGIN_NAME = 'CONNECTION_CONTROL' AND PLUGIN_STATUS = 'ACTIVE'" 2>/dev/null) || exit 1; th=$(mysql ${TDSQL_MYSQL_OPTS:-} -NBe "SELECT @@global.connection_control_failed_connections_threshold" 2>/dev/null) || exit 1; if [ "$pl" -ge 1 ] && [ "$th" -gt 0 ]; then echo compliant; else echo noncompliant; fi
期待される出力
compliant

修正方法

修正方法: ガイダンスまたは IaC パッチ

INSTALL PLUGIN CONNECTION_CONTROL SONAME 'connection_control.so'; INSTALL PLUGIN CONNECTION_CONTROL_FAILED_LOGIN_ATTEMPTS SONAME 'connection_control.so'; SET GLOBAL connection_control_failed_connections_threshold = 3; and set connection_control_min/max_connection_delay per policy.

プロパティ

オペレーティングシステム
すべて
タグ
tdsqlauthentication
参照
CIS Tencent TDSQL 10.3.22 Benchmark v1.0.0 - 4.12 Ensure Connection-Control Failed-Login Delay Is Enabled

このホストをチェック

監査が許可されているマシンで実行してください。スキャンは読み取り専用です。

shell
tmaegis scan --target tdsql