A recently offboarded contractor still holds a token that can invoke the internal AI model, while a newly created CI job is granted a blanket permission to the same MCP gateway. The contractor’s token can issue prompts, and the CI job can retrieve responses, but no one has checked whether the same identity should be allowed to both generate and consume the model’s output. The result is a classic segregation of duties violation that can hide malicious activity, inflate blast radius, and make audit trails meaningless.
In many organizations the MCP gateway is treated as a simple proxy: a network address that forwards traffic to a language model or code‑completion service. Engineers configure a service account, hand out its credentials, and assume that the surrounding IAM policies are enough. What actually slips through is the lack of a clear boundary between the actors who are allowed to initiate a request, the actors who can approve a high‑risk request, and the actors who can view the resulting data. When those responsibilities overlap, a single compromised credential can both trigger and conceal abuse.
Why segregation of duties matters for MCP gateways
Segregation of duties is a control principle that requires critical functions to be divided among separate people or systems. For an MCP gateway the critical functions are:
- Request initiation – the identity that sends a prompt to the model.
- Risk approval – the identity that reviews and authorizes a request that matches a high‑risk policy (for example, prompts that contain production secrets).
- Result consumption – the identity that reads the model’s response.
- Audit and replay – the identity that can inspect a session for compliance or forensic purposes.
If a single token can perform all four steps, an attacker who steals that token can issue malicious prompts, bypass any human review, read the output, and erase evidence of the activity. The separation of duties reduces the attack surface by ensuring that no single credential can complete the entire workflow.
Required controls before you can claim a safe MCP deployment
To achieve proper segregation you need three layers of protection:
- Identity‑driven role mapping – define distinct roles such as "prompt‑sender", "approver", and "viewer" in your identity provider. Each role receives a token that conveys only the permissions required for its function.
- Policy enforcement at the gateway – the gateway must examine each request, match it against risk policies, and enforce approval workflows before forwarding it to the model.
- Comprehensive audit – hoop.dev records every session, including the request, the approval decision, and the response, in an immutable store that only privileged auditors can query.
These controls cannot be satisfied by IAM alone because the IAM system never sees the actual prompt payload, never knows whether a request matches a high‑risk pattern, and never records the model’s answer. The enforcement point must sit where the traffic flows.
How hoop.dev provides the data‑path enforcement needed for segregation of duties
hoop.dev is a Layer 7 gateway that sits between identities and the MCP target. It authenticates users via OIDC or SAML, reads group membership, and maps each identity to a role. Because the gateway resides on the data path, it can inspect the request payload in real time. It then applies the following enforcement outcomes:
