Check provider logo

Cluster has authentication enabled

clusters_authentication_enabled

Severitycritical
Serviceclusters
by Prowler

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.

Run this check with Prowler CLI

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

CLI

atlas dbusers create --username <USERNAME> --password <PASSWORD> --role readWriteAnyDatabase@admin --projectId <PROJECT_ID>

Terraform
Other
  1. In the Atlas UI, open your project and go to Security > Database Access
  2. Click Add New Database User
  3. Select Username/Password, enter a username and password
  4. Assign a role (e.g., readWriteAnyDatabase on admin)
  5. Click Add User to save

This creates a database user, enabling authentication for the cluster

Source Code

Resource Type

NotDefined

References