Skip to content
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

fix: Add missing condition role_session_name when assuming a role #418

Conversation

gw0
Copy link
Contributor

@gw0 gw0 commented Aug 29, 2023

Description

For iam-assumable-role the setting role_requires_session_name = true is ignored when role_requires_mfa = false.

Motivation and Context

For the case when MFA is not enforced, the option to set the condition role_session_name when assuming a role is missing. This was probably due to the confusion caused by unnecessary code duplication (two separate policies whether MFA is enabled or not) when the feature was implemented.

Breaking Changes

No.

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

@antonbabenko antonbabenko merged commit 89d011e into terraform-aws-modules:master Aug 30, 2023
antonbabenko pushed a commit that referenced this pull request Aug 30, 2023
### [5.29.1](v5.29.0...v5.29.1) (2023-08-30)

### Bug Fixes

* Add missing condition role_session_name when assuming a role ([#418](#418)) ([89d011e](89d011e))
@antonbabenko
Copy link
Member

This PR is included in version 5.29.1 🎉

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants