Description
Ensure Database Auditing is turned on for each Atlas project, so that Atlas records database events such as authentication attempts, user and role changes, and schema changes for all dedicated clusters in the project. A custom filter can be used to choose which events are recorded.
Rationale
Without auditing, there is no record of who logged in to the database or changed users, roles, or collections. This makes it very hard to detect misuse or investigate incidents. Auditing provides an activity trail that supports security monitoring and compliance requirements.
Impact
Database activity is recorded for investigations
Supports compliance requirements
Auditing can affect performance and adds log volume
Default Value
By default, database auditing is turned off. It is available for M10 and higher clusters.
Pre-Requisites
Project Owner role
M10 or higher clusters
Test Plan
Log in to MongoDB Atlas at https://cloud.mongodb.com.
Select your organization and project from the menus at the top of the page.
In the sidebar, under the SECURITY heading, click Database & Network Access.
In the sidebar, click Advanced. The Advanced page displays.
Verify that Database Auditing is On.
Alternatively, run: atlas auditing describe
If auditing is off, follow the implementation steps.
Implementation Steps
Log in to MongoDB Atlas at https://cloud.mongodb.com.
Select your organization and project from the menus at the top of the page.
In the sidebar, under the SECURITY heading, click Database & Network Access.
In the sidebar, click Advanced. The Advanced page displays.
Under Database Auditing, toggle the setting to On.
Under Configure Your Auditing Filter, select the users, roles, and actions to audit, or click Use Custom JSON Filter to define your own filter.
Click Save.
Alternatively, run: atlas auditing update --enabled
Backout Plan
Log in to MongoDB Atlas at https://cloud.mongodb.com.
Select your organization and project from the menus at the top of the page.
In the sidebar, under the SECURITY heading, click Database & Network Access.
In the sidebar, click Advanced. The Advanced page displays.
Toggle Database Auditing to Off and save.
Reference