All posts

Preventing Service Account Sprawl in Non-Human Identities

In a well‑governed environment, service account sprawl is eliminated: every service account has a single, documented purpose, expires when its job finishes, and leaves a tamper‑proof trail of who used it and why. No orphaned keys linger in secret stores, and no automated process can spin up a credential without a human‑in‑the‑loop review. Why the problem persists Most organizations still treat non‑human identities like disposable passwords. Engineers create a Kubernetes service account for a

Free White Paper

Human-in-the-Loop Approvals + Non-Human Identity Management: The Complete Guide

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

Free. No spam. Unsubscribe anytime.

In a well‑governed environment, service account sprawl is eliminated: every service account has a single, documented purpose, expires when its job finishes, and leaves a tamper‑proof trail of who used it and why. No orphaned keys linger in secret stores, and no automated process can spin up a credential without a human‑in‑the‑loop review.

Why the problem persists

Most organizations still treat non‑human identities like disposable passwords. Engineers create a Kubernetes service account for a CI job, copy its token into a Git repo, and forget about it. Cloud‑native tools spin up a MySQL user for a batch job, store the password in a plain‑text config map, and never rotate it. The result is a sprawling set of credentials that no one can attribute, audit, or retire. Because the connection goes straight from the CI runner to the database, there is no checkpoint that can enforce least‑privilege, request approval, or data masking.

What the initial fix looks like

Moving to a non‑human identity model, OIDC‑backed service accounts, federated SAML assertions, or short‑lived IAM roles, addresses the creation side. Each workload now authenticates with a token that the identity provider can revoke centrally. This eliminates static passwords and makes credential rotation easier. However, the token still travels directly to the target system. The gateway that could inspect the request, enforce policy, or record the session is missing, leaving the environment vulnerable to abuse.

The missing enforcement layer

Setup alone decides who may start a connection, but it cannot inspect the traffic. The data path, where the request actually traverses the network, is the only place to apply guardrails. Without a dedicated gateway, there is no way to:

  • Record each session for later replay.
  • Mask sensitive fields in responses (for example, hiding credit‑card numbers returned by a query).
  • Require just‑in‑time approval before a risky command runs.
  • Block commands that match a deny list before they reach the backend.

All of these enforcement outcomes become possible only when a layer sits between the identity provider and the target resource.

hoop.dev as the data‑path gateway

hoop.dev implements the missing layer. It runs an agent inside the same network as the database, Kubernetes cluster, or SSH host, and proxies every connection through a Layer 7 gateway. Because the gateway sees the full protocol, it can apply inline masking, command‑level approvals, and session recording without exposing the underlying credential to the caller. The gateway also respects the identity information supplied by the OIDC or SAML token, so the same non‑human identity that started the request is used to enforce policy.

Continue reading? Get the full guide.

Human-in-the-Loop Approvals + Non-Human Identity Management: Architecture Patterns & Best Practices

Free. No spam. Unsubscribe anytime.

When a CI job attempts to run a DROP TABLE against a PostgreSQL instance, hoop.dev can pause the request, forward it to an approver, and log the entire interaction. If a service tries to read a column that contains personally identifiable information, hoop.dev can mask that column in the response before it reaches the job. All of these actions happen in the data path, ensuring that the enforcement outcomes are trustworthy and auditable.

Key practices to watch for

Even with hoop.dev in place, teams should monitor a few signals to keep service account sprawl in check:

  • Credential lifespan. Verify that tokens issued to non‑human identities have a short TTL and are renewed only when needed.
  • Scope of access. Use hoop.dev’s policy engine to restrict each identity to the exact resources and commands it requires.
  • Approval workflow usage. Track how often requests trigger a human approval and adjust policies to reduce unnecessary friction.
  • Audit log completeness. Ensure that every session recorded by hoop.dev is shipped to a secure store for long‑term retention.

By combining disciplined identity provisioning with a gateway that enforces policy at the point of use, organizations can dramatically reduce the attack surface created by unmanaged service accounts.

Getting started

To try this approach, deploy hoop.dev using the quick‑start Docker Compose file and configure a connection for your database or Kubernetes cluster. The getting‑started guide walks you through installing the agent, registering a resource, and defining a simple policy that requires approval for destructive commands. For deeper insight into policy features, masking options, and session replay, explore the learn section of the documentation.

FAQ

Does hoop.dev replace my existing IAM system?

No. hoop.dev consumes the identity information produced by your IAM or IdP. It adds a layer of enforcement on top of the existing authentication flow.

Can I use hoop.dev with any database?

hoop.dev supports a wide range of databases, including PostgreSQL, MySQL, and MongoDB. The gateway works at the protocol level, so the same policy model applies across all supported targets.

How does hoop.dev store session recordings?

Session data is written to a storage backend of your choice and can be accessed for audit or forensics.

Ready to see the code? Explore the open‑source repository on GitHub and start building a tighter control plane for your non‑human identities.

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