How to change IAM Account using another account's Access Key?
87
Created On 11/10/26 11:00 AM - Last Modified 11/10/26 12:58 PM
Objective
There are security requirements where Access Key is not required to be created for IAM Console access only accounts. As such can create IAM one account with Access Keys just for the purpose of change passwords for IAM Console access accounts.
Environment
10.1;10.2;10.3;10.4;10.5;10.6;10.7;10.8
Procedure
Steps to be performed in IAM Management Console:
- Create a Policy with the following permissions:
- UpdateLoginProfile
- ChangePassword
- GetAccountPasswordPolicy
- Set the resource to all Users
- Create an IAM account which would be used to change other IAM account passwords
- When selecting Access Type, choose both Programmatic access and AWS Management Console access
- Set/Auto generate a password and assign the policy create in point 1
- Create an Access Key for this account.
- Onboard an existing IAM Console only access account
- Onboard the IAM account and Access Key created earlier
- You may associate the account in point 2 as a Reconcile account in the Account details page or Platform policy
- Go the AWS platform used for the account in Point 1 and add Additional Policy Settings under Automatic Password Management
- Set ChangePasswordInResetMode to Yes and save the Platform policy
If you enable Debug for the Platform, you would see that CPM would perform reconcile instead in the debug log:
Info -> XMLAccountCreator :: CreateAccount() -> ReconcileAccount has been assigned
..
Info -> PluginWrapper :: RunPlugin() -> About to perform: 'reconcilepass' action
..
Info -> PluginWrapper :: RunPlugin() -> --------------------------------- Plugin Section Start ----------------------------
Info -> Reconcile :: run() -> reconcilepass action class - Start
Info -> BaseAction :: isValidExtraPassAccountIsAssinged() -> Extra account was assigned
..
Reconcile :: ReconcilePassword() -> Reconcile password process finished successfully.