You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "dimas-b (via GitHub)" <gi...@apache.org> on 2026/08/06 20:43:09 UTC

Re: [PR] Support for external principals [polaris]

dimas-b commented on code in PR #5119:
URL: https://github.com/apache/polaris/pull/5119#discussion_r3731778665


##########
polaris-core/src/main/java/org/apache/polaris/core/persistence/resolver/Resolver.java:
##########
@@ -780,6 +787,16 @@ private ResolverStatus resolvePaths(
   private ResolverStatus resolveCallerPrincipalAndPrincipalRoles(
       List<ResolvedPolarisEntity> toValidate, boolean resolvePrincipalRoles) {
 
+    // External principals are not backed by the metastore: synthesize the caller principal and its
+    // roles directly from the authenticated principal instead of resolving them from the backend.
+    boolean externalPrincipal =
+        polarisPrincipal
+            .getAttribute(PolarisPrincipal.PRINCIPAL_ENTITY_ATTRIBUTE_KEY, PrincipalEntity.class)
+            .isEmpty();
+    if (externalPrincipal) {

Review Comment:
   +1 to @adutra 's point.



-- 
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