All posts

Non-human identity vs shared service accounts: which actually controls AI agent risk (on on-prem)

An on‑premises AI pipeline continues to run a nightly model‑training job after the contractor who wrote it left the company. The job authenticates with a static service account credential that was never rotated. When the model produces a new artifact, an autonomous agent picks it up and pushes it to internal storage, still using the same shared secret. The artifact contains personally identifiable information, yet no one can tell which run accessed it or whether the data was redacted. Relying o

Free White Paper

Non-Human Identity Management + AI Agent Security: The Complete Guide

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

Free. No spam. Unsubscribe anytime.

An on‑premises AI pipeline continues to run a nightly model‑training job after the contractor who wrote it left the company. The job authenticates with a static service account credential that was never rotated. When the model produces a new artifact, an autonomous agent picks it up and pushes it to internal storage, still using the same shared secret. The artifact contains personally identifiable information, yet no one can tell which run accessed it or whether the data was redacted.

Relying on non-human identity for these agents would seem to solve the problem, but the reality is more nuanced. In practice, most organizations rely on two patterns:

  • Shared service accounts, a single secret that many scripts, CI jobs, and AI agents reuse.
  • Non‑human identity, a token or service principal issued by an identity provider for a specific automation workload.

Both patterns improve the setup phase. Non‑human identity replaces a password with an OIDC or SAML token, allowing the identity provider to enforce MFA, expiration, and group‑based scoping. However, the token is still presented directly to the target system. The request reaches the database or HTTP endpoint without an intervening enforcement point. Consequently, the organization still lacks:

  • Real‑time approval before a risky query runs.
  • Inline masking of credit‑card numbers or SSNs in query results.
  • Session recording that can be replayed for forensic analysis.
  • Granular, just‑in‑time access that expires the moment the job finishes.

Those missing controls are not solved by identity alone. The missing piece is a data‑path gateway that can observe and act on every protocol exchange. That is where hoop.dev fits.

Why non‑human identity matters for AI agents

Non‑human identity gives the organization visibility into who is authenticating. The identity provider can issue a distinct token for each CI pipeline, each model‑training job, and each autonomous agent. This eliminates credential sharing and enables revocation at the token level. The token also carries group membership, allowing policies such as “only agents in the ml‑training group may query the training_data database”.

But without a gateway, the token is simply handed to the downstream system. The downstream system validates the token and then executes the request. No additional checks occur, and the system does not retain a centrally managed audit log. If the downstream system is compromised, an attacker can reuse the token until it expires.

Why shared service accounts remain a liability

Shared service accounts hide the identity of the caller. All automation appears as a single user, making it impossible to attribute actions to a specific pipeline or job. Auditors cannot answer “which job accessed PII on March 12?” because the logs only show the generic account. Permissions are typically over‑provisioned to avoid breaking existing jobs, expanding the blast radius of a breach.

Even if an organization adds a vault to rotate the password, the core problem persists: the credential is still a static secret that any compromised process can reuse indefinitely.

hoop.dev as the enforcement point in the data path

hoop.dev sits between the identity layer and the target infrastructure. When an AI agent presents a non‑human identity token, hoop.dev validates the token, then proxies the protocol (PostgreSQL, HTTP, SSH, etc.) to the backend. Because the gateway is the sole conduit, it can enforce the following outcomes:

Continue reading? Get the full guide.

Non-Human Identity Management + AI Agent Security: Architecture Patterns & Best Practices

Free. No spam. Unsubscribe anytime.
  • Session recording – hoop.dev captures every request and response, creating a replayable audit trail.
  • Inline data masking – sensitive fields are redacted before they leave the database, protecting downstream systems.
  • Just‑in‑time approval – high‑risk queries trigger a workflow that requires a human signer before execution.
  • Command blocking – dangerous statements such as dropping a database are rejected automatically.
  • Zero‑knowledge credential handling – the agent never sees the underlying service credentials; hoop.dev presents them internally.

All of these controls exist only because hoop.dev occupies the data path. Remove hoop.dev and the same token would flow directly to the database, losing every enforcement benefit.

Putting the two approaches together

When you combine non‑human identity with hoop.dev, you get a complete control surface:

  1. Identity provider issues a short‑lived token for a specific AI job.
  2. The job connects through hoop.dev, which validates the token and extracts group claims.
  3. hoop.dev applies policy: it records the session, masks PII, and may pause for approval if the query touches a regulated table.
  4. After the job finishes, the token expires and the session ends, leaving an audit record.

In contrast, using a shared service account with hoop.dev still gains the enforcement benefits, but you lose the ability to attribute actions to a particular job. The audit log will show “service‑account” for every entry, making root‑cause analysis harder.

Practical steps to reduce AI agent risk

1. Replace static service accounts with non‑human identities. Create a dedicated OIDC client for each automation workload. Configure the identity provider to issue tokens with a short TTL and group claims that reflect the job’s purpose.

2. Deploy hoop.dev as the gateway for all AI‑related connections. Follow the getting‑started guide to run the gateway on‑prem and register your databases, HTTP APIs, and SSH endpoints.

3. Define policies that match your risk profile. Use hoop.dev’s policy language to mask columns that contain credit‑card numbers, require approval for any delete operation on production tables, and block commands that attempt to change user privileges.

4. Monitor the audit stream. hoop.dev records each session; integrate the audit feed with your SIEM to detect anomalous patterns.

5. Rotate credentials automatically. Because hoop.dev holds the backend credentials, you can rotate them without touching the agents. The agents continue to use their non‑human identity token.

FAQ

Does hoop.dev replace my existing identity provider?

No. hoop.dev consumes tokens issued by your OIDC or SAML provider. It adds a layer of enforcement on top of the identity verification you already have.

Can I still use a shared service account if I have no token source?

You can, but you will lose per‑job attribution. hoop.dev will still provide masking and session recording, but the audit will show only the generic account.

Is hoop.dev suitable for on‑prem environments without internet access?

Yes. hoop.dev runs as a Docker container or a Kubernetes pod inside your network. All enforcement happens locally, so no external connectivity is required.

Ready to see the code in action? Explore the open‑source repository on GitHub and start building a safer AI pipeline today.

For deeper guidance on policy configuration and advanced masking techniques, visit the learn section of the documentation.

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