Skip to content

fix(srv6): require authn/authz on the controller metrics endpoint#34

Merged
ryskn merged 1 commit into
dev/srv6egress-v1from
fix/srv6-metrics-authz
Jul 3, 2026
Merged

fix(srv6): require authn/authz on the controller metrics endpoint#34
ryskn merged 1 commit into
dev/srv6egress-v1from
fix/srv6-metrics-authz

Conversation

@ryskn

@ryskn ryskn commented Jul 3, 2026

Copy link
Copy Markdown
Owner

What

The controller metrics server bound :8080 in 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.

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 ryskn merged commit d461797 into dev/srv6egress-v1 Jul 3, 2026
1 check passed
@ryskn ryskn deleted the fix/srv6-metrics-authz branch July 3, 2026 01:50
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).
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.

1 participant