Description
For an IAM user who needs console access, use LoginProfile.PasswordResetRequired to require a change at first sign-in. A console login profile is unnecessary for other users.
Potential impact
If the initial password stays valid, someone who saw it during delivery may be able to use it.
Remediation
Deliver a unique initial password that meets the account policy. Verify the user can change their own password and sign in. Use MFA, least privilege and, where possible, federated access. Manage access keys separately.
Examples
Define the omitted InitialPassword input securely, for example as a NoEcho parameter with no default. Keep its value out of Metadata and Outputs.
Before
Resources:
MyUser:
Type: AWS::IAM::User
Properties:
LoginProfile:
Password: !Ref InitialPassword
PasswordResetRequired: false
After
Resources:
MyUser:
Type: AWS::IAM::User
Properties:
LoginProfile:
Password: !Ref InitialPassword
PasswordResetRequired: true
Both excerpts reference the same input. The second, with PasswordResetRequired: true, requires the user to change the password at sign-in.