DMS endpoints for MongoDB should have an authentication mechanism enabled
Checks that a DMS endpoint for a MongoDB source uses password authentication rather than none, so only a MongoDB user with valid credentials can read the data being migrated and the password is protected by the authentication mechanism.
- service
- DMS
- severity
- Medium
- scope
- evaluated in every region
How to fix it
- Can break clients: Tasks reading from this endpoint fail to connect until that user exists in MongoDB with read access, so run Test connection before restarting them.
In the console
Database Migration Service → Endpoints → the endpoint → Modify
- Authentication mode
- password
- User name and password
- A MongoDB user that can read the databases being migrated
- Authentication mechanism
- default, which is scram_sha_1 (SCRAM-SHA-1); mongodb_cr exists only for backward compatibility
- Authentication source
- The MongoDB database that holds the user's credentials, admin by default
With the AWS CLI
aws dms modify-endpoint --endpoint-arn <endpoint-arn> --username <user-name> --password <password> --mongo-db-settings AuthType=password --region <region>With Terraform
resource "aws_dms_endpoint" "this" {
endpoint_id = var.endpoint_id
endpoint_type = "source"
engine_name = "mongodb"
username = var.mongodb_username
password = var.mongodb_password
mongodb_settings {
auth_type = "password"
}
}
See which of your accounts this check is failing on.
Book a live scan