Control: Password policies for IAM users should have strong configurations
Description
This control checks whether the account password policy for IAM users have strong configurations.
Usage
Run the control in your terminal:
powerpipe control run terraform_aws_compliance.control.iam_account_password_policy_strongSnapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run terraform_aws_compliance.control.iam_account_password_policy_strong --shareSQL
This control uses a named query:
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_linefrom  terraform_resourcewhere  type = 'aws_iam_account_password_policy';