-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature configuration to modify storage credential lifetime #408
base: main
Are you sure you want to change the base?
Conversation
polaris-core/src/main/java/org/apache/polaris/core/storage/cache/StorageCredentialCache.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with minor suggestions.
* Returns the value of a `PolarisConfiguration`, or the default if it cannot be loaded. This | ||
* method does not need to be used when a `CallContext` is already available | ||
*/ | ||
public static <T> T loadConfig(PolarisConfiguration<T> configuration) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on this method. There are a lot of other places can reuse this as well, like here https://github.com/polaris-catalog/polaris/blob/main/polaris-service/src/main/java/org/apache/polaris/service/catalog/BasePolarisCatalog.java#L1029-L1029. We can consolidate them in a followup PR.
.durationSeconds( | ||
PolarisConfiguration.loadConfig( | ||
PolarisConfiguration.STORAGE_CREDENTIAL_DURATION_SECONDS)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor suggestion: we could keep them in one line like the following if we import the static field/method.
.durationSeconds(loadConfig(STORAGE_CREDENTIAL_DURATION_SECONDS))
.description( | ||
"The duration of time that vended storage credentials are valid for. Support for" | ||
+ " longer (or shorter) durations is dependent on the storage provider.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor suggestion: adding a comment that GCS isn't supported yet?
Description
If users want to extend/shorten the lifetime of vended storage credentials, we can support that with a
PolarisConfiguration
.I didn't see a way to implement this for
GcpStorageIntegration
, so that is notably missing from this PR for now.Type of change