MongoDB Atlas clusters enforce database authentication for client connections (authEnabled).
Identifies clusters where authentication is not required for access.
Risk
Without authentication, anyone with network reach can access the database, compromising confidentiality and integrity. Attackers can exfiltrate data, modify or delete records, and create backdoor users, leading to outages and data loss that impact availability.
prowler mongodbatlas --checks clusters_authentication_enabled
Recommendation
Enable and enforce database authentication on all clusters.
- Prefer strong methods (X.509, OIDC, AWS IAM) over static passwords
- Grant least privilege roles and avoid shared accounts
- Rotate credentials/keys
- Combine with IP access lists or private endpoints for defense in depth
Remediation
atlas dbusers create --username <USERNAME> --password <PASSWORD> --role readWriteAnyDatabase@admin --projectId <PROJECT_ID>
- In the Atlas UI, open your project and go to Security > Database Access
- Click Add New Database User
- Select Username/Password, enter a username and password
- Assign a role (e.g., readWriteAnyDatabase on admin)
- Click Add User to save
This creates a database user, enabling authentication for the cluster
Source Code
Resource Type
NotDefined