turbot/terraform_aws_compliance

Query: iam_account_password_policy_strong

Usage

powerpipe query terraform_aws_compliance.query.iam_account_password_policy_strong

Steampipe Tables

SQL

select
address as resource,
case
when
(attributes_std -> 'minimum_password_length')::integer >= 14
and (attributes_std -> 'require_lowercase_characters')::bool
and (attributes_std -> 'require_uppercase_characters')::bool
and (attributes_std -> 'require_numbers')::bool
and (attributes_std -> 'require_symbols')::bool
and (attributes_std -> 'password_reuse_prevention')::integer >= 24
then 'ok'
else 'alarm'
end as status,
split_part(address, '.', 2) || case
when
(attributes_std -> 'minimum_password_length')::integer >= 14
and (attributes_std -> 'require_lowercase_characters')::bool
and (attributes_std -> 'require_uppercase_characters')::bool
and (attributes_std -> 'require_numbers')::bool
and (attributes_std -> 'require_symbols')::bool
and (attributes_std -> 'password_reuse_prevention')::integer >= 24
then ' Strong password policies configured'
else ' Strong password policies not configured'
end || '.' as reason
, path || ':' || start_line
from
terraform_resource
where
type = 'aws_iam_account_password_policy';

Controls

The query is being used by the following controls: