Control: Ensure IAM password policy requires minimum length of 14 or greate
Description
Password policies are, in part, used to enforce password complexity requirements. IAM password policies can be used to ensure password are at least a given length. It is recommended that the password policy require a minimum password length 14.
Usage
Run the control in your terminal:
powerpipe control run terraform_aws_compliance.control.iam_account_password_policy_min_length_14
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run terraform_aws_compliance.control.iam_account_password_policy_min_length_14 --share
SQL
This control uses a named query:
select address as resource, case when (attributes_std -> 'minimum_password_length') is null then 'alarm' when (attributes_std -> 'minimum_password_length')::integer >= 14 then 'ok' else 'alarm' end as status, split_part(address, '.', 2) || case when (attributes_std -> 'minimum_password_length') is null then ' ''minimum_password_length'' is not defined' when (attributes_std -> 'minimum_password_length')::integer >= 14 then ' ''minimum_password_length'' is set and greater than 14' else ' ''minimum_password_length'' is set and less than 14' end || '.' as reason , path || ':' || start_linefrom terraform_resourcewhere type = 'aws_iam_account_password_policy';