Security: Unauthenticated Access to Metrics Endpoints
Open
@infernus01 is already working on this.
Since Oct 30, 2025.
kind/bug
- Dominant language
- Go
- Stars
- 608
- Forks
- 263
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 125
Description
Expected Behavior
HTTP/1.1 401 Unauthorized
{"error": "Unauthorized"}
Actual Behavior
# HELP go_goroutines Number of goroutines that currently exist.
# TYPE go_goroutines gauge
go_goroutines 147
# HELP tekton_pipelines_controller_pipelinerun_count Number of pipelineruns
# TYPE tekton_pipelines_controller_pipelinerun_count gauge
tekton_pipelines_controller_pipelinerun_count{status="success"} 42
...
[MORE METRICS OUTPUT]
Steps to Reproduce the Problem
curl http://${POD_IP}:9090/metrics
Additional Info
Recommended Approach: kube-rbac-proxy Sidecar
Deploy kube-rbac-proxy as a sidecar container to enforce authentication:
┌─────────────────────────────────────────┐
│ Pod: tekton-pipelines-controller │
│ │
│ ┌───────────────┐ ┌──────────────┐ │
│ │ Controller │ │ kube-rbac- │ │
│ │ │ │ proxy │ │
│ │ :9090 │◄──┤ :8443 │◄──┼─── HTTPS + Bearer Token
│ │ (localhost) │ │ (external) │ │ (Authenticated)
│ └───────────────┘ └──────────────┘ │
└─────────────────────────────────────────┘
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.