All posts

What PCI DSS Means for Embeddings

An offboarded contractor’s API key still lives in a CI job that calls an internal embedding service, exposing a gap that would fail a pci dss audit. The key can issue unlimited requests, and the logs show only a generic service account name. When a breach investigation begins, the team cannot tell which request accessed card‑number data or who approved the call. That situation is more common than most teams admit. Engineers often store embedding model credentials as environment variables, embed

Free White Paper

PCI DSS: The Complete Guide

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

Free. No spam. Unsubscribe anytime.

An offboarded contractor’s API key still lives in a CI job that calls an internal embedding service, exposing a gap that would fail a pci dss audit. The key can issue unlimited requests, and the logs show only a generic service account name. When a breach investigation begins, the team cannot tell which request accessed card‑number data or who approved the call.

That situation is more common than most teams admit. Engineers often store embedding model credentials as environment variables, embed them in Docker images, or share them in a team vault without fine‑grained policies. The connection from the application to the model runs directly over HTTP, bypassing any central guardrail. No individual request is tied to a person, no response is inspected for sensitive fields, and no workflow forces a human to approve high‑risk prompts. The result is a black box that easily violates PCI DSS requirements for access control, logging, and data protection.

Current practice and hidden risk

In many organizations the default is a static token that grants blanket read‑write access to the embedding endpoint. The token is checked into source control, propagated to staging and production, and never rotated. Because the token is static, the system cannot enforce least‑privilege at the request level. Audit trails are limited to generic server logs that do not capture the identity of the caller or the content of the response. Sensitive data such as credit‑card numbers that happen to be returned by the model are not masked, and there is no way to retroactively block a dangerous prompt.

PCI DSS expects every access to cardholder data to be traceable to an individual, that privileged actions be approved, and that sensitive data be protected in transit and at rest. The current practice described above fails those expectations on three fronts: identity, control, and evidence.

Why least‑privilege alone isn’t enough

Introducing a least‑privilege role that limits the token to only the embedding service is a step forward, but it does not close the audit gap. The request still travels straight to the model, bypassing any point where a policy could inspect the payload. Without an enforcement point, the system cannot record who issued the request, cannot require a manager’s sign‑off for high‑risk prompts, and cannot mask card numbers that appear in the model’s output. In other words, the precondition of “least‑privilege access” is satisfied, yet the core PCI DSS controls remain missing.

Continue reading? Get the full guide.

PCI DSS: Architecture Patterns & Best Practices

Free. No spam. Unsubscribe anytime.

hoop.dev as the enforcement point

hoop.dev provides the missing data‑path layer. It sits between the identity provider and the embedding endpoint, proxying every request. Because hoop.dev is the only place the traffic passes, it can apply inline masking, block disallowed commands, and route risky calls to an approval workflow before they reach the model. The gateway records each session, captures the user’s identity from OIDC, and stores an audit log that auditors can query.

When a developer or CI job attempts to call the embedding service, hoop.dev first validates the OIDC token, extracts group membership, and then enforces the policy attached to that identity. If the request contains a prompt that could generate cardholder data, hoop.dev can either mask the response fields or require a manager to approve the call in real time. Every approval, every masked field, and every command is written to the audit log by hoop.dev.

Generating PCI DSS evidence with hoop.dev

PCI DSS mandates four key evidence categories that auditors review:

  • Access control logs that show who accessed cardholder data and when.
  • Change‑management and approval records for privileged actions.
  • Data‑masking or encryption evidence for sensitive fields in transit.
  • Session replay capability to demonstrate that only authorized commands were executed.

hoop.dev generates each of these artifacts automatically. Because the gateway records the full request‑response exchange, the log contains the caller’s user ID, the exact prompt sent to the model, and the masked response that was returned. If a request required a manager’s sign‑off, hoop.dev stores the approval timestamp and the approver’s identity. The masking engine can be configured to redact credit‑card numbers, ensuring that the stored logs never contain raw PAN data, satisfying the data‑protection requirement.

During an audit, the compliance team can extract a report from hoop.dev that lists every embedding request, the associated user, and the outcome of any approval workflow. The session replay feature lets the team replay a request to verify that the model behaved as expected and that no unauthorized data was exfiltrated. In this way, hoop.dev turns a previously opaque embedding pipeline into a fully auditable, PCI‑compliant data flow.

Implementing this architecture starts with the getting‑started guide and the broader learn section, which walk through deploying the gateway, configuring OIDC, and defining masking policies for cardholder data. The open‑source repository on GitHub contains the full source code and example policies.

FAQ

  • How does hoop.dev satisfy PCI DSS logging requirements? hoop.dev records every request with the caller’s identity, the exact payload, and the response. The log is stored centrally and can be exported for audit purposes.
  • Can hoop.dev mask credit‑card numbers returned by an embedding model? Yes. Inline masking rules can be defined to redact PAN patterns before the data is written to storage or presented to the user.
  • Does hoop.dev support just‑in‑time access for CI pipelines? Absolutely. The gateway can issue a temporary approval token that expires after the CI job finishes, ensuring that long‑lived static credentials are not required.

Explore the source code and contribute improvements on GitHub.

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