dimas-b commented on code in PR #5140:
URL: https://github.com/apache/polaris/pull/5140#discussion_r3658180443
##########
runtime/service/src/main/java/org/apache/polaris/service/auth/AuthenticatingAugmentor.java:
##########
@@ -61,11 +64,14 @@ public Uni<SecurityIdentity> augment(
private SecurityIdentity authenticatePolarisPrincipal(SecurityIdentity
identity) {
PolarisPrincipal polarisPrincipal = authenticator.authenticate(identity);
+ Map<String, Object> attributes =
+ polarisPrincipal.getAttributes().entrySet().stream()
+ .collect(Collectors.toMap(entry -> entry.key().key(),
AttributeMap.Attribute::value));
return QuarkusSecurityIdentity.builder(identity)
.setAnonymous(false)
.setPrincipal(polarisPrincipal)
.addRoles(polarisPrincipal.getRoles())
- .addAttributes(polarisPrincipal.getAttributes())
+ .addAttributes(attributes)
Review Comment:
tangential: Do we really need Polaris-specific principal attributes in
`SecurityIdentity`?
Not adding them might resolve some of the concerns with exposing too much or
too specific data to potential (server-side) readers. WDYT?
--
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]