All posts

IAM Best Practices for Planner-Executor Agents

Many teams assume that giving a planner‑executor agent a single IAM role automatically makes every downstream action safe. The reality is that a role alone does not prevent over‑privileged commands, hide sensitive data, or provide a reliable audit trail. Current reality: shared credentials and blind execution In a typical deployment, a planner‑executor agent runs with a static IAM credential that is baked into the container image or stored in a long‑lived secret manager entry. The credential

Free White Paper

AWS IAM Best Practices: The Complete Guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free. No spam. Unsubscribe anytime.

Many teams assume that giving a planner‑executor agent a single IAM role automatically makes every downstream action safe. The reality is that a role alone does not prevent over‑privileged commands, hide sensitive data, or provide a reliable audit trail.

Current reality: shared credentials and blind execution

In a typical deployment, a planner‑executor agent runs with a static IAM credential that is baked into the container image or stored in a long‑lived secret manager entry. The credential often has broad permissions because the team wants the agent to be able to perform any task it might discover at runtime. Engineers rarely rotate these secrets, and the agent talks directly to the target service, whether a database, a Kubernetes API, or an SSH host, without any intermediary that can observe or intervene.

This setup satisfies the "who can call" question at the identity layer, but it leaves three critical gaps:

  • The agent can issue any command the role permits, even destructive ones, without a real‑time check.
  • Responses that contain passwords, tokens, or personal data flow straight back to the caller, exposing secrets.
  • Every action is logged only by the target service, making it hard to correlate who triggered a particular command when multiple agents share the same credential.

What IAM alone doesn’t solve

IAM provides the foundation: it authenticates the agent, assigns it a set of permissions, and can enforce least‑privilege policies at the role level. However, IAM does not sit on the data path, so it cannot inspect individual commands, mask fields, or require an approval before a risky operation runs. The request still reaches the target directly, bypassing any opportunity for command‑level audit or just‑in‑time (JIT) enforcement.

Because the enforcement point is outside the gateway, removing the gateway would not change the fact that the agent can execute any allowed API call. The missing piece is a control surface that sits between the agent and the target, where every request can be examined, logged, and optionally blocked.

Why a Layer‑7 gateway is the missing control plane

hoop.dev provides exactly that control surface. It is deployed as a network‑resident gateway that proxies all traffic from planner‑executor agents to their downstream resources. The gateway is the only place where enforcement can happen, and it adds four essential capabilities:

Continue reading? Get the full guide.

AWS IAM Best Practices: Architecture Patterns & Best Practices

Free. No spam. Unsubscribe anytime.
  • Session recording. hoop.dev records each interaction, preserving a replayable audit trail that ties every command back to the originating identity.
  • Inline data masking. Sensitive fields in responses are redacted before they leave the gateway, ensuring that secrets never reach the agent.
  • Just‑in‑time approvals. When a command matches a risky pattern, hoop.dev routes the request to a human approver, preventing accidental or malicious damage.
  • Command‑level blocking. Known dangerous statements are blocked outright, reducing blast radius without requiring changes to the IAM role.

All of these outcomes exist because hoop.dev sits in the data path. The setup phase, configuring OIDC authentication, provisioning a least‑privilege IAM role for the agent, and registering the target, decides who may start a session, but without hoop.dev the session would proceed unchecked.

Putting the pieces together

To apply IAM best practices for planner‑executor agents, follow this high‑level workflow:

  1. Define a narrowly scoped IAM role that grants only the actions the agent truly needs. Use resource‑level permissions wherever possible.
  2. Configure the agent to obtain short‑lived OIDC tokens from your identity provider. The tokens are verified by hoop.dev, which then maps group membership to access policies.
  3. Deploy hoop.dev as the gateway in front of every target the agent contacts, databases, Kubernetes clusters, SSH hosts, or HTTP APIs.
  4. Enable the built‑in guardrails: session recording, inline masking, JIT approvals, and command blocking. These are active only because hoop.dev intercepts the traffic.
  5. Monitor the audit logs produced by hoop.dev. They give you visibility into which identity performed which command, satisfying both security and compliance needs.

By separating identity (IAM) from enforcement (the gateway), you keep the principle of least privilege while adding real‑time, command‑level protection.

FAQ

Do I still need IAM policies if I use hoop.dev?

Yes. IAM determines which identities can obtain a token and which broad permissions the agent may request. hoop.dev builds on that foundation to enforce finer‑grained controls.

Can hoop.dev work with existing agents that already have static credentials?

It can, but the security benefit is limited. The gateway can still record and mask, but the agent will retain the same over‑privileged static secret. The recommended approach is to move to short‑lived OIDC tokens.

How does hoop.dev handle secret rotation?

Because the gateway stores the credential for the target, you rotate the secret in the target service and update the gateway configuration. The agents never see the new secret, reducing exposure.

For detailed steps on getting started with hoop.dev, see the getting‑started guide. The learn section provides deeper explanations of each guardrail.

View the open‑source repository on GitHub

Open source

Save the open-source gateway for agent data access

Hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.

Star and save the repo →More posts