Openshift IdP

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up an openshift idp to link your company login system to your cluster. Once you link it, the cluster checks who users are before they run commands. Teams map central user groups to cluster roles so engineers can do their work. When teams assign wide roles to save time, one user can change too many apps. Overly broad roles also let users read secret data across every single namespace. How an openshift idp works with cluster roles Your login system checks a user and sends their identity

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 an openshift idp to link your company login system to your cluster. Once you link it, the cluster checks who users are before they run commands. Teams map central user groups to cluster roles so engineers can do their work. When teams assign wide roles to save time, one user can change too many apps. Overly broad roles also let users read secret data across every single namespace.

How an openshift idp works with cluster roles

Your login system checks a user and sends their identity back to the cluster. After login, native Kubernetes RBAC takes over to check what that user can do. In Kubernetes RBAC, a Role or ClusterRole holds rules that list allowed actions. These rules are purely additive, which means there are no deny rules at all. A Role always sets permissions inside one single namespace for a specific team. A ClusterRole is not namespaced and can cover resources across the whole cluster. It can also cover cluster-scoped resources like nodes or other non-resource endpoints.

To give permissions to a user, you create a RoleBinding or a ClusterRoleBinding. A RoleBinding grants permissions inside one namespace and can point to a Role. A RoleBinding can also point to a shared ClusterRole to keep rules consistent. A ClusterRoleBinding grants access across the entire cluster at once for admin tasks. RBAC refers to resources by the exact name that appears in the API URL. Some APIs use a subresource, such as a pod log or an exec session. In RBAC rules, you write the subresource with a slash after the main resource.

What native identity setup solves and what it misses

Linking your login provider stops teams from sharing one static admin key across laptops. When someone leaves the team, you disable their main account in one central place. That step blocks them from logging into the cluster right away without extra work. Using namespace bindings also keeps normal app teams inside their own assigned project areas.

Still, the login check and the RBAC check only happen at the API door. Once a role lets an engineer start a pod exec session, RBAC stops watching. The cluster knows who opened the shell, but it does not check individual commands. If a pod holds a database key, the user can run queries inside it. Native RBAC cannot mask emails, phone numbers, or card numbers returned in that terminal. It also cannot ask a teammate to approve one risky shell command in flight.

OpenShift RBAC: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Why static group bindings grow too wide over time

During an outage, an on-call engineer often needs pod exec rights to fix bugs. Because RBAC has no deny rules, teams often bind whole groups to edit roles. Those bindings stay in place long after the outage ends and the ticket closes. Soon, dozens of engineers hold standing rights to open shells in live production pods. Auditing who ran what inside those interactive pod shells becomes very hard for security. Teams need a way to check commands and mask sensitive fields in real time.

Add request guardrails and response masking beside Kubernetes

Cluster roles and service accounts govern who reaches the Kubernetes API. Still, a broad role or agent can delete workloads or print sensitive values from ConfigMaps and logs. In practice, hoop.dev runs beside the API server as a sidecar for your Kubernetes API and checks every request and response alongside RBAC.

With hoop.dev Kubernetes controls, guardrails can allow listing Secret names while refusing reads of Secret data before execution. Data masking redacts matched keys in returned JSON responses and log streams in memory. Furthermore, hoop.dev holds SOC 2 Type II and is MIT licensed on GitHub.

Frequently asked questions

Does an openshift idp replace Kubernetes RBAC?

No, the identity provider only checks who the user is during the login step. Kubernetes RBAC still decides which resources and namespaces that user can read or change.

Can Kubernetes RBAC block one specific command inside a pod shell?

No, RBAC only controls whether a user can call the pod exec subresource. Once the shell session starts, RBAC does not inspect or block individual shell commands.

How do RoleBindings and ClusterRoleBindings differ after login?

A RoleBinding applies permissions inside one specific namespace for a user or group. A ClusterRoleBinding applies those permissions across every namespace and cluster resource at once.

The query runs. The emails stay hidden.