Repository navigation
Conversation
With api.username/api.password set, Prometheus scrapes, k8s probes and pprof debugging all required credentials, because basicAuthMiddleware wrapped every route on the single API listener. Bypass the auth check for these monitoring/debug paths; /metrics and /debug/pprof/* are still registered only when enable_metrics/enable_pprof are on, so disabled endpoints stay 404. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
api.username/api.passwordare set,basicAuthMiddlewarerequired credentials for every route, including/health(k8s probes),/metrics(Prometheus) and/debug/pprof/*./metricsand/debug/pprof/*are still registered only whenenable_metrics/enable_pprofare on, so disabled endpoints keep returning 404.api.usernamecomment.Test plan
pkg/server/metrics_auth_test.go: unit test through the realregisterHTTPHandlers()router —/health,/metrics,/debug/pprof/return 200 without credentials,/backup/versionreturns 401 without / 200 with credentials, disabled metrics/pprof return 404make test🤖 Generated with Claude Code