Skip to content

Adding support for file based configuration of basic auth username in http client config#511

Merged
roidelapluie merged 7 commits intoprometheus:mainfrom
wasim-nihal:username-file-12576
Sep 4, 2023
Merged

Adding support for file based configuration of basic auth username in http client config#511
roidelapluie merged 7 commits intoprometheus:mainfrom
wasim-nihal:username-file-12576

Conversation

@wasim-nihal
Copy link
Contributor

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.

…ent config.

Signed-off-by: Wasim Nihal <sswasim64@gmail.com>
@wasim-nihal
Copy link
Contributor Author

Please find the configuration documentation changes at prometheus/prometheus#12749

if len(req.Header.Get("Authorization")) != 0 {
return rt.rt.RoundTrip(req)
}
username, err := getBasicAuthUsername(*rt)
Copy link
Member

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

Copy link
Contributor Author

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.

wasim-nihal and others added 6 commits September 2, 2023 13:43
…ent config.

Signed-off-by: Wasim Nihal <sswasim64@gmail.com>
Co-authored-by: Julien Pivotto <roidelapluie@o11y.eu>
Signed-off-by: Nihal <38865967+wasim-nihal@users.noreply.github.com>
Co-authored-by: Julien Pivotto <roidelapluie@o11y.eu>
Signed-off-by: Nihal <38865967+wasim-nihal@users.noreply.github.com>
…common into username-file-12576

Signed-off-by: Wasim Nihal <sswasim64@gmail.com>
…common into username-file-12576

Signed-off-by: Wasim Nihal <sswasim64@gmail.com>
@wasim-nihal
Copy link
Contributor Author

@roidelapluie, I have addressed the above review comments. Request you to review the changes

@roidelapluie roidelapluie merged commit 4047c78 into prometheus:main Sep 4, 2023
@roidelapluie
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants