turbot/steampipe-mod-alicloud-compliance

Control: 6.3 Ensure that 'Auditing' is set to 'On' for applicable database instances

Description

Enable SQL auditing on all RDS except SQL Server 2012/2016/2017 and MariaDB TX.

Remediation

From Console

  1. Logon to RDS Console.
  2. In the upper-left corner, select the region of the target instance.
  3. Locate the target instance, and click the instance ID.
  4. In the left-side navigation pane, select SQL Explorer.
  5. Click Activate Now.
  6. Specify the SQL log storage duration (for how long you want to keep the SQL log), and click Activate.

Usage

Run the control in your terminal:

powerpipe control run alicloud_compliance.control.cis_v100_6_3

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run alicloud_compliance.control.cis_v100_6_3 --share

SQL

This control uses a named query:

select
arn as resource,
case
when sql_collector_policy ->> 'SQLCollectorStatus' = 'Enable' then 'ok'
else 'alarm'
end as status,
case
when sql_collector_policy ->> 'SQLCollectorStatus' = 'Enable' then title || ' SQL audit enabled.'
else title || ' SQL audit disabled.'
end as reason
, account_id as account_id, region as region
from
alicloud_rds_instance;

Tags