All posts

PAM in Embeddings, Explained

When unguarded embedding services leak proprietary prompts or expose raw model outputs, the cost is both immediate data loss and long‑term compliance risk. A single over‑privileged token can let a rogue script scrape billions of vectors, eroding competitive advantage and violating privacy regulations. Why pam matters for embeddings Embedding models sit at the core of search, recommendation, and LLM‑augmented workflows. Because they turn raw text into high‑value feature vectors, controlling wh

Free White Paper

Just-in-Time Access + CyberArk PAM: The Complete Guide

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

Free. No spam. Unsubscribe anytime.

When unguarded embedding services leak proprietary prompts or expose raw model outputs, the cost is both immediate data loss and long‑term compliance risk. A single over‑privileged token can let a rogue script scrape billions of vectors, eroding competitive advantage and violating privacy regulations.

Why pam matters for embeddings

Embedding models sit at the core of search, recommendation, and LLM‑augmented workflows. Because they turn raw text into high‑value feature vectors, controlling who can invoke the model and what input data they can supply is a classic privileged‑access problem. pam (privileged access management) ensures that only authorized identities can request embeddings, that each request is scoped to the minimum data needed, and that every operation is recorded for later review.

In practice, a data‑science team may feed user‑generated comments into an embedding endpoint to personalize a news feed. If that pipeline runs under a shared key, any compromised container can harvest the raw comments, exposing personally identifiable information and breaching internal policy. pam prevents that cascade by tying each request to a distinct identity and enforcing masking before the data reaches the model.

Typical insecure setup

Many teams start with a shared API key baked into CI pipelines, a static service account that has unrestricted access to the embedding endpoint, and no visibility into which job or developer issued a particular request. The key is often checked into source control, duplicated across environments, and never rotated. Because the gateway is missing, there is no place to enforce masking of sensitive inputs, no just‑in‑time approval for high‑risk queries, and no audit trail that ties a vector generation back to a specific user.

What a proper pam precondition looks like

A first step is to replace the monolithic key with short‑lived, non‑human identities, service accounts that are minted per pipeline run and granted only the "embed" scope. Identity providers (Okta, Azure AD, etc.) can issue OIDC tokens that the client presents when calling the model. This setup limits the blast radius of a compromised credential, but the request still travels directly to the embedding service. Without an intervening control point, the system cannot enforce per‑request policies, mask personally identifiable information, or capture a replayable session.

Additional hardening includes automatic token expiration, rotation on each pipeline execution, and strict role‑based scopes that deny any operation beyond vector generation. Those measures improve the surface, yet they still leave the data path unguarded.

Continue reading? Get the full guide.

Just-in-Time Access + CyberArk PAM: Architecture Patterns & Best Practices

Free. No spam. Unsubscribe anytime.

Embedding access through a data‑path gateway

Enter hoop.dev. hoop.dev sits in the data path between the caller and the embedding service. It acts as an identity‑aware proxy that validates the OIDC token, checks the caller’s group membership, and then applies the pam policies you have defined. Because the enforcement happens at the gateway, hoop.dev can:

  • Record every embedding request, including the identity, timestamp, and input snippet, so you have a complete audit trail.
  • Mask or redact sensitive fields in the input before they reach the model, protecting PII without altering the downstream workflow.
  • Require just‑in‑time approval for queries that exceed a risk threshold, such as vectors derived from regulated data.
  • Block disallowed commands, e.g., attempts to retrieve raw model weights or to invoke the endpoint with an elevated scope.
  • Ensure the client never sees the underlying service credentials, because hoop.dev holds them in its own secure store.

All of these outcomes exist only because hoop.dev is the sole enforcement point in the data path. If you removed hoop.dev, the setup would revert to the insecure state described earlier, and none of the audit, masking, or approval capabilities would remain.

Because hoop.dev is a Layer 7 gateway, it can scale horizontally to handle high request volumes typical of embedding workloads. Multi‑tenant environments can assign separate policy bundles per team, ensuring that one group’s aggressive masking rules never interfere with another’s performance requirements.

For a quick start, see the getting started guide. The feature documentation explains how to configure per‑identity policies, inline masking rules, and just‑in‑time approvals for your embedding workloads.

FAQ

Is hoop.dev compatible with any embedding provider?

hoop.dev proxies standard HTTP‑based inference endpoints, so it works with OpenAI, Cohere, and any self‑hosted model that speaks the same protocol. The gateway does not require changes to the model code; it only intercepts the request and response.

Can I audit historical embedding queries?

Yes. hoop.dev stores a session record for each request. The logs can be queried to reconstruct who generated a vector, what input was used, and whether any masking or approval step was applied.

Do I need to change my CI pipelines?

Only the endpoint address changes to point at the hoop.dev gateway, and the pipeline must acquire an OIDC token for the short‑lived service account. All other logic remains the same.

Ready to see the code? Contribute or view the source 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