adutra commented on code in PR #2280:
URL: https://github.com/apache/polaris/pull/2280#discussion_r2511708475


##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogHandler.java:
##########
@@ -844,6 +869,37 @@ ALLOW_FEDERATED_CATALOGS_CREDENTIAL_VENDING, 
getResolvedCatalogEntity())) {
     return responseBuilder;
   }
 
+  private AccessDelegationMode selectAccessDelegationMode(
+      Set<AccessDelegationMode> delegationModes) {
+
+    if (delegationModes.isEmpty()) {
+      return UNKNOWN;
+    }
+
+    if (delegationModes.size() == 1) {
+      return delegationModes.iterator().next();
+    }
+
+    if (delegationModes.contains(VENDED_CREDENTIALS) && 
delegationModes.contains(REMOTE_SIGNING)) {
+
+      boolean skipCredIndirection =
+          
realmConfig.getConfig(FeatureConfiguration.SKIP_CREDENTIAL_SUBSCOPING_INDIRECTION);
+
+      boolean credentialSubscopingAllowed =
+          baseCatalog instanceof IcebergCatalog

Review Comment:
   That's a good question! 
   
   It's complex to check this at this level because you need to find the 
`AwsStorageConfigurationInfo` corresponding to the resolved path in order to 
know if STS is unavailable.
   
   I think we shouldn't make this logic too complex, because it's not common 
for a client to request more than one access delegation mode anyways.
   
   I can though add a simple check to check if remote signing is enabled. If 
it's disabled there is no point in selecting `REMOTE_SIGNING`.



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

Reply via email to