You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@polaris.apache.org by su...@apache.org on 2026/04/14 14:26:59 UTC
(polaris) branch main updated: chore: Less descriptive OPA Exception message (#4197)
This is an automated email from the ASF dual-hosted git repository.
sungwy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris.git
The following commit(s) were added to refs/heads/main by this push:
new 6e62d1141b chore: Less descriptive OPA Exception message (#4197)
6e62d1141b is described below
commit 6e62d1141b0c2fc0ead1b11a84d0e022f9060e6d
Author: Sung Yun <10...@users.noreply.github.com>
AuthorDate: Tue Apr 14 10:26:54 2026 -0400
chore: Less descriptive OPA Exception message (#4197)
As pointed out in https://github.com/apache/polaris/pull/3999#discussion_r3077112696 `ForbiddenException` is propagated to Polaris response through the `IcebergExceptionMapper`. It would best to remove information about Polaris internals from the exception message sent back to the Polaris user.
---
.../org/apache/polaris/extension/auth/opa/OpaPolarisAuthorizer.java | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/extensions/auth/opa/impl/src/main/java/org/apache/polaris/extension/auth/opa/OpaPolarisAuthorizer.java b/extensions/auth/opa/impl/src/main/java/org/apache/polaris/extension/auth/opa/OpaPolarisAuthorizer.java
index 152959b99e..c1aac773dd 100644
--- a/extensions/auth/opa/impl/src/main/java/org/apache/polaris/extension/auth/opa/OpaPolarisAuthorizer.java
+++ b/extensions/auth/opa/impl/src/main/java/org/apache/polaris/extension/auth/opa/OpaPolarisAuthorizer.java
@@ -184,9 +184,7 @@ class OpaPolarisAuthorizer implements PolarisAuthorizer {
toResourceEntitiesFromResolvedPaths(targets),
toResourceEntitiesFromResolvedPaths(secondaries)));
if (!allowed) {
- throw new ForbiddenException(
- "OPA denied authorization for operation=%s principal=%s targets=%s secondaries=%s",
- authzOp, polarisPrincipal.getName(), targets, secondaries);
+ throw new ForbiddenException("OPA denied authorization");
}
}