iting0321 commented on code in PR #3750:
URL: https://github.com/apache/polaris/pull/3750#discussion_r2839570899
##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogAdapter.java:
##########
@@ -243,13 +244,16 @@ public Response updateProperties(
}
private EnumSet<AccessDelegationMode> parseAccessDelegationModes(String
accessDelegationMode) {
- EnumSet<AccessDelegationMode> delegationModes =
+ // Parse the modes from the header - validation will happen after mode
resolution
Review Comment:
I agree that is misleading. Change it to ```// Parse the access delegation
modes - validation will happen after mode resolution```
##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogAdapter.java:
##########
@@ -243,13 +244,16 @@ public Response updateProperties(
}
private EnumSet<AccessDelegationMode> parseAccessDelegationModes(String
accessDelegationMode) {
- EnumSet<AccessDelegationMode> delegationModes =
+ // Parse the modes from the header - validation will happen after mode
resolution
+ // in IcebergCatalogHandler.resolveAccessDelegationModes()
+ EnumSet<AccessDelegationMode> modes =
AccessDelegationMode.fromProtocolValuesList(accessDelegationMode);
+ // TODO remove when remote signing is implemented
Preconditions.checkArgument(
- delegationModes.isEmpty() ||
delegationModes.contains(VENDED_CREDENTIALS),
+ !modes.contains(REMOTE_SIGNING),
Review Comment:
I moved the validation from the parsing stage to the resolution stage. Now
we only reject if `REMOTE_SIGNING` is the resolved/selected mode, not just if
it's requested.
--
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]