Skip to content
Architecture/architecture/vault/
Architecture contents

06 · Vault

The core throws the original away. Sometimes you need it back.

This is the one place allowed to keep it, and it is built to make that hard.

The tension

Two good rules that contradict each other

The core's promise

It detects and redacts without ever storing the matched plaintext. A finding is a type and a range. There is nothing to steal, because nothing was kept.

The real requirement

An agent redacts a customer's card number, gets an answer, and now has to place the real order. Something, somewhere, has to put the value back.

The shape of it

Redact with a receipt

Original text, in a trusted runtimeThe vault is opened explicitly, with a bounded scope and lifetime.
the core scans, under your policy
Sanitized text plus a token<rsv_…> is 128 random bits, bound to one vault and one capture. The original stays behind, in memory, on the trusted side.
only the sanitized text crosses the boundary
The model, the log, the third partyThey see the token. The token is not the value and cannot become it.
later, an authorized restore

The approved value, to the approved destination

And nowhere else.

The central rule

A token alone grants nothing

The whole design depends on this rule. Holding the receipt does not entitle anyone to collect. At restore time, a server integration resolves who is asking and why from trusted runtime context, never from something the model said.

  1. Principal. Which authenticated identity is asking.
  2. Tenant. Cross-tenant lookups fail.
  3. Source. Where the capture came from.
  4. Sink and exact path. Which destination, and which structural field inside it.
  5. Purpose. What it is for, declared by the application.
  6. Liveness. Expiry, revocation, usage budget, and the exact issued tokens.

A trap it closes on purpose

A visible label is not a key

The core can format a typed placeholder from safe metadata, such as <JWT_1>, including PII types like <PII_JURISDICTION_US_SSN_1>. It is tempting to treat a label like that as proof the value was kept.

Grants nothing

A typed display placeholder, whether the core's own or an application label like <SSN_1>. It is a formatting concern. It does not imply the original was retained, or can be restored.

Grants a chance

An issued vault token, plus an application grant naming the sink and the exact path. Restoration never parses a display placeholder as proof of ownership.

Which matters because a model can write <SSN_1> into its output whenever it likes. Model output, tool arguments and visible placeholder text cannot authorize their own restoration.

What may be kept

Never everything

Blocked
A core block finding, private-key material, can never become a restorable entry. Not opt-in, not configurable.
Other findings
Require an explicit eligibility decision. Retention is opt-in, never a side effect.
Personal data
Retained only when the application names its exact type in the capture's allowlist, pii: { retain: […] }. Every other PII finding becomes a display placeholder that cannot be restored.

The pieces

Three beta surfaces, plus an alpha persistence profile

@redact-secret/vault

npm · 0.1.0-beta.5Released

The portable piece: opt-in, bounded, in-memory capture and the token lifecycle. Qualified for Node.js 20/22/24 and the browser main thread, with an optional dedicated-Worker mode qualified separately. Worker mode is not an implicit upgrade, and the two modes' guarantees are documented apart.

@redact-secret/vault-server

npm · 0.1.0-beta.5Released

The authority layer: principal, tenant, source, sink, path and purpose checks on every restore. Its default in-memory path remains beta; an opt-in persistent entry point composes encrypted records with an injected store and key provider.

redact-secret-vault (Python)

PyPI · 0.1.0b5Released

Research-grade. A native Python implementation of the same server authority contract, not of the portable vault API. Its base install is in memory; persistent modules ship behind extras but remain explicitly unsupported. Detection still crosses a documented Node.js service boundary.

@redact-secret/store-*

Alpha

Published alpha persistence pieces: contracts, record encryption, PostgreSQL and SQLite stores, an AWS KMS key provider, and conformance tooling. Only the documented PostgreSQL profiles carry a qualification claim. Persistence is a storage choice, not a third trust environment.

The npm names do not make this JavaScript-only. The server security contract is language-neutral, and Python, Rust and Go each need their own native distribution or a separately qualified service boundary.

Being honest

It says beta, and means it

Sources. README.md, ARCHITECTURE.md and the decision records under docs/decisions/ in redact-secret-vault at 194e20e. Published versions and dist-tags were read from the npm registry on 2026-10-03. The repository was formerly named redact-secret-reversible. Persistence is published but remains alpha: support claims apply only to the runtime, store and topology cells named in the repository's qualification records.