Skip to content

Allow tokenFile instead of raw token#151

Merged
Gerrit91 merged 2 commits into
mainfrom
alllow-token-from-file
Jul 6, 2026
Merged

Allow tokenFile instead of raw token#151
Gerrit91 merged 2 commits into
mainfrom
alllow-token-from-file

Conversation

@majst01

@majst01 majst01 commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Description

This will allow clients to read the token from a file which will periodically read to be able to have a token refresh sidecar.

Used AI-Tools ✨

  • none used for generation

@metal-robot metal-robot Bot added this to Development Jul 5, 2026
@majst01 majst01 force-pushed the alllow-token-from-file branch from 6a9ce8e to f53d923 Compare July 5, 2026 08:02
@majst01 majst01 self-assigned this Jul 5, 2026
@majst01 majst01 marked this pull request as ready for review July 5, 2026 08:16
@majst01 majst01 requested a review from a team as a code owner July 5, 2026 08:16
@majst01 majst01 force-pushed the alllow-token-from-file branch 3 times, most recently from 071b040 to de2b665 Compare July 5, 2026 09:47
@majst01 majst01 force-pushed the alllow-token-from-file branch from de2b665 to 322fec3 Compare July 5, 2026 09:50
Comment thread go/client/client-interceptors.go Outdated
if !i.config.tokenFileLastRead.IsZero() {
// The token is refreshed by a sidecar, this means we should periodically read the tokenfile
// and store the token in config instead und update the tokenFileLastRead afterwards
if time.Since(i.config.tokenFileLastRead) < 5*time.Minute {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const for 5*time.Minute and maybe add an opportunity to overwrite.

@Gerrit91 Gerrit91 merged commit 073357d into main Jul 6, 2026
3 checks passed
@Gerrit91 Gerrit91 deleted the alllow-token-from-file branch July 6, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants