Repository navigation
Open
Labels
bugSomething isn't working
Description
Is your feature request related to a problem? Please describe.
Currently the configured GCP access token is memoized and never refreshed:
polaris/service/common/src/main/java/org/apache/polaris/service/storage/StorageConfiguration.java
Lines 92 to 112 in 1cb85e0
| default Supplier<GoogleCredentials> gcpCredentialsSupplier() { | |
| return Suppliers.memoize( | |
| () -> { | |
| if (gcpAccessToken().isEmpty()) { | |
| try { | |
| return GoogleCredentials.getApplicationDefault(); | |
| } catch (IOException e) { | |
| throw new RuntimeException("Failed to get GCP credentials", e); | |
| } | |
| } else { | |
| AccessToken accessToken = | |
| new AccessToken( | |
| gcpAccessToken().get(), | |
| new Date( | |
| Instant.now() | |
| .plus(gcpAccessTokenLifespan().orElse(DEFAULT_TOKEN_LIFESPAN)) | |
| .toEpochMilli())); | |
| return GoogleCredentials.create(accessToken); | |
| } | |
| }); | |
| } |
Describe the solution you'd like
We need a way to refresh GCP credentials.
Describe alternatives you've considered
No response
Additional context
No response
Reacted by Flynn
Metadata
Metadata
Assignees
Labels
bugSomething isn't working
Activity
snazy commentedon Aug 6, 2025
Looks like this is actually a bug, providing the
gcp.tokenconfiguration works for only 1h (gcp.lifespan).sakshamratra0106 commentedon Dec 5, 2025
==> Seems GCS STS doesnt give downscoped token of more than 1 hour by default. Moreover their are no policies or permission that we can tweak to get the TTL extended. There are several use cases which it can affect, any job running more than an hour. Do we know how can we handle this ?
==> Below Property act as a dummy till we can enable something from GCS side to honour this property value
polaris.features."STORAGE_CREDENTIAL_DURATION_SECONDS" | 3600 | The duration of time that vended storage credentials are valid for. Support for longer (or shorter) durations is dependent on the storage provider. GCS current does not respect this value.