How can an MCP server authenticate to an EKS cluster without a human‑held credential? In modern pipelines, automated services, AI assistants, and CI/CD jobs need to talk to Kubernetes, but the traditional approach still relies on static kubeconfig files or long‑lived service‑account tokens. Those artifacts are often copied across teams, stored in Git, and never expire. The result is a moving target for credential leakage, no visibility into which automation performed which kubectl command, and no way to hide sensitive data that appears in API responses.
Using a non-human identity, for example an OIDC‑issued token or an AWS IAM role, addresses the first problem: the secret never lives in a developer’s laptop. The token can be short‑lived, scoped to a single request, and revoked centrally. However, even when the token is verified by the EKS control plane, the request still travels directly from the service to the cluster. That direct path means the organization loses three critical controls:
- There is no gate that can inspect each kubectl or exec command before it reaches the API server.
- Responses that contain secrets, passwords, or tokens flow back unfiltered to the caller.
- Every interaction is invisible to auditors because no central log captures the command‑level activity.
Those gaps remain open until a dedicated data‑path component sits between the caller and the cluster. That component must be able to verify the non-human identity, enforce policies, mask data, and record the entire session.
Why the data path must host enforcement for non‑human identity
When an MCP server presents an OIDC token, the token proves who the caller is, but it does not enforce what the caller may do. The enforcement point therefore has to be the gateway that actually carries the traffic. By placing a Layer 7 proxy in front of the EKS API, the organization gains a single place to apply:
- Just‑in‑time (JIT) access: the proxy can grant a temporary RBAC binding that expires as soon as the session ends.
- Inline data masking: any field that matches a sensitive pattern (for example, password or token) is replaced before it reaches the caller.
- Command‑level audit: every kubectl invocation, exec session, and API request is logged with the identity that issued it.
- Guardrails: risky operations such as delete namespace can be blocked or routed to a human approver.
All of those outcomes are possible only because the proxy sits in the data path. The upstream identity system (OIDC, AWS IAM) merely tells the proxy who is asking; the proxy decides what to allow.
How hoop.dev implements the gateway for EKS
hoop.dev provides the required Layer 7 gateway. Its architecture for an EKS connection follows a clear chain:
- Identity verification: The gateway receives an OIDC token from the MCP server and validates it against the configured IdP. Group membership and claims are extracted to drive policy decisions.
- Credential handling: The gateway agent, running inside the same network as the EKS cluster, assumes a dedicated IAM role that has permission to call EKS describe operations and to generate a Kubernetes token. This role is the EKS_ROLE_ARN configured on the connection.
- RBAC mapping: The assumed role is mapped to a Kubernetes ClusterRoleBinding. When a session starts, the gateway creates a short‑lived binding that ties the session name to a specific Kubernetes role, ensuring the access is JIT and revocable.
- Policy enforcement: As traffic flows through the gateway, hoop.dev inspects each request at the protocol level. It can block disallowed verbs, require human approval for destructive actions, and apply inline masking to response fields that match configured patterns.
- Session recording: Every request and response, along with the originating identity, is stored in an audit log. The recordings can be replayed later for forensics or compliance reviews.
Because the gateway holds the cluster credential, the MCP server never sees a secret. The server only presents its OIDC token, and hoop.dev does the heavy lifting of assuming the IAM role, generating the Kubernetes token, and enforcing policy.
