turbot/steampipe-mod-aws-compliance

Control: DMS endpoints for MongoDB should have an authentication mechanism enabled

Description

This control checks whether an AWS DMS endpoint for MongoDB is configured with an authentication mechanism. The control fails if an authentication type isn't set for the endpoint.

Usage

Run the control in your terminal:

powerpipe control run aws_compliance.control.dms_endpoint_mongo_db_authentication_enabled

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run aws_compliance.control.dms_endpoint_mongo_db_authentication_enabled --share

SQL

This control uses a named query:

select
arn as resource,
case
when endpoint_type <> 'SOURCE' then 'skip'
when mongo_db_settings is null then 'skip'
when (mongo_db_settings ->> 'AuthMechanism') = 'default' then 'alarm'
else 'ok'
end as status,
case
when endpoint_type <> 'SOURCE' then title || ' endpoint is not of source type.'
when mongo_db_settings is null then title || ' endpoint is not of mongodb engine type.'
when (mongo_db_settings ->> 'AuthMechanism') = 'default' then title || ' authentication mechanism disabled.'
else title || ' ' || (mongo_db_settings ->> 'AuthMechanism') || ' authentication mechanism enabled.'
end as reason
, region, account_id
from
aws_dms_endpoint;

Tags