An AI coding agent that was trained on a contractor’s repository suddenly receives a request to refactor a payment‑processing microservice. The agent connects to the production Postgres cluster, reads tables that contain customer names, email addresses, and transaction timestamps, and begins to generate new SQL snippets. No human has reviewed the request, and the organization has no record of which personal data the agent accessed.
Under GDPR, any system that processes personal data must be able to demonstrate accountability. That means maintaining an immutable audit log of who accessed what, when, and why; ensuring that only the minimum necessary data is exposed; and providing a clear audit trail for supervisory authorities. When AI agents operate autonomously, the traditional model of a human‑initiated session falls apart. The agent’s token may be scoped correctly, but without a control point that inspects the actual database traffic, the organization cannot prove that the agent respected the principle of data minimisation or that it never exfiltrated personal data.
Why identity alone is insufficient for GDPR evidence
Most teams start with a solid identity foundation: OIDC or SAML tokens issued by an IdP, fine‑grained IAM roles for service accounts, and short‑lived credentials for CI jobs. These steps answer the “who is allowed to connect?” question, but they do not answer “what did the connection actually do?” GDPR’s Article 30 requires records of processing activities, and Article 5 mandates that personal data be processed only for specified, explicit purposes. Without a data‑path enforcement layer, the following gaps remain:
- There is no per‑query audit that ties a specific SQL statement to the originating AI agent.
- Sensitive columns (e.g., email, SSN) can be returned in clear text, violating the data‑minimisation principle.
- Any accidental or malicious bulk export of personal data goes unnoticed until a downstream breach is discovered.
- Approval workflows that would let a data‑privacy officer sign off on high‑risk queries are impossible because the request never passes a gate.
In short, the request still reaches the Postgres server directly, and the organization lacks the continuous evidence stream that GDPR expects.
hoop.dev as the GDPR‑compatible data‑path gateway
hoop.dev is a Layer 7 gateway that sits between identities (human engineers, CI pipelines, or AI coding agents) and the Postgres database. By proxying the connection, hoop.dev becomes the only place where enforcement can happen. It records every session, applies inline masking to sensitive fields, and forces just‑in‑time approvals for high‑risk statements before they reach the database engine.
Because hoop.dev controls the traffic, it can generate the evidence GDPR demands:
- Session recording: hoop.dev records each query and response, tying it to the agent’s identity, timestamp, and source IP. The replay capability lets auditors reconstruct exactly what data was accessed.
- Inline data masking: When a query returns columns marked as personal data, hoop.dev masks those values in the response, ensuring that downstream logs never contain raw identifiers.
- Just‑in‑time approval: For queries that match a risk pattern, such as SELECT * FROM customers WHERE email LIKE ‘%’, hoop.dev pauses execution and routes the request to an authorized reviewer. The approval decision is stored alongside the session record.
- Fine‑grained audit logs: Each event includes the AI agent’s service account, the OIDC token claims, and the exact SQL statement, satisfying the “who, what, when, why” requirements of GDPR.
All of these outcomes are possible only because hoop.dev sits in the data path. The identity system alone cannot provide them.
