Ensure AWS IAM password policy has a symbol

Error: AWS IAM password policy does not have a symbol

Bridgecrew Policy ID: BC_AWS_IAM_7
Checkov Check ID: CKV_AWS_14
Severity: MEDIUM

AWS IAM password policy does not have a symbol

Description

Password policies are used to enforce the creation and use of password complexity. Your IAM password policy should be set for passwords to require the inclusion of different character types. The password policy should enforce passwords contain at least one symbol, this increases security, especially from a brute force attack.

Fix - Runtime

AWS Console

To change the password policy in the AWS Console you will need appropriate permissions to View Identity Access Management Account Settings.
go
To manually set the password policy with a minimum length, follow these steps:

  1. Log in to the AWS Management Console as an IAM user at https://console.aws.amazon.com/iam/.
  2. Navigate to IAM Services.
  3. On the Left Pane click Account Settings.
  4. Select Require at least one non-alphanumeric character.
  5. Click Apply password policy.

CLI Command

To change the password policy, use the following command:

aws iam update-account-password-policy --require-symbols

Fix - Buildtime

Terraform

resource "aws_iam_account_password_policy" "strict" {
  minimum_password_length        = 8
  require_lowercase_characters   = true
  require_numbers                = true
  require_uppercase_characters   = true
  require_symbols                = true
  allow_users_to_change_password = true
}

📘

Note

All commands starting with aws iam update-account-password-policy can be combined into a single command.