-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[extension/bearertokenauthextension] support reading tokens from file #14326
[extension/bearertokenauthextension] support reading tokens from file #14326
Conversation
89ea2bb
to
5081cfc
Compare
This commit extends the bearer token extension by the possibility to read tokens from a file. Signed-off-by: Benedikt Bongartz <[email protected]>
Signed-off-by: Benedikt Bongartz <[email protected]>
5081cfc
to
8545df2
Compare
} | ||
|
||
if b.shutdownCH != nil { | ||
return fmt.Errorf("bearerToken file monitoring is already running") |
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.
When would this be the case?
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.
The shutdown channel is created when the extension is started and removed when stop is called. This channel condition is used to prevent another watcher from being spawned.
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.
Is this happening when the component is started twice without being shut down?
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.
Hopefully never. But yes, in case it get started twice, before it was stopped.
Signed-off-by: Benedikt Bongartz <[email protected]>
Signed-off-by: Benedikt Bongartz <[email protected]>
Signed-off-by: Benedikt Bongartz <[email protected]>
Signed-off-by: Benedikt Bongartz <[email protected]>
Signed-off-by: Benedikt Bongartz <[email protected]>
Signed-off-by: Benedikt Bongartz <[email protected]>
…ogger Signed-off-by: Benedikt Bongartz <[email protected]>
d30f1c5
to
7b7f712
Compare
Description:
This pr extends the bearer token extension by the possibility to read tokens from a file. If a token file has been specified, this file is read once when the extension is started and overwrites the old token. Only if the content of the token changes again, the transferred token will be overwritten again.
Link to tracking Issue: #14325
Testing:
Documentation:
Updated extension Readme