You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "snazy (via GitHub)" <gi...@apache.org> on 2026/08/03 13:23:20 UTC
Re: [PR] Switch principal attributes to AttributeMap [polaris]
snazy commented on PR #5140:
URL: https://github.com/apache/polaris/pull/5140#issuecomment-5166883645
I agree with the type-safety concern: `AttributeKey<T>` does not enforce `T` when keys compare by their string value, and wrapping raw IdP attributes as `AttributeKey<Object>` buys very little.
I do not agree that all three reserved values should therefore become named `PolarisPrincipal` accessors, specifically the resolved `PrincipalEntity`. That would move a Polaris persistence/domain object into the authentication and authorization contract and encourage consumers to rely on its presence and internal property shape. An entity-backed principal can use it internally without exposing the entity itself.
I think the contract should instead separate stable, deliberately exposed authentication facts from an open attribute set. For the latter, provenance/namespace and an explicit forwarding allowlist matter more than nominal generic typing: an authorizer must be able to distinguish trusted Polaris-derived facts from IdP claims or other supplied attributes.
So I would keep `PrincipalEntity` behind the principal implementation and use this PR to define the projected authorization facts and provenance boundary, rather than making the backing entity first-class.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org