flyrain commented on code in PR #3997:
URL: https://github.com/apache/polaris/pull/3997#discussion_r3005429589
##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogAdapter.java:
##########
@@ -512,21 +511,15 @@ public Response loadCredentials(
SecurityContext securityContext) {
Namespace ns = decodeNamespace(namespace);
TableIdentifier tableIdentifier = TableIdentifier.of(ns,
RESTUtil.decodeString(table));
+ Optional<String> refreshEndpoint =
+ Optional.of(new
PolarisResourcePaths(prefix).credentialsPath(tableIdentifier));
return withCatalog(
securityContext,
prefix,
- catalog -> {
- LoadTableResponse loadTableResponse =
- catalog.loadTableWithAccessDelegation(
- tableIdentifier,
- "all",
- Optional.of(new
PolarisResourcePaths(prefix).credentialsPath(tableIdentifier)));
- return Response.ok(
- ImmutableLoadCredentialsResponse.builder()
- .credentials(loadTableResponse.credentials())
- .build())
- .build();
- });
+ catalog ->
+ Response.ok(
+
catalog.loadCredentialsFromEntityProperties(tableIdentifier, refreshEndpoint))
Review Comment:
I like the new changes here. I think the method name isn't accurate as it
could fall back to table metadata.json. Rename it to something like
`loadCredentials()`?
--
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]