-
Notifications
You must be signed in to change notification settings - Fork 398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iam_user password management support #822
iam_user password management support #822
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just version_added
is missing for the new parameter. otherwise looks good to me.
@marknet15 I think we should also support the method |
Fresh integrations tests run following PR feedback changes:
|
Co-authored-by: Mark Chappell <mchappel@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Backport to stable-2: 💚 backport PR created✅ Backport PR branch: Backported as #833 🤖 @patchback |
iam_user password management support SUMMARY The iam module currently supports password management for IAM users, but the newer iam_user module does not currently. This PR adds the password management functionality to bring parity with the old module. To ensure the IAM user is properly created before adding a login profile, the waiter for the IAM creation has also been added. ISSUE TYPE Feature Pull Request COMPONENT NAME iam_user ADDITIONAL INFORMATION The added functionality uses the create_login_profile and update_login_profile methods: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/iam.html#IAM.Client.create_login_profile https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/iam.html#IAM.Client.update_login_profile Local integration tests run: ansible-test integration --docker centos8 -vv iam_user --allow-unsupported ... PLAY RECAP ********************************************************************* testhost : ok=92 changed=24 unreachable=0 failed=0 skipped=0 rescued=0 ignored=2 AWS ACTIONS: ['iam:AddUserToGroup', 'iam:AttachUserPolicy', 'iam:CreateGroup', 'iam:CreateLoginProfile', 'iam:CreateUser', 'iam:DeleteGroup', 'iam:DeleteLoginProfile', 'iam:DeleteUser', 'iam:DetachUserPolicy', 'iam:GetGroup', 'iam:GetUser', 'iam:ListAccessKeys', 'iam:ListAttachedGroupPolicies', 'iam:ListAttachedUserPolicies', 'iam:ListGroupsForUser', 'iam:ListMFADevices', 'iam:ListPolicies', 'iam:ListSSHPublicKeys', 'iam:ListServiceSpecificCredentials', 'iam:ListSigningCertificates', 'iam:ListUserPolicies', 'iam:ListUsers', 'iam:RemoveUserFromGroup', 'iam:TagUser', 'iam:UntagUser', 'iam:UpdateLoginProfile'] Reviewed-by: Markus Bergholz <git@osuv.de> Reviewed-by: Mark Chappell <None> Reviewed-by: None <None> (cherry picked from commit a3d940a)
[PR #822/a3d940af backport][stable-2] iam_user password management support This is a backport of PR #822 as merged into main (a3d940a). SUMMARY The iam module currently supports password management for IAM users, but the newer iam_user module does not currently. This PR adds the password management functionality to bring parity with the old module. To ensure the IAM user is properly created before adding a login profile, the waiter for the IAM creation has also been added. ISSUE TYPE Feature Pull Request COMPONENT NAME iam_user ADDITIONAL INFORMATION The added functionality uses the create_login_profile and update_login_profile methods: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/iam.html#IAM.Client.create_login_profile https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/iam.html#IAM.Client.update_login_profile Local integration tests run: ansible-test integration --docker centos8 -vv iam_user --allow-unsupported ... PLAY RECAP ********************************************************************* testhost : ok=92 changed=24 unreachable=0 failed=0 skipped=0 rescued=0 ignored=2 AWS ACTIONS: ['iam:AddUserToGroup', 'iam:AttachUserPolicy', 'iam:CreateGroup', 'iam:CreateLoginProfile', 'iam:CreateUser', 'iam:DeleteGroup', 'iam:DeleteLoginProfile', 'iam:DeleteUser', 'iam:DetachUserPolicy', 'iam:GetGroup', 'iam:GetUser', 'iam:ListAccessKeys', 'iam:ListAttachedGroupPolicies', 'iam:ListAttachedUserPolicies', 'iam:ListGroupsForUser', 'iam:ListMFADevices', 'iam:ListPolicies', 'iam:ListSSHPublicKeys', 'iam:ListServiceSpecificCredentials', 'iam:ListSigningCertificates', 'iam:ListUserPolicies', 'iam:ListUsers', 'iam:RemoveUserFromGroup', 'iam:TagUser', 'iam:UntagUser', 'iam:UpdateLoginProfile'] Reviewed-by: Markus Bergholz <git@osuv.de> Reviewed-by: None <None>
iam_user password management support SUMMARY The iam module currently supports password management for IAM users, but the newer iam_user module does not currently. This PR adds the password management functionality to bring parity with the old module. To ensure the IAM user is properly created before adding a login profile, the waiter for the IAM creation has also been added. ISSUE TYPE Feature Pull Request COMPONENT NAME iam_user ADDITIONAL INFORMATION The added functionality uses the create_login_profile and update_login_profile methods: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/iam.html#IAM.Client.create_login_profile https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/iam.html#IAM.Client.update_login_profile Local integration tests run: ansible-test integration --docker centos8 -vv iam_user --allow-unsupported ... PLAY RECAP ********************************************************************* testhost : ok=92 changed=24 unreachable=0 failed=0 skipped=0 rescued=0 ignored=2 AWS ACTIONS: ['iam:AddUserToGroup', 'iam:AttachUserPolicy', 'iam:CreateGroup', 'iam:CreateLoginProfile', 'iam:CreateUser', 'iam:DeleteGroup', 'iam:DeleteLoginProfile', 'iam:DeleteUser', 'iam:DetachUserPolicy', 'iam:GetGroup', 'iam:GetUser', 'iam:ListAccessKeys', 'iam:ListAttachedGroupPolicies', 'iam:ListAttachedUserPolicies', 'iam:ListGroupsForUser', 'iam:ListMFADevices', 'iam:ListPolicies', 'iam:ListSSHPublicKeys', 'iam:ListServiceSpecificCredentials', 'iam:ListSigningCertificates', 'iam:ListUserPolicies', 'iam:ListUsers', 'iam:RemoveUserFromGroup', 'iam:TagUser', 'iam:UntagUser', 'iam:UpdateLoginProfile'] Reviewed-by: Markus Bergholz <git@osuv.de> Reviewed-by: Mark Chappell <None> Reviewed-by: None <None> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections@a3d940a
SUMMARY
The
iam
module currently supports password management for IAM users, but the neweriam_user
module does not currently. This PR adds the password management functionality to bring parity with the old module.To ensure the IAM user is properly created before adding a login profile, the waiter for the IAM creation has also been added.
ISSUE TYPE
COMPONENT NAME
iam_user
ADDITIONAL INFORMATION
The added functionality uses the
create_login_profile
andupdate_login_profile
methods:https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/iam.html#IAM.Client.create_login_profile
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/iam.html#IAM.Client.update_login_profile
Local integration tests run: