The tension between these two is what makes them dangerous together. Prompt injection is about steering what an agent decides to do. Agent impersonation is about who the agent appears to be when it acts. Combine them and your prompt-injection risk stops being the agent does something odd and becomes the agent does something odd under an identity that is allowed to do serious things. Each is manageable. The combination is the one to design against.
This is a defensive post. There are no payloads, no example injection strings, and no steps to reproduce an attack here. The framing is entirely server-side: where to enforce identity and access so that a steered agent is contained at the boundary, no matter what it was told.
Why the two compound
An agent reads inputs during a task. If a malicious instruction reaches it, the model's behavior can shift. That is prompt-injection risk in the abstract, and you cannot fully eliminate it inside the model, because the model is the thing being influenced. Now layer on impersonation: if the agent can act under an identity it merely asserts, then a steered agent does not just misbehave, it misbehaves with borrowed authority. The injected instruction lands on whatever the assumed identity is permitted to do.
So the realistic defensive stance is to assume the agent may be steered and to make sure that even then it can only act as its own verified identity, within a narrow, gated scope.
This is a shift in where you spend effort. A lot of prompt-injection discussion focuses on the input side: detecting malicious instructions, sanitizing content, hardening the system prompt. Those are worth doing, but they are probabilistic. They reduce how often an agent is steered, not what happens when one slips through, and at scale some will slip through. The access boundary is the deterministic half of the defense. It does not care whether the agent was steered. It only enforces what the verified identity is allowed to do, so the worst outcome of a successful injection is bounded by the scope and the approval gate rather than by the model's judgment.
Containing it server-side
- Bind identity at the connection. The agent acts only as the identity it authenticated through your identity provider, so it cannot pick up authority it was steered toward.
- Keep credentials out of the agent. Nothing for an injected instruction to extract or pass along.
- Scope and time-bound access. A steered agent can only reach the narrow resources its task was granted, only while the task runs.
- Route dangerous commands for approval. A human sits between a high-impact action and its execution, regardless of what the model decided.
- Record every command. If something is steered, you see exactly what it tried, under which identity.
The boundary that does not depend on the model
The core idea: the defense against a steered agent has to live outside the agent, on the connection, because the agent is the part that can be manipulated. hoop.dev is an identity-aware proxy on that boundary. It does not inspect the prompt or the model's output, and it does not try to. Instead it verifies the agent's identity through your OIDC or SAML provider, opens the infrastructure connection under a controlled credential the agent never holds, scopes access just in time, routes risky commands for human approval, and records each session.
So even if an agent is steered, it acts only as its verified identity, within a narrow scope, with destructive operations gated and everything recorded. Prompt-injection risk is contained by the access boundary, not by trusting the model to resist. See how identity-bound, scoped, recorded sessions are set up and the wider model in hoop.dev's runtime governance writing.
FAQ
Can hoop.dev stop prompt injection?
hoop.dev does not read prompts and does not try to detect injection. It contains the consequences: a steered agent still acts only as its verified identity, within a scoped, time-bound, approval-gated boundary on the infrastructure connection.
Why does impersonation make prompt-injection risk worse?
Injection changes what the agent does; impersonation changes whose authority it does it with. Together, a steered agent can act with borrowed privileges, so the boundary must enforce the agent's own identity.
Where should the defense live?
Outside the agent, on the connection, where the manipulated component cannot reconfigure the controls.
The gateway is open source. Read how identity binding, scoping, and approval work in the hoop.dev repository on GitHub and put a boundary around what a steered agent can reach.