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

feat: sanitize role session name #172

Merged
merged 2 commits into from
Nov 10, 2023
Merged

Conversation

brivu
Copy link
Contributor

@brivu brivu commented Nov 10, 2023

The role_session_name parameter can only contain 64 characters and can only contain uppercase and lowercase letters, digits from 0-9, and the characters =,,,., @, _, and -.

This pull request sanitizes the role_session_name parameter, ensuring that it's properly formatted so that the assume_role_with_web_identity command does not fail. It also adds testing for this parameter as well.

@brivu brivu requested a review from a team as a code owner November 10, 2023 01:50
* Replace all invalid characters with '-'
* Trim length to 64 chars
@brivu brivu force-pushed the feat/sanitize-role-session-name branch from a49d225 to a2dac93 Compare November 10, 2023 01:51
@brivu brivu self-assigned this Nov 10, 2023
@brivu brivu linked an issue Nov 10, 2023 that may be closed by this pull request
@brivu brivu merged commit 67f0991 into master Nov 10, 2023
2 checks passed
@brivu brivu deleted the feat/sanitize-role-session-name branch November 10, 2023 18:17
@ITslacker
Copy link

I just tried to re-run the job and I'm still experiencing the same errors.

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.

Generate shortlived AWS Keys using CircleCI OIDC token fails
4 participants