How to Configure EKS SSO
You set up eks sso by linking your identity provider to Kubernetes role bindings. This link lets engineers log in to clusters using their work accounts. Most teams map identity groups to broad cluster roles so everyone can work fast. Yet broad roles give users too much power across all namespaces and pods. One bad command in a shared cluster can break live apps or expose secret data. How eks sso works with Kubernetes roles To make eks sso work, you connect two separate systems together. First
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 eks sso by linking your identity provider to Kubernetes role bindings. This link lets engineers log in to clusters using their work accounts. Most teams map identity groups to broad cluster roles so everyone can work fast. Yet broad roles give users too much power across all namespaces and pods. One bad command in a shared cluster can break live apps or expose secret data.
How eks sso works with Kubernetes roles
To make eks sso work, you connect two separate systems together. First, your cloud identity tool checks who the user is during login. Second, Kubernetes role-based access control decides what that user can do inside the cluster. You map external identity groups to internal Kubernetes roles or cluster roles.
In Kubernetes, a Role sets rules within a single namespace. A ClusterRole sets rules across the whole cluster and covers cluster-scoped items like nodes. It can also cover namespaced items across every namespace at once. A RoleBinding gives permissions inside one namespace by referencing a Role or a ClusterRole. A ClusterRoleBinding gives permissions across the entire cluster.
All rules in Kubernetes are additive, which means there are no deny rules. You start with zero access and add rules for each group. When a user logs in through single sign-on, the API server checks their group bindings. If a binding matches, the API server allows the action.
Why role mappings are hard to keep tight
Kubernetes rules match the exact names that appear in the API URL. Some API calls use subresources, such as reading pod logs or running commands in pods. You must grant access to the subresource specifically if a developer needs to debug an app. Once a user has permission to run pod commands, they can open a shell inside that container.
Because there are no deny rules, teams often create a few large groups. A developer group might get a binding that allows pod commands across an entire namespace. If you try to restrict access to specific resource names, you hit limits on creation calls. Managing hundreds of tiny role bindings for every single pod and team takes too much time. Most teams give up and grant wide access to keep daily work moving.
EKS Access Management + End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
What native eks sso solves and what it misses
Setting up single sign-on solves the problem of static cluster keys. When someone leaves the team, you turn off their main account and their cluster access stops. You do not need to rotate shared keys or pass around local config files. The login step is clean and links back to a real person.
Still, single sign-on and role bindings only check who logs in and which API endpoint they call. They do not inspect what happens inside a session after it starts. Once a role binding allows a user to open a pod shell, Kubernetes steps back. The user can read local files, inspect memory, or view sensitive fields like emails and phone numbers.
Native roles also cannot ask for peer approval on a single risky command. If a user has the role, they have it all day without checks. And if pod logs contain card numbers or national IDs, native role bindings will not rewrite those fields. You know who opened the session, but you cannot govern the individual commands or data inside it.
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
How does eks sso map cloud groups to cluster permissions?
Your cloud identity provider passes group names to the cluster when a user logs in. Kubernetes then matches those group names to RoleBindings or ClusterRoleBindings to grant permissions.
Can I add a deny rule to block one dangerous command in Kubernetes?
No, Kubernetes role permissions are purely additive and do not support deny rules. To block an action, you must remove the rule that grants it and rebuild the role.
Why can users run shell commands inside pods after logging in with SSO?
If their mapped role includes the pod exec subresource, the API server lets them start a shell. Once inside the container, Kubernetes does not filter the Linux commands they run.
Related guides
In this post