Determine what the latest supported solution for securing a metrics endpoint is in Openshift #572

Closed
opened 2026-05-14 11:44:11 +00:00 by dkirwan · 3 comments
Member

Summary

Determine what the latest supported solution for securing a metrics endpoint is in Openshift.

Details

Determine what the latest supported solution for securing a metrics endpoint is in Openshift.

### Summary Determine what the latest supported solution for securing a metrics endpoint is in Openshift. ### Details Determine what the latest supported solution for securing a metrics endpoint is in Openshift.
dkirwan added this to the Sprint 20 project 2026-05-14 11:44:11 +00:00
humaton modified the project from Sprint 20 to Sprint 21 2026-05-18 10:16:08 +00:00
Member

I did research, and it seems there are 3 ways to secure endpoints:

  1. oauth2-proxy: An open-source proxy that authenticates traffic via an OIDC provider. It is primarily designed for interactive, human access (web browsers).

  2. kube-rbac-proxy: A Kubernetes-native proxy that authorizes access using machine tokens and cluster RBAC. It is designed almost entirely for machine-to-machine communication.

  3. openshift/oauth-proxy: OpenShift's native hybrid proxy. It handles both authentication and authorization natively, supporting both human and machine access.

I propose we use openshift/oauth-proxy. Because our cluster already uses FAS as a cluster-wide Identity Provider, we can easily deploy the app to support both token-based machine access (for Prometheus scraping) and FAS-authenticated human access. The questions:

  • Would we like to give humans access to this endpoint, or would only machines be enough?
  • Do we want to only give access to the endpoint to some OpenShift roles? In our case, forge admins and maintainers

arch: External traffic comes to the Route and is forwarded to the Pod. The proxy sidecar bypasses all traffic except the traffic that is trying to access the metrics endpoint.

I did research, and it seems there are 3 ways to secure endpoints: 1. `oauth2-proxy`: An open-source proxy that authenticates traffic via an OIDC provider. It is primarily designed for interactive, human access (web browsers). 2. `kube-rbac-proxy`: A Kubernetes-native proxy that authorizes access using machine tokens and cluster RBAC. It is designed almost entirely for machine-to-machine communication. 3. `openshift/oauth-proxy`: OpenShift's native hybrid proxy. It handles both authentication and authorization natively, supporting both human and machine access. I propose we use openshift/oauth-proxy. Because our cluster already uses FAS as a cluster-wide Identity Provider, we can easily deploy the app to support both token-based machine access (for Prometheus scraping) and FAS-authenticated human access. The questions: - Would we like to give humans access to this endpoint, or would only machines be enough? - Do we want to only give access to the endpoint to some OpenShift roles? In our case, forge admins and maintainers arch: External traffic comes to the Route and is forwarded to the Pod. The proxy sidecar bypasses all traffic except the traffic that is trying to access the `metrics` endpoint.
Author
Member

Ok, lets go with this openshift/oauth-proxy solution.. for the moment just configure it to you need to be authenticated to openshift via FAS in order to view the /metrics..

we also need to configure it so zabbix may access this endpoint.

Ok, lets go with this openshift/oauth-proxy solution.. for the moment just configure it to you need to be authenticated to openshift via FAS in order to view the /metrics.. we also need to configure it so zabbix may access this endpoint.
Author
Member

PR in for it look good, will try deploy this next week with @amedvede

PR in for it look good, will try deploy this next week with @amedvede - https://forge.fedoraproject.org/infra/ansible/pulls/3379
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
forge/forge#572
No description provided.