Redact Secrets From LLM Prompts: Inside OVHcloud’s Pookie

Proxy that can redact secrets from LLM prompts before they reach the model provider

Engineers at OVHcloud built Pookie, an internal proxy meant to redact secrets from LLM prompts before the text leaves the company. The idea is that an outside model provider never receives passwords, keys or internal addresses, while the person using the AI tool notices nothing. A write-up of the design shows why that takes more engineering than a list of regular expressions.

Placeholders that stay consistent

Pookie swaps each sensitive value for a placeholder computed with a keyed HMAC. Anyone without the key can’t recover the original from the result, yet the same input always yields the same placeholder. That consistency lets the model keep track of “server A” over a long conversation without knowing what server A is.

An example placeholder is __PK_PRIVIP_fe44bc609bf6__. The prefix names the tool, the next part gives the type (here a private IP address), and the tail points to the original in Pookie’s cache. If a provider stores or analyses the placeholder, it learns nothing, because the value lives elsewhere. Because the placeholder depends only on the key and the value, the outbound path needs no cache lookup. The proxy just notes each mapping for the return trip.

One master key, read from a file the platform mounts, is split into subkeys for placeholders, encryption and namespaces, so none is reused for a second job.

The same IP address always gets the same placeholder, a different server gets another
Image: OVHcloud Blog

Catching more than it should

Two stages find secrets. Pattern rules recognize values with a predictable format, including private IPs, hostnames in listed zones, API tokens, IBANs, card numbers and customer account IDs. An entropy test then flags random-looking strings, which covers a generated password with no tell-tale format. Encoded content gets decoded and checked a second time. The tool never asks a provider whether a credential is still active.

The bias is deliberate. Pookie accepts replacing a harmless string over letting a real one through. A false alarm in a proxy costs the model a bit of context, whereas a miss exposes a credential.

Anatomy of a placeholder used to redact secrets from LLM prompts, with no data inside
Image: OVHcloud Blog

Keeping users apart

Stored mappings sit in a namespace derived, through an HMAC, from each person’s own provider credential. A placeholder issued in one session means nothing in another. That stops a hostile provider from slipping user A’s placeholder into user B’s reply and getting a shared store to expand it into A’s secret.

Stored values are encrypted with XChaCha20-Poly1305 and a random nonce. Each ciphertext is tied to its namespaced key, so moving a value under a different key breaks authentication, even for someone with write access to Redis. Entries expire after 72 hours by default, a window chosen so work started Friday can resume Monday. The store sits behind TLS, authentication and network isolation. The tool has no user accounts or role-based access control, and a service with bad configuration simply won’t start.

A placeholder replayed in another user’s session misses in that user’s namespace
Image: OVHcloud Blog

What happens when something breaks

Outbound, errors stop the request. A store that can’t be reached or a failed detection pass means nothing is sent, so the worst result is a stalled AI tool rather than leaked data.

Inbound is gentler. Responses stream in pieces, and a placeholder might straddle two of them, so Pookie waits just long enough to avoid restoring half of one. Restored values placed in tool-call arguments are escaped as JSON so agents get valid input. If a placeholder can’t be expanded, it remains in the text and triggers an alert.

The performance cost is small: under 200 microseconds per streamed event at the 99th percentile, and about two seconds at worst for a very large request.

Where it doesn’t protect you

The author lists the weaknesses openly:

  • A passphrase of plain words looks ordinary and can get through.
  • Encrypted data without a recognizable marker goes unreplaced, since Pookie never decrypts to look.
  • Unusual encodings, such as base64 applied twice or compression, can conceal a secret.
  • Because placeholders are stable, the provider can tell which fields repeat.
  • Port numbers are left alone.
  • An agent may still leak a value after Pookie has put it back.
  • The tool trusts the agent and its setup, so it offers no defense against a hostile one.
  • If the store is lost, placeholders saved in old files can’t be turned back into values.

Named entity recognition could find names and postal addresses, which patterns miss. The author tried it, and per-request time rose from around 200 milliseconds to 30 seconds. For now it isn’t worth the delay, though lighter models are under study.

Ways to run it and what comes next

One engine powers four setups: a command-line preview tool, a single binary with an in-memory store, a Docker Compose stack with dashboards, and a Kubernetes Helm chart using Redis for shared multi-user installs. A test with a fixed key confirms that the proxy and the command-line tool give byte-identical results.

The first working version took two weeks, built with AI agents. OVHcloud’s advice for anyone doing the same is to start by keeping secrets out of source code. For data that can’t leave Europe, its AI Endpoints service runs open-weight models in the European Union behind an OpenAI-compatible API.

Source: OVHcloud Blog

Written by

Saksham Bhargava

Saksham Bhargava runs Alteroid and has been writing about consumer technology for over five years, covering iPhone, Android, Windows, AI tools and gaming. With an MCA and six years of hands-on web development experience, he tests the features he writes about on his own devices and focuses on clear, practical guides that solve real problems. Away from the screen, he enjoys travelling to places most tourists skip.