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: role session name #140

Merged
merged 4 commits into from
Jun 21, 2023
Merged

fix: role session name #140

merged 4 commits into from
Jun 21, 2023

Conversation

brivu
Copy link
Contributor

@brivu brivu commented Jun 20, 2023

Currently, job name containing white spaces is valid in CircleCI. However, the assume-role-with-web-identity command uses the job name as the default value for the role-session-name parameter that gets passed to the aws cli.

The issue is that the aws cli command does not accept a role-session-name contain white spaces and throws this error:

Member must satisfy regular expression pattern: [\w+=,.@-]*

This PR implements a fix to check and see if the job name contains white spaces. It it does, the spaces are replaces by -.

@brivu brivu requested a review from a team as a code owner June 20, 2023 19:20
@brivu brivu self-assigned this Jun 20, 2023
.circleci/test-deploy.yml Outdated Show resolved Hide resolved
@EricRibeiro
Copy link
Contributor

Unrelated to the PR, but I noticed there is a job in test-deploy called integration-test-role_arn-config. The _ doesn't seem to follow the naming convention of other jobs in the same file.

Maybe it was wrongfully renamed during the OT 12 migration?

@brivu brivu changed the title Fix/role session name fix: role session name Jun 21, 2023
@brivu
Copy link
Contributor Author

brivu commented Jun 21, 2023

Unrelated to the PR, but I noticed there is a job in test-deploy called integration-test-role_arn-config. The _ doesn't seem to follow the naming convention of other jobs in the same file.

Maybe it was wrongfully renamed during the OT 12 migration?

You're right. I made the change. Thank you!

@brivu brivu merged commit 8acff3d into master Jun 21, 2023
2 checks passed
@brivu brivu deleted the fix/role-session-name branch June 21, 2023 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing escape for role-session-name for OIDC & temporary credentials expiration
2 participants