Skip to content

Make deployment credentials refresh interval configurable - #99

Merged
popen2 merged 4 commits into
mainfrom
claude/compassionate-dijkstra-8RlPs
May 25, 2026
Merged

popen2 merged 4 commits into
mainfrom
claude/compassionate-dijkstra-8RlPs

Conversation

@popen2

@popen2 popen2 commented May 25, 2026

Copy link
Copy Markdown
Member

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

  • Added new deployment_credentials_refresh_interval configuration field with a default value of 20 minutes
  • Removed dependency on DEPLOYMENT_TOKEN_DURATION constant from platz_auth
  • Updated credential refresh logic to use the configured interval instead of a computed value
  • Changed try_join_all to join_all with explicit error handling to accommodate the new configuration approach
  • Fixed argument macro syntax from default_value to default_value_t for boolean field

Implementation Details

  • The refresh interval is now configurable via the PLATZ_DEPLOYMENT_CREDENTIALS_REFRESH_INTERVAL environment variable
  • Uses humantime::Duration for user-friendly duration parsing (e.g., "20m", "1h")
  • Error handling for the credential refresh futures is now done explicitly via collect::<Result<Vec<_>>>()? instead of relying on try_join_all
  • This change decouples the deployment credentials refresh cadence from the token duration, allowing independent configuration

https://claude.ai/code/session_01UGtmhxw74pYTvYJ41tjrTT

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
popen2 force-pushed the claude/compassionate-dijkstra-8RlPs branch from ce71fce to bdc2898 Compare May 25, 2026 19:15
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
@popen2
popen2 merged commit 19f4e02 into main May 25, 2026
8 checks passed
@popen2
popen2 deleted the claude/compassionate-dijkstra-8RlPs branch May 25, 2026 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants