Failing to prove compliance with LGPD can trigger multi‑million‑real‑currency penalties and erode customer trust. When an LLM‑driven application invokes external functions, data moves across network boundaries, and every request becomes a potential audit liability. Without concrete evidence that only authorized users triggered those calls, that data was masked where required, and the operation was approved, an organization cannot demonstrate the controls demanded by the law.
Function calling is attractive because it lets developers offload complex work to micro‑services, but it also expands the attack surface. Sensitive personal identifiers, names, addresses, CPF numbers, can be passed as arguments, stored in logs, or returned in responses. LGPD mandates that any processing of personal data be logged, that access be limited to the minimum necessary, and that the organization retain proof of consent and justification for each use.
Most teams rely on identity providers, OIDC tokens, and role‑based access controls to decide who may invoke a function. Those setups answer the question “who is calling?” but they do not capture what was actually sent, whether the payload contained protected data, or whether a human approved the operation. The missing piece is a control plane that sits on the data path, watches every request, and produces the audit artifacts required by regulators.
Why the data path matters for LGPD evidence
LGPD compliance evidence must be trustworthy, complete, and tamper‑evident. A system that records only after the request reaches the downstream service cannot guarantee that the request was not altered, that sensitive fields were not exposed, or that an unauthorized user did not bypass approval. The enforcement point therefore has to be the gateway that all function‑calling traffic traverses.
Placing controls at the gateway gives three concrete benefits:
- Session recording: Every function call, its arguments, and the response are recorded in a durable log.
- Inline masking: Sensitive fields are redacted in real time, ensuring that logs never store raw personal data.
- Just‑in‑time approval: High‑risk calls can be routed to a human reviewer before they are forwarded to the target service.
These outcomes exist only because the gateway can inspect and act on the traffic. The surrounding identity setup alone cannot provide them.
Introducing hoop.dev as the LGPD‑ready gateway
hoop.dev is an open‑source Layer 7 gateway that sits between callers and the functions they invoke. It consumes OIDC or SAML tokens to authenticate users, but the enforcement happens inside the gateway itself. Because hoop.dev proxies the connection, it can apply the three enforcement outcomes described above.
When a user initiates a function call, hoop.dev checks the user’s group membership and any policy that marks the call as sensitive. If the policy requires approval, the request is paused and presented to an authorized reviewer. Once approved, hoop.dev forwards the call to the target service while simultaneously recording the full request and response payload.
