fix(srv6): require authn/authz on the controller metrics endpoint#34
Merged
Conversation
The metrics server bound :8080 in plaintext with no authentication, so any workload able to reach the pod could scrape operational detail. Enable SecureServing + filters.WithAuthenticationAndAuthorization (TokenReview + SubjectAccessReview), the kubebuilder-standard secure metrics setup. Note: scrapers now need a bearer token and the controller ServiceAccount needs auth-delegation RBAC (system:auth-delegator) to validate them.
ryskn
added a commit
that referenced
this pull request
Jul 3, 2026
The metrics authn/authz change (#34) imports controller-runtime/pkg/metrics/filters, which transitively requires the otel http instrumentation + konnectivity client modules. Record them in go.mod/go.sum so the module builds under -mod=readonly (CI).
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.
What
The controller metrics server bound
:8080in plaintext with no authentication — any workload reaching the pod could scrape operational detail (no secrets, but avoidable exposure).Fix
Enable
SecureServing+filters.WithAuthenticationAndAuthorization(TokenReview + SubjectAccessReview) — the kubebuilder-standard secure metrics setup.Deploy note: scrapers now need a bearer token and the controller SA needs auth-delegation RBAC (
system:auth-delegator).Review finding
Info I3.
Test
go build/vet ./srv6egress/cmd/...green.