Openshift API Server
The openshift api server checks and runs every request sent to your cluster. You control it by setting up role rules that match users to cluster tasks. Teams often start by giving engineers broad cluster roles to speed up daily work. When roles are too broad, one bad command can break apps across many namespaces. Shared keys and wide rules also make it hard to trace who ran a command. How the openshift api server checks roles and rules Every action in a cluster goes through the central contro
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
The openshift api server checks and runs every request sent to your cluster. You control it by setting up role rules that match users to cluster tasks. Teams often start by giving engineers broad cluster roles to speed up daily work. When roles are too broad, one bad command can break apps across many namespaces. Shared keys and wide rules also make it hard to trace who ran a command.
How the openshift api server checks roles and rules
Every action in a cluster goes through the central control plane first. A user or tool sends a request to read or change a cluster object. The server checks who the user is and then checks their role rules. These rules live in the standard Kubernetes role API group.
A normal Role sets rules inside one single namespace. A ClusterRole sets rules across the whole cluster at once. It can cover cluster items like nodes or namespaced items everywhere. All rules in this system only add access. There are no deny rules in standard role setups.
To give a user these rules, you create a binding object. A RoleBinding gives permissions inside one specific namespace. It can point to a local Role or a wide ClusterRole. A ClusterRoleBinding gives those permissions across the entire cluster at once. Admins must pair each user or group with the right binding for their job.
Subresources and the limits of static roles
The API matches rules to the exact names used in the request URL. Some cluster tasks use a subresource, such as reading pod logs or running commands. In a role rule, you write the main resource and subresource with a slash. This lets admins split basic pod viewing from live shell sessions.
Static roles work well to decide who can start a task. Still, they cannot see what happens inside a live pod session. Once a role allows an exec request, the server opens a direct stream. The role system does not check the shell commands typed inside that stream. It also does not filter the data that comes back to the user screen.
Kubernetes API Server Access + OpenShift RBAC: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Why teams struggle with role sprawl over time
As teams add more apps, the number of namespaces and bindings grows fast. Admins often grant wide roles during an outage so engineers can fix bugs fast. Since there are no deny rules, you cannot block one risky action in a broad role. Instead, you must build new small roles from scratch for each team.
Those extra bindings often stay in place long after the incident ends. Over time, many users keep permanent rights to run commands in production pods. If an engineer runs a database tool inside a pod, raw records appear on screen. The cluster log shows that a session started, not what data returned.
Check Kubernetes API requests and responses on the wire
Kubernetes RBAC decides who may call the API server. RBAC does not check response payloads or split listing Secret names from reading Secret values when a role grants get access. With hoop.dev, you run an open-source HTTP proxy, a sidecar for your Kubernetes API. The kubectl client changes only the server address it talks to while RBAC stays in place.
On each call, hoop.dev guardrails read the method, normalized path, and headers to refuse bad deletes or full Secret reads with a 403 error. On the way back, hoop.dev data masking walks JSON responses by key and masks matched values in Secrets, ConfigMaps, and pod logs. Every request and verdict is logged without storing bearer tokens. View the project on GitHub.
Frequently asked questions
How does the API server handle deny rules in RBAC?
It does not support deny rules at all. All permissions in Kubernetes RBAC are purely additive. You start with zero rights and add rules through bindings.
What is the difference between a RoleBinding and a ClusterRoleBinding?
A RoleBinding grants access inside one single namespace. A ClusterRoleBinding grants access across all namespaces and cluster resources at the same time.
How do you control access to pod logs and exec sessions?
You list subresources in your role rules using a slash format. This lets you allow reading pod logs without allowing live shell commands.
Related guides
In this post