Red Hat Openshift API Management

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up red hat openshift api management by defining role rules for cluster endpoints. Teams bind these roles to users and apps to control API calls. Most teams start by creating broad cluster roles so apps can talk to the server. When these roles are too wide, any user or app can read or change sensitive resources. A single bad request can then alter workloads across your whole cluster. How red hat openshift api management works with native roles Under the hood, the platform relies on sta

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.

You set up red hat openshift api management by defining role rules for cluster endpoints. Teams bind these roles to users and apps to control API calls. Most teams start by creating broad cluster roles so apps can talk to the server. When these roles are too wide, any user or app can read or change sensitive resources. A single bad request can then alter workloads across your whole cluster.

How red hat openshift api management works with native roles

Under the hood, the platform relies on standard Kubernetes role-based access control. A role or cluster role holds a set of rules that grant permissions. These permissions are additive, which means there are no deny rules in the system. You start with zero access and add rules for each needed action.

A standard role always sets permissions inside a single namespace. A cluster role is not limited to one namespace. It can cover cluster-wide resources like nodes or non-resource endpoints. It can also cover namespaced resources across all namespaces at once.

Once you write the rules, you attach them to users or service accounts. A role binding grants permissions inside one specific namespace. That role binding can point to a local role or a shared cluster role. A cluster role binding grants those permissions across the entire cluster. The API server checks these bindings on every request before it runs the action.

Handling subresources in API rules

API rules refer to resources by the exact name shown in the API path. Many cluster actions also use subresources, such as reading pod logs or running commands. In your rules, you write a subresource with a slash after the main resource name.

Teams often try to limit subresource creation to specific named items. Still, the resource names restriction on create actions applies only to top-level resources. It does not apply to subresources in the API server. You must plan your namespace boundaries with care when you grant subresource permissions.

API Key Management + OpenShift RBAC: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

What native API roles solve and what they miss

Native roles and bindings do a good job of sorting out who can call an endpoint. They let you split teams by namespace and stop unapproved users from viewing cluster nodes. They give you a clean way to group rules for apps and human operators.

Yet this native setup leaves a major operational gap for live traffic. Role bindings only check if a user can reach an API endpoint or subresource. They do not inspect the specific commands or payloads sent inside an active session. Once a role allows someone to run commands in a pod, the cluster steps back.

The native role cannot block a dangerous shell command inside that pod. It also cannot rewrite sensitive data like emails, phone numbers, or card numbers in responses. Teams also struggle when static service account keys sit on laptops or build servers. If someone leaks a key, the attacker gets every permission tied to that role binding. To fix this, teams need controls that check individual requests and hide raw credentials.

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

Can I write a deny rule in native cluster RBAC?

No, native permissions are only additive and do not support deny rules. To block an action, you must remove the rule or binding that grants it.

What is the difference between a role binding and a cluster role binding?

A role binding grants access inside one namespace only. A cluster role binding grants access across all namespaces and cluster-scoped resources.

Why do broad subresource permissions create risk for teams?

Subresources control powerful actions like reading pod logs or running commands inside containers. Once granted, native roles do not filter the commands run or the data returned.

The query runs. The emails stay hidden.