yushesp opened a new pull request, #3525:
URL: https://github.com/apache/polaris/pull/3525

   Principal names containing invalid characters (spaces, parentheses, etc.) 
were causing AWS STS AssumeRole requests to fail with validation errors. AWS 
STS role session names must match the pattern [\w+=,.@-]*.
   
   This change:
   - Adds AwsRoleSessionNameSanitizer utility class to sanitize strings for use 
as AWS STS role session names
   - Replaces invalid characters with underscores and truncates to 64 
characters (AWS maximum)
   - Updates AwsCredentialsStorageIntegration to sanitize principal names when 
INCLUDE_PRINCIPAL_NAME_IN_SUBSCOPED_CREDENTIAL is enabled
   - Adds tests to verify sanitization behavior and AWS pattern compliance
   
   Fixes issue where principal names like `Joe (local)` would produce invalid 
role session names like `Polaris-Joe (local)` and cause AssumeRole to fail. Now 
sanitized to `polaris-Joe__local_`.
   
   <!--
   ๐Ÿ“ Describe what changes you're proposing, especially breaking or user-facing 
changes. 
   ๐Ÿ“– See https://github.com/apache/polaris/blob/main/CONTRIBUTING.md for more.
   -->
   
   ## Checklist
   - [x] ๐Ÿ›ก๏ธ Don't disclose security issues! (contact [email protected])
   - [x] ๐Ÿ”— Clearly explained why the changes are needed, or linked related 
issues: Fixes #
   - [x] ๐Ÿงช Added/updated tests with good coverage, or manually tested (and 
explained how)
   - [x] ๐Ÿ’ก Added comments for complex logic
   - [x] ๐Ÿงพ Updated `CHANGELOG.md` (if needed)
   - [x] ๐Ÿ“š Updated documentation in `site/content/in-dev/unreleased` (if needed)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to