-
Notifications
You must be signed in to change notification settings - Fork 320
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
Adding support for file based configuration of basic auth username in http client config #511
Conversation
…ent config. Signed-off-by: Wasim Nihal <[email protected]>
Please find the configuration documentation changes at prometheus/prometheus#12749 |
config/http_config.go
Outdated
} | ||
|
||
func (rt *basicAuthRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { | ||
if len(req.Header.Get("Authorization")) != 0 { | ||
return rt.rt.RoundTrip(req) | ||
} | ||
username, err := getBasicAuthUsername(*rt) |
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.
I don't think extra funtions are needed of they do not share code
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.
addressed the comment. Moved this logic back to the basic auth RoundTrip method.
…ent config. Signed-off-by: Wasim Nihal <[email protected]>
Co-authored-by: Julien Pivotto <[email protected]> Signed-off-by: Nihal <[email protected]>
Co-authored-by: Julien Pivotto <[email protected]> Signed-off-by: Nihal <[email protected]>
…common into username-file-12576 Signed-off-by: Wasim Nihal <[email protected]>
…common into username-file-12576 Signed-off-by: Wasim Nihal <[email protected]>
…common into username-file-12576
@roidelapluie, I have addressed the above review comments. Request you to review the changes |
Thanks! |
Including changes to have
username_file
option for basic auth configuration.Changes for the ticket: prometheus/prometheus#12576
@roidelapluie , request you to review the changes.