Skip to main content

More Info:

Checks if an Amazon DocumentDB (with MongoDB compatibility) instance cluster has CloudWatch log export enabled for audit logs. The rule is NON_COMPLIANT if an Amazon DocumentDB instance cluster does not have CloudWatch log export enabled for audit logs.

Risk Level

Low

Address

Configuration, Monitoring

Compliance Standards

  • APRA CPS 234 (Australia)
  • BSI C5 (Germany)
  • Brazil LGPD
  • CCPA / CPRA (California)
  • CIS Critical Security Controls v8
  • CMMC 2.0
  • CSA Cloud Controls Matrix v4
  • DPDPA
  • Digital Operational Resilience Act (EU)
  • Essential 8
  • GDPR
  • HIPAA
  • ISO 27001
  • ISO/IEC 27017
  • ISO/IEC 27018
  • ISO/IEC 27701
  • KSA PDPL
  • MAS Technology Risk Management (Singapore)
  • MITRE ATT&CK (Cloud)
  • NIS2 Directive
  • NIST SP 800-171
  • NYDFS 23 NYCRR 500
  • SWIFT Customer Security Controls Framework
  • Sarbanes-Oxley IT General Controls
  • Securities and Exchange Board of India (SEBI) - Cloud Security Adoption Framework
  • UK NCSC Cyber Assessment Framework

Triage and Remediation

Remediation

Using Console

To remediate the DocDB Cluster Audit Logging misconfiguration for AWS RDS using the AWS console, follow these step-by-step instructions:
  1. Sign in to the AWS Management Console: Go to https://aws.amazon.com/ and sign in to the AWS Management Console using your credentials.
  2. Navigate to Amazon RDS Console: Once you are logged in, navigate to the Amazon RDS console by clicking on the “Services” dropdown menu at the top of the page and selecting “RDS” under the “Database” category.
  3. Select the Amazon DocumentDB Cluster: In the Amazon RDS console, locate and select the Amazon DocumentDB cluster for which you want to enable audit logging.
  4. Enable Audit Logging:
    • In the cluster details page, click on the “Modify” button in the upper right corner.
    • Scroll down to the “Database options” section.
    • Under the “Audit log configuration” section, select “Enable” for the “Audit log” option.
    • Choose the desired settings for the audit log, such as the S3 bucket where the logs will be stored, the IAM role that has permission to write to the bucket, and the KMS key for encryption (if needed).
    • Click on the “Continue” button.
  5. Apply Changes: Review the changes you have made in the “Summary of modifications” section. If everything looks correct, click on the “Modify cluster” button to apply the changes.
  6. Monitor Audit Logging Status: Once the modifications are applied, monitor the status of the audit logging configuration in the Amazon DocumentDB cluster details page. The status should change to “applying” and then “active” once the audit logging is successfully enabled.
By following these steps, you will remediate the misconfiguration by enabling audit logging for your Amazon DocumentDB cluster in AWS RDS using the AWS console.

To remediate the misconfiguration of DocDB Cluster Audit Logging not being enabled for AWS RDS using AWS CLI, follow these steps:
  1. Enable Logging for the Amazon DocumentDB Cluster: Run the following AWS CLI command to enable audit logging for your Amazon DocumentDB cluster. Replace cluster-identifier with the actual identifier of your DocumentDB cluster.
  2. Verify the Audit Logging Configuration: Run the following command to verify that the audit logging configuration has been successfully updated for your DocumentDB cluster.
    This command should return an array with the value [ "audit" ], indicating that audit logging has been enabled.
  3. Monitor the CloudWatch Logs: Once the audit logging is enabled, you can monitor the logs in CloudWatch Logs to ensure that all the database activities are being logged appropriately.
By following these steps, you can remediate the misconfiguration of DocDB Cluster Audit Logging not being enabled for AWS RDS using AWS CLI.
To remediate the misconfiguration of DocDB Cluster Audit Logging not being enabled for AWS RDS using Python, you can follow these steps:
  1. Import the necessary Python libraries, such as boto3, which is the AWS SDK for Python.
  1. Initialize the AWS RDS client using the boto3.client method.
  1. Identify the DocDB Cluster for which you want to enable audit logging. You can do this by specifying the DBClusterIdentifier of the DocDB Cluster.
  1. Enable audit logging for the DocDB Cluster by calling the modify_db_cluster method of the RDS client with the EnableCloudwatchLogsExports parameter set to include 'audit'.
  1. Verify that the audit logging has been enabled successfully by checking the response from the modify_db_cluster API call.
By following these steps and running the Python script, you can remediate the misconfiguration of DocDB Cluster Audit Logging not being enabled for AWS RDS.
Enabling audit_logs in the parameter group will affect all clusters that use that group; if you currently share it, create and attach a dedicated parameter group as shown above. These changes are in-place (no Terraform-forced replacement of the cluster), though some settings may apply after a pending-reboot.To verify, terraform plan should show:
  • an aws_docdb_cluster_parameter_group with parameter.audit_logs changing to "enabled" (or being created with that value), and
  • the aws_docdb_cluster gaining/setting enabled_cloudwatch_logs_exports = ["audit"] and (if needed) updating db_cluster_parameter_group_name to the new group.