sungwy commented on code in PR #4356:
URL: https://github.com/apache/polaris/pull/4356#discussion_r3195300699
##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/common/CatalogHandler.java:
##########
@@ -244,6 +276,25 @@ protected void authorizeBasicTableLikeOperationsOrThrow(
PolarisEntitySubType subType,
TableIdentifier identifier) {
ensureResolutionManifestForTable(identifier);
+ if (resolutionManifest.getPrimaryResolverStatus() == null) {
+ if (!ops.isEmpty()) {
+ // Pre-resolution runs once for the shared target set. Current
built-in authorizers
+ // resolve broadly and do not vary resolution scope by operation, so
any op in the set is
+ // sufficient here. If a future authorizer makes pre-resolution
operation-specific, this
+ // path may need to resolve for each op or accept a multi-op request.
+ AuthorizationState authzState = new AuthorizationState();
+ authzState.setResolutionManifest(resolutionManifest);
+ authorizer()
+ .resolveAuthorizationInputs(
+ authzState,
+ AuthorizationRequest.of(
+ polarisPrincipal(),
+ ops.iterator().next(),
+ List.of(
+ AuthorizationTargetBinding.of(
+ PolarisSecurableMapper.tableLike(catalogName(),
identifier), null))));
Review Comment:
updated to only resolve once for updateTable
--
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]