MariaDB
TMA-MARIADB-4.9
Enable data-at-rest encryption in MariaDB
설명
Data-at-rest encryption protects the privacy of your information, prevents data breaches and helps meet regulatory requirements. Fails when any *ENCRYPT* server variable is OFF, or InnoDB reports no tablespaces or any unencrypted tablespace in INNODB_TABLESPACES_ENCRYPTION. Backup encryption is not checked. 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).
점검 방법
감사 방식: SQL 쿼리
out=$(mariadb -NBe "SELECT IF((SELECT COUNT(*) FROM information_schema.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE '%ENCRYPT%' AND VARIABLE_VALUE = 'OFF') = 0 AND (SELECT COUNT(*) FROM information_schema.INNODB_TABLESPACES_ENCRYPTION) > 0 AND (SELECT COUNT(*) FROM information_schema.INNODB_TABLESPACES_ENCRYPTION WHERE ENCRYPTION_SCHEME = 0) = 0, 'compliant', 'noncompliant')" 2>/dev/null) || exit 1; printf '%s\n' "$out"- 예상 출력
compliant
조치 방법
조치 방식: 가이드 또는 인프라 패치
Configure a key management plugin (e.g. file_key_management with an encrypted key file under /etc/mysql/encryption, mysql:mysql, mode 640), then under [mariadbd] set innodb_encrypt_tables=ON, innodb_encrypt_log=ON, innodb_encrypt_temporary_tables=ON, encrypt_binlog=ON, encrypt_tmp_files=ON, encrypt_tmp_disk_tables=ON, aria_encrypt_tables=ON, innodb_encryption_threads=4; restart, and encrypt backups (e.g. mariabackup | openssl enc).
속성
- 운영 체제
- 모두
- 태그
- mariadbdatabaseencryption
- 참고 자료
- CIS MariaDB 10.11 Benchmark v1.0.0 - 4.9 Enable data-at-rest encryption in MariaDB
이 호스트 점검하기
감사 권한이 있는 시스템에서 실행하세요. 스캔은 읽기 전용입니다.
tmaegis scan --target mariadb --level 2