Skip to content

fix(custom-resources): AwsCustomResource assumed role session name may contain invalid characters - #34016

Merged
mergify[bot] merged 4 commits into
aws:mainfrom
msessa:fix/aws_custom_resource_assumerole_session
Apr 8, 2025
Merged

fix(custom-resources): AwsCustomResource assumed role session name may contain invalid characters#34016
mergify[bot] merged 4 commits into
aws:mainfrom
msessa:fix/aws_custom_resource_assumerole_session

Conversation

@msessa

@msessa msessa commented Apr 2, 2025

Copy link
Copy Markdown
Contributor

Issue # (if applicable)

Closes #23260

Also #34011

Reason for this change

According to the documentation, the RoleSessionName property for an AssumeRole operation may only contain upper- and lower-case alphanumeric characters with no spaces, underscores or any of the following characters: =,.@-

Description of changes

Sanitize the role session name by removing all non-allowed symbols

Describe any new or updated permissions being added

N/A

Description of how you validated changes

  • Unit Test
  • Integration Test

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions github-actions Bot added bug This issue is a bug. effort/small Small work item – less than a day of effort p1 labels Apr 2, 2025
@aws-cdk-automation
aws-cdk-automation requested a review from a team April 2, 2025 12:12
@github-actions github-actions Bot added the beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK label Apr 2, 2025

@aws-cdk-automation aws-cdk-automation left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This review is outdated)

@msessa msessa changed the title fix(custom-resources): AwsCustomResource assumed role session name may contain invalid characters fix(custom-resources): AwsCustomResource assumed role session name may contain invalid characters Apr 2, 2025
@aws-cdk-automation
aws-cdk-automation dismissed their stale review April 2, 2025 13:18

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Apr 4, 2025
@msessa
msessa force-pushed the fix/aws_custom_resource_assumerole_session branch from 4e03b3a to db7288c Compare April 6, 2025 12:35
@codecov

codecov Bot commented Apr 8, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.98%. Comparing base (74cbe27) to head (db7288c).
Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #34016   +/-   ##
=======================================
  Coverage   83.98%   83.98%           
=======================================
  Files         120      120           
  Lines        6976     6976           
  Branches     1178     1178           
=======================================
  Hits         5859     5859           
  Misses       1005     1005           
  Partials      112      112           
Flag Coverage Δ
suite.unit 83.98% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
packages/aws-cdk ∅ <ø> (∅)
packages/aws-cdk-lib/core 83.98% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@samson-keung samson-keung left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you for the PR

@mergify

mergify Bot commented Apr 8, 2025

Copy link
Copy Markdown
Contributor

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@samson-keung samson-keung self-assigned this Apr 8, 2025
@aws-cdk-automation

Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 60e1a3f
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify

mergify Bot commented Apr 8, 2025

Copy link
Copy Markdown
Contributor

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify
mergify Bot merged commit 32b6b4d into aws:main Apr 8, 2025
@github-actions

github-actions Bot commented Apr 8, 2025

Copy link
Copy Markdown
Contributor

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK bug This issue is a bug. effort/small Small work item – less than a day of effort p1 pr/needs-maintainer-review This PR needs a review from a Core Team Member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AwsCustomResource: Invalid RoleSessionName when PhysicalResourceId is an Arn

3 participants