Uncontrolled function calls can expose privileged data to anyone who can invoke an API, making access reviews essential.
Most teams build LLM‑driven applications that call internal services directly, using static credentials embedded in code or shared service accounts. The function is invoked without any human check, the backend sees the raw request, and the response is streamed back to the model. In practice this means a compromised token or a careless developer can trigger high‑value operations – creating users, pulling financial records, or deleting data – without any trace of who approved the action.
Because the call travels straight from the caller to the target, there is no central point where an organization can enforce an access review, mask sensitive fields, or record the interaction for later audit. The only thing that limits risk is the initial credential policy, which is often static, over‑privileged, and rarely revisited.
Why access reviews matter for function calling
Access reviews are a systematic process that answers three questions each time a function is called:
- Who is the caller?
- Does the caller have a legitimate need for this specific operation?
- Has a recent review confirmed that the permission is still appropriate?
Embedding these questions into the runtime path forces every request to be evaluated against the latest policy, rather than relying on a stale permission set.
Practical steps for an effective review process
- Catalog every function. Maintain a single source of truth that lists the purpose, required scopes, and data sensitivity of each callable endpoint.
- Assign owners. Designate a responsible team or individual for each function who can approve or revoke access.
- Schedule periodic reviews. Run quarterly or monthly cycles where owners verify that current callers still need the permission.
- Scope permissions tightly. Grant the minimum set of arguments and response fields needed for the task.
- Log every decision. Record who approved a call, when, and under what justification.
Even when these practices are followed, the enforcement gap remains: the request still reaches the backend directly, bypassing any runtime guardrails. The policy exists on paper, but the data path offers no way to enforce it in real time.
How hoop.dev closes the enforcement gap
hoop.dev acts as a Layer 7 gateway that sits between the caller and the function target. It receives the request, validates the caller’s identity via OIDC/SAML, checks the latest access‑review decision, and then either forwards the call, requires a just‑in‑time approval, masks sensitive response fields, or blocks the operation entirely. Because the gateway is the only place the traffic passes, every enforcement outcome happens there.
In this architecture the three required categories line up clearly:
- Setup. Identity providers (Okta, Azure AD, Google Workspace) issue tokens that identify the caller. This step decides who is making the request but does not enforce any policy.
- The data path. hoop.dev is the sole gateway where the request is inspected. No other component sees the traffic before the gateway decides what to do.
- Enforcement outcomes. hoop.dev records each session for replay, applies inline masking to hide PII, enforces just‑in‑time approvals, and blocks disallowed commands. These outcomes exist only because hoop.dev sits in the data path.
When a function call is made through hoop.dev, the flow looks like this:
- The client presents an OIDC token.
- hoop.dev verifies the token and extracts group membership.
- It consults the access‑review store to see if the caller’s permission is still valid.
- If the review is fresh, the call is forwarded; otherwise a human approver is notified.
- The response is inspected; any fields marked as sensitive are masked before they reach the caller.
- All steps are logged and the session is recorded for audit.
This pattern lets teams keep the same access‑review discipline they use for human users, but now it is enforced automatically for every function invocation.
Applying the best‑practice checklist with hoop.dev
With hoop.dev in place, the practical steps above become enforceable policies:
- When you register a function, you also attach the required access‑review rule.
- Owners configure the approval workflow in the learning portal, so a request that fails a review triggers a notification to the right person.
- hoop.dev’s inline masking configuration lets you declare which response fields are PII, ensuring they never leave the gateway unredacted.
- Every approval or denial is stored in the audit log, giving you concrete evidence for compliance audits.
Because the gateway is the only path to the function, you no longer need to rely on manual credential rotation or ad‑hoc code reviews. The system automatically enforces the latest access‑review decisions, and any deviation is blocked before it can affect the backend.
FAQ
What is an access review in the context of function calling?
An access review is a periodic validation that a caller’s permission to invoke a specific function is still justified. It involves confirming the need, scope, and data sensitivity of the call.
Can hoop.dev work with existing CI/CD pipelines?
Yes. hoop.dev integrates via standard client tools (curl, SDKs, or the hoop.dev CLI). Your pipeline can invoke functions through the gateway, automatically benefiting from the same access‑review enforcement.
Do I need to change my function code to use hoop.dev?
No. The gateway operates at the protocol layer, so the function implementation remains unchanged. You only point your client to the hoop.dev endpoint instead of the direct service address.
Explore the source code and contribute at https://github.com/hoophq/hoop.