adutra commented on code in PR #14178:
URL: https://github.com/apache/iceberg/pull/14178#discussion_r2394474961
##########
core/src/main/java/org/apache/iceberg/rest/auth/OAuth2Manager.java:
##########
@@ -173,14 +173,17 @@ public AuthSession tableSession(RESTClient sharedClient,
Map<String, String> pro
sessionCache = newSessionCache(name, properties);
}
+ String oauth2ServerUri =
+ properties.getOrDefault(OAuth2Properties.OAUTH2_SERVER_URI,
ResourcePaths.tokens());
Review Comment:
@nastra while adapting the Dremio AuthManager to this, I realized that there
might be a better cache key:
the signer endpoint URI itself.
```java
String cacheKey = properties.getOrDefault("s3.signer.uri",
properties.get(CatalogProperties.URI));
if (config.token() != null) {
return sessionCache.cachedSession(
cacheKey, k -> newSessionFromAccessToken(config.token(),
properties, parent));
}
if (config.credential() != null && !config.credential().isEmpty()) {
return sessionCache.cachedSession(cacheKey, k ->
newSessionFromTokenResponse(config, parent));
}
```
WDYT? Caching by signer endpoint seems more natural to me, since that's what
we want conceptually: one session for each signing catalog.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]