Skip to content

fix: include user-defined attributes in PolarisPrincipal#4293

Closed
Vishwaspatel2401 wants to merge 1 commit into
apache:mainfrom
Vishwaspatel2401:fix/polaris-principal-user-defined-attrs
Closed

fix: include user-defined attributes in PolarisPrincipal#4293
Vishwaspatel2401 wants to merge 1 commit into
apache:mainfrom
Vishwaspatel2401:fix/polaris-principal-user-defined-attrs

Conversation

@Vishwaspatel2401
Copy link
Copy Markdown

Summary

When creating a Polaris principal with custom user-defined attributes (e.g. region=northamerica), those attributes were silently dropped during API authentication. Only internal attributes like client_id were retained.

Root cause: PolarisPrincipal.of(PrincipalEntity, ...) called getInternalPropertiesAsMap() exclusively, ignoring the user-defined properties stored in getPropertiesAsMap().

Fix: Merge both maps when constructing the principal, with internal properties taking precedence on key conflicts.

Fixes #4291

Checklist

This PR was developed with the help of AI assistance (Claude). I fully understand the changes and can explain all design decisions.

Fixes apache#4291: PolarisPrincipal.of(PrincipalEntity, ...) was only
calling getInternalPropertiesAsMap(), silently dropping user-defined
attributes set during principal creation. Now merges both maps with
internal properties taking precedence on key conflicts.
@adnanhemani
Copy link
Copy Markdown
Contributor

I believe #4292 came first and represents a reasonable try at fixing the issue, so closing this PR in favor of that one. Please feel free to re-open if this is attempting to do something extra and/or different.

@github-project-automation github-project-automation Bot moved this from PRs In Progress to Done in Basic Kanban Board Apr 27, 2026
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.

PolarisPrincipal missing user-defined attributes supplied during principal creation

2 participants