説明
min_pw_length は IAM ユーザーのコンソールパスワードの最小文字数です。カスタムポリシーでは 6~128 文字を指定できます。ルートユーザーのパスワードとアクセスキーは対象外です。
想定される影響
最小文字数が少ないと、推測しやすいパスワードを設定できる場合があります。引き上げた基準は既存ユーザーが次にパスワードを変更するときに適用されます。
対処方法
min_pw_length または別名の minimum_password_length に組織の基準を指定してください。適用されている文字数と文字種の条件を確認し、コンソールユーザーには MFA を要求します。
例
変更前
yaml
- name: IAM パスワードポリシーを設定する
community.aws.iam_password_policy:
state: present
require_symbols: false
require_numbers: true
require_uppercase: true
require_lowercase: true
allow_pw_change: true
pw_max_age: 60
pw_reuse_prevent: 5
pw_expire: false
- name: IAM パスワードポリシーの別の設定例
community.aws.iam_password_policy:
state: present
min_pw_length: 6
require_symbols: false
require_numbers: true
require_uppercase: true
require_lowercase: true
allow_pw_change: true
pw_max_age: 60
pw_reuse_prevent: 5
pw_expire: false
変更後
yaml
- name: IAM パスワードポリシーを設定する
community.aws.iam_password_policy:
state: present
min_pw_length: 8
require_symbols: false
require_numbers: true
require_uppercase: true
require_lowercase: true
allow_pw_change: true
pw_max_age: 60
pw_reuse_prevent: 5
pw_expire: false
変更前の 2 つのタスクは、モジュールの既定値である 6 文字を使うか、6 文字を明示しています。変更後は例として 8 文字を指定します。