TMAegis
mongodb 관련 규칙 더 보기

TMA-MONGODB-2.2

Ensure that MongoDB does not bypass authentication via the localhost exception

높음레벨 1자동mongodb

설명

MongoDB should not be set to bypass authentication via the localhost exception. The localhost exception allows the user to enable authorization before creating the first user in the system. When active, the localhost exception allows all connections from the localhost interface to have full access to that instance. The exception applies only when there are no users created in the MongoDB instance. Checks the YAML config file /etc/mongod.conf (SKIP when it does not exist). The localhost exception is enabled by default, so the setting must be present and false.

점검 방법

감사 방식: 파일 패턴

파일
/etc/mongod.conf
패턴
(?m)^[ \t]*enableLocalhostAuthBypass:[ \t]*['\x22]?(?:false|0)\b

조치 방법

조치 방식: 가이드 또는 인프라 패치

Add 'setParameter: {enableLocalhostAuthBypass: false}' to /etc/mongod.conf (or start mongod with --setParameter enableLocalhostAuthBypass=0) and restart mongod.

속성

운영 체제
모두
태그
mongodbauthentication
참고 자료
CIS MongoDB 8 Benchmark v2.0.0 - 2.2 Ensure that MongoDB does not bypass authentication via the localhost exception

이 호스트 점검하기

감사 권한이 있는 시스템에서 실행하세요. 스캔은 읽기 전용입니다.

shell
tmaegis scan --target mongodb