Make deployment credentials refresh interval configurable - #99
Merged
Merged
Conversation
Use default_value_t for the disable_deployment_credentials flag, and express the deployment credentials refresh cadence as a humantime duration (PLATZ_DEPLOYMENT_CREDENTIALS_REFRESH_INTERVAL, default 20m) instead of a "times per hour" integer. Co-authored-by: popen2 <popen2@gmail.com> Co-authored-by: Claude <noreply@anthropic.com> https://claude.ai/code/session_01UGtmhxw74pYTvYJ41tjrTT
popen2
force-pushed
the
claude/compassionate-dijkstra-8RlPs
branch
from
May 25, 2026 19:15
ce71fce to
bdc2898
Compare
Add PLATZ_DEPLOYMENT_CREDENTIALS_TOKEN_DURATION (humantime, default 1h) and issue deployment tokens with that lifetime via AccessToken::for_deployment. At startup, validate that the refresh interval is non-zero and shorter than the token duration so credentials are always refreshed before they expire. The DEPLOYMENT_TOKEN_DURATION constant is no longer referenced and has been removed. Co-authored-by: popen2 <popen2@gmail.com> Co-authored-by: Claude <noreply@anthropic.com> https://claude.ai/code/session_01UGtmhxw74pYTvYJ41tjrTT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR makes the deployment credentials refresh interval configurable via environment variable, replacing the hardcoded value that was derived from
DEPLOYMENT_TOKEN_DURATION.Key Changes
deployment_credentials_refresh_intervalconfiguration field with a default value of 20 minutesDEPLOYMENT_TOKEN_DURATIONconstant fromplatz_authtry_join_alltojoin_allwith explicit error handling to accommodate the new configuration approachdefault_valuetodefault_value_tfor boolean fieldImplementation Details
PLATZ_DEPLOYMENT_CREDENTIALS_REFRESH_INTERVALenvironment variablehumantime::Durationfor user-friendly duration parsing (e.g., "20m", "1h")collect::<Result<Vec<_>>>()?instead of relying ontry_join_allhttps://claude.ai/code/session_01UGtmhxw74pYTvYJ41tjrTT