Control: IAM users should have hardware MFA enabled
Description
Manage access to resources in the AWS Cloud by ensuring hardware MFA is enabled for the user.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.iam_user_hardware_mfa_enabled
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.iam_user_hardware_mfa_enabled --share
SQL
This control uses a named query:
select u.arn as resource, case when serial_number is null then 'alarm' when serial_number like any(array['%mfa%','%sms-mfa%']) then 'info' else 'ok' end as status, case when serial_number is null then u.name || ' MFA device not configured.' when serial_number like any(array['%mfa%','%sms-mfa%']) then u.name || ' MFA enabled, but the MFA associated is a virtual device.' else u.name || ' hardware MFA device enabled.' end as reason , u.region, u.account_idfrom aws_iam_virtual_mfa_device as m right join aws_iam_user as u on m.user_id = u.user_id;