Context
The eks-agent-platform operator's metrics endpoint is now secure by default (metrics.secure: true): it serves over HTTPS and requires every scrape to authenticate + authorize via controller-runtime's WithAuthenticationAndAuthorization filter (TokenReview + a SubjectAccessReview on the /metrics nonResourceURL). This closes a STRIDE information-disclosure finding where the metrics endpoint was plaintext HTTP gated only by NetworkPolicy.
Consequence for eks-gitops
The prod scrape path here is the Grafana Agent (Alloy) scraping by pod annotation (prometheus.io/scrape), which is plaintext and unauthenticated. That path can no longer read the operator's metrics, and the operator chart now suppresses those prometheus.io/* annotations while metrics.secure is on. On kube-prometheus-stack clusters (kx) the operator's ServiceMonitor already carries the scheme: https + insecureSkipVerify + bearer-token config, so the ServiceMonitor path works; the Grafana-Agent-scraped clusters need their scrape config updated.
Ask
Teach the Grafana Agent to scrape the operator's secure metrics endpoint over https with a bearer token. Either:
- Bind the agent's scrape ServiceAccount to the operator chart's
<release>-metrics-reader ClusterRole (grants get on the /metrics nonResourceURL) and present that SA token with tls_config { insecure_skip_verify = true } (the endpoint uses an in-memory self-signed cert); or
- Scrape the operator via the authenticated ServiceMonitor path instead of pod annotations.
Until this lands, deploying the operator with metrics.secure: true to a Grafana-Agent-scraped cluster leaves its controller-runtime metrics unscraped — fail-safe (metrics not exposed rather than leaked), but a monitoring gap. Interim escape hatch: set metrics.secure: false on that cluster to restore the plaintext annotation path, at the cost of reopening the info-disclosure gap.
Refs
- eks-agent-platform operator chart:
charts/operator/values.yaml (metrics.secure), charts/operator/templates/rbac.yaml (*-metrics-reader ClusterRole + system:auth-delegator binding), charts/operator/templates/servicemonitor.yaml
- Filed from eks-agent-platform quality-remediation Target 29 (metrics authn/authz)
Context
The eks-agent-platform operator's metrics endpoint is now secure by default (
metrics.secure: true): it serves over HTTPS and requires every scrape to authenticate + authorize via controller-runtime'sWithAuthenticationAndAuthorizationfilter (TokenReview + a SubjectAccessReview on the/metricsnonResourceURL). This closes a STRIDE information-disclosure finding where the metrics endpoint was plaintext HTTP gated only by NetworkPolicy.Consequence for eks-gitops
The prod scrape path here is the Grafana Agent (Alloy) scraping by pod annotation (
prometheus.io/scrape), which is plaintext and unauthenticated. That path can no longer read the operator's metrics, and the operator chart now suppresses thoseprometheus.io/*annotations whilemetrics.secureis on. On kube-prometheus-stack clusters (kx) the operator's ServiceMonitor already carries thescheme: https+insecureSkipVerify+ bearer-token config, so the ServiceMonitor path works; the Grafana-Agent-scraped clusters need their scrape config updated.Ask
Teach the Grafana Agent to scrape the operator's secure metrics endpoint over https with a bearer token. Either:
<release>-metrics-readerClusterRole (grantsgeton the/metricsnonResourceURL) and present that SA token withtls_config { insecure_skip_verify = true }(the endpoint uses an in-memory self-signed cert); orUntil this lands, deploying the operator with
metrics.secure: trueto a Grafana-Agent-scraped cluster leaves its controller-runtime metrics unscraped — fail-safe (metrics not exposed rather than leaked), but a monitoring gap. Interim escape hatch: setmetrics.secure: falseon that cluster to restore the plaintext annotation path, at the cost of reopening the info-disclosure gap.Refs
charts/operator/values.yaml(metrics.secure),charts/operator/templates/rbac.yaml(*-metrics-readerClusterRole +system:auth-delegatorbinding),charts/operator/templates/servicemonitor.yaml