TMAegis
More rules for tdsql

TMA-TDSQL-4.8

Ensure High-Risk Parameters Cannot Be Arbitrarily Modified via `SET GLOBAL`

MediumLevel 2Manual reviewtdsql

Description

Users with the SUPER or SYSTEM_VARIABLES_ADMIN privilege can modify system variables online via SET GLOBAL, including security-related parameters (such as sql_mode, read_only).

How it is checked

Audit method: Manual review

This recommendation cannot be checked automatically. A scan lists it with these instructions when you pass --include-manual.

Run SELECT User, Host FROM mysql.user WHERE Super_priv = 'Y' AND User NOT LIKE 'tdsqlsys%'; and check SYSTEM_VARIABLES_ADMIN grants (SELECT * FROM mysql.global_grants WHERE PRIV = 'SYSTEM_VARIABLES_ADMIN'). Only TDSQL system accounts may hold them; with audit logging enabled, review the audit trail for unexpected SET GLOBAL statements.

How it is fixed

Fix method: Guidance or infrastructure patch

1. Allow only TDSQL system accounts (tdsqlsys_*) to hold the SUPER privilege. 2. Have business accounts modify parameters uniformly through the OSS management interface. 3. Enable audit logging of SET GLOBAL operations.

Properties

Operating systems
Any
Tags
tdsqlprivileges
Reference
CIS Tencent TDSQL 10.3.22 Benchmark v1.0.0 - 4.8 Ensure High-Risk Parameters Cannot Be Arbitrarily Modified via `SET GLOBAL`