Cluster Access Rules
You set up cluster access rules by binding user groups to native roles. These rules tell the control plane who can read, write, or delete cluster resources. Most teams start by mapping identity groups to broad admin or reader roles. Overly broad roles let one bad command wipe out workloads or leak secrets. When every engineer shares the same wide role, audit logs lose clear detail. Teams then struggle to see who ran a risky command during an outage. How cluster access rules work in native setu
AWS Config Rules: the complete guide
Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.
You set up cluster access rules by binding user groups to native roles. These rules tell the control plane who can read, write, or delete cluster resources. Most teams start by mapping identity groups to broad admin or reader roles. Overly broad roles let one bad command wipe out workloads or leak secrets. When every engineer shares the same wide role, audit logs lose clear detail. Teams then struggle to see who ran a risky command during an outage.
How cluster access rules work in native setups
A cluster checks every request through two main steps before it runs anything. First, the user logs in with a certificate, token, or single sign-on account. The control plane checks this login against your main identity tool to confirm who it is. Second, the cluster checks its internal rules to see what that user can do. These cluster access rules match a user or group to a specific set of verbs. Verbs include simple actions like read, list, create, update, or delete on specific objects.
You can scope these rules to one namespace or across the whole cluster. A namespace rule keeps a team inside its own project folder and blocks outside changes. A cluster-wide rule applies to every node, pod, and secret in the system. Most teams group these permissions into reusable roles for developers, testers, and on-call responders. When a user sends a command, the API server compares the request against all bound roles. If a rule matches, the server runs the action and writes an entry to the log.
What native roles solve and where gaps remain
Native roles are great for blocking unauthorized users at the front door of the cluster. They keep frontend developers out of billing namespaces and stop guests from changing node settings. They also let you match company groups to basic job functions without much manual work. For static day-to-day permissions, built-in role bindings give you a solid first line of defense.
Still, native cluster access rules only check the resource type and the action verb. They decide who logs in, not what individual commands or queries do inside a session. Once an engineer opens an interactive shell inside a pod, the role check is over. The cluster cannot inspect the shell commands or stop a risky script in flight. It also cannot mask sensitive data like emails, phone numbers, card numbers, or national IDs. If an on-call engineer needs temporary write rights, admins must edit role bindings by hand. Those temporary rights often stay active for weeks because nobody remembers to remove them later.
AWS Config Rules: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
How to keep role bindings clean over time
Start by giving every team member a read-only role for daily status checks. Do not bind human users to full admin roles for routine debugging work. Instead, let automated deployment tools handle standard app updates and config changes. Group permissions by job task rather than creating custom rules for single people. Review your active role bindings every month to spot stale accounts and leftover permissions. Delete unused service accounts right away so attackers cannot use old tokens to log in. Keep namespace roles separate from cluster-wide roles so one mistake stays small.
Check database and API queries on the wire
Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev sits inline in the wire protocol beside those services as an open-source proxy, a sidecar for your Postgres or API. On every query an AI agent or engineer runs against production, hoop.dev decides to pass, mask, block, or hold it for human review.
Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run, and hoop.dev data masking rewrites matched sensitive values in responses in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.
Frequently asked questions
What is the difference between namespace rules and cluster-wide rules?
Namespace rules limit a user to one specific project area inside the cluster. Cluster-wide rules give permissions across every project, node, and shared system resource at once.
Why do native cluster roles fail to stop bad commands inside a pod?
The cluster only checks if the user has permission to open the pod shell. Once the shell opens, the native role system does not read or filter the commands typed inside.
How often should teams review their cluster role bindings?
Teams should check their role bindings at least once a month to remove old accounts. You should also remove temporary admin rights right after an incident or fix ends.
Related guides
In this post