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 13:43:00 UTC
(polaris) branch less-descriptive-opa-exception created (now 5f0c00e95c)
This is an automated email from the ASF dual-hosted git repository.
sungwy pushed a change to branch less-descriptive-opa-exception
in repository https://gitbox.apache.org/repos/asf/polaris.git
at 5f0c00e95c chore: Less descriptive OPA Exception message
This branch includes the following new commits:
new 5f0c00e95c chore: Less descriptive OPA Exception message
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(polaris) 01/01: chore: Less descriptive OPA Exception message
Posted by su...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sungwy pushed a commit to branch less-descriptive-opa-exception
in repository https://gitbox.apache.org/repos/asf/polaris.git
commit 5f0c00e95c8732334662ab5b99f434fa7ef486be
Author: Sung Yun <10...@users.noreply.github.com>
AuthorDate: Tue Apr 14 09:42:53 2026 -0400
chore: Less descriptive OPA Exception message
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");
}
}