turbot/tailpipe-mod-aws-cloudtrail-log-detections

Detection: RDS DB Instance IAM Authentication Disabled

Overview

Detect when an Amazon RDS database instance had IAM database authentication disabled. Disabling IAM authentication increases the risk of credential leakage and unauthorized access by relying on static credentials. Enabling IAM authentication simplifies access management, enhances security, and aligns with best practices.

References:

Usage

Run the detection in your terminal:

powerpipe detection run aws_cloudtrail_log_detections.detection.rds_db_instance_iam_authentication_disabled

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe detection run aws_cloudtrail_log_detections.detection.rds_db_instance_iam_authentication_disabled --share

SQL

This detection uses a named query:

select
tp_timestamp as timestamp,
string_split(event_source, '.')[1] || ':' || event_name as operation,
request_parameters ->> 'dBInstanceIdentifier' as resource,
user_identity.arn as actor,
tp_source_ip as source_ip,
tp_index as account_id,
aws_region as region,
tp_id as source_id,
*
from
aws_cloudtrail_log
where
event_source = 'rds.amazonaws.com'
and event_name = 'ModifyDBInstance'
and (response_elements -> 'iAMDatabaseAuthenticationEnabled') = false
and error_code is null
order by
event_time desc;

Tags