Skip to content

Conversation

darshanime
Copy link

closes prometheus/prometheus#9166
Signed-off-by: darshanime [email protected]

Copy link
Member

@roidelapluie roidelapluie left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution!

This should be documented, and we should use the configuration we read on every request.

I think a better name for it would be basic_auth_excluded_paths

func (u *webHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
// Check if path has auth excluded.
if _, ok := u.authExcludedPaths[r.URL.Path]; ok {
u.logger.Log("msg", "Bypassing auth, path in auth_excluded_paths", "path", r.URL.Path)
Copy link
Member

Choose a reason for hiding this comment

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

I would leave logging out if this pull request until we figure out #63.

if _, ok := u.authExcludedPaths[r.URL.Path]; ok {
u.logger.Log("msg", "Bypassing auth, path in auth_excluded_paths", "path", r.URL.Path)
u.handler.ServeHTTP(w, r)
return
Copy link
Member

Choose a reason for hiding this comment

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

This should be below HTTP headers, and after we check that there are users set.

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.

Option to disable security on Prometheus health endpoints, /-/healthy and /-/ready
2 participants