An offboarded contractor’s CI job continues to call a retrieval‑augmented generation (RAG) pipeline using a hard‑coded service token that was never revoked. The token gives the job unrestricted read and write access to the vector store, the LLM endpoint, and any downstream APIs. Because the job runs under a non-human identity that is static and over‑privileged, there is no record of what was asked, no way to block a dangerous prompt, and no audit trail for compliance.
Why static credentials break RAG pipelines
Static secrets are attractive because they require no extra plumbing, but they create three hidden risks. First, the same credential is reused across environments, so a breach in one place compromises every RAG instance. Second, the credential carries more privileges than the job actually needs, inflating the blast radius of a mistake. Third, because the request bypasses any enforcement layer, there is no real‑time visibility into which prompts were sent or which responses contained sensitive data.
Non-human identity as a prerequisite
Replacing static secrets with a non-human identity solves the first two risks. An identity provider (IdP) can issue short‑lived OIDC tokens to each CI job, each token scoped to the exact RAG resources the job requires. The setup decides who the request is and whether it may start, but it does not by itself enforce policy. Without a gateway, the request would still travel directly to the vector store and LLM, leaving the audit and masking gaps unfilled.
Putting hoop.dev in the data path
hoop.dev acts as a Layer 7 gateway that sits between the non-human identity and the RAG backend. Because hoop.dev proxies the connection, it is the only place enforcement can happen. hoop.dev verifies the OIDC token, checks the job’s group membership, and then applies just‑in‑time approval, inline masking of personally identifiable information, and session recording before the request reaches the vector store or LLM. The enforcement outcomes – audit logs, masked responses, and replayable sessions – exist only because hoop.dev sits in the data path.
Designing policies for non-human identity
When you register a RAG resource in hoop.dev, you attach a policy document that references the non-human identity’s groups. Policies can require manual approval for write operations, automatically mask fields that match PII patterns, and reject any request that exceeds a defined token‑usage quota. Because the policy lives in the gateway, it cannot be bypassed by a compromised CI job; the job’s token is validated on each request and the policy is re‑evaluated in real time.
