Profile Applicability: Level 1
IAM policy is a document that allows or denies permission to AWS service and resources. IAM also maintains the password policies. IAM password policies can prevent the reuse of a given password by the same user. It is recommended that the password policy prevent the reuse of passwords. IAM enables you to manage access to AWS services resources securely, It gives you the flexibility to configure access based on your company’s specific operational and security needs. It fixes the policies for the authentication for users, groups, and roles.
Use the same previous password or reuse the password may be vulnerable it increases the account resiliency against brute force login attempts.
By rotating the console password periodically it helps in preventing the use of the previous passwords and enhancing security.
By default, AWS will have only a few password policy and if you want to make custom policies you can follow the remediation steps.
Before starting the configuration of the IAM password policy we need to keep in mind the following:
Avoid the login through the Root user.
Only authorized persons (i.e, admins) can access the IAM console.
Using AWS Console
Login to AWS Console
Go to IAM Service on the AWS Console https://console.aws.amazon.com/iam/
Click on Account Settings on the Left Pane
Check the list of policies shown under Password policy section to know whether the particular policy is enabled or not
Using AWS CLI:
- Run the following commands to view the password policy
aws iam get-account-password-policy
Perform the following to set the password policy as prescribed:
- Log in to AWS account with Admin access
- Go to IAM Service on the AWS Console https://console.aws.amazon.com/iam/
- Click on Account Setting on the left navigation pane, under Identity and Access Management(IAM) Dashboard
- We see password policy click on change button
- After clicking on the change you will be directed to Modify password policy panel, there click on the check box as shown in the image which prevents password reuse, and here we can set the remember passwords to “24” (We recommend you to set it to 24 but you can change it ranging from 1-24 as per your security concern) and click on save changes button
Using AWS CLI:
aws iam update-account-password-policy --password-reuse-prevention 24
If you want to proceed with previous settings go through the Implementation steps section and uncheck the prevent password reuse option. Or else if you just want to change remember password value go through the Implementation steps section and in the option where you want to choose to remember the password value give the previous value or value you want to change.
4.4 Use Unique Passwords
- Where multi-factor authentication is not supported (such as local administrator, root, or service accounts), accounts will use passwords that are unique to that system.