Openshift Waf
You set up an openshift waf by placing a web filter in front of your routes. This filter inspects incoming web traffic and blocks bad requests before they reach your pods. Most teams deploy this edge defense first to protect public web apps from outside attacks. Yet edge filters do not restrict what engineers can do after they log into the cluster. Broad cluster roles still let internal users run risky commands or read sensitive app data. How an openshift waf works with cluster roles An opens
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 waf by placing a web filter in front of your routes. This filter inspects incoming web traffic and blocks bad requests before they reach your pods. Most teams deploy this edge defense first to protect public web apps from outside attacks. Yet edge filters do not restrict what engineers can do after they log into the cluster. Broad cluster roles still let internal users run risky commands or read sensitive app data.
How an openshift waf works with cluster roles
An openshift waf sits at the network edge and checks incoming HTTP traffic for threats. It stops common web attacks before that traffic ever hits your running containers. Once traffic passes the edge, Kubernetes role-based rules govern who can manage the workload. In Kubernetes, a Role or ClusterRole holds rules that represent a set of permissions. These permissions are additive, which means there are no deny rules in the native model. A Role always sets permissions within one single namespace for your team. A ClusterRole is not namespaced and can cover cluster-wide resources like nodes. It can also cover namespaced resources across all namespaces in your cluster. A RoleBinding grants permissions inside one namespace by referencing a Role or a ClusterRole. A ClusterRoleBinding grants permissions across the entire cluster at once.
Admins use these bindings to let engineers deploy and manage their web filters and apps. The API server checks these rules every time a user or service sends a request. RBAC refers to resources by the exact name that appears in the API URL. Some APIs also use a subresource, such as a pod's logs or exec endpoint. When teams assign broad cluster roles to speed up work, they open wide internal permissions.
What edge filters and native roles leave open
An openshift waf only inspects public traffic coming from outside users toward your web apps. It does nothing when an engineer connects directly to the cluster API to fix an issue. Native RBAC decides who can log in and reach a resource, not what happens inside. Once a user has permission for the pod exec subresource, they can open a shell. From that shell, the native role cannot inspect individual commands in flight. An engineer can run any script, change local files, or pull secrets from memory.
The same gap exists when users query databases or internal services running inside the cluster. Native roles check if a user can reach the pod, not what data comes back. If a table holds emails, phone numbers, card numbers, or national IDs, raw rows return. Without field-level masking that rewrites matched fields in results, sensitive data spills into local terminals. Teams also struggle to tie shared service credentials back to one specific person during audits. Edge filters protect the front door, and RBAC checks the initial API call. Neither tool controls individual commands or masks sensitive data during an active internal session.
OpenShift RBAC + AWS WAF: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
How to tighten workload permissions step by step
Start by scoping every team member down to a single namespace using a standard RoleBinding. Avoid ClusterRoleBinding grants unless a user must manage nodes or cluster-wide settings every day. Remember that Kubernetes permissions are additive, so you cannot add a deny rule later. You must build small roles from the start and only add verbs that users need.
Next, separate the permissions for reading pod status from the permissions for subresources. Grant pod log reading only to teams that debug app output during an incident. Restrict pod exec permissions so users cannot open interactive shells on production containers at will. Review your bindings often to remove old accounts and shrink broad role assignments across namespaces.
Govern kubectl and API calls in flight
Identity providers and Kubernetes RBAC decide who logs into a cluster. They cannot redact keys inside returned JSON objects or hold a risky delete call for review. By design, hoop.dev sits inline as an open-source proxy, a sidecar for your Kubernetes API, without replacing RBAC. On every production call from an engineer or AI agent, hoop.dev decides to pass, mask, block, or hold it for human approval.
First, hoop.dev guardrails refuse banned methods, paths, or headers before they run or hold risky deletes for review. Next, hoop.dev data masking rewrites sensitive keys in returned Secret, ConfigMap, and log responses in memory, and writes each decision to the audit trail. Explore the repo on GitHub.
Frequently asked questions
Does an openshift waf stop internal users from running pod exec commands?
No, a web filter only inspects external HTTP traffic heading to your public app routes. Engineers use the Kubernetes API server to run pod exec commands, which bypasses the web filter.
Can I add a deny rule to a Kubernetes Role to block one specific pod?
No, Kubernetes RBAC permissions are additive and do not support deny rules at all. You must create a new Role that includes only the exact resources you want to allow.
How does data masking protect sensitive fields during database queries in a cluster?
Data masking inspects query results in flight and rewrites matched fields like emails or card numbers. This keeps raw values out of user terminals while letting engineers test and fix apps.
Related guides
In this post