TMA-MONGODB-2.3
Ensure authentication is enabled in the sharded cluster
Mô tả
Authentication is enabled in a sharded cluster when the certificate or key files are created and configured for all components. This ensures that every client that accesses the cluster must provide credentials, to include MongoDB instances that access each other within the cluster. Checks the YAML config file /etc/mongod.conf (SKIP when it does not exist). The benchmark requires x.509 membership authentication (keyFile is accepted only for development); applies to sharded clusters and replica sets.
Cách kiểm tra
Phương pháp kiểm tra: Mẫu tệp
- Tệp
/etc/mongod.conf- Mẫu khớp
(?m)^[ \t]*clusterAuthMode:[ \t]*['\x22]?x509\b
Cách khắc phục
Phương pháp khắc phục: Hướng dẫn hoặc bản vá hạ tầng
On every member configure net.tls (mode: requireTLS, certificateKeyFile, CAFile, clusterFile) and security.clusterAuthMode: x509, then perform a rolling restart.
Thuộc tính
- Hệ điều hành
- Bất kỳ
- Thẻ
- mongodbauthenticationcluster
- Tham chiếu
- CIS MongoDB 8 Benchmark v2.0.0 - 2.3 Ensure authentication is enabled in the sharded cluster
Kiểm tra máy này
Chạy lệnh này trên máy bạn được phép kiểm tra. Lần quét chỉ ở chế độ đọc.
tmaegis scan --target mongodb --level 2