When an AI coding agent is added to a CI pipeline, the most convenient way to let it talk to a production database is to embed a service‑account token issued by Entra. Without just-in-time access controls, that token often carries wide‑range privileges because the agent needs to compile, test, and sometimes migrate schemas. The result is a standing credential that lives forever in the pipeline configuration.
That static credential creates three hidden problems. First, any compromise of the pipeline gives an attacker immediate, long‑lived access to the database. Second, the agent can run arbitrary queries without any human oversight, which makes data exfiltration or destructive commands trivial. Third, because the connection bypasses any gatekeeper, there is no record of which queries were executed, no way to mask sensitive columns, and no opportunity to require an approval before a risky operation.
Just-in-time access means granting the smallest possible set of permissions for the shortest possible time, and only after a policy decision has been satisfied. In practice, the agent presents an Entra‑issued OIDC token, the system checks that the token belongs to a known non‑human identity, and then a temporary, scoped credential is issued for the exact operation the agent needs to perform.
Entra already supplies the identity plumbing. By creating a dedicated service principal for the AI agent, you can enforce least‑privilege scopes at token issuance time. However, the token alone does not enforce the "just‑in-time" part. The request still travels straight from the CI runner to the database, carrying the token’s privileges, without any intermediate enforcement point.
This missing enforcement layer leaves the three risks described above unchecked. Without a gateway, you cannot:
- Intercept a query and require a human or policy‑based approval before it runs.
- Mask columns that contain secrets or personally identifiable information in real time.
- Record a replayable session that auditors can review later.
hoop.dev fills that gap by sitting in the data path between the Entra‑issued identity and the target infrastructure. The gateway validates the OIDC token, extracts the user or service principal information, and then proxies the connection to the database. Because the traffic passes through hoop.dev, the platform can enforce just‑in-time access policies, block disallowed commands, apply inline masking, and capture a complete audit trail for every session.
