You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "lrichards-etsy (via GitHub)" <gi...@apache.org> on 2024/11/02 00:36:12 UTC

Re: [PR] Feature configuration to modify storage credential lifetime [polaris]

lrichards-etsy commented on code in PR #408:
URL: https://github.com/apache/polaris/pull/408#discussion_r1826403273


##########
polaris-core/src/main/java/org/apache/polaris/core/storage/cache/StorageCredentialCache.java:
##########
@@ -91,6 +91,24 @@ public long expireAfterRead(
                 });
   }
 
+  /** How long credentials should remain in the cache. */
+  private static long maxCacheDurationMs() {
+    var cacheDurationSeconds =
+        PolarisConfiguration.loadConfig(
+            PolarisConfiguration.STORAGE_CREDENTIAL_CACHE_DURATION_SECONDS);
+    var credentialDurationSeconds =
+        PolarisConfiguration.loadConfig(PolarisConfiguration.STORAGE_CREDENTIAL_DURATION_SECONDS);
+    if (cacheDurationSeconds <= credentialDurationSeconds) {

Review Comment:
   I think this is flipped? It should error if cache > credential duration. 



-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org