Introduction
Iron Vault is a small local proxy that holds API credentials so the programs that use them never do.
Point an application’s base URL at Iron Vault and give it a placeholder instead of a provider key. Iron Vault authenticates the caller, checks its route, adds the credential, and forwards the request over verified TLS. The application holds at most a local caller token that grants specific routes; it never needs the provider secret.
sequenceDiagram
participant App as Application (caller)
participant IV as Iron Vault
participant API as Provider API (upstream)
App->>IV: request to /route/..., with a caller token or none
Note over IV: authenticate the caller<br/>check the route's method, path and rate limit<br/>add the credential to the route's slot
IV->>API: request with the credential, over verified TLS
API-->>IV: response
Note over IV: scrub the credential from the response
IV-->>App: response
Who it is for
- AI agents and MCP servers that call APIs such as Brave, Venice or an FX service, without real keys in their configuration or environment.
- Back-office applications that share an installation’s credentials through isolated routes.
- Shared Linux workstations, where each OS account gets only its own routes.
- Server operators who want an unattended service with isolated callers and recoverable encrypted storage.
CLI tools such as gh, npm and cargo are supported only where a tested base-URL integration covers the whole
workflow. Setting HTTPS_PROXY alone does not inject credentials.
What it promises, and what it doesn’t
Iron Vault aims to stop a caller from reading a stored provider credential, sending it to another origin, or using a route it is not granted. It refuses config changes that were not approved, and refuses an old config paired with its old approval.
It does not stop misuse of a route a caller is granted. Malware that can read a caller’s token, or that runs as an account the service recognises, can use that caller’s routes. Method and path restrictions and rate limits bound that access. Response scrubbing reduces accidental disclosure when an upstream echoes a secret, but cannot recognise every transformed form of it. Root and other host administrators are trusted. The security model explains how the vault is locked.
Status
v0 is in progress, and Iron Vault runs on Linux only. The proxy works end to end in development mode. The Debian package for a protected Linux installation is built from the repository, but it has not had a release check on a real machine yet, so don’t rely on it to protect real secrets.
How this manual is organised
- Installation: development mode, the protected Linux install, a shared Linux workstation, and Docker Compose.
- Cookbook: short recipes, each ending with something that works.
- Reference: every command, config key, error, service state, audit event and file.
- Glossary: the terms this manual and the code share, one name per concept.
Development mode
Development mode runs Iron Vault as your own user, with its files in your XDG directories. It is for trying Iron
Vault out and for development. It gives no isolation from malware running as you, and the service says so when
it starts and in status. It relaxes nothing else: callers still authenticate, routes are still checked, TLS is
still verified, responses are still scrubbed, the vault is still encrypted, and configs still need approval.
Development mode is compiled in only with the dev-mode Cargo feature, so a release build can’t be switched into
it. It refuses to run as root.
Build and install
Build and install the dev-mode binary as in
step 1 of getting started. It needs Linux and a Rust toolchain.
The service refuses to run a binary that another account could replace, so make the binary and every directory above
it writable only by you. A build inside a group-writable directory (such as target/ under a 0775 checkout) is
refused with a message naming the directory. Installing under ~/.local usually avoids this.
Shell completion
Bash completion is generated from the same command definitions the CLI parses, and needs no running service:
mkdir -p ~/.local/share/bash-completion/completions
iron-vault completions bash > ~/.local/share/bash-completion/completions/iron-vault
or add source <(iron-vault completions bash) to ~/.bashrc.
Where the files are
Development mode keeps its files here:
| What | Where |
|---|---|
| Config | $XDG_CONFIG_HOME/iron-vault-dev/config.toml (default ~/.config/...) |
| Vault | $XDG_STATE_HOME/iron-vault-dev/ (default ~/.local/state/...) |
| Log | $XDG_STATE_HOME/iron-vault-dev-log/, unless you pass --log-to-stdout |
| Admin socket | $XDG_RUNTIME_DIR/iron-vault-dev/admin.sock |
XDG_RUNTIME_DIR must be set, as it is in a normal desktop or SSH login. A Unix socket path must be under 108
bytes, so keep these directories short. Files and locations lists every file and its
permissions.
Callers need a token
Development mode runs the service as your own account, and a caller may never be the service’s own account, so in
development every caller needs a token. A protected installation runs the service as the iron-vault system account,
and then your account can be a caller identified by the kernel, with no token file to steal:
[listeners.local]
unix_socket = "/run/iron-vault/proxy.sock"
[callers.dev]
listener = "local"
auth = "peer"
user = "alice" # the account the calling process runs as
routes = ["httpbin"] # the route from getting started
The kernel reports the connecting process’s account, so only processes running as alice get those routes. That
includes malware running as alice, but no other account’s processes. A protected installation also takes the admin
socket away from your login account: you administer it with sudo.
A tour through the cookbook
These recipes, in this order, start the service and try each part of Iron Vault against
httpbin.org, which echoes back each request it receives, and Venice.ai. The
tour needs curl and jq, and the two-callers recipe needs two Venice API keys.
- Getting started in development mode: start the service, create and unlock the vault, store a credential, approve a route and send a request.
- Two keys, two callers, different permissions.
- Investigate with the audit log.
- Rotate or revoke a caller token and widen or narrow a route.
- Scrubbing and redirects.
- A route can’t send a key to another host.
- Rotate a provider key and remove a credential safely.
- Lock, unlock and restart.
- Tamper detection and recovery.
- Point a real application at Iron Vault.
- Start over in development mode.
Installing Iron Vault on Linux
This guide installs the protected Linux deployment (§4): the
service runs as the iron-vault system account, its vault is in /var/lib/iron-vault, and no ordinary account can read
it. linux-package.md says what the package installs and why. For a worked example with several
accounts, see multiuser-linux.md. To try Iron Vault as your own user instead, use
development mode, which gives no isolation from malware running as you.
The protection depends on the host, not only the package. Do the two checks under Before you install first.
Before you install
Harden sudo
Every admin command runs through sudo (§5): your login
account is never an admin principal, so malware running as you cannot reach the admin socket. That barrier is only as
strong as your sudo setup. After you enter your password, sudo remembers it for a timeout that depends on the
distribution: 5 minutes upstream, 15 on Ubuntu. Since sudo 1.8.21 the cache is per terminal (timestamp_type=tty) by
default, so anything running in that terminal, malware included, can run admin commands without a prompt until the timeout
ends.
-
Cache per terminal, or not at all. Create
/etc/sudoers.d/iron-vault-sudowithsudo visudo -fand put one of these in it. The first sets the per-terminal cache explicitly, so a distribution default cannot change it:Defaults timestamp_type=ttyor, the stronger choice, to ask for the password every time:
Defaults timestamp_timeout=0 -
Add a hardware key where you have one.
pam_u2f(Debian and Ubuntu packagelibpam-u2f) makessudoask for a touch on a FIDO2 key as well as the password.-
Before editing
/etc/pam.d/sudo, open a spare terminal and runsudo -iin it, and keep that root shell open until the last step. (su -fails on Ubuntu, where root is locked.) Without the key file, every latersudois refused. -
Register the key;
pamu2fcfgprints to stdout, writes no file and needs a touch on the key, so redirect it:mkdir -p ~/.config/Yubico && pamu2fcfg > ~/.config/Yubico/u2f_keysMalware running as you can rewrite that file and register its own key. A central
authfile=under/etc, owned by root (auth required pam_u2f.so authfile=/etc/u2f_mappings), keeps the registration out of its reach. Register withpamu2fcfg -u "$USER" | sudo tee -a /etc/u2f_mappingsinstead. -
In
/etc/pam.d/sudo, addauth required pam_u2f.soafter the@include common-authline. -
From a second terminal, check that
sudo trueasks for the touch, and only then close the root shell.
-
Approving a config also needs the approval passphrase, and unlocking needs the vault passphrase, so a borrowed sudo
session alone can do neither. It is still a host administrator (§2):
it can read the unlocked service’s memory, lock the service, and run as any caller account to use that account’s routes.
Encrypt swap and hibernation storage
Iron Vault locks its memory with mlockall, so the service’s secrets are not paged out to swap. Locking does not stop
hibernation: the kernel writes all of RAM to the hibernation image, locked pages included
(§14). Swap and hibernation storage must therefore be
encrypted whenever either is enabled, normally by full-disk encryption. Swap matters beyond the service too: the CLI
(sudo iron-vault init, unlock, add, replace and config approve) holds the passphrases and keys you type, and
does not call mlockall, so those pages can be swapped out.
Check what the machine uses:
swapon --show
lsblk -o NAME,TYPE,FSTYPE
In the lsblk tree, the partition should show crypto_LUKS in FSTYPE, with a crypt device (TYPE column) beneath it
and swap in FSTYPE on that crypt device. A swap partition directly on a plain disk partition is unencrypted.
lsblk lists no swap files, and Ubuntu’s default swap is the file /swap.img. For a swap file, find the device that holds
it and check that device in the lsblk tree for crypt:
findmnt -no SOURCE -T /swap.img
A zram swap device without a writeback device is RAM-backed and never reaches disk, so it needs no encryption.
If swapon --show prints nothing and you never hibernate, there is no swap to protect.
If you hibernate, the resume device is the swap device: check it the same way.
Install
The package supports Ubuntu 26.04 LTS and also installs and runs on Ubuntu 24.04 LTS. Build it on the oldest release you will install it on: a package built on 24.04 installs on 26.04 too, but one built on 26.04 may need a newer glibc than 24.04 has.
Build the package from source, or use one you were given. Building needs cargo-deb, lintian, and libtss2-dev and
pkg-config for the TPM signing helper:
sudo apt install libtss2-dev pkg-config lintian
cargo install cargo-deb --locked
scripts/build-deb.sh
sudo apt install ./target/debian/iron-vault_*.deb
scripts/build-deb.sh builds both the service and the helper (cargo deb alone builds only the service), checks the package, and
writes it to target/debian/. IRON_VAULT_SKIP_LINTIAN=1 skips the lintian check
(details).
The package creates the iron-vault account and its directories, and enables and starts iron-vault.service. The
service starts Locked with no vault, and the installer prints the next command.
If an iron-vault account or group already exists, the install stops with “an iron-vault account or group already exists
and is not a locked system account”, unless it is what the package would have created: a system uid, a nologin or
false shell, a locked password, home /, /nonexistent or /var/lib/iron-vault, no other groups, and a group with
no members, no administrators and no password in /etc/gshadow (or in /etc/group when /etc/gshadow has no entry
for it). The package would otherwise hand that account the vault and its group the audit log. The message lists each
problem. Correct the account, or delete it so the package creates its own, then finish the install:
sudo userdel iron-vault
sudo groupdel iron-vault # only if the group is still there
sudo dpkg --configure iron-vault
The same check runs when you reinstall after a purge, which keeps the account. If you gave a
log collector the iron-vault group, take it out of the
group first and add it back afterwards. If the install stops instead with “could not check the account files for an
existing iron-vault account”, check that /etc/passwd, /etc/group, /etc/shadow and /etc/gshadow are readable,
then run sudo dpkg --configure iron-vault.
sudo iron-vault init # prompts for the vault and approval passphrases; shows the recovery key once
sudo iron-vault unlock # prompts for the vault passphrase
sudo iron-vault status # service: ready
init is described in vault-initialization.md. Store the recovery key offline.
unlock is refused with memory-unprotected if the service could not lock its memory, and status names the cause. The
packaged unit sets LimitMEMLOCK=infinity, which is what allows the lock, so the usual cause is an edited unit or a drop-in
that lowers the limit. Fix the limit (after a hand edit of a unit or drop-in, run sudo systemctl daemon-reload first) and
sudo systemctl restart iron-vault; the service does not restart itself, because it has not failed.
Then add each credential the config names, write a config and approve it, as in multiuser-linux.md:
sudo iron-vault add github --origin api.github.com
sudo iron-vault config approve config.toml
The config can be anywhere sudo can read it. The service publishes the approved copy to /etc/iron-vault/config.toml.
Send a request
A config with a Unix socket listener needs no listener socket unit: the service binds the socket itself in
/run/iron-vault. This example assumes the multi-user config, which grants the
gh route to the code account by its peer account. Run it as code:
curl --unix-socket /run/iron-vault/proxy.sock http://localhost/gh/user
Your own login gets 401 unless the config names it as a caller. sudo curl ... is refused: the service never accepts
root as a caller (§7).
Add a TCP listener
In a protected install, systemd holds every TCP port, so the service never binds one itself
(§7). Each listener is an instance
iron-vault-listener@<name>.socket of the packaged template, and <name> must be the listener’s name in the config. A
non-loopback address also needs tls_certificate and tls_key in the config.
-
Give the instance its address in a drop-in:
sudo systemctl edit iron-vault-listener@loopback.socket[Socket] ListenStream=127.0.0.1:7878An address that appears only after boot, such as a Docker bridge, also needs
FreeBind=yesin the drop-in. -
Enable it, so it starts at every boot:
sudo systemctl enable iron-vault-listener@loopback.socket -
List the running listener sockets, then stop them together with the service, start each one the list shows plus the new one, then start the service and unlock it. systemd refuses to start a socket while its service is running (
Socket service iron-vault.service already active, refusing), soenable --nowor a plainstartfails here. Stopping the service alone is not enough: a caller connecting to a listener socket that is still up starts it again, and the refusal returns. This frees every listener’s port for a moment. Read Stop the service for what that means for callers and for port squatting, and stop your callers first.systemctl list-units 'iron-vault-listener@*.socket' sudo systemctl stop 'iron-vault-listener@*.socket' iron-vault.service sudo systemctl start iron-vault-listener@loopback.socket # one line for each socket the list showed, the new one included sudo systemctl start iron-vault sudo iron-vault unlockList before you stop: a stopped instance may be unloaded, and a glob passed to
startthen matches nothing. A listener you leave out stays down, with its port free, until the next boot. -
Approve a config that names the listener with the same address:
[listeners.loopback] address = "127.0.0.1:7878"sudo iron-vault config approve config.toml
The service serves on a passed socket only if an approved listener of the same name has exactly that address, so editing
a socket unit can remove a listener but never widen one. To remove a listener, approve a config without it, then run
sudo systemctl disable --now iron-vault-listener@loopback.socket.
systemd keeps the port through service restarts and crash loops. A socket that fails to bind at boot, for example
because another process took the port first, leaves the port free, and a process holding it can collect the caller
tokens your callers send. Check systemctl --failed after each boot. If a listener socket was down while callers kept
sending, rotate their tokens as under Stop the service.
Stop the service
sudo systemctl stop iron-vault stops the service only until a caller connects. systemd keeps listening on each
listener socket and starts the service again on the next connection. It comes back Locked, so no credential is exposed,
but it is running. If you stop it during an incident, for example because you suspect a caller was compromised, stop
the listener sockets with it:
sudo systemctl stop 'iron-vault-listener@*.socket' iron-vault.service
It stays stopped until the next boot. Stopping the sockets releases their ports, and another local process can then
bind a TCP port and collect the caller tokens that callers keep sending to it. Stop your callers first. If any kept
sending while the ports were free, issue new caller tokens for the callers on TCP listeners with
iron-vault caller-token and approve a config with their new
token_hash lines.
To start it again, start each listener socket, then the service, and unlock it:
sudo systemctl start iron-vault-listener@loopback.socket
sudo systemctl start iron-vault
sudo iron-vault unlock
TPM unlock
TPM unlock lets the service open the vault at boot with no one typing a passphrase. The vault passphrase and the offline recovery key keep working: TPM unlock adds a way in and replaces none. It is optional, and it has had no release check on a real machine yet, so don’t rely on it for real secrets. For a walk-through that ends in a reboot that reaches Ready, see the recipe. The design is tpm-unlock.md.
What it needs. Ubuntu 26.04 LTS, the supported release, where its release checks run. It also runs on Ubuntu 24.04 LTS:
there the provisioning helper goes ahead after a notice that no release check runs on 24.04. On any other release the helper
stops, and the service starts Locked and waits for iron-vault unlock, as it does without TPM unlock. It also needs a TPM 2.0,
Secure Boot on (the seal is bound to PCR 7, which records the Secure Boot policy) and age-keygen (Ubuntu package age). TPM
unlock has no PIN in v0 (the TPM approver has one). A laptop gets its second secret from full-disk
encryption instead, as below.
How it works. The host unlock identity is a key that systemd-creds seals to the TPM as the root-only file
/etc/iron-vault-host/host-unlock.cred. At each boot the package’s handoff unit, iron-vault-host-unlock.service, unseals
it as root onto a ramfs at /run/iron-vault-unlock and hands it to the service, which uses it to open the vault. The service
never opens the TPM, and the identity is never written to disk in the clear. There is nothing to enable: the service pulls the
handoff unit in at every start, and the unit is skipped on a machine with no blob.
flowchart LR
T[("TPM, at PCR 7")] -->|unseals| U["iron-vault-host-unlock.service<br/>(root)"]
B["/etc/iron-vault-host/host-unlock.cred"] --> U
U -->|installs the identity| R["/run/iron-vault-unlock<br/>(ramfs)"]
R -->|read at start| S["iron-vault.service"]
S -->|opens| V[("the vault")]
Provision
Run the helper once, as root, with the choice of mode it asks for. There is no default, because the two modes accept different risks (§14):
--server: for a server or appliance. Anyone with physical access to the machine and a trusted boot image can start the vault. The helper says so and seals nothing until you typeyes.--portable: for a laptop. The helper checks, once, that something you must supply at boot protects the disk that holds the blob: a LUKS passphrase typed at boot, or a LUKS TPM slot that needs a PIN (systemd-cryptenroll --tpm2-with-pin=yes). On a btrfs or bcachefs filesystem that spans several devices it checks every device. It warns when part of the disk is not encrypted, when a TPM orclevisslot needs no PIN, when/etc/crypttabor an initramfs holds a key file, when a crypttabkeyscript=is not one known to ask you, and when it cannot tell. With a warning it seals nothing until you accept that anyone who steals the machine can start the vault.
sudo iron-vault-provision-host-unlock --server # or --portable
It prints the identity’s recipient key, age1…, and writes /etc/iron-vault-host/host-unlock.cred. It refuses to run when
the blob exists: move the old one aside first. With no terminal, yes is never read from a pipe; pass
--accept-physical-access (--server) or --accept-no-second-secret (--portable) to accept in a script. The choice is
recorded in the journal (journalctl -t iron-vault-host-unlock) and in /etc/iron-vault-host/provisioning.txt. The helper
never clears the TPM, sets a TPM password or changes its lockout settings.
The --portable check runs once, at provisioning. A PIN-less slot added later, for example with
systemd-cryptenroll --tpm2-device=auto, silently removes the second secret and the helper never sees it. Run the helper
again, as under Replace the identity, after any change to the disk’s key slots. It cannot see a
passphrase written on the laptop either.
Enrol
The handoff unit runs before the service only at boot. On a running install, start it by hand; the running service sees its mount.
-
A new vault: provision, start the handoff unit, then create the vault with the identity as a recipient.
sudo systemctl start iron-vault-host-unlock.service sudo iron-vault init --host-unlock sudo iron-vault unlock -
An existing vault: provision, start the handoff unit, then enrol the recipient key the helper printed. It asks for the vault passphrase.
sudo systemctl start iron-vault-host-unlock.service sudo iron-vault recipient add --host-unlock age1… --label "host unlock"
Then check that a restart needs no unlock:
sudo systemctl restart iron-vault
sudo iron-vault status # service: ready, host unlock: unlocked
lock still wins: a service its owner locked stays Locked across a crash, a restart and a reboot until a passphrase
unlock (lock, unlock and restart).
Before a Secure Boot key or firmware update
These change PCR 7, and the blob no longer unseals: a change to the Secure Boot keys or databases (PK, KEK, db, dbx),
turning Secure Boot on or off, a change to the certificate that verifies the boot chain, shim’s MokSBState or SBAT level,
and an option ROM the firmware verifies against a different db entry. Treat a firmware update as one unless the
vendor says it leaves the Secure Boot variables alone. dbx and KEK updates arrive routinely through fwupd and
distribution updates. Unattended unlock does not survive them, and a server that applies them unattended needs someone
to type the passphrase afterwards, or should hold them for a maintenance window. The vault is not stranded: the service
starts Locked and unlock and the recovery key work as before.
Before the update:
- Run
sudo iron-vault recovery checkwith the offline recovery key, to prove a way in that does not need the TPM. - Confirm that whoever holds the vault passphrase can reach the machine after the reboot.
- Schedule it for a window in which callers can do without the vault until the passphrase is typed.
After the update
After the reboot the service is Locked, sudo iron-vault status says host unlock: unseal_failed, and the audit log has
vault.host-unlock with host_unlock_outcome unseal_failed.
sudo iron-vault unlockwith the vault passphrase.- Move the old blob aside and provision a new identity (see Replace the identity). The helper prints a new recipient key.
sudo systemctl restart iron-vault-host-unlock.servicesudo iron-vault recipient add --host-unlock <new age1…> --label "host unlock"sudo systemctl restart iron-vault, and check thatstatusreaches Ready with nounlock.sudo iron-vault recipient remove <old age1…>(it asks for the approval passphrase), and delete the old blob.
Replace the identity
Provisioning a new identity is also what to do after a lost TPM or a change to the disk’s key slots. The blob must be moved aside first, because the helper will not overwrite it:
sudo mv /etc/iron-vault-host/host-unlock.cred /etc/iron-vault-host/host-unlock.cred.old
sudo iron-vault-provision-host-unlock --server # or --portable
Then restart the handoff unit and enrol the new key as in steps 3 to 6 above. recipient list shows the old key as
host-unlock beside the new one until you remove it. recipient remove refuses the
recipient whose identity the handoff currently holds, so if it refuses, you named the new key.
Retire TPM unlock
sudo systemctl stop iron-vault-host-unlock.servicesudo rm /etc/iron-vault-host/host-unlock.credsudo iron-vault recipient remove <age1…>for thehost-unlockrecipient.sudo systemctl restart iron-vault: the service starts Locked, withhost unlock: absent.
A copy of the blob in a backup still opens on this TPM at this PCR 7. To retire the whole machine, see Retire a machine.
Other things to know
- A distribution upgrade.
systemd-credschanges how it binds to the TPM between releases, and whether a blob sealed on one release unseals after an upgrade to the next has not been checked. Have the vault passphrase at hand: a failure readsunseal_failed, and the steps above replace the identity. - A TPM in lockout. The TPM counts wrong PINs and passwords from every program that uses it, and by the TPM
specification also an unclean power loss after the boot’s unseal. When the count reaches its limit the TPM is in
lockout, and it then refuses this unseal too: the service starts Locked with
unseal_failed, andjournalctl -b -u iron-vault-host-unlock.servicesaysdictionary attack lockout mode. Nothing needs provisioning again. Type the passphrase withsudo iron-vault unlockif callers can’t wait. The TPM forgets one try per lockout interval while the machine is on (tpm2_getcap properties-variableshowsinLockoutand the count); once it is out of lockout,sudo systemctl restart iron-vaultunseals again. A machine that loses power often, or runs other TPM software that takes PINs, is more likely to meet this. - An owner password set by another OS.
systemd-credsseals under the TPM’s owner hierarchy, whose password is empty on Linux by default. If another operating system set one, the helper fails withsystemd-creds’s error. Iron Vault never sets, clears or reads it. - Hibernation. The unsealed identity is in RAM, so hibernation writes it into the hibernation image. Swap and hibernation storage must be encrypted (above); this matters most on a laptop.
- Who can interfere. A member of the
tssgroup can open/dev/tpmrm0and clear the TPM or set an owner password. That ends unattended unlock until you provision again; the vault waits Locked, not stranded. - Uninstall and purge.
apt removestops the handoff unit and keeps/etc/iron-vault-host.apt purgedeletes it only when you also let it delete the vault, because that identity opens only that vault.
TPM approval signer
The package can also use the machine’s TPM as an approval signer: a key that never leaves the TPM approves your configs and the changes that need you present, once you type its PIN. It is optional, adds an approver and replaces none, and it has had no release check on a real machine yet, so don’t rely on it for real secrets. For the commands, see the recipe. The design is tpm-approval-signer.md.
What it needs. Ubuntu 26.04 LTS (it also runs on 24.04, which has no release check), a TPM 2.0 at /dev/tpmrm0 and the
tss group with the udev rule that gives it that device. Ubuntu’s tpm-udev package provides both, and the TPM libraries the
package depends on pull it in, so it is always installed; the package creates no tss group itself. If the rule does not match
your TPM’s device, the kind is still offered, because the socket exists, but approver add --kind tpm answers
approver-kind-unavailable.
What the package installs. A helper, /usr/libexec/iron-vault/iron-vault-tpm-signer, run for one connection at a time by
iron-vault-tpm-signer.socket as its own account, iron-vault-tpm. The service account and root alone can connect to
/run/iron-vault-tpm/signer.sock. iron-vault.service is unchanged: it still has no access to any TPM device. Install enables
and starts the socket, and remove stops it; both accounts are kept, as iron-vault is.
The PIN. At least 6 characters, typed twice at enrollment. The TPM keeps no copy of it. The TPM counts every wrong try, and shares one counter among everything on the machine that uses a PIN, such as a disk-encryption slot. The helper therefore spends at most half of the TPM’s tries, never more than 16 at a time, and refuses to work at all when the TPM’s lockout recovery interval is under 600 seconds (one forgotten try is forgiven per interval). A wrong try is also counted after a power cut that follows a use of the key.
Recovery advice.
- Keep a software approver beside the TPM one. A forgotten PIN, a firmware reset that cleared the TPM, or a replaced board are all recovered by enrolling another approver and removing the TPM one; both approval counters carry over.
- If the TPM approver is the only one and it is lost, only
resetremains. - The recovery key and the vault passphrase are not approvers and cannot enroll or remove one.
- The key works on this machine only, and does not move in a migration bundle.
- To retire the TPM approver,
approver removeit; that deletes its blob. Nothing of Iron Vault’s stays in the TPM.
Upgrade
Build the new package as under Install, then:
sudo apt install ./target/debian/iron-vault_*.deb
sudo iron-vault unlock
The upgrade restarts iron-vault.service, and it comes back Locked unless TPM unlock is set up: requests get 503 with
reason locked until you unlock it (§15). Listener socket units are not restarted, so
they keep their ports through the upgrade. The vault and config are not touched.
Read the release’s Breaking changes in the changelog first. A pre-release may change a vault file format without
reading the old one: the upgrade from 0.3.0-alpha to 0.4.0-alpha does. Then unlock ends with unlocked-unavailable
and status shows reason: recovery needed. Copy /etc/iron-vault/config.toml and save the output of
sudo iron-vault list before such an upgrade, and follow
Recover from an upgrade that cannot open the vault after it.
Uninstall and purge
sudo apt remove iron-vault stops the service, stops and disables the listener instances, and removes the program. It
keeps /etc/iron-vault, /var/lib/iron-vault, /var/log/iron-vault, the listener drop-ins and the iron-vault account,
so a later install opens the same vault and starts Locked. Enable each listener socket unit again after reinstalling.
Removing the package releases the listener ports, and the caller tokens stay valid for the reinstall. Stop your callers
before apt remove. If any kept sending to a TCP listener while the package was removed, rotate their tokens as under
Stop the service.
sudo apt purge iron-vault deletes /etc/iron-vault (the published config and signature, and any TLS files you put
there), /var/log/iron-vault and the listener drop-ins under /etc/systemd/system/iron-vault-listener@*.socket.d. It then
asks, at high priority and defaulting to no: “Delete the vault and every stored credential?” Answer yes to delete
/var/lib/iron-vault. Under a non-interactive frontend, with no answer preseeded, the vault is kept and the purge prints
the command to delete it.
Deleted credential records cannot be recovered, not even with the recovery key. To delete a kept vault by hand:
sudo rm -rf /var/lib/iron-vault
A kept vault whose config went with the purge unlocks into an Unavailable service with an invalid policy until you approve
a config again (config-approval.md). The iron-vault account and the iron-vault-tpm account of the TPM signing helper stay after purge, so a
later account cannot reuse their uids and gain a kept vault’s files. To remove them too, after deleting the vault:
sudo userdel iron-vault and sudo userdel iron-vault-tpm.
Iron Vault on a shared Linux workstation: a beginner’s guide
This guide explains one setup from start to finish: a single Linux machine where different kinds of work run under different user accounts, and Iron Vault hands each account only the API access it needs. It assumes no knowledge of cryptography, systemd or Linux permissions beyond “each user has their own files”.
Status: this guide describes the protected Linux installation, which the
.debpackage installs. For the install,sudohardening, encrypted swap, upgrade and uninstall, see linux-install.md. Callers are recognised as in §7 of the specification.
The situation
You have one Linux box and you have split your work across three accounts, so that malware in one account can’t reach everything:
| Account | What it does | API credentials it needs |
|---|---|---|
alice | Your main account: email, documents, the desktop | AI services, Adobe, CRM |
trading | Crypto wallets and brokerage accounts | TradingDesk, CoinGecko |
code | Software development | GitHub |
You develop outside Docker because you need ordinary desktop (X) applications, so you rely on Linux user accounts
to keep things apart. That works well for files: code can’t read trading’s wallet files.
The problem
API keys have to live somewhere. Today they all live in alice’s home directory, in config files and environment
variables. That causes two problems:
aliceholds everything. Malware that gets intoalice’s account can copy every key at once: the AI services, Adobe, the CRM and the trading platforms.- The other accounts need keys too. To give
codea GitHub token, you copy it intocode’s home directory. Now malware incodecan copy the token and use it from anywhere, for as long as it stays valid. You may never notice.
A copied key is the worst outcome: it works from the attacker’s machine, it bypasses every limit you set, and the only fix is to revoke it at the provider.
What Iron Vault changes
Iron Vault is a small service that runs in the background under its own account, iron-vault. It holds the real
keys, encrypted, in a directory no ordinary account can read.
Think of it as a front desk. Your programs no longer carry keys. Instead they walk up to the front desk and say “please send this request to GitHub for me”. The desk checks who is asking and whether they’re allowed to make that request. If so, it adds the key, sends the request, and passes back the answer. The key never leaves the desk.
flowchart LR
subgraph code account
G[git scripts, gh tools]
end
subgraph trading account
T[trading bots]
end
subgraph iron-vault service
D{Who is asking?<br/>What may they do?}
K[(Encrypted keys)]
end
G -- "/gh/..." --> D
T -- "/tradingdesk/...<br/>/coingecko/..." --> D
K -. adds the key .-> D
D -- HTTPS with key --> GH[api.github.com]
D -- HTTPS with key --> TD[TradingDesk API]
D -- HTTPS with key --> CG[CoinGecko API]
After the change:
codecan use GitHub through Iron Vault, but it can’t read the GitHub token, and it can’t reach the trading APIs.tradingcan use TradingDesk and CoinGecko, but not GitHub, and it can’t read those keys either.aliceno longer has the keys lying around in files. She manages them through Iron Vault’s admin commands.
How Iron Vault knows who is asking
When a program connects to Iron Vault’s Unix socket (a special file programs use to talk to each other on the same machine), the Linux kernel tells Iron Vault which user account the program runs as. A program can’t lie about this; only root could fake it.
So a request that arrives from the code account is the code caller. It needs no passwords, tokens or groups.
The config says which account may use which routes, and the kernel says which account is connecting.
This is peer-account identity, written auth = "peer" in the config.
What about http://localhost?
Many tools only accept a web address such as http://localhost:7878/gh, not a socket file. Over a network
connection, even a local one, the kernel does not tell Iron Vault which account is connecting. For those tools,
Iron Vault gives the account a caller token: a long random password that the tool sends with each request.
Keep it in a file only that account can read.
| Connection | How Iron Vault recognises the account | What the account keeps |
|---|---|---|
Unix socket /run/iron-vault/proxy.sock | The kernel reports the account | Nothing |
http://127.0.0.1:7878 | A caller token sent with each request | One caller token, not the API key |
A stolen caller token is much less dangerous than a stolen API key. It only works from this machine, only for that account’s routes, and only within that account’s limits. You can replace it without touching the provider.
Setting it up
Run the sudo commands from alice’s terminal.
1. Install the package
Follow linux-install.md to harden sudo and check that swap is encrypted, then
install the .deb. The package creates the iron-vault account and its private directories, and installs Iron Vault as
a system service that starts at boot, Locked:
| Path | Owner | Who else can get in |
|---|---|---|
/var/lib/iron-vault | iron-vault | Nobody. This holds the encrypted keys. |
/etc/iron-vault/config.toml | iron-vault | Nobody. This is the approved config. |
/run/iron-vault | iron-vault | Other accounts can reach the sockets inside, but can’t add, remove or replace files |
2. Create the vault
sudo iron-vault init
This creates the encryption keys, asks you to choose a vault passphrase and an approval passphrase, and shows you a recovery key once. Write the recovery key down or store it in your password manager: it is how you get back in if you forget the vault passphrase. Then unlock the vault, which you do again after every restart or upgrade:
sudo iron-vault unlock
Why
sudo, and not justalice? Admin commands work only for root. If plainalicecould run them, malware inalice’s account could too. WithDefaults timestamp_timeout=0, the stronger choice in linux-install.md,sudoasks for your password for every admin command; withtimestamp_type=ttyit asks once per terminal until the timeout ends. Approving a config change also needs your approval passphrase, so a hijackedsudosession alone isn’t enough.
3. Add the credentials
sudo iron-vault add github --origin api.github.com
sudo iron-vault add tradingdesk --origin api.tradingdesk.example
sudo iron-vault add coingecko --origin api.coingecko.com
Iron Vault asks for each key at a prompt, not on the command line, so it never lands in your shell history. The
--origin option names the website the key may be sent to. That choice is locked in with the key: a
later config change can never send the GitHub token anywhere else.
Once a key is in, delete the old copies from config files and environment variables.
4. Write the config
The config says who may use what. Here is the whole thing for this machine:
schema_version = 1
# One socket for everyone. The connecting account decides what it may use.
[listeners.local]
unix_socket = "/run/iron-vault/proxy.sock"
# --- Who may use what ----------------------------------------------------
[callers.code]
listener = "local"
auth = "peer"
user = "code"
routes = ["gh"]
[callers.trading]
listener = "local"
auth = "peer"
user = "trading"
routes = ["tradingdesk", "coingecko"]
# --- Where each route goes -----------------------------------------------
[routes.gh]
prefix = "/gh"
upstream = "https://api.github.com"
credential = "github"
slot = { header = "Authorization", format = "Bearer {}" }
methods = ["GET", "POST", "PATCH"]
paths = ["/**"]
rate_limit = { requests = 300, per_seconds = 60, burst = 30 }
[routes.tradingdesk]
prefix = "/tradingdesk"
upstream = "https://api.tradingdesk.example"
credential = "tradingdesk"
slot = { header = "Authorization", format = "Bearer {}" }
methods = ["GET", "POST"]
paths = ["/v1/orders/**", "/v1/positions/**"]
rate_limit = { requests = 60, per_seconds = 60, burst = 10 }
[routes.coingecko]
prefix = "/coingecko"
upstream = "https://api.coingecko.com"
credential = "coingecko"
slot = { header = "x-cg-demo-api-key" }
methods = ["GET"]
paths = ["/api/v3/**"]
rate_limit = { requests = 30, per_seconds = 60, burst = 5 }
Reading it in plain words:
- Listener: where programs knock. Here it’s one socket file.
- Caller: who is knocking.
codeis every process that runs as thecodeaccount. - Route: a door to one API. It names the website, which key to use, and where in the request the key goes (the slot).
methodsandpaths: which kinds of request the door allows. CoinGecko only allows reading (GET). Every route must list these; leaving them out never means “allow everything”.rate_limit: how fast requests may come. If malware intradingstarts hammering the API, it hits this limit.
You can make a door narrower for one account. To let code only read from GitHub, add a second route with the
same key and tighter rules, and grant code that one instead:
[routes.gh-read]
prefix = "/gh-read"
upstream = "https://api.github.com"
credential = "github"
slot = { header = "Authorization", format = "Bearer {}" }
methods = ["GET"]
paths = ["/repos/**", "/user"]
rate_limit = { requests = 300, per_seconds = 60, burst = 30 }
5. Approve the config
Save the config above as config.toml, then approve it:
sudo iron-vault config approve config.toml
Iron Vault reads it, checks it, and shows you its own summary of what will change. If it looks right, you approve it. Approving needs your approval passphrase.
Iron Vault only ever runs a config you approved. If someone edits the file behind your back, or puts back an older one, Iron Vault refuses to use it.
6. Point the programs at Iron Vault
Programs in code and trading now send their API requests to Iron Vault instead of the provider, and leave the
key out:
# As the code account: list your GitHub repositories
curl --unix-socket /run/iron-vault/proxy.sock http://localhost/gh/user/repos
# As the trading account: get the Bitcoin price
curl --unix-socket /run/iron-vault/proxy.sock \
"http://localhost/coingecko/api/v3/simple/price?ids=bitcoin&vs_currencies=usd"
The http://localhost part is only there because curl needs a web address; the request goes through the socket
file.
For a program that has a “base URL” setting, set it to the route. A Python script that can talk to a Unix socket, for
example, would send its requests to http://localhost/gh over the socket in place of https://api.github.com. Not
every tool can talk to a socket file; for those, use the
http://127.0.0.1 listener with a caller token. The step-4 config has no such listener. Add one as described in
linux-install.md: it needs a listener socket unit, a [listeners.<name>] table
with the same address, and a caller with token_hash. Get the token with
(umask 077; sudo iron-vault caller-token > ~/.iron-vault-token): the token goes to a file only the caller can read, and
the token_hash line for the caller’s table goes to the terminal. The service keeps only the hash.
Some command-line tools, such as gh, need more than a base URL change and are not supported yet
(future spec §3).
What each account can and can’t do
| If malware gets into… | It can | It can’t |
|---|---|---|
code | Make GitHub requests the gh route allows, at its rate limit | Read the GitHub token; reach the trading APIs |
trading | Make TradingDesk and CoinGecko requests their routes allow | Read those keys; reach GitHub |
alice | Use any route granted to alice, if you grant her any | Read any key; run admin commands without sudo; approve a config without your approval passphrase |
Iron Vault logs every request with the account, route and result, but never the key, so you can see afterwards what was done in each account’s name.
What this doesn’t protect against
- Misuse through allowed routes. Malware in
tradingcan still place an order that thetradingdeskroute allows. Keep routes as narrow as the work allows, and use the provider’s own limits (such as trade size caps) as well. - Root. Anyone who can become root, including through
sudo, can read Iron Vault’s memory once it’s unlocked. Protectalice’s password and consider a hardware key forsudo. - Keys you type. When you enter a key in step 3, it passes through
alice’s terminal. Malware already running asaliceat that moment could capture it. - Keys already copied. Keys that sat in files before you moved them into Iron Vault may already have been copied. If in doubt, ask the provider for a new key and add that one instead.
Words used in this guide
| Term | Meaning |
|---|---|
| Caller | A named program identity in the config; here, everything running as one account |
| Caller token | A random password a caller sends when the connection doesn’t reveal its account |
| Listener | A socket file or network address where Iron Vault accepts requests |
| Peer account | The account the kernel reports for a program connecting to a socket file |
| Route | A path prefix such as /gh that leads to one API, with one key and its limits |
| Slot | The one place in a request where Iron Vault puts the key, such as the Authorization header |
| Upstream | The real API that Iron Vault forwards a request to |
The full definitions are in the glossary.
Installing Iron Vault with Docker Compose
This guide takes a server from nothing to a Ready Iron Vault stack: the service in one container, one isolated network and TLS listener per caller container, and a host unlock so the service comes back Ready after a restart with no one typing a passphrase. It is the server and appliance shape of §17. docker-compose.md says why each choice was made. On a desktop or a shared workstation use protected Linux instead, and to try Iron Vault use development mode.
The protection depends on the host, not only the stack. Whoever controls the Docker daemon can replace Iron Vault, run commands in its container and read its memory after unlock, so the daemon’s administrators are trusted. Do the checks under Before you start first.
Only this shape is supported: rootful Docker on a Linux host with systemd, run by a host administrator, with Iron
Vault and its callers in one Compose project. Rootless Docker, userns-remap, Podman and a TPM device passed into the
container are not supported.
The host unlock has passed its release check on a machine’s firmware TPM, but the caller isolation check has not run on
a real machine yet, so don’t rely on the Compose profile to protect real secrets. Every sudo line here is for you to
run; none of it runs by itself.
The reference Compose file, with its two example callers, sets up this layout. Each caller container reaches only its
own listener, on a network that has no other member and no way out; only Iron Vault joins the egress network:
+------------------------------------ host ------------------------------------+
| |
| caller-a network (internal) iron-vault container |
| 172.30.1.0/29 +-----------------------+ |
| +------------+ TLS, no token | | egress |
| | caller-a |------------------------>| 172.30.1.2:8443 | network |
| | 172.30.1.3 | | |------------+--> provider APIs
| +------------+ | | (HTTPS) |
| | | |
| caller-b network (internal) | | |
| 172.30.2.0/29 | | |
| +------------+ TLS, no token | | |
| | caller-b |------------------------>| 172.30.2.2:8443 | |
| | 172.30.2.3 | +-----------------------+ |
| +------------+ ^ |
| | read-only mount |
| TPM --> iron-vault-host-unlock.service --> /run/iron-vault-unlock (ramfs) |
| |
+------------------------------------------------------------------------------+
Before you start
Who may control the Docker daemon
Daemon access is root on the host. No untrusted account may be in the docker group, hold a passwordless
sudo docker, or reach the Docker socket some other way, such as a socket ACL or a remote API. Group membership is not
the whole test; look at what can actually connect:
getent group docker
ls -l /var/run/docker.sock
sudo -l -U SOMEONE # for each account that has sudo
Never use a user’s rootless daemon for Iron Vault: that user controls it.
Encrypt swap and hibernation storage
Iron Vault locks its memory, but locked memory does not stop hibernation from writing it to disk (§14). Use full-disk encryption, and check swap and hibernation storage as in the Linux guide’s Encrypt swap and hibernation storage. The host CLI you type passphrases into does not lock its memory either.
Harden sudo
Every admin command runs through sudo on the host, so follow Harden sudo.
What else the host needs
- systemd with
systemd-creds, and a TPM 2.0. The host unlock identity is sealed to the TPM and to the Secure Boot policy (PCR 7), so Secure Boot must be on. - Docker Engine with the Compose and buildx plugins, new enough to support the network option
com.docker.network.bridge.gateway_mode_ipv4: isolated, and enabled at boot. The service image is built with BuildKit, which the buildx plugin provides. On Ubuntu’s own packages installdocker-buildxwithdocker.ioanddocker-compose-v2:docker.ioonly suggests it, and without it the build fails with “the –chmod option requires BuildKit”. Docker’s apt repository calls itdocker-buildx-plugin. age-keygen(Debian and Ubuntu packageage),opensslandcurl.- This repository checked out, for the files under
packaging/compose/.
Set up
The paths below are the ones the service’s trusted-path checks accept. Run everything from the repository root unless a step says otherwise.
1. Install the host files
Three files make the iron-vault account at the fixed uid and gid 460, create the three runtime directories at each
boot, and define the unlock handoff unit:
sudo install -m 0644 packaging/compose/host/sysusers.d/iron-vault.conf /usr/lib/sysusers.d/iron-vault.conf
sudo install -m 0644 packaging/compose/host/tmpfiles.d/iron-vault-compose.conf /usr/lib/tmpfiles.d/iron-vault-compose.conf
sudo install -m 0644 packaging/compose/host/iron-vault-host-unlock.service /etc/systemd/system/iron-vault-host-unlock.service
sudo systemd-sysusers
sudo systemd-tmpfiles --create
sudo systemctl daemon-reload
id iron-vault # uid=460(iron-vault) gid=460(iron-vault)
If id shows another uid, stop: something else already held 460, and the service refuses to run when the host’s account
and the image’s differ. The account has no shell, and nothing on the host may run as it. This stack must not share a host
with the Linux package: both use /run/iron-vault and the iron-vault account.
Then make the project directory, root’s alone, and the TLS directory under it:
sudo install -d -m 0700 /etc/iron-vault-host
sudo install -d -m 0755 /etc/iron-vault-host/tls
2. Build or pull the image
Build the container image from this repository. The build refuses anything but the container feature set:
sudo docker build -f packaging/compose/Dockerfile -t iron-vault .
The uid and gid are build arguments, IRON_VAULT_UID and IRON_VAULT_GID, both 460 by default. Change them only
together with the host’s sysusers.d file and the Compose file’s user:. To use an image you pulled or were given,
skip the build. Each release also publishes this image to ghcr.io/cjs77/iron-vault, tagged with the release version
(for example 0.6.0-alpha); final releases also move latest. A digest pin needs a registry digest. An image
pulled from ghcr already has one; read it with docker image inspect --format '{{index .RepoDigests 0}}' IMAGE. For a local
build, push it to a registry you control first, then read the digest the same way.
Copy the host CLI out of the image. It is the same binary as the service, which is how the two stay in step:
ctr=$(sudo docker create IMAGE)
sudo docker cp "$ctr:/usr/bin/iron-vault" /usr/local/bin/iron-vault
sudo docker rm "$ctr"
sudo chown root:root /usr/local/bin/iron-vault && sudo chmod 0755 /usr/local/bin/iron-vault
iron-vault --version # lists "container"
3. Write the Compose file
Copy the reference file and edit it:
sudo install -m 0600 packaging/compose/compose.yaml /etc/iron-vault-host/compose.yaml
sudo -e /etc/iron-vault-host/compose.yaml
Replace the image digests (they are placeholders), the two example callers with your own, and the subnets if they clash
with the host’s. Pin iron-vault’s image: by digest, so a retagged image cannot change what a later recreation runs.
Keep every other line; the hardening checklist says what each one is for. Put no
compose.override.yaml and no .env beside it: Compose reads both automatically.
4. Provision the host unlock identity
This generates the host unlock identity and seals it to the TPM, as root. The secret text exists only in a pipe:
sudo packaging/compose/host/provision-host-unlock.sh
It writes /etc/iron-vault-host/host-unlock.cred (root, 0600) and prints one line to the terminal: the identity’s
recipient key, age1.... Note it down to compare with what you enrol. The script refuses to run if the credential
already exists. --with-key host+tpm2 also ties the seal to the host’s /var/lib/systemd/credential.secret; no other
value is accepted.
5. Start the unlock unit
sudo systemctl enable --now iron-vault-host-unlock.service
findmnt /run/iron-vault-unlock # a ramfs
The unit mounts a ramfs on /run/iron-vault-unlock and installs the identity there for the service account. It runs
before Docker at every boot. If it fails, Docker still starts and the service waits Locked.
6. Make the certificates
Each caller’s listener is TLS, and the caller trusts only the CA that issued its certificate. The certificate names Iron Vault’s address on that caller’s network as an IP subject alternative name. One certificate may name every listener’s address, because only Iron Vault holds its key. The addresses below are the reference file’s; use yours.
cd "$(mktemp -d)"
curve="-newkey ec -pkeyopt ec_paramgen_curve:prime256v1 -nodes"
openssl req -x509 $curve -keyout ca.key -out ca.crt -subj /CN=iron-vault-ca -days 365 \
-addext basicConstraints=critical,CA:TRUE -addext keyUsage=critical,keyCertSign
openssl req -new $curve -keyout server.key -out server.csr -subj /CN=iron-vault
printf 'subjectAltName=IP:172.30.1.2,IP:172.30.2.2\nbasicConstraints=CA:FALSE\nextendedKeyUsage=serverAuth\n' > san.ext
openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -days 365 -extfile san.ext -out server.crt
Install the certificate for each listener, and its key for the service account only:
for name in caller-a caller-b; do
sudo install -m 0644 server.crt "/etc/iron-vault-host/tls/$name.crt"
sudo install -m 0600 -o iron-vault -g iron-vault server.key "/etc/iron-vault-host/tls/$name.key"
done
Give each caller container ca.crt as its trust anchor, and nothing else from this directory. Then move ca.key out of
reach, to an offline store: it can sign certificates that callers would trust. Delete the directory’s copy of
server.key too, once it is installed.
7. Start the stack
sudo docker compose -f /etc/iron-vault-host/compose.yaml up -d
sudo iron-vault ping # shows the container profile
sudo iron-vault status # Locked: there is no vault yet
8. Create the vault and enrol the host unlock identity
sudo iron-vault init --host-unlock
init prompts for the vault and approval passphrases and shows the recovery key once. Store the recovery key offline.
--host-unlock makes init read the handoff first, and it refuses to start if the handoff is missing or unsafe. The
vault then has three recipients: the operational identity, the recovery key and the host unlock identity.
sudo iron-vault recipient list shows them once the service is Ready; the host unlock recipient’s key is the one
step 4 printed.
init leaves the service Locked. Restart it, and it opens the vault from the handoff:
sudo docker compose -f /etc/iron-vault-host/compose.yaml restart iron-vault
sudo iron-vault status # Ready
vault-initialization.md describes init.
9. Add the credentials and approve the config
Add each credential the config names, then write the config and approve it. packaging/compose/config.example.toml is
the matching example for the reference Compose file: one TLS listener per caller, each with auth = "isolated-network".
The approval must come after the certificates are in place, because the config names them.
cp packaging/compose/config.example.toml config.toml
$EDITOR config.toml # your callers, listener addresses, routes and credential names
sudo iron-vault add venice_chat --origin api.venice.ai
sudo iron-vault add brave --origin api.search.brave.com
sudo iron-vault config approve config.toml
An isolated-network caller needs no token. It must have its own TLS listener on a dedicated address, as that listener’s only caller; the approval refuses a config that breaks it. The approval cannot see Docker’s networks, so keeping each address on its own network is the Compose file’s job.
10. Send a request
A caller reaches its own listener over TLS, trusting the CA from step 6 and sending no token: the network identifies it.
From a caller container that has curl and ca.crt:
curl --cacert /ca.crt -X POST https://172.30.1.2:8443/venice-chat/chat/completions
Use the body your application sends. A request outside the caller’s routes is refused.
Approve with a TPM PIN
This is optional. A signing key that never leaves the host’s TPM can approve your configs, and the changes that need you present, once you type its PIN. It adds an approver and replaces none. Ubuntu 24.04 LTS only, as on a protected install, and it has had no release check on a real machine yet, so don’t rely on it for real secrets.
The container never touches the TPM. The host runs the TPM signing helper from the Linux package, and the service
reaches its socket through the read-only mount of /run/iron-vault-tpm. The helper answers only uid 460, the service
account, and signs only an approval, a presence proof or a migration proof, never anything else.
What it does not protect. You type the PIN at sudo iron-vault, and it passes through the service to the helper,
as the approval passphrase does. The helper checks the form of what it signs, not that you saw it. A compromised
service container that captured the PIN could sign an approval for a config you never saw, as it could with the
approval passphrase. Showing the summary and taking the PIN on the host was considered and declined: the service
already holds the vault and every credential (design).
Install the helper on the host
You need the Linux package (iron-vault_*.deb) of the same release as the image, from the release page or built with
scripts/build-deb.sh. Unpack it without installing it, because the package may not share a host with this stack,
and install the helper, its two units and its account:
sudo apt install libtss2-esys-3.0.2-0t64 libtss2-tctildr0t64 tpm-udev
dpkg-deb -x iron-vault_*.deb pkg
sudo install -D -m 0755 pkg/usr/libexec/iron-vault/iron-vault-tpm-signer /usr/libexec/iron-vault/iron-vault-tpm-signer
sudo install -m 0644 pkg/usr/lib/systemd/system/iron-vault-tpm-signer.socket \
pkg/usr/lib/systemd/system/iron-vault-tpm-signer@.service /etc/systemd/system/
sudo install -m 0644 packaging/compose/host/sysusers.d/iron-vault-tpm.conf /usr/lib/sysusers.d/iron-vault-tpm.conf
sudo systemd-sysusers
sudo systemctl daemon-reload
sudo systemctl enable --now iron-vault-tpm-signer.socket
ldd /usr/libexec/iron-vault/iron-vault-tpm-signer | grep 'not found' # prints nothing
ls -l /run/iron-vault-tpm/signer.sock # srw------- 1 iron-vault root ...
The units need no change: on this host the iron-vault account is uid 460, the container’s, so the socket’s owner
and the helper’s one permitted peer are already the service. tpm-udev gives the tss group /dev/tpmrm0, which the
helper’s unit adds for the helper alone. A container whose Compose file mounts /run/iron-vault-tpm sees the socket at
once; it needs no restart.
A stack set up from 0.7.0-alpha or earlier has no such mount, and its service answers approver add --kind tpm
with exit code 44 however the host is set up. Give it the mount before you enrol:
-
Install this release’s tmpfiles file, which adds
/run/iron-vault-tpm, and create the directory:sudo install -m 0644 packaging/compose/host/tmpfiles.d/iron-vault-compose.conf /usr/lib/tmpfiles.d/iron-vault-compose.conf sudo systemd-tmpfiles --create -
Add the read-only bind from the reference
packaging/compose/compose.yamlto theiron-vaultservice’svolumes:in/etc/iron-vault-host/compose.yaml:- type: bind source: /run/iron-vault-tpm target: /run/iron-vault-tpm read_only: true -
Recreate the service. It restarts, and comes back Ready through the unlock handoff:
sudo docker compose -f /etc/iron-vault-host/compose.yaml up -d
Do step 1 first: Docker refuses to start a service whose bind source is missing.
Enrol and use it
sudo iron-vault approver add --kind tpm --label "server TPM"
From here the TPM PIN recipe applies unchanged, from its step 2: the PIN rules, the TPM’s dictionary-attack settings, approving a config with the PIN, and what a wrong PIN costs.
Keep a software approver beside it. The TPM keeps no copy of the PIN. A forgotten PIN, a cleared host TPM or a
replaced board leaves the TPM approver unusable, and only another approver gets you out: enrol a new one with it, then
approver remove the lost one (recipe). If the lost
TPM approver was the only one, only reset remains.
Hardening checklist
Tick each line against your own Compose file and host. The reference file applies every line. The reasons, and the threats each answers, are in the design’s checklist.
The Iron Vault container
-
user: "460:460", the same uid and gid as the image and the host’siron-vaultaccount. -
read_only: true. -
cap_drop: [ALL]. -
security_opt: [no-new-privileges:true]. -
ulimitswithmemlock: -1andcore: 0. Without an unlimited memlock the service cannot lock memory, and refuses to unlock. - None of
privileged,pid: host,ipc: host,network_mode: host,devices, or the Docker socket. - No
seccomp=unconfinedorapparmor=unconfined. - No
environmentorenv_fileholding a secret. -
command: ["serve", "--log-to-stdout"], andloggingwith thejson-filedriver andmax-sizeandmax-file. Neverjournald(log operations). -
restart: unless-stopped. -
image:pinned by digest. - Networks are
egressand each caller’s network, each with a staticipv4_address. - No other container uses
network_mode: "service:iron-vault"or"container:..."naming it.
Mounts
- Named volumes
configat/etc/iron-vaultandstateat/var/lib/iron-vault. - Host
/run/iron-vaultat/run/iron-vault, read-write. - Host
/run/iron-vault-unlockat the same path, read-only, as a directory and not as a file. - Host
/run/iron-vault-tpmat the same path, read-only, as a directory and not as a file. - Host
/etc/iron-vault-host/tlsat/etc/iron-vault-tls, read-only. - Nothing else: no home directory, no Docker socket.
Each caller container
-
cap_drop: [ALL], and neverNET_ADMINorNET_RAW. -
security_opt: [no-new-privileges:true]. - On its own caller network only: never
egress, never another caller’s. - A static
ipv4_addressof its own on that network. - No
network_modeofhost, or sharing Iron Vault’s. - No
configorstatevolume, no/run/iron-vault,/run/iron-vault-unlock,/run/iron-vault-tpmor TLS key mount, and no Docker socket. - No
privileged,pid: hostoripc: host. - Trusts only the CA that issued its listener’s certificate.
The caller networks
- One network per caller,
internal: true, with a small subnet such as a/29, and IPv6 off. -
com.docker.network.bridge.gateway_mode_ipv4: isolatedon each, so the bridge has no host address. -
egressis not internal, and only Iron Vault joins it.
The host
-
/etc/iron-vault-hostis root’s,0700, and holds the Compose file, with nocompose.override.yamlor.env. - The image’s build context, and any entrypoint or script mounted into a container, are root’s too.
-
host-unlock.credis root’s,0600; the unit and its scripts are root-owned. - Only root reaches the Docker socket: no ordinary account in
docker, no passwordlesssudo docker. - The host
iron-vaultaccount has no shell, and nothing on the host runs as it. - Swap and hibernation storage are encrypted.
-
sudois hardened as in protected Linux.
Remote administration
Without user-namespace remapping the container shares the host’s uids, so the service sees the host account that opens
the admin socket. Root is the only admin principal in this profile; the service account is not one. A plain
docker exec runs as the service uid and is refused for that reason, and docker exec -u 0 is root without
CAP_DAC_OVERRIDE, so it cannot open the socket.
There are two ways to administer a server from elsewhere. Both are SSH, and neither exposes the admin protocol on a network.
-
Run the command on the server (the default).
ssh -t admin@server sudo iron-vault statusThe command runs through
sudoon the server, and what you type goes through the SSH terminal.-tis required for commands that prompt. -
Forward the admin socket. This needs a key-only root login (
PermitRootLogin prohibit-password) on the server.ssh -N -L ~/.iv-admin.sock:/run/iron-vault/admin.sock root@server & iron-vault --admin-socket ~/.iv-admin.sock statusClose the forward when you are done: any process of your local account can use the socket while it is open, as root on the server.
An ssh -L forward through a non-root login is refused. sshd connects to the socket as the login account, so the
kernel refuses the connect() first: the socket is 0600 and owned by the service account, in a 0711 directory, so
only root can open it. Even a login that got through would be refused, because the service accepts only uid 0. Use the first form, or log in as root with a key.
Restarts and reboots
- A restart of the service container, by hand or after a crash (
restart: unless-stopped), reads the handoff again, and the service comes back Ready with no one present. - A reboot of the host runs the unlock unit before Docker starts, then Docker starts the stack, and the service
reads the handoff. Check with
sudo iron-vault statusonce it is up. lockholds until a passphrasesudo iron-vault unlock, across a crash, a restart of the container and a reboot: it leaves an empty file,locked-by-owner, in the state volume, and a service that finds it does not read the handoff. Whoever controls the runtime can still delete that file, so this protects your lock from a crash, not from the runtime’s administrator.- If the handoff is missing or refused, the service stays Locked, and
sudo iron-vault unlockwith the vault passphrase still works. The reason is in thevault.host-unlockrecord of the audit log. A failed host unlock does not count toward the passphrase attempt limit.
A lost TPM, or a cleared credential
The host unlock identity lives only sealed to this host’s TPM. It is lost with the TPM, the motherboard, a TPM clear, or a change to Secure Boot’s policy (PCR 7). Then the stack starts Locked, and the vault is intact.
A TPM approver on the same TPM is lost with a clear or a new board too, though not with a Secure Boot change. Replace it through your software approver, as Approve with a TPM PIN says.
Open the vault with the vault passphrase, which recipient add needs. Optionally run recovery check to confirm the
offline recovery key still opens it; it does not unlock the vault.
sudo iron-vault unlock
sudo iron-vault recovery check
Then replace the host unlock identity:
-
Move the unusable credential aside, because the script will not overwrite it, and provision a new identity:
sudo mv /etc/iron-vault-host/host-unlock.cred /etc/iron-vault-host/host-unlock.cred.old sudo packaging/compose/host/provision-host-unlock.sh sudo systemctl restart iron-vault-host-unlock.serviceNote the
age1...recipient key it prints. -
Enrol it as the host unlock recipient, with the vault passphrase:
sudo iron-vault recipient add --host-unlock age1... --label "host unlock, new TPM"recipient listshows the key with the rolehost-unlock, beside the old one. -
Restart the container, and check it reaches Ready with no
unlock:sudo docker compose -f /etc/iron-vault-host/compose.yaml restart iron-vault sudo iron-vault status -
Remove the old
host-unlockentry by its key asrecipient listprints it, and delete the old credential:sudo iron-vault recipient list sudo iron-vault recipient remove age1... sudo rm /etc/iron-vault-host/host-unlock.cred.oldRemoval needs the approval passphrase, and it protects future copies of
identity.ageonly.recipient removerefuses the entry whose identity the unlock handoff holds, so if it refuses, you named the new key.
Upgrade
Build or pull the new image as in step 2, put its digest in the Compose file’s
image:, and recreate the service:
sudo docker compose -f /etc/iron-vault-host/compose.yaml up -d
The service restarts, reads the handoff and comes back Ready. The named volumes keep the vault and the config. Copy the
new host CLI out of the image as in step 2, so it matches the service. Without a working handoff, run
sudo iron-vault unlock.
If you take a new reference compose.yaml, install the same release’s tmpfiles file and run sudo systemd-tmpfiles --create first (step 1): a bind whose source directory is missing, such as
/run/iron-vault-tpm on a host set up from 0.7.0-alpha or earlier, makes Docker refuse to start the service (“bind
source path does not exist”). The vault is unharmed; the service stays down until the directory exists.
Read the release’s Breaking changes in the changelog first. If it says the new release cannot open the old vault, as
from 0.3.0-alpha to 0.4.0-alpha, the service comes up with reason: recovery needed instead of Ready: follow
Recover from an upgrade that cannot open the vault.
Remove
Stop the stack. The volumes, and with them the vault, stay:
sudo docker compose -f /etc/iron-vault-host/compose.yaml down
To retire the host unlock, stop and disable the handoff unit, remove the credential, then remove its recipient with
recipient remove while the stack still runs. The service keeps working through the passphrase.
To retire a TPM approver, approver remove it while the stack runs, then remove the helper:
sudo systemctl disable --now iron-vault-tpm-signer.socket
sudo rm /etc/systemd/system/iron-vault-tpm-signer.socket /etc/systemd/system/iron-vault-tpm-signer@.service \
/usr/libexec/iron-vault/iron-vault-tpm-signer /usr/lib/sysusers.d/iron-vault-tpm.conf
sudo systemctl daemon-reload
sudo userdel iron-vault-tpm
To delete everything, down -v deletes the vault and every stored credential, and nothing recovers them, not even the
recovery key.
sudo docker compose -f /etc/iron-vault-host/compose.yaml down -v
sudo systemctl disable --now iron-vault-host-unlock.service
sudo rm -rf /etc/iron-vault-host
sudo rm /etc/systemd/system/iron-vault-host-unlock.service /usr/lib/tmpfiles.d/iron-vault-compose.conf \
/usr/lib/sysusers.d/iron-vault.conf /usr/local/bin/iron-vault
sudo systemctl daemon-reload
sudo userdel iron-vault
Keep the account if you keep the volumes: a later account at the same uid could otherwise read a kept vault’s files.
Getting started in development mode
Checked with iron-vault 0.2.0-alpha (features: dev-mode), built from main at cc59b80.
Run Iron Vault as your own user with one credential and one route to httpbin.org, and send a request through it.
Development mode gives no isolation from malware running as you. Use it to learn Iron Vault, never to protect real secrets. For that, use the protected Linux install.
Prerequisites
- Linux, with
XDG_RUNTIME_DIRset, as it is in a normal desktop or SSH login. - A Rust toolchain,
curland network access tohttpbin.org. - About 15 minutes.
Steps
1. Build and install
cargo install --path crates/iron-vault --features dev-mode --root ~/.local/iron-vault-dev
chmod -R go-w ~/.local/iron-vault-dev
export PATH="$HOME/.local/iron-vault-dev/bin:$PATH"
iron-vault --version
iron-vault 0.2.0-alpha (features: dev-mode)
The chmod matters: the service refuses to run a binary that another account could replace.
2. Start the service
In a terminal of its own:
iron-vault serve --log-to-stdout | tee -a ~/iron-vault-dev.log
Expect service started, process hardening is incomplete (ERROR, unless you raised RLIMIT_MEMLOCK) and the
development-mode warning:
{"service":"iron-vault","service_version":"0.2.0-alpha","schema_version":1,"deployment_profile":"development","level":"WARN","message":"development mode: no isolation from malware running as alice","target":"iron_vault"}
In a second terminal, check the service:
iron-vault ping
iron-vault status
the service is running: development profile, admin protocol version 1
service: locked
profile: development — no isolation from malware running as alice
vault: not initialized (run iron-vault init)
vault id: unknown
approval committed: unknown while the vault is locked
approval highest reserved: unknown while the vault is locked
memory protection: NOT protected, swap protection unavailable (RLIMIT_MEMLOCK soft limit is 8315834368 bytes, not unlimited)
recovery last checked: unknown (the vault is not initialized)
credentials: unknown while the vault is locked
status exits with 4 while the service is not Ready, as here.
3. Create the vault
iron-vault init
init asks for two passphrases, each twice, at least 12 characters and different from each other:
- the vault passphrase unlocks the vault each time the service starts;
- the approval passphrase approves config changes and confirms
replaceandrm.
It then shows the recovery key once, as text and as a QR code. Save it somewhere offline, then type yes:
Vault passphrase:
Repeat the vault passphrase:
Approval passphrase:
Repeat the approval passphrase:
The recovery key follows. It is shown this once, and the service keeps no copy.
It is the second way into the vault if the vault passphrase or this machine is lost.
Store it in an independent password manager or on paper, never beside the vault.
You may also keep it in a passphrase-encrypted file of your own.
AGE-SECRET-KEY-1…
(QR code)
Type yes once you have saved the recovery key: yes
initialized vault 4b3faa85-…: approval version 1 committed
run iron-vault unlock to start serving
init needs a controlling terminal. The service stays Locked.
4. Unlock
iron-vault unlock
Vault passphrase:
the vault is unlocked: the service is Ready
iron-vault status
service: ready
profile: development — no isolation from malware running as alice
vault: unlocked
vault id: 4b3faa85-…
approval committed: 1
approval highest reserved: 1
memory protection: NOT protected, swap protection unavailable (RLIMIT_MEMLOCK soft limit is 8315834368 bytes, not unlimited)
recovery last checked: never (reminders counting since 2026-11-07)
credentials: none
Run unlock again each time you restart the service.
5. Check the recovery key
Prove that the key you saved opens the vault:
iron-vault recovery check
Recovery key:
the recovery key opens vault 4b3faa85-…: checked 2026-11-07T09:43:48Z
status then shows the time under recovery last checked.
6. Store a credential
add takes the credential’s name and the origins it may be sent to, and prompts for the secret. httpbin checks no
keys, so type a test value such as not-a-real-key-123:
iron-vault add httpbin_key --origin httpbin.org
iron-vault list
Secret for httpbin_key:
added httpbin_key (static) as record 531d79af-…
httpbin_key static httpbin.org:443 healthy
For a real secret, pipe it in so it stays out of your shell history: pass show brave | iron-vault add brave --origin api.search.brave.com.
7. Issue a caller token
Keep tokens in a directory only you can read:
mkdir -m 700 -p ~/.iron-vault-tokens
iron-vault caller-token > ~/.iron-vault-tokens/me
The token goes to the file. The terminal shows the line the config needs:
token_hash = "blake2b:…"
This token is shown once and the service keeps no copy of it.
Put the token_hash line on the caller's [callers.<name>] table and run `iron-vault config approve <file>`.
The token works only once that config is approved and active; the caller's old token, if any, keeps working until then.
Anyone who can read the token file can use its routes.
8. Write and approve a config
Save this as dev-config.toml, anywhere you like, with your own token_hash line:
schema_version = 1
[listeners.loopback]
address = "127.0.0.1:7878"
[callers.me]
listener = "loopback"
token_hash = "blake2b:<the 64 hex digits caller-token printed>"
routes = ["httpbin"]
[routes.httpbin]
prefix = "/httpbin"
upstream = "https://httpbin.org"
credential = "httpbin_key"
slot = { header = "Authorization", format = "Bearer {}" }
methods = ["GET"]
paths = ["/anything/**", "/headers"]
rate_limit = { requests = 30, per_seconds = 60, burst = 5 }
The configuration reference explains each table. Approve it:
iron-vault config approve dev-config.toml
Approval summary
vault: 4b3faa85-…
version to commit: 2
config digest: blake2b:f08dc490…
committed version: 1
callers:
+ me: listener loopback, auth token, rate limits none
route grants:
+ me: granted httpbin
routes:
+ httpbin: prefix /httpbin, upstream https://httpbin.org/, credential httpbin_key, slot header Authorization format "Bearer {}", ca file none, methods GET, paths /anything/**, /headers, rate limit 30 per 60s burst 5, confirm none
listeners:
+ loopback: endpoint tcp 127.0.0.1:7878, no tls, token header default
Approve this config as version 2? Type yes to approve: yes
Approval passphrase for "approval passphrase":
approved version 2 (blake2b:f08dc490…)
callers: 1 added; route grants: 1 added; routes: 1 added; listeners: 1 added; limits: none; logging: none; recovery: none
The listener opens without a restart. Keep editing dev-config.toml, never the service’s published copy in
~/.config/iron-vault-dev/config.toml.
9. Send a request
TOKEN=$(cat ~/.iron-vault-tokens/me)
curl -s -H "Proxy-Authorization: Bearer $TOKEN" http://127.0.0.1:7878/httpbin/headers
{
"headers": {
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate, br",
"Authorization": "Bearer [iron-vault:scrubbed]",
"Host": "httpbin.org",
"User-Agent": "curl/8.5.0"
}
}
httpbin received the secret and echoed it back; Iron Vault scrubbed it from the response. There is no
Proxy-Authorization in the echo: your caller token never left the machine.
The service’s log shows the request and the scrub (trimmed):
{"level":"INFO","message":"request completed","event":"request.completed","listener":"loopback","http_method":"GET","caller":"me","route":"httpbin","credential":"httpbin_key","upstream_host":"httpbin.org","status":200,"request_bytes":0,"response_bytes":199,"duration_ms":308,"scrubbed":true,"outcome":"success","target":"iron-vault.request"}
{"level":"WARN","message":"scrubbed a secret from a response","event":"response.scrubbed","route":"httpbin","credential":"httpbin_key","matches":1,"target":"iron-vault.audit"}
10. See the policy refuse
AUTH="Proxy-Authorization: Bearer $TOKEN"
curl -si http://127.0.0.1:7878/httpbin/headers # no token
curl -si -H "$AUTH" -X POST http://127.0.0.1:7878/httpbin/anything # method not allowed
curl -si -H "$AUTH" http://127.0.0.1:7878/httpbin/ip # path not allowed
HTTP/1.1 401 Unauthorized
content-type: text/plain; charset=utf-8
content-length: 12
unauthorized
HTTP/1.1 403 Forbidden
content-type: text/plain; charset=utf-8
content-length: 9
forbidden
HTTP/1.1 403 Forbidden
content-type: text/plain; charset=utf-8
content-length: 9
forbidden
Nothing leaves the machine. The log’s reason field says why: unauthenticated, method_not_allowed and
path_not_allowed.
What can go wrong
iron-vault: refusing to start: /home/alice/projects/iron-vault/target/debug/iron-vault is not trusted: /home/alice/projects is writable by group 1001; run `chmod g-w /home/alice/projects`. Run the binary from~/.local, not fromtarget/in a group-writable checkout, and run thechmodin step 1.iron-vault: refusing to start: … is not trusted: /tmp is a shared directory other users can write; move the state directory, config, TLS key or certificate out of /tmp rather than changing its permissions. PointXDG_CONFIG_HOMEandXDG_STATE_HOMEat directories in your home.iron-vault: the Iron Vault service is not running: there is no admin socket at …. Start the service, with the sameXDG_RUNTIME_DIRas the CLI.iron-vault: the service answered error 14 (unlock-denied): wrong passphrase. After 5 wrong vault passphrases,unlockis refused for a cooldown that starts at 30 s and doubles up to 15 min.iron-vault: the service answered error 20 (name-taken): credential httpbin_key already exists, healthy or damaged; `add` never overwrites. Usereplaceto change an existing credential.429 Too Many Requestson the first requests after an unlock or approval. The route’s bucket starts empty; wait a few seconds.503from the proxy. The service is Locked: runiron-vault unlock.
Reference
- CLI: every command and its exit codes.
- Configuration: listeners, callers, routes, slots and rate limits.
- Errors and service states.
- Audit log and files and locations.
- Next: give an AI agent or MCP server an API key.
Give an AI agent or MCP server an API key
Checked with iron-vault 0.2.0-alpha (features: dev-mode), built from main at cc59b80.
Let an agent or MCP server call Brave Search, Venice and an FX API through Iron Vault, holding a base URL, a placeholder key and a caller token, never a provider key:
| Provider | Slot | The agent’s base URL |
|---|---|---|
| Brave Search | a header: X-Subscription-Token | http://127.0.0.1:7878/brave |
| Venice | a header with a format: Authorization: Bearer {} | http://127.0.0.1:7878/venice |
| An FX API | a query parameter: app_id | http://127.0.0.1:7878/fx |
The FX route uses OpenExchangeRates, which takes its key in an app_id query
parameter; set paths to the endpoints your own FX provider uses. The Brave and Venice output below comes from runs
with a dummy key; the FX approval summary and request were not captured from a run.
Prerequisites
- The service running and Ready, with the loopback listener from
getting started. This recipe adds to that recipe’s
dev-config.toml. - A key for each provider you want. Each step stands alone, so skip a provider you don’t use.
Steps
1. Store the keys
add prompts for each key with echo off. Each --origin names the only host its key may be sent to:
iron-vault add brave --origin api.search.brave.com
iron-vault add venice --origin api.venice.ai
iron-vault add fx_key --origin openexchangerates.org
iron-vault list
added brave (static) as record 8a6c0dd9-…
added venice (static) as record 469b5ab8-…
added fx_key (static) as record c8653d1f-…
brave static api.search.brave.com:443 healthy
fx_key static openexchangerates.org:443 healthy
httpbin_key static httpbin.org:443 healthy
venice static api.venice.ai:443 healthy
A pipe from a password manager, such as pass show fx | iron-vault add fx_key --origin openexchangerates.org, also works.
2. Issue the agent a caller token
iron-vault caller-token > ~/.iron-vault-tokens/agent
token_hash = "blake2b:…"
This token is shown once and the service keeps no copy of it.
…
3. Add the caller and routes
Add these tables to dev-config.toml, with your own token_hash:
[callers.agent]
listener = "loopback"
token_hash = "blake2b:<the agent's hash>"
routes = ["brave", "venice", "fx"]
[routes.brave]
prefix = "/brave"
upstream = "https://api.search.brave.com"
credential = "brave"
slot = { header = "X-Subscription-Token" }
methods = ["GET"]
paths = ["/res/v1/web/search"]
rate_limit = { requests = 60, per_seconds = 60, burst = 10 }
[routes.venice]
prefix = "/venice"
upstream = "https://api.venice.ai/api/v1"
credential = "venice"
slot = { header = "Authorization", format = "Bearer {}" }
methods = ["POST"]
paths = ["/chat/completions"]
rate_limit = { requests = 120, per_seconds = 60, burst = 20 }
[routes.fx]
prefix = "/fx"
upstream = "https://openexchangerates.org/api"
credential = "fx_key"
slot = { query = "app_id" }
methods = ["GET"]
paths = ["/latest.json", "/historical/*", "/currencies.json", "/usage.json"]
rate_limit = { requests = 10, per_seconds = 60, burst = 2 }
paths match the path after the route prefix, without the upstream’s base path: the agent’s
/venice/chat/completions reaches Venice as /api/v1/chat/completions, and paths names /chat/completions. See
configuration for slots and path patterns.
Approve it:
iron-vault config approve dev-config.toml
Approval summary
vault: 4b3faa85-…
version to commit: 3
config digest: blake2b:ce35d419…
committed version: 2
callers:
+ agent: listener loopback, auth token, rate limits none
route grants:
+ agent: granted brave, fx, venice
routes:
+ brave: prefix /brave, upstream https://api.search.brave.com/, credential brave, slot header X-Subscription-Token format "{}", ca file none, methods GET, paths /res/v1/web/search, rate limit 60 per 60s burst 10, confirm none
+ fx: prefix /fx, upstream https://openexchangerates.org/api, credential fx_key, slot query app_id, ca file none, methods GET, paths /currencies.json, /historical/*, /latest.json, /usage.json, rate limit 10 per 60s burst 2, confirm none
+ venice: prefix /venice, upstream https://api.venice.ai/api/v1, credential venice, slot header Authorization format "Bearer {}", ca file none, methods POST, paths /chat/completions, rate limit 120 per 60s burst 20, confirm none
Approve this config as version 3? Type yes to approve: yes
Approval passphrase for "approval passphrase":
approved version 3 (blake2b:ce35d419…)
callers: 1 added; route grants: 1 added; routes: 3 added; listeners: none; limits: none; logging: none; recovery: none
4. Try each route
AG="Proxy-Authorization: Bearer $(cat ~/.iron-vault-tokens/agent)"
Brave Search. The agent sends no X-Subscription-Token; Iron Vault adds it.
curl -s -H "$AG" -H 'Accept: application/json' 'http://127.0.0.1:7878/brave/res/v1/web/search?q=iron+vault'
With a dummy key, Brave answers:
{"error":{"code":"SUBSCRIPTION_TOKEN_INVALID","detail":"The provided subscription token is invalid.","meta":{"component":"authentication"},"status":422},"type":"ErrorResponse"}
Venice.
curl -s -H "$AG" -H 'Content-Type: application/json' http://127.0.0.1:7878/venice/chat/completions \
-d '{"model": "google-gemma-3-27b-it", "messages": [{"role": "user", "content": "hi"}]}'
With a dummy key, Venice answers 401 Unauthorized with:
{"error":"Authentication failed"}
FX. Iron Vault appends app_id=<key> to the query. Set no base: the free plan serves USD rates only.
curl -s -H "$AG" 'http://127.0.0.1:7878/fx/latest.json?symbols=EUR'
A provider’s own refusal shows the request reached it with a key in the slot. The log (trimmed):
{"event":"request.completed","caller":"agent","route":"brave","status":422,"outcome":"success"}
{"event":"request.completed","caller":"agent","route":"venice","status":401,"outcome":"success"}
outcome is success whenever Iron Vault forwarded the request, whatever the provider answered.
5. Configure the agent
Give the agent three things:
- Base URL: the route’s prefix on the listener, from the table at the top. The agent appends its usual API path.
For Venice, an OpenAI-compatible client sets its base URL to
http://127.0.0.1:7878/venice. - API key: any placeholder, such as
placeholder. Iron Vault replaces it with the real key. - Caller token: sent as
Proxy-Authorization: Bearer <token>on every request. If the agent can only add a header with a fixed name, see point a real application at Iron Vault.
These settings were not tried with a particular agent. Before relying on one, check that it uses the base URL for every request.
In a protected install, run the agent as its own OS account and make it a peer caller on the Unix socket, so there is no token file to steal:
[callers.fx-mcp]
listener = "local"
auth = "peer"
user = "fx-mcp"
routes = ["fx"]
What can go wrong
iron-vault: the service answered error 7 (config-invalid): the proposed config is invalid: route fx sends credential fx_key to an origin its record does not permit. The route’s upstream is not one of the credential’s origins. Fix the upstream, orreplacethe credential with the right--origin. No version is used up.403 Forbiddenfrom Iron Vault. The method or path is not in the route. The log’sreasonsays which:method_not_allowedorpath_not_allowed. Remember thatpathsleave out the upstream’s base path.401or422from the provider. The request reached the provider with the stored key, and the provider refused it. Check the key, orreplaceit.400 Bad Requestwithforeign_markerin the log. The agent put a marker such as{iv:brave}in the slot of a route whose credential is notbrave.429 Too Many Requestsright after an approval or unlock. Each route’s token bucket starts empty whenever the service becomes Ready; wait a few seconds.
Reference
- Configuration: slots,
format, path patterns and rate limits. - CLI:
add,listandcaller-token. - Audit log:
request.completedand itsreasonvalues. - Errors.
Two keys, two callers, different permissions
Checked with iron-vault 0.2.0-alpha (features: dev-mode), built from main at cc59b80.
Give two Venice API keys one job each, each used by its own caller:
| Credential | Caller | Route | Allows |
|---|---|---|---|
venice_chat | chat | venice-chat | POST to chat completions only, at most 6 requests a minute |
venice_dev | dev | venice-dev | GET or POST anywhere under /api/v1, up to 600 a minute |
The output below was captured with a dummy Venice key in place of each pass show, so forwarded chat requests show
Venice’s 401. With real keys they get answers.
Prerequisites
- The service running and Ready, with the loopback listener from getting started. This recipe
adds to that recipe’s
dev-config.toml. - Two Venice API keys.
Steps
1. Store both keys
pass show venice-chat | iron-vault add venice_chat --origin api.venice.ai
pass show venice-dev | iron-vault add venice_dev --origin api.venice.ai
added venice_chat (static) as record 6e15ff12-…
added venice_dev (static) as record 850eba14-…
2. Issue a token for each caller
Each command prints its own token_hash line, so keep them apart:
iron-vault caller-token > ~/.iron-vault-tokens/chat 2> chat.hash
iron-vault caller-token > ~/.iron-vault-tokens/dev 2> dev.hash
head -1 chat.hash dev.hash
==> chat.hash <==
token_hash = "blake2b:…"
==> dev.hash <==
token_hash = "blake2b:…"
The hash files hold no secret; delete them once the config holds the hashes.
3. Add the callers and routes
config approve replaces the whole config, so add these tables to dev-config.toml and keep what is there:
[callers.chat]
listener = "loopback"
token_hash = "blake2b:<chat's hash>"
routes = ["venice-chat"]
[callers.dev]
listener = "loopback"
token_hash = "blake2b:<dev's hash>"
routes = ["venice-dev"]
[routes.venice-chat]
prefix = "/venice-chat"
upstream = "https://api.venice.ai/api/v1"
credential = "venice_chat"
slot = { header = "Authorization", format = "Bearer {}" }
methods = ["POST"]
paths = ["/chat/completions"]
rate_limit = { requests = 6, per_seconds = 60, burst = 6 }
[routes.venice-dev]
prefix = "/venice-dev"
upstream = "https://api.venice.ai/api/v1"
credential = "venice_dev"
slot = { header = "Authorization", format = "Bearer {}" }
methods = ["GET", "POST"]
paths = ["/**"]
rate_limit = { requests = 600, per_seconds = 60, burst = 100 }
chat reaches only the routes it lists. paths leave out the upstream’s base path, so /chat/completions, not
/api/v1/chat/completions. The chat route allows 6 at once, then one every 10 seconds. See
configuration for path patterns and rate limits.
Approve it:
iron-vault config approve dev-config.toml
Approval summary
vault: 4b3faa85-…
version to commit: 4
config digest: blake2b:731e570b…
committed version: 3
callers:
+ chat: listener loopback, auth token, rate limits none
+ dev: listener loopback, auth token, rate limits none
route grants:
+ chat: granted venice-chat
+ dev: granted venice-dev
routes:
+ venice-chat: prefix /venice-chat, upstream https://api.venice.ai/api/v1, credential venice_chat, slot header Authorization format "Bearer {}", ca file none, methods POST, paths /chat/completions, rate limit 6 per 60s burst 6, confirm none
+ venice-dev: prefix /venice-dev, upstream https://api.venice.ai/api/v1, credential venice_dev, slot header Authorization format "Bearer {}", ca file none, methods GET, POST, paths /**, rate limit 600 per 60s burst 100, confirm none
Approve this config as version 4? Type yes to approve: yes
Approval passphrase for "approval passphrase":
approved version 4 (blake2b:731e570b…)
callers: 2 added; route grants: 2 added; routes: 2 added; listeners: none; limits: none; logging: none; recovery: none
4. Use each caller for its job
CHAT="Proxy-Authorization: Bearer $(cat ~/.iron-vault-tokens/chat)"
DEV="Proxy-Authorization: Bearer $(cat ~/.iron-vault-tokens/dev)"
Chat with the chat token:
curl -s -H "$CHAT" -H 'Content-Type: application/json' \
http://127.0.0.1:7878/venice-chat/chat/completions \
-d '{"model": "google-gemma-3-27b-it", "messages": [{"role": "user", "content": "hi"}]}'
With a dummy key, Venice answers 401 with {"error":"Authentication failed"}. With a real key you get the
completion.
List models with the dev token:
curl -s -H "$DEV" http://127.0.0.1:7878/venice-dev/models | head -c 120
{"data":[{"context_length":1000000,"created":1791849600,"id":"gemini-4-argon","model_spec":{"pricing":{"input":{"usd":2.5,
5. Check what chat may not do
# GET is not an allowed method on chat's route
curl -si -H "$CHAT" http://127.0.0.1:7878/venice-chat/models
# chat's caller is not granted dev's route
curl -si -H "$CHAT" http://127.0.0.1:7878/venice-dev/models
Both answer the same way, before anything leaves the machine:
HTTP/1.1 403 Forbidden
content-type: text/plain; charset=utf-8
content-length: 9
forbidden
The log says why (fields trimmed):
{"caller":"chat","route":"venice-chat","http_method":"GET","status":403,"outcome":"failure","reason":"method_not_allowed"}
{"caller":"chat","route":"venice-dev","http_method":"GET","status":403,"outcome":"failure","reason":"not_granted"}
6. Check the rate limit
The route’s bucket starts empty, so wait a minute for it to fill, then send seven requests at once:
sleep 60
for i in 1 2 3 4 5 6 7; do
curl -s -o /dev/null -w '%{http_code}\n' \
-H "$CHAT" -H 'Content-Type: application/json' \
http://127.0.0.1:7878/venice-chat/chat/completions \
-d '{"model": "google-gemma-3-27b-it", "messages": [{"role": "user", "content": "hi"}]}' &
done
wait
429
401
401
401
401
401
401
Six reach Venice (401 with a dummy key); the seventh gets 429 without leaving the machine, often first. Its log
record has "reason":"rate_limited".
What can go wrong
- All seven requests get
429. The bucket was not full: it starts empty. Wait the full minute. 401 Unauthorizedfrom Iron Vault,unauthorizedin the body. The token is missing, wrong, or was replaced by a newer approval (reason:unauthenticated).iron-vault: the service answered error 7 (config-invalid): the proposed config is invalid: caller chat is granted route venice-admin, which is not defined. A caller’sroutesnames a route the config does not define. Add the route or take it out of the list.403withpath_not_allowedon the chat route.pathsleave out the upstream’s base path:/chat/completions, not/api/v1/chat/completions.
Reference
- Configuration: callers, routes, path patterns and rate limits.
- Audit log:
request.completedand itsreasonvalues. - Errors.
- Related: rotate or revoke a caller token, widen or narrow a route.
Basic authentication upstreams
Checked with iron-vault 0.2.0-alpha (features: dev-mode), built from main at cc59b80.
Store a username and password and have Iron Vault send them upstream as Authorization: Basic …. The test endpoint,
httpbin’s /basic-auth/<user>/<password>, puts both values in its path; a real upstream’s caller knows neither.
Every command below was run against httpbin.org.
Prerequisites
- The service running and Ready, with the
mecaller and loopback listener from getting started. This recipe adds to that recipe’sdev-config.toml.
Steps
1. Store the username and password
--kind basic makes add ask for two values, neither echoed:
iron-vault add httpbin_basic --kind basic --origin httpbin.org
Username for httpbin_basic:
Password for httpbin_basic:
added httpbin_basic (basic) as record 5c4cd8bd-…
This run used alice and test-basic-pass-77. Piped in, the first line is the username and the second the password.
iron-vault list
…
httpbin_basic basic httpbin.org:443 healthy
httpbin_key static httpbin.org:443 healthy
…
2. Add a route with the Basic slot
The Basic slot is the bare string "basic". Add the route to dev-config.toml, and grant it to me:
[callers.me]
listener = "loopback"
token_hash = "blake2b:<me's hash>"
routes = ["httpbin", "httpbin-basic"]
[routes.httpbin-basic]
prefix = "/httpbin-basic"
upstream = "https://httpbin.org"
credential = "httpbin_basic"
slot = "basic"
methods = ["GET"]
paths = ["/basic-auth/alice/*", "/headers"]
rate_limit = { requests = 30, per_seconds = 60, burst = 5 }
iron-vault config approve dev-config.toml
Approval summary
vault: 4b3faa85-…
version to commit: 5
config digest: blake2b:6d193719…
committed version: 4
route grants:
~ me: granted httpbin-basic
routes:
+ httpbin-basic: prefix /httpbin-basic, upstream https://httpbin.org/, credential httpbin_basic, slot basic, ca file none, methods GET, paths /basic-auth/alice/*, /headers, rate limit 30 per 60s burst 5, confirm none
Approve this config as version 5? Type yes to approve: yes
Approval passphrase for "approval passphrase":
approved version 5 (blake2b:6d193719…)
callers: none; route grants: 1 changed; routes: 1 added; listeners: none; limits: none; logging: none; recovery: none
3. Send requests
AUTH="Proxy-Authorization: Bearer $(cat ~/.iron-vault-tokens/me)"
curl -s -H "$AUTH" http://127.0.0.1:7878/httpbin-basic/basic-auth/alice/test-basic-pass-77
httpbin accepted the username and password Iron Vault sent:
{
"authenticated": true,
"user": "alice",
"authorized": true
}
Ask httpbin to echo the headers it received:
curl -s -H "$AUTH" http://127.0.0.1:7878/httpbin-basic/headers
{
"headers": {
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate, br",
"Authorization": "[iron-vault:scrubbed]",
"Host": "httpbin.org",
"User-Agent": "curl/8.5.0"
}
}
The whole Basic … value is scrubbed, and the log has a response.scrubbed record with "matches":1. A caller’s own
Authorization header, such as curl -u placeholder:placeholder, is replaced by the stored one.
A wrong password in the path is refused by httpbin, not by Iron Vault:
curl -si -H "$AUTH" http://127.0.0.1:7878/httpbin-basic/basic-auth/alice/wrong
HTTP/1.1 401 Unauthorized
www-authenticate: Basic realm="Fake Realm"
…
What can go wrong
- The username is not scrubbed from bodies.
"user": "alice"comes back unchanged. The username alone is scrubbed only when the password is empty. 403withpath_not_allowed. This route allows onlyalice’s path;/basic-auth/bob/xis refused before anything leaves the machine.429right after the approval. The route’s token bucket starts empty and refills at one request every 2 seconds; wait a few seconds.401from the upstream. The stored username or password is wrong.replace httpbin_basic --kind basic --origin httpbin.orgstores new ones.
Reference
- Configuration: the
"basic"slot. - CLI:
add --kind basic, andreplace --kindto change kind. - Audit log:
response.scrubbed.
Point a real application at Iron Vault
Checked with iron-vault 0.2.0-alpha (features: dev-mode), built from main at cc59b80.
Configure an application to reach its API through Iron Vault in base-URL mode, send its caller token, and check
that it sends every request through the route. The application must let you change the address it sends to. The
examples use curl against httpbin.org; no particular application was tested.
Prerequisites
- The service running and Ready, with the
mecaller, the loopback listener and thehttpbinroute from getting started. - A route for the application’s API, such as those in give an AI agent or MCP server an API key.
Steps
1. Set the base URL
Set the application’s API address to the listener plus the route’s prefix, for example
http://127.0.0.1:7878/venice for a route with prefix = "/venice". A request whose path matches no route prefix is refused:
curl -si -H "Proxy-Authorization: Bearer $(cat ~/.iron-vault-tokens/me)" http://127.0.0.1:7878/headers
HTTP/1.1 404 Not Found
…
not found
The log reason is no_route: the application dropped the prefix.
2. Give it a placeholder key
Where the application wants its API key, give it any placeholder, such as placeholder:
AUTH="Proxy-Authorization: Bearer $(cat ~/.iron-vault-tokens/me)"
curl -s -H "$AUTH" -H 'Authorization: Bearer placeholder' http://127.0.0.1:7878/httpbin/headers | grep Authorization
"Authorization": "Bearer [iron-vault:scrubbed]",
httpbin received the stored key, not placeholder.
Or use a marker, {iv:<credential name>}, naming the route’s own credential. A marker naming another credential
is refused:
curl -s -H "$AUTH" -H 'Authorization: Bearer {iv:httpbin_key}' http://127.0.0.1:7878/httpbin/headers | grep Authorization
curl -si -H "$AUTH" -H 'Authorization: Bearer {iv:brave}' http://127.0.0.1:7878/httpbin/headers
"Authorization": "Bearer [iron-vault:scrubbed]",
HTTP/1.1 400 Bad Request
…
bad request
The second is logged with "reason":"foreign_marker". Outside the slot a marker is passed on unchanged:
curl -s -H "$AUTH" 'http://127.0.0.1:7878/httpbin/anything/x?note=%7Biv:httpbin_key%7D' | grep -E 'note|Authorization'
"note": "{iv:httpbin_key}"
"Authorization": "Bearer [iron-vault:scrubbed]",
3. Send the caller token
Every request needs the caller’s token, in one of two places:
Proxy-Authorization: Bearer <token>, the default.- The listener’s
token_header, for an application that can add a custom header but notProxy-Authorization. The token goes in it bare, with noBearer.
Issue the application its own token:
iron-vault caller-token > ~/.iron-vault-tokens/app
Add a listener and a caller to dev-config.toml, with the token_hash line that printed:
[listeners.app]
address = "127.0.0.1:7879"
token_header = "X-Iron-Vault-Token"
[callers.app]
listener = "app"
token_hash = "blake2b:<app's hash>"
routes = ["httpbin"]
The application gets a listener of its own, because token_header is set per listener. Approve it:
iron-vault config approve dev-config.toml
Approval summary
vault: 4b3faa85-…
version to commit: 6
config digest: blake2b:2dbc74a7…
committed version: 5
callers:
+ app: listener app, auth token, rate limits none
route grants:
+ app: granted httpbin
listeners:
+ app: endpoint tcp 127.0.0.1:7879, no tls, token header X-Iron-Vault-Token
Approve this config as version 6? Type yes to approve: yes
Approval passphrase for "approval passphrase":
approved version 6 (blake2b:2dbc74a7…)
callers: 1 added; route grants: 1 added; routes: none; listeners: 1 added; limits: none; logging: none; recovery: none
Then send a request with the token in X-Iron-Vault-Token, and one with it in Proxy-Authorization:
APP_TOKEN=$(cat ~/.iron-vault-tokens/app)
curl -s -H "X-Iron-Vault-Token: $APP_TOKEN" -H 'Authorization: Bearer placeholder' http://127.0.0.1:7879/httpbin/headers
curl -si -H "Proxy-Authorization: Bearer $APP_TOKEN" http://127.0.0.1:7879/httpbin/headers | head -1
{
"headers": {
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate, br",
"Authorization": "Bearer [iron-vault:scrubbed]",
"Host": "httpbin.org",
"User-Agent": "curl/8.5.0"
}
}
HTTP/1.1 401 Unauthorized
On this listener only X-Iron-Vault-Token carries the token, and it never reaches httpbin.
4. Check that a client supports base-URL mode
Don’t assume an application uses the base URL for every request. Before you rely on it:
-
Give it a route whose upstream echoes requests, as httpbin does, or watch the log while you use it.
-
Use every feature you need. Each request through Iron Vault ends in one
request.completedrecord naming your caller and route:jq -c 'select(.event == "request.completed") | {caller, route, http_method, status, outcome, reason}' ~/iron-vault-dev.log -
Look for what is missing. A feature that works but leaves no record sent its request somewhere else.
-
Look for
no_routeandpath_not_allowedrefusals: the application calls paths you haven’t allowed, or dropped the prefix.
5. Don’t rely on HTTPS_PROXY
Setting HTTPS_PROXY does not make Iron Vault inject credentials. Iron Vault refuses the CONNECT tunnel:
HTTPS_PROXY=http://127.0.0.1:7878 curl -sv https://httpbin.org/headers
> CONNECT httpbin.org:443 HTTP/1.1
< HTTP/1.1 400 Bad Request
< connection: close
< content-type: text/plain; charset=utf-8
< content-length: 24
* CONNECT tunnel failed, response 400
The body is CONNECT is not supported, and the log reason is connect_not_supported. Tools such as gh, npm and
cargo count as supported only once an end-to-end check covers their whole workflow in base-URL mode.
What can go wrong
404withno_route. The application dropped the route prefix from the base URL.401from Iron Vault. No token, a wrong one, or the token in the wrong header for this listener.400withforeign_marker. The placeholder names another credential.400 CONNECT is not supported. The application is using Iron Vault as a forward proxy. Set its base URL instead.- The application needs HTTPS to its API. The loopback listener is plain HTTP. A TCP listener on any address but
loopback must have
tls_certificateandtls_key; see the configuration reference.
Reference
- Configuration: listeners,
token_header, slots and markers. Its example has routes for Brave Search (a header slot), Venice (a Bearer token) and OpenExchangeRates (a query parameter). - Audit log:
request.completedand itsreasonvalues. - Errors.
- The use cases in the README, and the security boundary: a program holding a caller token can use that caller’s routes.
Protected Linux install
Written against main at 378d57d. Not run: this recipe needs root and a Debian or Ubuntu machine to install
on, and neither was available when it was checked, so no output is shown. Every command comes from the
installation guide.
Run Iron Vault as the iron-vault system service from the .deb package, with its vault in /var/lib/iron-vault.
Your own account calls it through a Unix socket as a peer caller, and you administer it with sudo.
The package has not had a release check on a real machine yet, so don’t rely on it to protect real secrets.
Each step links to its section of the install guide for the detail.
Prerequisites
- Debian or Ubuntu, and an account that can use
sudo. - A Rust toolchain and
cargo-deb, to build the package. - An idea of which accounts need which credentials. The multi-user guide works through one example.
Steps
1. Harden the host
Do these before you install; the protection rests on them:
- Harden
sudo: a per-terminal credential cache or none, and a hardware key where you have one. - Encrypt swap and hibernation storage.
2. Build and install the package
sudo apt install libtss2-dev pkg-config lintian
cargo install cargo-deb --locked
scripts/build-deb.sh
sudo apt install ./target/debian/iron-vault_*.deb
iron-vault.service starts Locked, with no vault. See Install.
3. Create and unlock the vault
sudo iron-vault init
sudo iron-vault unlock
sudo iron-vault status
init works as in getting started: two passphrases and the recovery key,
shown once. Store and check the recovery key now. status should show service: ready. If
unlock is refused with memory-unprotected, the
install guide says how to fix the memory limit.
4. Add credentials and a peer-authenticated caller
Store each credential with sudo iron-vault add. Then write a config whose callers are recognised by their account
on a Unix socket listener. This fragment is not a whole config: start from the complete
multi-user config.
[listeners.local]
unix_socket = "/run/iron-vault/proxy.sock"
[callers.code]
listener = "local"
auth = "peer"
user = "code" # the account the calling process runs as
routes = ["gh"]
Approve it with sudo iron-vault config approve config.toml, reading the summary first, as in
widen or narrow a route.
5. Send a request
As the code account:
curl --unix-socket /run/iron-vault/proxy.sock http://localhost/gh/user
Another account gets 401 unless the config names it, and sudo curl is refused. See
Send a request.
6. Add a TCP listener, if a caller needs one
Follow Add a TCP listener: an
iron-vault-listener@<name>.socket instance per listener, then a config with a listener of the same name and address.
A non-loopback address also needs tls_certificate and tls_key.
7. Upgrade
Build the new package, then:
sudo apt install ./target/debian/iron-vault_*.deb
sudo iron-vault unlock
The service restarts Locked; requests get 503 with reason locked until you unlock. See Upgrade, and Uninstall and purge
for removing it.
What can go wrong
- An admin command run without
sudois refused. Usesudo. unlockis refused withmemory-unprotected. An edited unit or drop-in loweredLimitMEMLOCK. Fix it and restart the service.- Every request gets
503after an upgrade or reboot. The service restarted Locked. Runsudo iron-vault unlock. - After an upgrade,
unlockends withunlocked-unavailableandstatusshowsreason: recovery needed. The new release may not read the old vault’s format. Check the changelog’s Breaking changes, then follow Recover from an upgrade that cannot open the vault.
Reference
- Installing Iron Vault on Linux and a shared Linux workstation.
- CLI: running commands with
sudo. - §4 of the specification, and the package design.
- The rest of the cookbook applies with
sudoin front of eachiron-vaultcommand, the log at/var/log/iron-vault/iron-vault.logand the published config at/etc/iron-vault/config.toml.
Rotate a provider key
Checked with iron-vault 0.2.0-alpha (features: dev-mode), built from main at 378d57d.
Give a stored credential a new secret; every route that uses it sends the new one, with no config change or restart. Revoke the old key at the provider afterwards: the provider accepts it until you do.
Output captured against httpbin.org, with a test value in place of each pass show.
Prerequisites
- The service running and Ready, with the
httpbin_keycredential andhttpbinroute from getting started. - The approval passphrase.
- The new key from the provider.
Steps
1. Replace the secret
replace takes the same --origin options as add. The old origins are not kept, so name every one again:
iron-vault replace httpbin_key --origin httpbin.org
It shows what changes and which routes use the credential, then asks for the approval passphrase and the new secret:
replace credential httpbin_key
record: f40ebf97-… -> a new record ID, assigned when the change is written
kind: static -> static
origins: httpbin.org:443 -> httpbin.org:443
routes using httpbin_key: httpbin (callers: me)
Approval passphrase for "approval passphrase":
Secret for httpbin_key:
replaced httpbin_key (static) as record 22327b62-…
From a script, put the approval passphrase on the first line of stdin and the secret after it:
{ pass show iron-vault-approval; pass show httpbin; } | iron-vault replace httpbin_key --origin httpbin.org
replace credential httpbin_key
record: 22327b62-… -> a new record ID, assigned when the change is written
kind: static -> static
origins: httpbin.org:443 -> httpbin.org:443
routes using httpbin_key: httpbin (callers: me)
replaced httpbin_key (static) as record 21f505bb-…
2. Check that the route uses the new key
iron-vault list
curl -s -H "Proxy-Authorization: Bearer $(cat ~/.iron-vault-tokens/me)" http://127.0.0.1:7878/httpbin/headers
httpbin_key static httpbin.org:443 healthy
{
"headers": {
"Accept": "*/*",
"Authorization": "Bearer [iron-vault:scrubbed]",
…
The first request may get 429: the route’s rate limit
starts empty after a replace. While the switch is in
progress, requests get 503 with reason checking.
3. Find the change in the log
jq -c 'select(.event == "credential.replaced")' ~/iron-vault-dev.log
{"service":"iron-vault","service_version":"0.2.0-alpha","schema_version":1,"deployment_profile":"development","timestamp":"2026-11-07T10:20:34.208637Z","level":"INFO","message":"credential replaced","event":"credential.replaced","credential":"httpbin_key","old_record_id":"f40ebf97-…","record_id":"22327b62-…","kind":"static","origins":"https://httpbin.org:443","old_kind":"static","old_origins":"https://httpbin.org:443","target":"iron-vault.audit"}
4. Revoke the old key at the provider
Do it in the provider’s console.
Changing the origins or the kind
replace also changes a key’s origins and kind. The new record must suit every route that uses the credential, or
nothing changes:
iron-vault replace httpbin_key --origin postman-echo.com
iron-vault: the service answered error 24 (credential-in-use): routes use credential httpbin_key and would stop working: route httpbin sends credential httpbin_key to postman-echo.com:443, which its record does not permit; approve a config without them first
To move a key to another host, change one side at a time:
replacewith the new origin alongside the old one:--origin httpbin.org --origin postman-echo.com.- Approve a config that points the route at the new host.
replaceagain with only the new origin.
What can go wrong
iron-vault: the service answered error 9 (approval-denied): the approval passphrase does not open the approver key. The approval passphrase was wrong. Nothing changed; the old key is still in use. The log has avault.presence-refusedrecord with"refusal":"wrong_passphrase".iron-vault: the service answered error 24 (credential-in-use): …. The new origins or kind don’t suit a route that uses the credential, as above.429on the first request afterwards. The bucket starts empty after areplace.- The provider refuses the new key. Iron Vault sends what you typed. Check for a stray space or a truncated paste,
then
replaceagain.
Reference
- CLI:
replaceand its stdin layout. - Audit log:
credential.replaced. - Related: remove a credential safely, rotate or revoke a caller token.
Remove a credential safely
Checked with iron-vault 0.2.0-alpha (features: dev-mode), built from main at 378d57d.
Remove a credential you no longer need: first approve a config without the routes that use it, then rm it. The
example credential is old_key, used by a route old granted to the me caller.
Prerequisites
- The service running and Ready, with the
mecaller from getting started. - The approval passphrase:
rmasks for it. - Your config file,
dev-config.toml.
To follow along, store a credential and give it a route first:
echo old-test-key-000 | iron-vault add old_key --origin httpbin.org
added old_key (static) as record b3d9440b-…
Add "old" to [callers.me]’s routes, add this route, and approve the config:
[routes.old]
prefix = "/old"
upstream = "https://httpbin.org"
credential = "old_key"
slot = { header = "Authorization", format = "Bearer {}" }
methods = ["GET"]
paths = ["/headers"]
rate_limit = { requests = 30, per_seconds = 60, burst = 5 }
Steps
1. See what uses the credential
rm tells you, by refusing:
iron-vault rm old_key
iron-vault: the service answered error 24 (credential-in-use): credential old_key is used by route old; approve a config without that route, then run `rm` again
Nothing was removed.
2. Approve a config without those routes
In dev-config.toml, delete the [routes.old] table and take "old" out of every caller’s routes. Deleting only
the table gets:
iron-vault: the service answered error 7 (config-invalid): the proposed config is invalid: caller me is granted route old, which is not defined
With both changes made:
iron-vault config approve dev-config.toml
Approval summary
vault: 8c597c79-…
version to commit: 4
config digest: blake2b:ab7050b8…
committed version: 3
route grants:
~ me: revoked old
routes:
- old
Approve this config as version 4? Type yes to approve: yes
Approval passphrase for "approval passphrase":
approved version 4 (blake2b:ab7050b8…)
callers: none; route grants: 1 changed; routes: 1 removed; listeners: none; limits: none; logging: none; recovery: none
Check that the summary removes only the routes you meant to remove before you type yes.
3. Remove the credential
iron-vault rm old_key
iron-vault list
It shows the record, then asks for the approval passphrase:
remove credential old_key
record: b3d9440b-…
kind: static
origins: httpbin.org:443
routes using old_key: none
Approval passphrase for "approval passphrase":
removed old_key
httpbin_key static httpbin.org:443 healthy
The log records it:
{"level":"INFO","message":"credential removed; no active route used it","event":"credential.removed","credential":"old_key","record_id":"b3d9440b-…","target":"iron-vault.audit"}
4. Revoke the key at the provider
rm deletes Iron Vault’s copy only. Revoke the key in the provider’s console, so a copy in an old backup is useless
too.
What can go wrong
iron-vault: the service answered error 24 (credential-in-use): …. A route of the active config still uses the credential. Do step 2 first, and approve it.iron-vault: the service answered error 7 (config-invalid): … caller me is granted route old, which is not defined. You deleted the route but left it in a caller’sroutes.iron-vault: the service answered error 9 (approval-denied): the approval passphrase does not open the approver key. Nothing was removed.- You removed the wrong credential. There is no undo.
addit again with the secret from the provider, or a reissued one, and approve its routes again.
Reference
- CLI:
rm. - Audit log:
credential.removed. - Related: rotate a provider key, widen or narrow a route.
Rotate or revoke a caller token
Checked with iron-vault 0.2.0-alpha (features: dev-mode), built from main at 378d57d.
Give a caller a new caller token, or remove the caller. Both are a config change: the old token stops working when the new config is approved, not before.
Prerequisites
- The service running and Ready, with the
mecaller andhttpbinroute from getting started. - Your config file,
dev-config.toml, and the approval passphrase.
A peer caller (auth = "peer") has no token; to revoke it, revoke the caller.
Rotate a token
1. Issue a new token
Keep the old token’s header, to check later that it is refused:
OLD="Proxy-Authorization: Bearer $(cat ~/.iron-vault-tokens/me)"
iron-vault caller-token > ~/.iron-vault-tokens/me.new
token_hash = "blake2b:675b97bb…"
This token is shown once and the service keeps no copy of it.
Put the token_hash line on the caller's [callers.<name>] table and run `iron-vault config approve <file>`.
The token works only once that config is approved and active; the caller's old token, if any, keeps working until then.
The old token still works:
curl -si -H "$OLD" http://127.0.0.1:7878/httpbin/headers | head -1
HTTP/1.1 200 OK
2. Put the new hash in the config and approve it
Replace the token_hash line in [callers.me] with the one just printed:
iron-vault config approve dev-config.toml
Approval summary
vault: 8c597c79-…
version to commit: 5
config digest: blake2b:3671b247…
committed version: 4
callers:
~ me: token changed
Approve this config as version 5? Type yes to approve: yes
Approval passphrase for "approval passphrase":
approved version 5 (blake2b:3671b247…)
callers: 1 changed; route grants: none; routes: none; listeners: none; limits: none; logging: none; recovery: none
If the summary shows anything but token changed, answer anything but yes and check the file.
3. Move the new token into place
mv ~/.iron-vault-tokens/me.new ~/.iron-vault-tokens/me
AUTH="Proxy-Authorization: Bearer $(cat ~/.iron-vault-tokens/me)"
curl -si -H "$OLD" http://127.0.0.1:7878/httpbin/headers | head -1
curl -si -H "$AUTH" http://127.0.0.1:7878/httpbin/headers | head -1
HTTP/1.1 401 Unauthorized
HTTP/1.1 200 OK
Give the new token to the program that uses it, and restart the program if it reads the token only at startup. Until
then its requests get 401.
Revoke a caller
Delete the caller’s whole [callers.<name>] table from dev-config.toml and approve. Here the caller is ci, which
was granted the httpbin route:
iron-vault config approve dev-config.toml
Approval summary
vault: 8c597c79-…
version to commit: 7
config digest: blake2b:afe3d6c6…
committed version: 6
callers:
- ci
route grants:
- ci: revoked httpbin
Approve this config as version 7? Type yes to approve: yes
Approval passphrase for "approval passphrase":
approved version 7 (blake2b:afe3d6c6…)
callers: 1 removed; route grants: 1 removed; routes: none; listeners: none; limits: none; logging: none; recovery: none
Its token is refused from then on:
curl -si -H "Proxy-Authorization: Bearer $(cat ~/.iron-vault-tokens/ci)" http://127.0.0.1:7878/httpbin/headers | head -1
rm ~/.iron-vault-tokens/ci
HTTP/1.1 401 Unauthorized
The log shows the last request that worked and the first refused one (fields trimmed):
{"caller":"ci","route":"httpbin","status":200,"outcome":"success","reason":null}
{"caller":null,"route":null,"status":401,"outcome":"failure","reason":"unauthenticated"}
To take one route away from a caller without revoking it, remove the route from its routes instead. The summary
shows ~ <caller>: revoked <route>.
What can go wrong
- The old token still works. The new config was not approved, or the approval was declined.
iron-vault statusshows the committed version; it should have gone up by one. - Both tokens get
401. Thetoken_hashline in the file is not the onecaller-tokenprinted for the new token, or the program still sends the old token. - You lost the new token before saving it. The service keeps no copy. Issue another and approve again.
Reference
- CLI:
caller-token. - Configuration: callers and
token_hash. - Related: widen or narrow a route, investigate with the audit log.
Widen or narrow a route
Checked with iron-vault 0.2.0-alpha (features: dev-mode), built from main at 378d57d.
Make a route allow more, or less, and check the approval summary before you type yes: it shows what the
approval changes, including any edit to the file you didn’t make.
Prerequisites
- The service running and Ready, with the
mecaller andhttpbinroute from getting started. - Your config file,
dev-config.toml, and the approval passphrase.
Steps
1. Widen the route
Allow httpbin’s compressed and streamed echoes too. In [routes.httpbin]:
paths = ["/anything/**", "/headers", "/gzip", "/stream/*"]
* matches exactly one path segment, and ** zero or more; see configuration.
iron-vault config approve dev-config.toml
Approval summary
vault: 8c597c79-…
version to commit: 8
config digest: blake2b:e540c2d8…
committed version: 7
routes:
~ httpbin: paths /anything/**, /headers -> /anything/**, /gzip, /headers, /stream/*
Approve this config as version 8? Type yes to approve: yes
Approval passphrase for "approval passphrase":
approved version 8 (blake2b:e540c2d8…)
callers: none; route grants: none; routes: 1 changed; listeners: none; limits: none; logging: none; recovery: none
The new paths work at once, with no restart:
AUTH="Proxy-Authorization: Bearer $(cat ~/.iron-vault-tokens/me)"
curl -s -H "$AUTH" http://127.0.0.1:7878/httpbin/stream/2
{"id":0,"args":{},"headers":{"Accept":"*/*","Accept-Encoding":"gzip, deflate, br","Authorization":"Bearer [iron-vault:scrubbed]","Host":"httpbin.org","User-Agent":"curl/8.5.0"},"origin":"…","url":"https://httpbin.org/stream/2"}
{"id":1,"args":{},"headers":{"Accept":"*/*","Accept-Encoding":"gzip, deflate, br","Authorization":"Bearer [iron-vault:scrubbed]","Host":"httpbin.org","User-Agent":"curl/8.5.0"},"origin":"…","url":"https://httpbin.org/stream/2"}
2. Narrow it
Take /stream/* away again and slow the route down:
paths = ["/anything/**", "/headers", "/gzip"]
rate_limit = { requests = 10, per_seconds = 60, burst = 2 }
Approval summary
vault: 8c597c79-…
version to commit: 9
config digest: blake2b:f8020a2b…
committed version: 8
routes:
~ httpbin: paths /anything/**, /gzip, /headers, /stream/* -> /anything/**, /gzip, /headers; rate limit 30 per 60s burst 5 -> 10 per 60s burst 2
Approve this config as version 9? Type yes to approve: yes
Approval passphrase for "approval passphrase":
approved version 9 (blake2b:f8020a2b…)
callers: none; route grants: none; routes: 1 changed; listeners: none; limits: none; logging: none; recovery: none
curl -si -H "$AUTH" http://127.0.0.1:7878/httpbin/stream/2 | head -1
HTTP/1.1 403 Forbidden
The log gives the reason path_not_allowed. After each approval the route’s rate limit
starts empty.
3. Read the summary, and say no when it’s wrong
Suppose the file now holds a change you didn’t make, or one bigger than you meant:
Approval summary
vault: 8c597c79-…
version to commit: 10
config digest: blake2b:869e704b…
committed version: 9
routes:
~ httpbin: methods GET -> DELETE, GET, POST; paths /anything/**, /gzip, /headers -> /**
Approve this config as version 10? Type yes to approve: no
iron-vault: the service answered error 8 (declined): the config was not approved: the confirmation was not `yes`
Anything but yes declines. Nothing changes: status still shows approval committed: 9 and
approval highest reserved: 9. Fix the file and approve again.
What to check in a summary:
- Header.
vaultis your vault, andcommitted versionis the onestatusshows. After tamper detection it readsno active config, and every table is listed as added. callers(+added,-removed,~changed). A new caller, a changed listener ortoken changedyou didn’t expect.route grants: which caller gains or loses which route.routes: each changed field as old->new: prefix, upstream, credential, slot, CA file, methods, paths, rate limit and confirmation. Watchupstreamandslotmost.listeners: a new address changes who can reach every route on it.- The last line counts every section, so
nonein a section confirms nothing changed there.
What can go wrong
iron-vault: the service answered error 8 (declined): the config was not approved: the confirmation was not `yes`. You typed something other thanyes. Nothing changed.iron-vault: the service answered error 7 (config-invalid): the proposed config is invalid: …. Refused before the summary; the message names the problem. A listener moved to192.0.2.10:8443withouttls_certificateandtls_keygivesthe proposed config is invalid: listener public on 192.0.2.10:8443 needs tls_certificate and tls_key: plain HTTP is allowed only on loopback. Check the configuration reference for that table.403withpath_not_allowedafter widening. Patterns leave out the upstream’s base path.429straight after the approval. The bucket starts empty.
Reference
- Configuration: routes, path patterns, methods and rate limits.
- CLI:
config approve. - The approval summary’s design.
- Related: rotate or revoke a caller token, tamper detection and recovery.
Scrubbing and redirects
Checked with iron-vault 0.2.0-alpha (features: dev-mode), built from main at e10f09e. The streamed Venice chat
in step 2 needs a real Venice key and was not run, so no output is shown for it.
See the scrubber remove a credential from compressed and streamed responses, and what Iron Vault does with an upstream’s redirect.
Prerequisites
- The service running and Ready, with the
mecaller andhttpbinroute from getting started, andAUTHset as in that recipe. - For the streamed chat, the
chatcaller andvenice-chatroute from two keys, two callers, andCHATset as in that recipe.
Steps
1. Allow the paths
In dev-config.toml, widen the httpbin route’s paths:
paths = ["/anything/**", "/headers", "/gzip", "/stream/*", "/redirect-to"]
Approve it:
iron-vault config approve dev-config.toml
Your vault ID, digest and versions will differ:
Approval summary
vault: 7e3c6dfe-3a89-49ee-9f54-1e538dbfc4ed
version to commit: 3
config digest: blake2b:d5c63bfb9766ff1cbf98328c7c50f8e0fd4aeff2c1ce9f897567a59e361a6b5a
committed version: 2
routes:
~ httpbin: paths /anything/**, /headers -> /anything/**, /gzip, /headers, /redirect-to, /stream/*
Approve this config as version 3? Type yes to approve: yes
Approval passphrase for "approval passphrase":
approved version 3 (blake2b:d5c63bfb9766ff1cbf98328c7c50f8e0fd4aeff2c1ce9f897567a59e361a6b5a)
callers: none; route grants: none; routes: 1 changed; listeners: none; limits: none; logging: none; recovery: none
Wait a few seconds before the next step: the route’s bucket starts empty after the approval.
2. Scrub compressed and streamed responses
httpbin’s /gzip answers with a gzip-compressed echo, and /stream/3 with three streamed echoes:
curl -si -H "$AUTH" http://127.0.0.1:7878/httpbin/gzip
HTTP/1.1 200 OK
access-control-allow-credentials: true
access-control-allow-origin: *
access-control-expose-headers: Retry-After, RateLimit, RateLimit-Policy
date: Sun, 08 Nov 2026 12:11:08 GMT
x-content-type-options: nosniff
content-type: application/json
transfer-encoding: chunked
{
"args": {},
"headers": {
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate, br",
"Authorization": "Bearer [iron-vault:scrubbed]",
"Host": "httpbin.org",
"User-Agent": "curl/8.5.0"
},
"method": "GET",
"origin": "203.0.113.7",
"url": "",
"gzipped": true
}
curl -sN -H "$AUTH" http://127.0.0.1:7878/httpbin/stream/3
{"id":0,"args":{},"headers":{"Accept":"*/*","Accept-Encoding":"gzip, deflate, br","Authorization":"Bearer [iron-vault:scrubbed]","Host":"httpbin.org","User-Agent":"curl/8.5.0"},"origin":"203.0.113.7","url":"https://httpbin.org/stream/3"}
{"id":1,"args":{},"headers":{"Accept":"*/*","Accept-Encoding":"gzip, deflate, br","Authorization":"Bearer [iron-vault:scrubbed]","Host":"httpbin.org","User-Agent":"curl/8.5.0"},"origin":"203.0.113.7","url":"https://httpbin.org/stream/3"}
{"id":2,"args":{},"headers":{"Accept":"*/*","Accept-Encoding":"gzip, deflate, br","Authorization":"Bearer [iron-vault:scrubbed]","Host":"httpbin.org","User-Agent":"curl/8.5.0"},"origin":"203.0.113.7","url":"https://httpbin.org/stream/3"}
In both, Authorization reads Bearer [iron-vault:scrubbed]. The /gzip response arrives without
Content-Encoding, decompressed for scrubbing. Each response produces a response.scrubbed record, with one match per
echo. This one is from /stream/3:
{"service":"iron-vault","service_version":"0.2.0-alpha","schema_version":1,"deployment_profile":"development","timestamp":"2026-11-08T12:11:11.628275Z","level":"WARN","message":"scrubbed a secret from a response","event":"response.scrubbed","request_id":"4efad803-1ac8-413e-9ad0-221632213ea0","route":"httpbin","credential":"httpbin_key","matches":3,"target":"iron-vault.audit"}
Venice’s chat route streams the same way, as server-sent events, with "stream": true (not run):
curl -sN -H "$CHAT" -H 'Content-Type: application/json' \
http://127.0.0.1:7878/venice-chat/chat/completions \
-d '{"model": "google-gemma-3-27b-it", "stream": true, "messages": [{"role": "user", "content": "Count to five."}]}'
3. See a redirect come back
Iron Vault never follows a redirect; it passes it back to the caller:
# a redirect within httpbin is rewritten under the route prefix
curl -si -H "$AUTH" 'http://127.0.0.1:7878/httpbin/redirect-to?url=/headers' | grep -i '^location'
# location: /httpbin/headers
# a redirect to another site is passed through unchanged; following it sends no credential
curl -si -H "$AUTH" 'http://127.0.0.1:7878/httpbin/redirect-to?url=https://example.com/' | grep -i '^location'
# location: https://example.com/
A redirect to the same origin but outside the upstream’s base path, such as /other from an upstream at /api/v1, is
refused with 502.
What can go wrong
403withpath_not_allowed. The route’spathsdon’t include the path; step 1 adds them.502with reasonredirect_refused. The upstream redirected outside its base path, as above.
Reference
- Audit log:
response.scrubbed. - Errors: the
502reasons. - Related: Basic authentication upstreams, which shows what the scrubber matches for a Basic credential.
A route can’t send a key to another host
Checked with iron-vault 0.2.0-alpha (features: dev-mode), built from main at e10f09e.
See Iron Vault refuse to send a stored key anywhere its credential record doesn’t permit, from a config approval or a
replace.
Prerequisites
- The service running and Ready, with the
httpbin_keycredential andhttpbinroute from getting started. - Your config file,
dev-config.toml.
Steps
1. Point the route at another host
Point the httpbin route somewhere else in dev-config.toml:
upstream = "https://postman-echo.com"
iron-vault config approve dev-config.toml
The service refuses before asking anything:
iron-vault: the service answered error 7 (config-invalid): the proposed config is invalid: route httpbin sends credential httpbin_key to an origin its record does not permit
The command exits with status 1, and iron-vault status still shows the same approval committed version. Put the
upstream back to https://httpbin.org.
2. Try it with replace
Replace the key with a record that permits only another host:
iron-vault replace httpbin_key --origin postman-echo.com
It is refused before it asks for anything:
iron-vault: the service answered error 24 (credential-in-use): routes use credential httpbin_key and would stop working: route httpbin sends credential httpbin_key to httpbin.org:443, which its record does not permit; approve a config without them first
iron-vault list still shows httpbin_key static httpbin.org:443 healthy.
To move a key to another host on purpose, follow changing the origins or the kind.
Reference
- Configuration:
credential, and where it may go. - Errors:
config-invalidandcredential-in-use. - Related: rotate a provider key.
Investigate with the audit log
Checked with iron-vault 0.2.0-alpha (features: dev-mode), built from main at 378d57d.
Use jq on the audit log to find which requests were refused and why, which responses had a secret scrubbed, and who
changed what, and when. Long outputs below are cut to their last lines.
Prerequisites
-
jq. -
The log. Set
LOGto its path:Install Log Read it as Development, as in getting started ~/iron-vault-dev.log(theteecopy)you Development, without --log-to-stdout$XDG_STATE_HOME/iron-vault-dev-log/iron-vault.logyou Protected Linux install /var/log/iron-vault/iron-vault.logroot ( sudo jq …)LOG=~/iron-vault-dev.logRead rotated
iron-vault.log.1withjqand olderiron-vault.log.*.gzwithzcat … | jq. See log operations.
Steps
1. Count refusals by reason
A refused request’s request.completed record has "outcome":"failure" and a reason:
jq -r 'select(.event == "request.completed" and .outcome == "failure") | .reason' $LOG | sort | uniq -c | sort -rn
4 rate_limited
3 unauthenticated
2 path_not_allowed
2 locked
1 policy_invalid
1 no_route
1 method_not_allowed
Where to look:
| Reason | Status | Look at |
|---|---|---|
unauthenticated | 401 | a missing, wrong or revoked caller token; such records name no caller |
not_granted, method_not_allowed, path_not_allowed | 403 | the caller’s routes, or the route’s methods and paths (widen or narrow a route) |
no_route | 404 | a base URL missing the route prefix |
rate_limited | 429 | the route’s rate_limit; straight after an unlock or approval, the bucket starting empty |
locked | 503 | the service is Locked: unlock it |
policy_invalid | 503 | the config check failed: see tamper detection |
The audit log reference lists every reason.
2. Narrow it down
Who was refused, on which route, and when:
jq -c 'select(.event == "request.completed" and .reason == "rate_limited") | {timestamp, caller, route}' $LOG
…
{"timestamp":"2026-11-07T10:22:50.927407Z","caller":"me","route":"httpbin"}
{"timestamp":"2026-11-07T10:23:53.745995Z","caller":"me","route":"httpbin"}
{"timestamp":"2026-11-07T10:24:37.662668Z","caller":"me","route":"httpbin"}
Swap the select for .route == "brave" and .outcome == "failure" to see one route’s failures, or add
and .timestamp >= "2026-11-07T10:20" to bound the time (UTC timestamps compare as strings).
3. Find scrubbed responses
A response.scrubbed record means the upstream sent a credential back. From a real API (not an echo service like
httpbin), report it to the provider. To list them:
jq -c 'select(.event == "response.scrubbed") | {timestamp, request_id, route, credential, matches}' $LOG
…
{"timestamp":"2026-11-07T10:22:50.919167Z","request_id":"0589c90c-…","route":"httpbin","credential":"httpbin_key","matches":1}
{"timestamp":"2026-11-07T10:24:00.060540Z","request_id":"5e34a829-…","route":"httpbin","credential":"httpbin_key","matches":1}
4. Follow one request
A request_id joins every record about one request:
jq -c 'select(.request_id == "5e34a829-…") | {event, caller, route, status, scrubbed, matches}' $LOG
{"event":"request.completed","caller":"me","route":"httpbin","status":200,"scrubbed":true,"matches":null}
{"event":"response.scrubbed","caller":null,"route":"httpbin","status":null,"scrubbed":null,"matches":1}
Use the full ID from the log.
5. Read the admin trail
Credential changes, issued tokens, approvals, config checks, recovery checks, refused passphrases and lock changes:
jq -c 'select(.event | strings | test("^(credential|caller|vault|recovery)\\.|^admin\\.refused|^config\\.(approval|reload|check)|^service\\.lock"))
| {timestamp, event}
+ ({credential, version, refusal, peer_uid, recovery_outcome, unavailable_reason, from_state, to_state}
| with_entries(select(.value != null)))' $LOG
…
{"timestamp":"2026-11-07T10:20:14.997205Z","event":"credential.added","credential":"httpbin_key"}
{"timestamp":"2026-11-07T10:20:14.999235Z","event":"caller.token-issued"}
{"timestamp":"2026-11-07T10:20:15.436819Z","event":"config.approval-completed","version":2}
{"timestamp":"2026-11-07T10:20:34.208637Z","event":"credential.replaced","credential":"httpbin_key"}
{"timestamp":"2026-11-07T10:20:56.809548Z","event":"vault.presence-refused","refusal":"wrong_passphrase"}
{"timestamp":"2026-11-07T10:21:03.864703Z","event":"credential.replaced","credential":"httpbin_key"}
…
{"timestamp":"2026-11-07T10:24:16.625579Z","event":"recovery.checked","recovery_outcome":"failed"}
{"timestamp":"2026-11-07T10:24:23.474827Z","event":"config.check-failed","unavailable_reason":"policy_invalid"}
{"timestamp":"2026-11-07T10:24:23.474848Z","event":"config.reload-failed","unavailable_reason":"policy_invalid"}
{"timestamp":"2026-11-07T10:24:32.584363Z","event":"config.approval-completed","version":10}
Things to look for:
- an
admin.refusedwith refusalnot_admin_principal: an account that is not the admin tried the admin socket, andpeer_uidnames it; - a
vault.presence-refusedorvault.unlock-refusedyou didn’t cause: someone tried the vault passphrase; - a
config.approval-refusedyou didn’t cause: someone tried the approval passphrase; - an approval or
credential.replacedyou didn’t make; - a
config.reload-failed: someone changed the published config.
A declined or invalid approval writes only an admin.command record.
6. See what an approval changed
Each config.approval-completed carries the approval summary that was shown before yes:
jq -r 'select(.event == "config.approval-completed" and .version == 9) | "version \(.version), \(.timestamp)\n\(.summary)"' $LOG
version 9, 2026-11-07T10:22:20.790368Z
routes:
~ httpbin: paths /anything/**, /gzip, /headers, /stream/* -> /anything/**, /gzip, /headers; rate limit 30 per 60s burst 5 -> 10 per 60s burst 2
7. Check that no secret reached the log
Search for a test secret you stored:
grep -c -F 'not-a-real-key-123' $LOG
0
Never do this with a real secret: it would land in your shell history.
What can go wrong
jq: error (at …): null (null) cannot be matched, as it is not a string. Keep the.event | stringsguard in filters that test the event name.Permission deniedon/var/log/iron-vault. Usesudo, and don’t add a login or caller account to the log’s group.- Nothing since a restart. In development with
--log-to-stdout, the log is wherever stdout went. Without thetee, it is gone.
Reference
- Audit log: every event, its fields and level, and every
reason. - Log operations: location, permissions, rotation, collectors and more queries.
- The audit logging design.
Lock, unlock and restart
Checked with iron-vault 0.2.0-alpha (features: dev-mode), built from main at 378d57d.
Lock the service, see what callers get while it is Locked, unlock it, and restart it. lock clears every secret from
the service’s memory until someone unlocks it with the vault passphrase. See service states.
Prerequisites
- The service running and Ready, with the
mecaller andhttpbinroute from getting started. - The vault passphrase.
Steps
1. Lock
iron-vault lock
iron-vault status
locked
service: locked
profile: development — no isolation from malware running as alice
vault: locked
vault id: unknown
approval committed: unknown while the vault is locked
approval highest reserved: unknown while the vault is locked
memory protection: NOT protected, swap protection unavailable (RLIMIT_MEMLOCK soft limit is 8315834368 bytes, not unlimited)
recovery last checked: never (reminders counting since 2026-11-07)
credentials: unknown while the vault is locked
status exits with 4 while the service is not Ready.
2. See what callers get
The listener stays open:
AUTH="Proxy-Authorization: Bearer $(cat ~/.iron-vault-tokens/me)"
curl -si -H "$AUTH" http://127.0.0.1:7878/httpbin/headers
HTTP/1.1 503 Service Unavailable
content-type: text/plain; charset=utf-8
content-length: 6
locked
The log records it as "status":503,"outcome":"failure","reason":"locked".
3. Unlock
iron-vault unlock
Vault passphrase:
the vault is unlocked: the service is Ready
A wrong passphrase changes nothing:
iron-vault: the service answered error 14 (unlock-denied): wrong passphrase
After 5 wrong vault passphrases, unlock is refused for a cooldown that starts at 30 s and doubles up to 15 min.
lock does not clear the count.
The log (trimmed):
{"event":"service.lock-transition","from_state":"ready","to_state":"locked"}
{"event":"vault.unlock-refused","refusal":"wrong_passphrase"}
{"event":"service.lock-transition","from_state":"locked","to_state":"checking"}
{"event":"service.lock-transition","from_state":"checking","to_state":"ready"}
4. Restart
Stop the service with Ctrl-C in its terminal, and start it again with the command from getting started:
iron-vault serve --log-to-stdout | tee -a ~/iron-vault-dev.log
It comes back Locked:
iron-vault status | head -3
curl -si -H "$AUTH" http://127.0.0.1:7878/httpbin/headers | head -1
service: locked
profile: development — no isolation from malware running as alice
vault: locked
HTTP/1.1 503 Service Unavailable
Unlock it:
iron-vault unlock
iron-vault status
Vault passphrase:
the vault is unlocked: the service is Ready
service: ready
profile: development — no isolation from malware running as alice
vault: unlocked
vault id: 8c597c79-…
approval committed: 9
approval highest reserved: 9
memory protection: NOT protected, swap protection unavailable (RLIMIT_MEMLOCK soft limit is 8315834368 bytes, not unlimited)
recovery last checked: never (reminders counting since 2026-11-07)
credential httpbin_key: healthy
5. Expect 429 for a moment
The rate limit starts empty on every unlock. Straight after it:
curl -si -H "$AUTH" http://127.0.0.1:7878/httpbin/headers | head -1
sleep 6
curl -si -H "$AUTH" http://127.0.0.1:7878/httpbin/headers | head -1
HTTP/1.1 429 Too Many Requests
HTTP/1.1 200 OK
A lock survives a restart
After lock, a restart, crash or reboot leaves the service Locked until a passphrase unlock, even with a host unlock
(Docker Compose, or TPM unlock). The log has vault.host-unlock with host_unlock_outcome
owner_locked. The owner-lock file holds this state.
In a protected install
Run the commands through sudo, and restart with sudo systemctl restart iron-vault. After every restart or package
upgrade, run sudo iron-vault unlock, unless TPM unlock is set up.
What can go wrong
iron-vault: the service answered error 14 (unlock-denied): wrong passphrase. Type the vault passphrase, not the approval passphrase. After 5 wrong ones the cooldown starts.iron-vault: the Iron Vault service is not running: there is no admin socket at …. The service is stopped, or it was started with a differentXDG_RUNTIME_DIR.503withpolicy invalidafter unlocking. The published config failed its check. See tamper detection and recovery.lockorunlockwarns on stderr about the owner-lock file. The state directory is not writable, so the lock will not survive a restart, or the next start will stay Locked. Once it is writable,lockthenunlockagain.unlockis refused withmemory-unprotected(protected install only). The service could not lock its memory. The installation guide says how to fix the limit.
Reference
- Service states: Locked, Checking, Ready and Unavailable.
- CLI:
lock,unlockandstatus. - Related: check and store your recovery key.
Check and store your recovery key
Checked with iron-vault 0.2.0-alpha (features: dev-mode), built from main at 378d57d.
Store the recovery key, the AGE-SECRET-KEY-1… line init showed you once, and prove it opens your vault. The
service keeps no copy. Check it while the vault passphrase still works, so a bad copy can still be replaced. See the
recovery design for what the check proves.
Prerequisites
- The service running, Locked or Ready. The check works in both.
- The recovery key from
init.
Steps
1. Store the key
Keep it apart from the vault and from the machine:
- An independent password manager, one this machine doesn’t sync from, or paper, kept somewhere safe.
initalso shows the key as a QR code, which you can print. - Optionally, a passphrase-encrypted file of your own as well, such as one made with
age -p. - Never beside the vault or in the same backup. An encrypted file must live off this machine too.
Keep a copy of your approved config and the output of iron-vault list with it: if the vault is lost, they list the
credentials to reissue.
2. Check the key
iron-vault recovery check
It asks for the key with echo off:
Recovery key:
the recovery key opens vault 8c597c79-…: checked 2026-11-07T10:24:07Z
Or pipe it in:
pass show iron-vault-recovery | iron-vault recovery check
It changes nothing in the vault, and works while Locked (here after iron-vault lock):
locked
the recovery key opens vault 8c597c79-…: checked 2026-11-07T10:24:09Z
3. See when you last checked
iron-vault status | grep recovery
recovery last checked: 2026-11-07 (today)
4. Answer the reminders
After 90 days without a check, the service logs a recovery.reminder record at INFO (at most once a week), and
status adds , overdue. The log is the only reminder, so alert on that event; the
log operations guide has the query. Set the interval, 7 to 365 days, in the
approved config:
[recovery]
reminder_days = 90
Run the check again whenever you move the key to a new place.
5. If you forget the vault passphrase
Not yet run against a build: the output below is what the code prints.
Lock the service if it is Ready, then unlock with the recovery key instead:
iron-vault lock
iron-vault unlock --recovery
It asks for the key, then for a new vault passphrase twice, all with echo off:
Recovery key:
Choose a new vault passphrase of at least 12 characters, different from every approval passphrase. Once the recovery unlock finishes, unlock refuses the forgotten vault passphrase.
New vault passphrase:
Repeat the new vault passphrase:
the vault is unlocked with the recovery key and has a new vault passphrase: the service is Ready
From now on unlock takes the new passphrase only. It also counts as a recovery check. After 5 wrong keys it waits
30 seconds before the next try, doubling up to 15 minutes; wrong vault passphrases don’t count towards that.
A copy of identity.age made before still opens with the forgotten passphrase, so if it may have leaked, rotate the
credentials at their providers too.
What can go wrong
iron-vault: the service answered error 30 (recovery-key-invalid): the text is not an AGE-SECRET-KEY-1... recovery key. Not a recovery key: a truncated paste, a missing line, or another kind of key.iron-vault: the service answered error 31 (recovery-check-failed): the recovery key does not open this vault. Not this vault’s key. If you can’t find the right one, the vault has only its passphrase left, and a forgotten passphrase could then not be recovered: add a new recovery key now, then remove the lost one.recovery-check-unavailable. A vault file could not be read; this says nothing about the key.statusand the log name the file.
Each check logs a recovery.checked record with recovery_outcome opened, invalid, failed or
unavailable.
Reference
- CLI:
recovery check, andunlockfor--recovery. - Errors of
unlock --recovery. - The recovery unlock design.
- The recovery design: what the check proves, and the reminder schedule.
- §16 of the specification.
Rotate the recovery key, or add a machine’s key
Replace the recovery key with a new one, and enrol an age key that you hold on another machine. A recipient is a
key the vault identity is wrapped for; see the security model.
Prerequisites
- The service running and Ready, as at the end of getting started.
- The vault passphrase, for
recipient add, and the approval passphrase, forrecipient remove. - The recovery key you keep now, and somewhere safe to store a new one; see check and store your recovery key.
Steps
1. List the recipients
iron-vault recipient list
age10dvnun… operational 2026-11-08T14:54:27Z vault passphrase
age1vhncy4… recovery 2026-11-08T14:54:27Z recovery key
Commands name a recipient by its age1… key, never its label. Note the old recovery key’s for step 4.
2. Add a new recovery key
The service shows the new key once, like init; save it, type yes, then type the vault passphrase:
iron-vault recipient add --recovery --label "recovery key 2026"
add a new recovery key to the vault
vault: 3c3bc52f-…
recipient: age1lvqkl6…
role: recovery
label: recovery key 2026
recipients after the change: 3 (operational 1, recovery 2)
next: the new recovery key is shown once; save it, then type yes
authorize with: the vault passphrase
The recovery key follows. It is shown this once, and the service keeps no copy.
…
AGE-SECRET-KEY-1…
…
Type yes once you have saved the recovery key: yes
Vault passphrase:
enrolled age1lvqkl6… as recovery; the vault has 3 recipients.
Removing a recipient protects future copies of identity.age only.
Old copies of identity.age, and backups, still open with a removed key.
If a machine was lost, rotate the provider credentials it could reach.
Check the new key with iron-vault recovery check, then remove the old recovery key with iron-vault recipient remove.
3. Check the new key
Paste the new key at the prompt (the old one also passes until step 4):
iron-vault recovery check
Recovery key:
the recovery key opens vault 3c3bc52f-…: checked …
If the check fails, stop here: the old recovery key still works. Remove the new key by the age1… key step 2 showed,
with iron-vault recipient remove, then run step 2 again. See
what can go wrong.
4. Remove the old recovery key
Name it by the age1… key from step 1, and type the approval passphrase:
iron-vault recipient remove age1vhncy4…
remove a recipient from the vault
vault: 3c3bc52f-…
recipient: age1vhncy4…
role: recovery
label: recovery key
enrolled: 2026-11-08T14:54:27Z
recipients after the change: 2 (operational 1, recovery 1)
removing a recipient protects future copies of identity.age only; copies made before still open with this key
authorize with: the approval passphrase
Approval passphrase for "approval passphrase":
removed age1vhncy4…; the vault has 2 recipients.
Removing a recipient protects future copies of identity.age only.
Old copies of identity.age, and backups, still open with a removed key.
If a machine was lost, rotate the provider credentials it could reach.
Check the recovery key you keep with iron-vault recovery check.
The old key now fails recovery check:
iron-vault: the service answered error 31 (recovery-check-failed): the recovery key does not open this vault
Copies of identity.age and backups made before the removal still open with the old key. If the old key or a machine
was lost, rotate the provider credentials too.
5. Add another machine’s key
Whoever holds an enrolled key’s secret half can open every credential. Enrol only a key you control. It is used by the host unlock handoff in the Container profile; no other v0 command uses it.
Generate the key on the other machine, for example with age-keygen, and enrol its public age1… key:
iron-vault recipient add age1v4q6gq… --label "bob's new laptop"
add a recipient to the vault
vault: 3c3bc52f-…
recipient: age1v4q6gq…
role: added
label: bob's new laptop
recipients after the change: 3 (operational 1, recovery 1, added 1)
this key will open the vault identity, and with it every credential, in every copy of identity.age written from now on
authorize with: the vault passphrase
Vault passphrase:
enrolled age1v4q6gq… as added; the vault has 3 recipients.
Removing a recipient protects future copies of identity.age only.
Old copies of identity.age, and backups, still open with a removed key.
If a machine was lost, rotate the provider credentials it could reach.
recipient list now has a third line, with role added. It never counts as a recovery key. Remove it with
recipient remove when the machine is retired.
What can go wrong
declined. You didn’t typeyesafter the new recovery key was shown. Nothing changed; discard the key shown.recipient-set-invalid. The change would leave the vault without its vault passphrase recipient or without a recovery key, or with more than 64 recipients. Add the new recovery key before you remove the old one.unknown-recipientorrecipient-invalid. The key doesn’t match an enrolled recipient, or isn’t anage1…key. Copy it fromrecipient list.recipient-enrolled. The key is already enrolled.migration-deniedfromrecipient add, orapproval-deniedfromrecipient remove. The wrong passphrase:addtakes the vault passphrase,removethe approval passphrase. Nothing was written.wrong-state. The service is Locked. Runiron-vault unlock; every recipient command needs Ready.
The errors reference lists every code.
Reference
- CLI:
recipient list,addandremove. - Recipients design: the independence rule, and why old copies still open.
- Reset the vault, when no way into it is left.
- Retire a machine, once its recipient is removed.
- Move a vault to a new machine.
Rotate the approval passphrase, and keep a second approver
Checked with iron-vault 0.3.0-alpha (features: dev-mode), built from main at 539cea4.
Enrol a new approval passphrase, approve the active config with it, then remove the old one; every route keeps serving throughout. Each approver is a pinned approval signer, and any one of them gives your approval.
Why keep a second approver
Only a pinned approver can enrol or remove an approver: never the vault passphrase or a recovery key
(security model). If you forget every approval passphrase, you can
never approve a config, replace or remove a credential, or change approvers again; reset is the
only way out.
So do steps 1 and 2 to enrol a second approver, with a passphrase kept apart from the first. Then a forgotten
passphrase costs one approver remove (after step 3, if the forgotten one is active). Keep a software approver
beside a TPM approver too.
Prerequisites
- The service running and Ready, with a config approved as in getting started.
- The current approval passphrase, and a new one of at least 12 characters, different from the vault passphrase.
dev-config.toml, the config you last approved.
Steps
1. List the approvers
iron-vault approver list
d69d992b-fcf3-481b-b12d-1ec89a59ae67 software 2026-11-11T01:21:45Z active approval passphrase
active marks the approver that signed the config in force. Note the old approver’s ID for step 4; commands name an
approver by ID, never by label.
2. Enroll the new approver
Type the current approval passphrase, then the new one twice:
iron-vault approver add --label "approval passphrase 2026"
enroll an approval signer
vault: 4c3dce89-4e6e-42ad-830b-e0bb5eb39c36
kind: software
label: approval passphrase 2026
approvers after the change: 2
the new signer alone can approve a config and authorize replace, rm, recipient remove and approver changes
next: choose its approval passphrase, different from the vault passphrase
authorize with: any pinned approver
Approval passphrase for "approval passphrase":
New approval passphrase for "approval passphrase 2026":
Repeat the new approval passphrase:
enrolled approver a53f9f72-74c7-403e-82a7-c34f9474ce25 (software); the vault has 2 approvers.
a53f9f72-74c7-403e-82a7-c34f9474ce25
Only the bare approver ID goes to stdout. If you are only adding a second approver, stop here and store its passphrase.
3. Approve the active config with the new approver
Approve the same config again, so the old approver no longer signs the config in force. At the first prompt press Ctrl-Y to switch to the new approver, then type the new passphrase:
iron-vault config approve dev-config.toml
Approval summary
vault: 4c3dce89-4e6e-42ad-830b-e0bb5eb39c36
version to commit: 3
config digest: blake2b:10cef10967fbeeaece8a5f087bf247f8e3ad253a88f1fc96e2db4d449122e0c7
committed version: 2
no change; same config as version 2
Approve this config as version 3? Type yes to approve: yes
Approval passphrase for "approval passphrase" (Ctrl-Y to try another way): ^Y
Approval passphrase for "approval passphrase 2026" (Ctrl-Y to try another way):
approved version 3 (blake2b:10cef10967fbeeaece8a5f087bf247f8e3ad253a88f1fc96e2db4d449122e0c7)
callers: none; route grants: none; routes: none; listeners: none; limits: none; logging: none; recovery: none
Nothing echoes; ^Y marks where Ctrl-Y was pressed. approver list now marks the new approver active.
4. Remove the old approver
iron-vault approver remove d69d992b-fcf3-481b-b12d-1ec89a59ae67
Type the new approver’s passphrase:
remove an approval signer
vault: 4c3dce89-4e6e-42ad-830b-e0bb5eb39c36
approver: d69d992b-fcf3-481b-b12d-1ec89a59ae67
kind: software
label: approval passphrase
enrolled: 2026-11-11T01:21:45Z
approvers after the change: 1
it can no longer approve or give owner presence; copies of the state directory made before still pin it
authorize with: any pinned approver
Approval passphrase for "approval passphrase 2026" (Ctrl-Y to try another way):
removed approver d69d992b-fcf3-481b-b12d-1ec89a59ae67; the vault has 1 approvers.
The old approval passphrase no longer works.
5. Check that it worked
iron-vault approver list
a53f9f72-74c7-403e-82a7-c34f9474ce25 software 2026-11-11T01:22:04Z active approval passphrase 2026
Check that a route still serves:
curl -s -H "Proxy-Authorization: Bearer $(cat ~/.iron-vault-tokens/me)" http://127.0.0.1:7878/httpbin/headers
The reply’s Authorization header reads Bearer [iron-vault:scrubbed].
What can go wrong
approver-in-use. The approver signed the active config (this approver signed the active approval; approve the config with another approver first; nothing was changed). Do step 3, then remove it.approver-set-invalid.removenamed the last approver: enroll another first.addfound 16 already pinned: remove one first.approval-denied. The wrong passphrase for the approver the prompt names. Nothing was changed: run the command again, pressing Ctrl-Y first to use another approver.passphrase-rejected. The new passphrase is under 12 characters, or the two entries differ.wrong-state. The service is Locked. Runiron-vault unlock.
Copies of the state directory made before a removal still pin the removed approver. The errors reference lists every code.
Reference
- CLI:
approver list,addandremove. - Approval signers design: authorization, approver order and the release checks.
- Security model: why unlocking never grants approval.
Approve configs with a TPM PIN
The prompts below match the code; the test suite runs the same steps against a software TPM without asserting their text. This has had no release check on a real machine yet, so don’t rely on it for real secrets. Ubuntu 26.04 LTS on a protected install or a Compose host; also runs on 24.04.
Enrol a signing key held in your machine’s TPM as an approver, used once you type its PIN. Keep a software approver beside it: a forgotten PIN is recovered only through another approver. See the TPM approval signer design for how the helper reaches the TPM.
Before you start
- The package from the Linux install guide, or on a Compose host the helper installed as the Compose guide says, with the service Ready and a config approved. A development build never offers the TPM kind.
- A TPM 2.0 at
/dev/tpmrm0, readable by thetssgroup. The package pulls intpm-udev, which sets that up. - A TPM whose dictionary-attack settings limit guessing: a lockout recovery interval of at least 600 seconds and a maximum
of at least 2 failed tries.
tpm2_getcap properties-variableshows them; with weaker settings the helper refuses to work. - A PIN of at least 6 characters, different from the vault passphrase.
- The approval passphrase of the approver you already have. Keep that approver. See forgotten PIN.
Steps
1. Check that the kind is offered
ls -l /run/iron-vault-tpm/signer.sock
srw------- 1 iron-vault root 0 Nov 11 09:12 /run/iron-vault-tpm/signer.sock
The service offers the tpm kind while this socket exists.
2. Enroll the TPM approver
sudo iron-vault approver add --kind tpm --label "laptop TPM"
Type the current approval passphrase, then the new PIN twice:
enroll an approval signer
vault: 92e20af6-d193-401c-9e0f-87bf5069adb3
kind: tpm
label: laptop TPM
approvers after the change: 2
the new signer alone can approve a config and authorize replace, rm, recipient remove and approver changes
next: choose its TPM approval PIN, at least 6 characters
the key works only on this machine's TPM and will not move with a migration bundle
a forgotten PIN is recovered only through another approver, so keep a software approver
authorize with: any pinned approver
Approval passphrase for "approval passphrase":
New TPM approval PIN for "laptop TPM":
Repeat the new TPM approval PIN:
enrolled approver 1f0c5c0e-3a9c-4a58-8f5d-6a1f3b4c9d21 (tpm); the vault has 2 approvers.
1f0c5c0e-3a9c-4a58-8f5d-6a1f3b4c9d21
A TPM that cannot sign enrolls nothing.
3. Approve a config with the PIN
At the first prompt press Ctrl-Y to switch to the TPM approver, then type the PIN:
sudo iron-vault config approve dev-config.toml
Approve this config as version 3? Type yes to approve: yes
Approval passphrase for "approval passphrase" (Ctrl-Y to try another way): ^Y
TPM approval PIN for "laptop TPM" (Ctrl-Y to try another way):
approved version 3 (blake2b:10cef10967fbeeaece8a5f087bf247f8e3ad253a88f1fc96e2db4d449122e0c7)
Nothing echoes while you type.
4. Check that it worked
sudo iron-vault approver list
1f0c5c0e-3a9c-4a58-8f5d-6a1f3b4c9d21 tpm 2026-11-11T09:14:02Z active laptop TPM
d69d992b-fcf3-481b-b12d-1ec89a59ae67 software 2026-11-11T01:21:45Z - approval passphrase
What a wrong PIN costs
Every wrong PIN, and an unclean shutdown after the key was used, counts against the TPM’s dictionary-attack counter,
shared with every PIN-protected object on the machine. The helper spends at most half the TPM’s tries, then answers
tpm-locked-out with the seconds to wait; the software approver still works. See the design’s
lockout reserve.
A forgotten PIN, or a replaced TPM
A forgotten PIN, a cleared TPM or a replaced board leave the TPM approver unusable (approval-denied, or
approval-unavailable saying not this TPM). Use another approver:
sudo iron-vault approver add --label "backup passphrase", authorized by the software approver (Ctrl-Y at the first prompt).- If the TPM approver signed the config in force (
activeinapprover list), approve the config again with another approver, or the remove fails withapprover-in-use. sudo iron-vault approver remove <the TPM approver's ID>, which also deletes its blob.
If a lost TPM approver was the only one, reset is the only way out. The TPM approver’s key cannot
move with a migration bundle; the destination needs a software approver.
What can go wrong
approval-denied. The PIN was wrong, and it counted against the TPM’s lockout. Nothing was reserved or changed.tpm-locked-out. The TPM is in lockout, or the helper is holding back its share. Wait the seconds the message gives, or switch to the software approver.approval-unavailable. The helper refused for a reason other than the PIN or a lockout; the message names the helper’s status:not this TPM, dictionary-attack settings too weak (raise the interval to 600 seconds or more), or a TPM error.approver-kind-unavailable. This install does not offer the kind, or the helper cannot start. The usual cause is no/dev/tpmrm0, or a udev rule that does not give thetssgroup that device.
The errors reference lists the codes.
Reference
- CLI:
approver add --kind tpm. - Files and locations: the
.tpmblob and the helper’s socket. - Security model.
- TPM approval signer design.
Tamper detection and recovery
Checked with iron-vault 0.2.0-alpha (features: dev-mode), built from main at 378d57d.
Change the published config without an approval, see the service stop proxying, and bring it back. See the config approval design for the check.
Step 1 plays the attacker. Don’t do it to a service that holds real keys.
Prerequisites
- The service running and Ready, with the
mecaller andhttpbinroute from getting started, and the route’s rate limit set toburst = 2as in widen or narrow a route. - Your own config file,
dev-config.toml, holding the config you last approved, and the approval passphrase.
Steps
1. Change the published config
Raise the rate limit in the published copy, then ask the service to reload:
CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/iron-vault-dev/config.toml"
sed -i 's/burst = 2 }/burst = 500 }/' "$CONFIG"
pkill -HUP -u "$USER" -f 'iron-vault serve'
2. See what the service does
iron-vault status
service: unavailable
reason: policy invalid
profile: development — no isolation from malware running as alice
vault: locked
vault id: unknown
approval committed: unknown while the vault is locked
approval highest reserved: unknown while the vault is locked
memory protection: NOT protected, swap protection unavailable (RLIMIT_MEMLOCK soft limit is 8315834368 bytes, not unlimited)
recovery last checked: 2026-11-07 (today)
credentials: unknown while the vault is locked
Every request is refused, before anything leaves the machine:
curl -si -H "Proxy-Authorization: Bearer $(cat ~/.iron-vault-tokens/me)" http://127.0.0.1:7878/httpbin/headers
HTTP/1.1 503 Service Unavailable
content-type: text/plain; charset=utf-8
content-length: 14
policy invalid
The log says what happened:
jq -c 'select(.event == "config.reload-failed")' ~/iron-vault-dev.log
{"service":"iron-vault","service_version":"0.2.0-alpha","schema_version":1,"deployment_profile":"development","timestamp":"2026-11-07T10:24:23.474848Z","level":"WARN","message":"the reload failed, the service stops proxying","event":"config.reload-failed","committed_version":9,"unavailable_reason":"policy_invalid","detail":"the published config is not committed version 9: the config has changed since it was approved; approve it again","target":"iron-vault.audit"}
A config.check-failed record with the same detail comes just before it.
3. Find out how it happened
In a protected install only the iron-vault service account and root can write the published config. Look at what
else changed, and read the admin trail for approvals and
credential changes you didn’t make.
4. Approve your config again
Never fix the published copy by hand. Approve your own copy, after checking it is the one you mean:
iron-vault config approve dev-config.toml
No config is active, so everything is listed as added:
Approval summary
vault: 8c597c79-…
version to commit: 10
config digest: blake2b:f8020a2b…
committed version: 9
no active config
callers:
+ me: listener loopback, auth token, rate limits none
route grants:
+ me: granted httpbin
routes:
+ httpbin: prefix /httpbin, upstream https://httpbin.org/, credential httpbin_key, slot header Authorization format "Bearer {}", ca file none, methods GET, paths /anything/**, /gzip, /headers, rate limit 10 per 60s burst 2, confirm none
listeners:
+ loopback: endpoint tcp 127.0.0.1:7878, no tls, token header default
Approve this config as version 10? Type yes to approve: yes
Approval passphrase for "approval passphrase":
approved version 10 (blake2b:f8020a2b…)
callers: 1 added; route grants: 1 added; routes: 1 added; listeners: 1 added; limits: none; logging: none; recovery: none
Read every line: this is the whole policy, not a diff.
iron-vault status | head -6
service: ready
profile: development — no isolation from malware running as alice
vault: unlocked
vault id: 8c597c79-…
approval committed: 10
approval highest reserved: 10
The first request may get 429: the rate limit
starts empty.
What can go wrong
statusshowsvault: lockedwhile Unavailable, but the secrets are not out of memory. Unavailable keeps the vault identity in memory. To clear it while you investigate, runiron-vault lock, theniron-vault unlockbefore you approve. See service states.- You don’t have the config you last approved. Write a new one from scratch and approve it. The summary lists it all as added either way.
Reference
- Files and locations: the published config, its signature, and why never to edit them.
- Service states: Unavailable.
- Config approval design: reload and the config check.
Start over in development mode
Checked with iron-vault 0.2.0-alpha (features: dev-mode), built from main at 378d57d.
Delete a development install’s vault, config and log, so the service starts ready for init. This deletes every
credential in the development vault; the recovery key cannot bring them back.
Development mode only. A protected install is removed with apt purge; see
Uninstall and purge. To keep the installation and replace the
vault, use iron-vault reset.
Prerequisites
- A development install, as in getting started.
- Nothing in the vault you still need. Run
iron-vault listfirst if you’re not sure.
Steps
1. Stop the service
Press Ctrl-C in the service’s terminal. Its last log records are:
{"message":"stopping on SIGINT"}
{"message":"stopped"}
2. Remove its files
rm -rf "${XDG_CONFIG_HOME:-$HOME/.config}/iron-vault-dev" \
"${XDG_STATE_HOME:-$HOME/.local/state}/iron-vault-dev" \
"${XDG_STATE_HOME:-$HOME/.local/state}/iron-vault-dev-log" \
~/.iron-vault-tokens ~/iron-vault-dev.log
It prints nothing. Your own dev-config.toml is kept, but its token_hash lines no longer match any token.
3. Check
Start the service again, as in getting started, and in a second terminal:
iron-vault ping
iron-vault status
the service is running: development profile, admin protocol version 1
service: locked
profile: development — no isolation from malware running as alice
vault: not initialized (run iron-vault init)
vault id: unknown
approval committed: unknown while the vault is locked
approval highest reserved: unknown while the vault is locked
memory protection: NOT protected, swap protection unavailable (RLIMIT_MEMLOCK soft limit is 8315834368 bytes, not unlimited)
recovery last checked: unknown (the vault is not initialized)
credentials: unknown while the vault is locked
Carry on from create the vault. Throw away the old recovery key: it opens nothing now.
4. Uninstall, if you’re done
rm -rf ~/.local/iron-vault-dev
Also remove the bash completion file, if you installed one.
What can go wrong
statusstill shows a vault. The service was still running when you deleted the files, or it uses differentXDG_*directories from your shell. Stop it, check the variables, and remove the files again.- You removed a vault you needed. There is no undo. Reissue each key from its provider, using your copies of
the config and
listoutput.
Reference
- Files and locations: every file a development install writes.
- Related: check and store your recovery key.
Reset the vault
Discard the vault and its config and make a new, empty vault. Use it only when no way in is left: neither the vault
passphrase nor the recovery key opens the vault, or no approver can answer
(why to keep a second approver). If you forgot the vault passphrase
but have the recovery key, run iron-vault unlock --recovery
instead, which sets a new passphrase and keeps everything. If the vault passphrase works and an approver answers,
rotate the recovery key or the approval passphrase instead.
After an upgrade that cannot read the vault, see Recover from an upgrade first.
reset cannot be undone. Every credential, the config and its signatures are deleted. It is not secure
erasure: a backup of the old vault still opens with the old recovery key and vault passphrase, so rotate at the
provider any credential that may have leaked.
The commands are for development mode. In a protected installation, use sudo
and read the config from /etc/iron-vault/config.toml; see
sudo in a protected installation.
Prerequisites
- The service running, Ready, Locked or Unavailable.
- An administrator account:
resetis refused to anyone else. - A terminal. The confirmation must be typed at one;
resetcannot be scripted or fed from a pipe.
Steps
1. Keep what you will need
Reset keeps no copy of anything. Save:
- Your own copy of the config. If you have lost it, copy the published one before you confirm.
- The output of
iron-vault list(needs the vault unlocked), so you know which credentials to reissue.
cp ~/.config/iron-vault-dev/config.toml ~/iron-vault-config.toml
iron-vault list > ~/iron-vault-credentials.txt
Credential values cannot be recovered. Each key is reissued by its provider.
2. Reset
iron-vault reset
It shows what it will discard, then asks you to type the vault ID:
Type 3f1c9a5e-0b9c-4f7e-8a41-6d2b7e0c1a55 to discard this vault
Type or paste the ID; anything else, or Ctrl-C, removes nothing. When no vault is Initialized (a half-finished
init), type the state directory’s path instead. The service keeps serving until you confirm, then stays Locked.
On success it prints how many files it removed, and any file it left in place:
reset: discarded vault 3f1c9a5e-0b9c-4f7e-8a41-6d2b7e0c1a55; 7 files removed
next: run `iron-vault init`
The audit log, TLS files, the host unlock credential and any file it did not recognise stay. If it names a file it left in place, move that aside before the next step.
3. Create the new vault
iron-vault init
iron-vault unlock
Store the new recovery key as in check and store your recovery key. On a Compose or host-unlock
installation, run iron-vault init --host-unlock instead.
4. Rebuild
Add each credential again with the value its provider reissued, then approve your copy of the config:
iron-vault add fx_key --origin openexchangerates.org
iron-vault config approve ~/iron-vault-config.toml
Your callers’ tokens still match the token_hash lines in your copy of the config.
5. Check
iron-vault status
iron-vault list
status shows service: ready and the new vault ID, and list shows the credentials you added.
What can go wrong
resetexits with code 3. It found no terminal; it refuses a pipe or file. Run it from an interactive shell.nothing-to-reset. No vault file is there. Runiron-vault init, or move the file the message names aside.declined. What you typed did not match, or the vault changed while the summary was on screen. Nothing was removed; runresetagain.reset-failed. A file could not be removed. Unless the message says the vault is intact,statusshowsreset unfinished: fix the cause the message names and runiron-vault resetagain. Until it finishes,unlockandinitrefuse.
Reference
- CLI and errors.
- Audit log:
vault.reset-confirmed,vault.resetandvault.reset-failed. - Reset design: what is removed, in what order, and why.
- Related: start over in development mode, retire a machine.
Recover from an upgrade that cannot open the vault
Written from the code of iron-vault 0.4.0-alpha for an upgrade from 0.3.0-alpha. The steps have not been run end to
end on a real machine.
Replace a vault the new release cannot read with a new one, and add your config and credentials again. Use it only when the release’s changelog says, under Breaking changes, that a vault made by the older release cannot be opened, as for 0.3.0-alpha to 0.4.0-alpha. No command recovers the old credentials: each must be reissued by its provider.
The commands below are for a protected Linux install. In
development mode, drop sudo, and the config is
~/.config/iron-vault-dev/config.toml. In a Docker Compose install, run the host CLI as its guide says.
Prerequisites
- The new release installed, the service running, and
unlockending as in step 1. - An administrator account and a terminal:
resetasks for a confirmation typed at one. - A way to get a new value for each credential from its provider.
Steps
1. Check that this is the format change, not damage
sudo iron-vault unlock
sudo iron-vault status
After a 0.3.0-alpha to 0.4.0-alpha upgrade, unlock takes the vault passphrase, then ends with
unlocked-unavailable (error 16): “the vault unlocked, but the config check failed: the service is Unavailable
(recovery needed)”. status shows:
service: unavailable
reason: recovery needed
Every request gets 503 with reason recovery needed. The log names the file the new release could not read:
sudo jq -c 'select(.event == "vault.shared-state-damaged") | {timestamp, file, damage}' /var/log/iron-vault/iron-vault.log
{"timestamp":"…","file":"approval.age","damage":"approval_state"}
The record’s remediation says not to delete or re-initialize the state directory; that is for damage. Go on only if:
- the record appeared right after the upgrade, and
- the changelog says this upgrade cannot open the old vault.
If either is not true, stop: something else damaged the vault. Follow tamper detection and recovery and keep the state directory as it is.
2. Save the config and the credential names
reset deletes the published config, and list cannot read this vault, so take both from the config:
sudo cat /etc/iron-vault/config.toml > ~/iron-vault-config.toml
grep -E '^\s*(credential|upstream)\s*=' ~/iron-vault-config.toml
Each credential line names a credential to add again, and the upstream beside it gives its host. The token_hash
lines still match the tokens your callers hold.
3. Update the config for the release’s other breaking changes
Change your copy to match the rest of the release’s Breaking changes. For 0.4.0-alpha:
- Route
pathsmatch after the prefix. For a route whoseupstreamhas a path, remove that path from the start of each pattern: withupstream = "https://api.venice.ai/api/v1","/api/v1/chat/completions"becomes"/chat/completions". A route you miss still approves, but its requests get403 path_not_allowed. X-Iron-Vault-Tokenis reserved. A routeslotthat names it is refused.[limits] upstream_timeout_secsis enforced. Check that it is long enough for your slowest provider.
4. Reset the old vault
sudo iron-vault reset
It works on a vault the new release cannot open. Type the vault ID when asked:
reset: discarded vault 3f1c9a5e-0b9c-4f7e-8a41-6d2b7e0c1a55; 7 files removed
next: run `iron-vault init`
See reset the vault. A file the old release named differently is left, and init refuses until it is
gone. From 0.3.0-alpha, that is the old approver key:
left in place, move it aside before `init`: approver.age
Delete it:
sudo rm /var/lib/iron-vault/approver.age
5. Create the new vault
sudo iron-vault init
sudo iron-vault unlock
Store the new recovery key as in check and store your recovery key. If you used
TPM unlock, run sudo iron-vault init --host-unlock instead. If you had a TPM approver
or a second software approver, enroll it again with approver add.
The service is Ready with no routes; every request is refused until step 6.
6. Add the credentials and approve the config
Add each credential from step 2 with the value its provider gives you, and the host from its route’s upstream:
sudo iron-vault add venice_key --origin api.venice.ai
sudo iron-vault config approve ~/iron-vault-config.toml
The summary lists the whole config as added. Type yes, then the new approval passphrase.
Revoke the old keys at each provider: reset is not secure erasure, and a backup of the old vault still opens with
the old vault passphrase or recovery key.
7. Check
sudo iron-vault status
sudo iron-vault list
status shows service: ready and the new vault ID, and list shows the credentials you added. Send a request through
a route you use, as getting started does.
Before the next breaking upgrade
Before you install a release whose changelog lists a format change, while the old release can still read the vault:
sudo cp /etc/iron-vault/config.toml ~/iron-vault-config.toml
sudo iron-vault list > ~/iron-vault-credentials.txt
If the changelog says the new release imports the old release’s export bundle, move the vault
instead, keeping the credentials.
What can go wrong
resetexits with code 3. It found no terminal. Run it from an interactive shell.config approverefuses withconfig-invalid. The message names the route or field. It is usually a change from step 3 that was missed, or a credential from step 2 that has not been added yet.- Requests get
403 path_not_allowedafter the approval. A route’spathsstill repeat itsupstreampath. Fix them as in step 3 and approve again.
Reference
- Reset the vault, errors and service states.
- Audit log:
vault.shared-state-damagedandconfig.check-failed. - Upgrade a protected install.
Retire a machine
Remove a retired machine’s recipient key from the vault that stays, then retire its sealed unlock credential and, if
nothing else needs it, its TPM. forget-machine only checks and prints the steps; you run them yourself.
Old copies of identity.age and backups still open with a removed key: if the machine was lost, rotate the
provider credentials it could reach (step 4).
Run every iron-vault command through sudo (see sudo in a protected
installation).
Prerequisites
- The vault that stays, running and Ready, on another machine. Don’t run the commands on the retired machine.
- The retired machine’s recipient key, the
age1…text. For a machine with TPM unlock it is thehost-unlockline ofiron-vault recipient list, or what the provisioning script printed. If the machine’s vault was moved withexportandimport, the new vault never held the old key; use the one the old machine’srecipient listor provisioning output showed. - Your approval passphrase, if the key is still a recipient (step 1).
Steps
1. Remove the recipient, if it is still one
iron-vault recipient list
iron-vault recipient remove age1…
recipient remove asks for the approval passphrase; see manage recipients.
2. Check that it is gone
iron-vault forget-machine age1…
If the key is gone, it prints three facts and then the steps for the retired machine:
age1… is not a recipient of this vault. Check that it is the key the retired machine had: this command cannot tell a removed key from one that was never enrolled.
independence rule: holds
recovery last checked: 2026-11-04 (7 days ago)
A mistyped key also reads as gone, so compare the key it repeats with the one on the retired machine.
Fix any warning (printed first, on stderr) before you clear any TPM:
the recovery check is overdue,has never runoris not on record. Runrecovery checkwith your offline recovery key.the vault no longer meets the independence rule. Add the missingoperationalorrecoveryrecipient withrecipient add.
3. Follow the steps it prints, on the retired machine
Steps 1 to 3 run as root on the retired machine. In order:
- Find out what else uses the TPM. Clearing it destroys every key it holds. List the TPM keyslots of each LUKS
device with
systemd-cryptenroll DEVICE; look for other sealed credentials withgrep -rlE 'LoadCredentialEncrypted|SetCredentialEncrypted|ImportCredential' /etc/systemd /run/systemd /usr/lib/systemdandls /etc/credstore.encrypted /run/credstore.encrypted /usr/lib/credstore.encrypted /usr/local/lib/credstore.encrypted; list the persistent handles withtpm2_getcap handles-persistent. The handle0x81000001is systemd’s storage root key, shared by everysystemd-credsuser on the machine. List the NV indices withtpm2_getcap handles-nv-index: clearing the TPM destroys them, and other software keeps state there (the systemd-pcrlock policy, which LUKS keyslots enrolled with--tpm2-pcrlockdepend on, andtpm2-totp). Also ask the machine’s other users, and check for other software that keeps keys in the TPM. - Delete the sealed credential.
systemctl stop iron-vault-host-unlock.service, thenrm /etc/iron-vault-host/host-unlock.cred. A copy of that file in a backup still opens on this TPM. - Clear the TPM only if nothing else needs it and the recovery path is verified. Use the firmware’s clear-TPM setting, or
tpm2_clear. If step 1 found another user, leave the TPM alone: step 2 has retired the machine from this vault, and only old backup copies stay reachable through this TPM. Do not clear a shared TPM.
If the machine held only an added or recovery key, there is no TPM step: delete that key where it was kept.
The machine may also still hold its own copy of the vault. Retire it with iron-vault reset or by
purging the package, and delete /etc/iron-vault-host/provisioning.txt beside the sealed credential.
4. If the machine was lost or stolen, rotate
On the vault that stays, for each credential in iron-vault list, have the provider reissue the key, then give the
name and the origins list shows:
iron-vault replace NAME --origin openexchangerates.org
See rotate a key.
What can go wrong
machine-not-forgotten. The key is still a recipient. Runrecipient removewith the same key. If that is refused because the key is the host unlock identity this service holds, you ran the command on the machine being retired; run it on the vault that stays.wrong-state. The service is not Ready. Runiron-vault unlock.recipient-invalid. The argument is not anage1…key.busy. Another operation holds the service-wide lock; try again.recipient-inventory-damaged. The recipient inventory is missing or damaged; nothing was changed. See errors.
Reference
- CLI and errors.
- Audit log:
recipient.forget-checked. - Forget machine design: what it checks, and why it runs on the vault that stays.
- Related: manage recipients, reset the vault, unlock at boot with a TPM.
Run Iron Vault in Docker Compose
Not run: this recipe needs root, Docker, systemd and a TPM 2.0 on a host, and none was available when it was checked, so no output is shown. Every command comes from the Compose install guide.
Run Iron Vault as a container, with one isolated network and TLS listener per caller container, that comes back Ready after a restart from an unlock identity sealed to the host’s TPM.
The Compose profile has had no release check on a real machine yet, so don’t rely on it to protect real secrets.
Whoever controls the Docker daemon can read the service’s secrets. Use protected Linux on a desktop or a shared workstation. Each step links to its section of the install guide.
Prerequisites
- A Linux host with systemd and
systemd-creds, a TPM 2.0 and Secure Boot on (the identity is sealed to PCR 7). - Rootful Docker Engine with the Compose plugin,
age-keygen,opensslandcurl. - This repository checked out, for
packaging/compose/.
Steps
-
Check the host: who may control the Docker daemon, encrypted swap and hibernation storage, and a hardened
sudo. -
Install the host files, then build the image and write the Compose file.
-
Provision the host unlock identity and start the unlock unit.
-
Make the certificates, one TLS listener per caller.
-
Start the stack, then create the vault with
sudo iron-vault init --host-unlockand restart the service container (step 8). Store the recovery key offline. -
Send a request from a caller container:
curl --cacert /ca.crt -X POST https://172.30.1.2:8443/venice-chat/chat/completions
The recipe ends when sudo iron-vault status shows Ready after docker compose restart iron-vault, and that request
reaches its route.
Not yet built
- The TPM approval signer: in this profile every approver uses an approval passphrase.
Reference
- Docker Compose install guide, including the hardening checklist, restarts and reboots and a lost TPM.
- Design and §17 of the specification.
Unlock at boot with a TPM
Not run: this recipe needs root and a TPM 2.0 on Ubuntu 26.04 (or 24.04), and none was available when it was checked, so no output is shown. Every command comes from the TPM unlock section of the Linux install guide.
Make a protected Linux install reach Ready after a reboot with no iron-vault unlock, from a key that systemd-creds
seals to the machine’s TPM. The vault passphrase and recovery key still work.
TPM unlock has had no release check on a real machine yet, so don’t rely on it to protect real secrets.
Before you start:
- There is no TPM PIN. Anyone who can boot the machine into a trusted image can start the vault. On a laptop, use
--portablewith a disk encrypted under a pre-boot secret. - A Secure Boot update ends it. The service starts Locked; unlock with the passphrase, then provision again (see before a Secure Boot key or firmware update).
- Ubuntu 26.04 LTS; also runs on 24.04. On 24.04 the provisioning helper notes that no release check runs there. Elsewhere the helper stops and the service starts Locked.
Prerequisites
- Ubuntu 26.04 LTS (or 24.04) with Secure Boot on and a TPM 2.0, and the package installed as in the install guide.
age-keygen(Ubuntu packageage).- Encrypted swap and hibernation storage (guide).
- The vault passphrase, the approval passphrase and a place to keep the recovery key offline.
Steps
-
Seal an identity to the TPM. Use
--serverfor a server, or--portablefor a laptop whose disk is encrypted with a pre-boot secret. Typeyeswhen it asks:sudo iron-vault-provision-host-unlock --serverIt prints a recipient key,
age1…, and writes/etc/iron-vault-host/host-unlock.cred. Note the key. -
Start the handoff unit:
sudo systemctl start iron-vault-host-unlock.service -
Enrol the identity. For a new vault,
initdoes it, and shows the recovery key once: store it offline.sudo iron-vault init --host-unlock sudo iron-vault unlockFor an existing vault, enrol the key from step 1 instead, with the vault passphrase:
sudo iron-vault recipient add --host-unlock age1… --label "host unlock" -
Prove the recovery key still opens the vault:
sudo iron-vault recovery check -
Reboot, and look at the service without typing anything:
sudo reboot # after the machine is back sudo iron-vault status
The recipe ends when status shows the service Ready and the host unlock outcome unlocked, with no unlock since the
reboot:
service: ready
…
host unlock: unlocked
What can go wrong
host unlock: unseal_failed. The TPM would not unseal the key, as after a Secure Boot or firmware update. Type the passphrase withsudo iron-vault unlock, then follow After the update. If the handoff unit’s journal (journalctl -b -u iron-vault-host-unlock.service) saysdictionary attack lockout modeinstead, the TPM is in lockout: don’t provision again, see A TPM in lockout.host unlock: absent. No blob, or the handoff unit did not run. Checksystemctl status iron-vault-host-unlock.serviceand that/etc/iron-vault-host/host-unlock.credexists.host unlock: refused. The service would not use the handoff. Thevault.host-unlockrecord in the audit log gives the reason. Runsudo iron-vault unlock, fix the cause, and restart the service.host unlock: owner_locked. An earlierlockis still in force. A passphraseunlockclears it (lock, unlock and restart).- The helper fails with an error from
systemd-creds. Another operating system may have set the TPM’s owner password.
Reference
- TPM unlock in the install guide, including retiring it
- Files and locations
- Design and §14 of the specification.
Move a vault to a new machine
Move your vault, with the same credentials, vault ID and approval counters, to a new machine with export and
import. The old machine keeps serving until you retire it. See the
migration bundle design for what the bundle holds.
Run every iron-vault command through sudo (see sudo in a protected
installation).
Prerequisites
- The source, running and Ready, and its vault passphrase. A
tpmapprover’s PIN can stand in for it (Ctrl-Y at the prompt). - The new machine, with Iron Vault installed and its service running, and no vault:
iron-vault statusshowsvault: not initialized. - A software approver on the source, and its approval passphrase.
exportrefuses a vault with no software approver (approver-set-invalid, error 42); enroll one first withapprover add. - A way to carry one file between the machines, such as a USB stick or
scp. Carry the export passphrase separately.
Steps
1. Export on the source
iron-vault export vault.bundle
It asks for the vault passphrase, then for a new export passphrase, twice. Make it long and new: the bundle can be guessed at offline.
exported vault 3f2b8c1e-5d4a-4e6f-9a7b-1c2d3e4f5a6b to vault.bundle: 3 credentials, 6144 bytes
the source vault keeps serving until you retire it
the bundle opens only with the export passphrase
If export was killed, remove .vault.bundle.partial before you run it again.
2. Carry the bundle to the new machine
Copy vault.bundle across. Delete other copies once the import has worked.
3. Import on the new machine
iron-vault import vault.bundle
It asks for the export passphrase, then shows a summary:
import a migration bundle
vault: 3f2b8c1e-5d4a-4e6f-9a7b-1c2d3e4f5a6b
credentials: 3
approvers: approval passphrase
committed approval: version 4; highest reserved version: 4
config: the source's committed config, to be approved on this machine
then: a new vault passphrase and a new recovery key for this machine
routing starts after iron-vault config approve, at version 5 or later
A TPM approver shows as bound to the source machine; it cannot sign here.
Then it asks for a new vault passphrase, twice, and shows a new recovery key once, as init does. Store it as in
check and store your recovery key, then type yes. It writes the source’s config to
vault.bundle.config.toml:
imported vault 3f2b8c1e-5d4a-4e6f-9a7b-1c2d3e4f5a6b: 3 credentials, approval version 4 committed, highest reserved version 4
recipients: operational, recovery
the source's committed config has the digest blake2b:…
next:
1. iron-vault unlock (the service then answers 503 until a config is approved)
2. iron-vault config approve vault.bundle.config.toml
…
4. Unlock, and approve the config
iron-vault unlock
iron-vault config approve vault.bundle.config.toml
unlock is expected to end with unlocked-unavailable (error 16), “the vault unlocked, but the config check failed”,
and a non-zero exit status (a set -e script must allow it); requests get 503 until the approval.
Edit the config copy first if the new machine needs a different listener address or path. config approve lists the
whole config as added; answer with a software approver’s passphrase. Then send a request through a route you use, as
getting started does.
5. Replace the TPM approvers
Skip this step if the summary listed no approver bound to the source machine. Otherwise remove each one:
iron-vault approver list
iron-vault approver remove <approver ID>
To have a TPM approver here, enrol a new one as in approve configs with a TPM PIN.
6. Check the recovery key
iron-vault recovery check
Type the recovery key that import showed. See check and store your recovery key.
7. Compare the versions with the source
On the source, run iron-vault status and compare its approval committed and approval highest reserved lines with
the versions import printed. If the source shows higher versions, a config was approved there after the export: export again, run iron-vault reset on the new machine to discard the vault
you imported, and import the new bundle.
8. Retire the source
Stop its service, and keep or destroy its state directory as you would any copy of the vault: its passphrase and recovery key still open it. If it had TPM unlock, follow retire a machine for its TPM.
What can go wrong
import-denied. The export passphrase was wrong. Nothing was written; runimportagain.already-initialized. The new machine has a vault, or files in its state directory that are not a vault.bundle-invalid. The file is not a bundle this version reads, or was damaged on the way. The message names the rule it failed. Nothing was written; export again from the source.import-failed. A write failed.statusshowsimport unfinished (run iron-vault import again), andunlockrefuses. Runimportagain: it discards the unfinished import and starts over, with a new recovery key.migration-deniedormigration-rate-limitedfromexport. The vault passphrase was wrong, or wrong too many times; see the errors reference.
Reference
- CLI:
exportandimport. - Files and locations: the bundle, its partial file and the config copy.
- Migration bundle design: what the bundle holds and how import checks it.
- Requirements: §16.
Log in to an OAuth provider
The commands, prompts and messages below match the code, and the test suite runs these steps against a test provider. Neither shipped definition has been checked against the real provider yet, so check that a login and a refresh work before you rely on them.
Let an application call Gmail, Google Calendar or the GitHub API through Iron Vault without holding an OAuth token.
You sign the provider account in once with iron-vault login. Iron Vault keeps the refresh token in an encrypted
OAuth account record, refreshes the access token itself, and puts it in each request on a route that names the
record. The application holds a caller token and a placeholder, as for a static key.
Two kinds of record take part:
- An OAuth client record holds one provider app’s client ID and client secret, and the provider definition
that says how to talk to that provider.
add --kind oauth-clientmakes it. No route may name it. - An OAuth account record holds one signed-in account’s refresh token, granted scopes and verified account, and
names its client record.
loginmakes it, and routes name it like any credential.
Login is paste-back: the service shows a consent URL, you open it in any browser, and after you consent the browser
is sent to http://127.0.0.1:42213/?code=…&state=…. Nothing listens there, so the browser shows a connection error;
you copy the whole address from its address bar and paste it at the prompt. The service checks the state and redeems
the code with a PKCE verifier only it holds, so the address is no use to anyone else. This works the same from a
protected install, a Compose deployment or a remote machine, since the browser need not run where the service does.
Run every iron-vault command through sudo on a protected install (see sudo in a protected
installation), or without it in development mode.
Before you start
- The service running and Ready, with a listener and a caller, as in getting started or the Compose recipe.
- The approval passphrase, for
config approve, and for a login that changes the account or the client, or adds a scope or origin. - An account with the provider, and the rights to register an app there.
The shipped google definition asks for openid and email on every login, proves the account by the id_token
Google returns, and refreshes without rotation: a refresh writes nothing to disk. Its resource hosts are
gmail.googleapis.com and www.googleapis.com (Calendar). Another Google API host needs a definition of its
own.
1. Register a Desktop client
In the Google Cloud console, in a project of your Workspace:
- Enable the APIs you will call, such as the Gmail API and the Google Calendar API.
- Set up the OAuth consent screen with the Internal user type. Google gives refresh tokens that expire after seven days to an External app in Testing (Google: refresh token expiration), which would end unattended running within a week. The Internal user type needs a Google Workspace.
- Create an OAuth client of type Desktop app. Google accepts any loopback port for a Desktop client, so there is no redirect to register. Keep the client ID and client secret to hand.
2. Enroll the client
sudo iron-vault add google_client --kind oauth-client --provider google
The service first shows the definition the record will seal, with every default filled in, and the origins the client secret may be sent to, then prompts for the client ID (echo on) and the client secret (echo off):
OAuth client google_client will seal this provider definition:
authorize = "https://accounts.google.com/o/oauth2/v2/auth"
token = "https://oauth2.googleapis.com/token"
redirect = "http://127.0.0.1:42213/"
scopes = "required"
add_scopes = ["email", "openid"]
rotation = "never"
client_auth = "client_secret_post"
resource_hosts = ["gmail.googleapis.com", "www.googleapis.com"]
min_retry_seconds = 60
refresh_margin_seconds = 300
[authorize_params]
access_type = "offline"
prompt = "consent"
[account]
style = "id_token"
issuers = ["accounts.google.com", "https://accounts.google.com"]
[revoke]
style = "rfc7009"
url = "https://oauth2.googleapis.com/revoke"
Its permitted origins, the only ones the record can reach: accounts.google.com:443, oauth2.googleapis.com:443.
Client ID for google_client:
Client secret for google_client:
added google_client (oauth_client) as record 5f0c…
The definition is sealed: editing the file or a config later cannot move the client secret to another endpoint. To change the client secret or the definition, enroll a new client record and sign each account in again with it.
3. Sign the account in
Name every scope the application needs, and every resource host its routes reach:
sudo iron-vault login google_naomi --client google_client \
--scope https://www.googleapis.com/auth/gmail.send \
--scope https://www.googleapis.com/auth/calendar.events \
--scope https://www.googleapis.com/auth/calendar.freebusy \
--origin gmail.googleapis.com --origin www.googleapis.com \
--account naomi@example.com
Open this address in a browser and consent:
https://accounts.google.com/o/oauth2/v2/auth?…
Address your browser was sent to:
Open the URL, sign in as naomi@example.com, and leave every scope ticked. Paste the address the browser ends on:
exchanging the code
signed in google_naomi as naomi@example.com (https://accounts.google.com): added
granted scopes: email openid https://www.googleapis.com/auth/calendar.events …
The login is refused, and nothing is written, if the pasted address carries another login’s state
(state-mismatch) or an error (consent-refused), if Google verified another account than --account
(account-mismatch), or if you unticked a scope (scopes-missing). Each needs a fresh login; a code is never
redeemed twice. See login errors.
list shows the account record with its client, verified account and scopes, never a token:
google_client oauth_client (token oauth2.googleapis.com, rotation never) accounts.google.com:443,oauth2.googleapis.com:443 healthy
google_naomi oauth_refresh (client google_client, account "naomi@example.com", issuer "https://accounts.google.com", scopes …) gmail.googleapis.com:443,www.googleapis.com:443 healthy
4. Route to it
An account record fills a header slot. Add a route to your config that names it, and grant the route to the caller:
[routes.gmail]
prefix = "/gmail"
upstream = "https://gmail.googleapis.com"
credential = "google_naomi"
slot = { header = "Authorization", format = "Bearer {}" }
methods = ["GET", "POST"]
paths = ["/gmail/v1/users/me/**"]
rate_limit = { requests = 120, per_seconds = 60, burst = 20 }
sudo iron-vault config approve config.toml
The approval summary ends with the account each route reaches, so you see whose mailbox it is before you sign:
accounts:
route gmail: credential google_naomi reaches "naomi@example.com" (issuer "https://accounts.google.com", subject "1084…") through client google_client
The broad path grant is a choice: it lets the caller do anything those scopes allow under /gmail/v1/users/me/.
Narrow paths and methods to what the application needs.
5. Check that it worked
curl -s -H "Proxy-Authorization: Bearer $(cat ~/.iron-vault-tokens/me)" \
http://127.0.0.1:7878/gmail/gmail/v1/users/me/profile
Gmail answers with the account’s profile. The first request refreshes the access token, which the service then reuses
until five minutes before it expires. A credential.refreshed event in the audit log
records each refresh.
When the caller gets 503
A route that names an account record answers 503 with the body service unavailable when no access token can be had.
The audit log’s request.completed event gives the reason:
-
credential_needs_login: the provider refused the refresh token. Google does this when the user changes their password (Gmail scopes), when the grant is revoked, or when the token went unused for six months. Acredential.needs-loginevent records it once, andstatusshows it:credential google_naomi: needs login (refused); unavailable routes: gmailRun the same
loginagain. Signing the same account in again with the same client and no new scope or origin needs no approval passphrase; other routes keep working meanwhile. -
token_unavailable: the last refresh failed, or the upstream answered401and the service dropped the token. The service waits 60 seconds after a refresh attempt before the next one, so a caller that keeps getting401can’t make it refresh on every request. Retry after a minute. If it persists,credential.refresh-failedsays why.
A 401 from Gmail itself goes to the caller as it came, and the request is never sent again.
GitHub App
The shipped github-app definition takes no scopes (a GitHub App’s permissions are set on the app), proves the account
by one request to https://api.github.com/user, and rotates: GitHub sends a new refresh token on every refresh, and the
service stores it before it uses the new access token, so a crash never leaves it holding a spent token. Its resource
host is api.github.com.
1. Register the app
Under Settings → Developer settings → GitHub Apps → New GitHub App:
- Set the Callback URL to exactly
http://127.0.0.1:42213/. GitHub documents a flexible loopback port for OAuth Apps but not for GitHub Apps, so register this address as it is. - Leave Expire user authorization tokens ticked. The service needs a refresh token, which GitHub sends only for expiring user tokens.
- Clear Webhook → Active; the service needs no webhook.
- Give the app the repository or organization permissions the application needs, then create it.
- Generate a client secret, and keep the client ID and secret to hand.
- Install the app on the account or organization whose repositories it will reach.
2. Enroll and sign in
sudo iron-vault add github_client --kind oauth-client --provider github-app
sudo iron-vault login github_octo --client github_client --origin api.github.com --account octocat
--account is the GitHub login. Give no --scope: the definition refuses it.
signed in github_octo as octocat (https://api.github.com): added
granted scopes: none reported
Route to it as for Google, with upstream = "https://api.github.com". GitHub’s access token lives eight hours; the
service refreshes it from half its lifetime on, and waits five minutes between refresh attempts.
Revoking a GitHub App grant
GitHub’s revocation call isn’t the standard one, so the definition says revoke = { style = "none" }. When rm removes
the account record, or a login moves it to another account or client, the service tells you to revoke at the provider
instead of doing it. Revoke under Settings → Applications → Authorized GitHub Apps → Revoke on the account that
signed in.
If a rotation’s outcome is unknown, say the service crashed after sending the refresh, the record needs login with cause
uncertain, rather than risk sending a spent refresh token. Run login again.
Another provider
Adding a provider needs a definition file, not a code change. The provider definition reference lists every field and rule; this section writes one for an OpenID Connect provider, Acme, field by field. Read the provider’s OAuth documentation for each value.
authorize = "https://id.acme.example/authorize"
token = "https://id.acme.example/token"
scopes = "optional"
add_scopes = ["openid", "email"]
account = { style = "id_token", issuers = ["https://id.acme.example"] }
rotation = "never"
client_auth = "client_secret_basic"
revoke = { style = "rfc7009", url = "https://id.acme.example/revoke" }
resource_hosts = ["api.acme.example"]
authorizeandtoken: the authorization and token endpoints, plainhttpsURLs with no query or fragment. Fixed consent-URL parameters go inauthorize_params, never in the URL.redirect(left out here): the loopback address the browser is sent to,http://127.0.0.1:42213/unless you set another port. Register it with the provider if it asks.scopes:requiredif every login must name a--scope,optional, ornoneif the provider sets permissions on the app.add_scopes: scopes every login asks for. Anid_tokenprovider needsopenidhere, and usuallyemail, so the token names the account.account: how the service learns who signed in.id_tokenreads the token response’s OpenID Connectid_token, whoseissmust be one ofissuersand whoseemailmust be verified. A provider without one takes{ style = "userinfo", url = "…", subject = "id", display = "login" }: one GET with the new access token, naming the JSON fields that hold a stable ID and the name--accountmust match.rotation:alwaysif the provider ever sends a new refresh token on a refresh, elsenever. If unsure, choosealways: a wrongneverfails closed, with the record needing login, but costs a login.client_auth:client_secret_basicif the token endpoint wants the client ID and secret as HTTP Basic,client_secret_postfor the form body.revoke: the provider’s RFC 7009 revocation endpoint, or{ style = "none" }if it has none, and the service will tell you to revoke at the provider.resource_hosts: the API hosts an account’s tokens may be sent to: a host name, or*.and a host name, which matches exactly one more label. A public suffix such as*.comor*.github.iois refused.
Enroll it from the file; a value with a / or ending in .toml is a path:
sudo iron-vault add acme_client --kind oauth-client --provider ./acme.toml
sudo iron-vault login acme_naomi --client acme_client --scope read --origin api.acme.example --account naomi@acme.example
A definition that breaks a rule is refused before any prompt, with credential-invalid and a message naming the field:
invalid provider definition: unknown field `token_lifetime`, expected one of `authorize`, `token`, … at line 10, column 1
invalid provider definition: an endpoint follows the rules for a route's upstream URL: upstream URL must start with "https://" at line 2, column 9
Reference
- Provider definitions: every field, default and rule.
addandloginin the CLI reference, and theloginerrors.- Request refusals:
credential_needs_loginandtoken_unavailable. - OAuth design: login, refresh, the rotation transaction and the threats they meet.
Not yet available
These recipes are for features on the roadmap that Iron Vault doesn’t have yet. Each page says what the feature will do, its phase, and what to do until it lands. A page gets its full recipe once the feature ships.
| Recipe | Phase |
|---|---|
| Restrict what a request may contain | v1 |
| Use a YubiKey | later |
| Other credential kinds | later |
| Sync from a password manager | later |
| macOS and Windows | later |
Restrict what a request may contain
Not yet available. Planned for v1 (roadmap).
A route will be able to allow-list query parameters and JSON body fields, such as the models a key may call.
Until then, a route restricts the method, the path and the rate only; see widen or narrow a route.
Use a YubiKey
Not yet available. Planned for a later phase (roadmap).
A YubiKey will become a recipient that unlocks the vault and signs approvals with a PIN or touch, and a route will be able to ask for a touch on each request.
Until then, the vault unlocks with the vault passphrase or TPM unlock, approvals are signed with an approval passphrase or a TPM PIN, and a config with a route that asks for a touch is refused when it is read.
Other credential kinds
Not yet available. Planned for a later phase (roadmap).
Iron Vault will hold JWT, GitHub App, HMAC and AWS Signature Version 4 credentials.
Until then, a credential is a static key or a Basic username and password; see Basic authentication upstreams.
Sync from a password manager
Not yet available. Planned for a later phase (roadmap).
iron-vault sync will import approved records from a supported password manager, without the secrets passing through
the CLI.
Until then, pipe each secret into add or replace from your password manager, as in
rotate a provider key.
macOS and Windows
Not yet available. Planned for a later phase (roadmap).
Iron Vault will run as a launchd daemon on macOS and as a Windows service, each under its own account, with the same protection as the Linux package.
Until then, Iron Vault runs on Linux only.
CLI
Every iron-vault command and option, with what each one does. The sections after the introduction are generated
from the definitions the CLI parses, as iron-vault completions is, so they match iron-vault COMMAND --help.
Secrets are never arguments
No argument or option ever takes a secret value. Arguments end up in shell history, process listings and error messages, where a passphrase or a provider key must never appear (§5). A command that needs one has the service prompt for it, and the CLI reads the answer in one of two ways:
- From a terminal, with echo off.
- From stdin, one line per prompt, when stdin is not a terminal. Pipe a secret in from a password manager, so it
never reaches your shell history:
pass show fx | iron-vault add fx --origin openexchangerates.org.
init is the exception: it shows the recovery key, so it needs a controlling terminal and refuses to run without
one.
Host unlock
iron-vault init --host-unlock and iron-vault import --host-unlock also enrol the host unlock identity from the unlock
handoff as a recipient of the new vault. The packaged and container builds accept it; a dev-mode build rejects it as an unexpected
argument (design).
The admin socket
The CLI is a thin client. It opens nothing itself: each command sends one admin request to the service over the
admin socket and shows the answer
(admin protocol). The service decides what to prompt for, and judges whoever
connects by the account the connection comes from. serve is the only command that runs the service; completions
and config check never contact it, so any account can run them.
The socket is admin.sock in the service’s runtime directory: /run/iron-vault/ in a protected installation, and
$XDG_RUNTIME_DIR/iron-vault-dev/ in development mode (Files and locations). --admin-socket PATH
connects to another one, such as a socket forwarded over SSH; the service at the other end still judges the account
the connection arrives as.
sudo in a protected installation
In a protected installation your login account is never an admin principal, so malware running as you cannot reach
the admin socket. Only root may connect, not the iron-vault service account either, so a compromised service cannot lock the vault or
spend your passphrase attempts. You run every client command through sudo:
sudo iron-vault unlock
sudo iron-vault status
That barrier is only as strong as your sudo setup; the installation guide
covers credential caching and a second factor. In development mode the service runs as you, and you run the same
commands without sudo.
Build features
Every build has the same commands and options, except that a dev-mode build has no --host-unlock on init and
import (Host unlock). The dev-mode and container Cargo features change the deployment profile,
and with it the paths, the service account and which accounts may administer the service. iron-vault --version lists
the features a binary was built with.
--help (-h for a summary) works on every command and is not repeated below.
iron-vault
iron-vault [OPTIONS] <COMMAND>
Iron Vault: a local proxy that holds API credentials so the programs that use them never do.
--admin-socket <PATH>: Use the admin socket at PATH instead of this installation’s, for example one forwarded over SSH. Every client command takes it;serverefuses it, because the service always binds its own installation’s socket.- global: it may also follow the command
Exit codes:
0 success
1 the service answered with an error
2 usage error
3 no answer from the service: it is not running, this account may not connect, the exchange failed, a prompt
got no value, or a secret value the service sent could not be shown on a terminal; `reset` and `import` also
exit 3, before they connect, when stdin is not a terminal or /dev/tty cannot be opened; `export` also
exits 3 when the bundle it received is incomplete or cannot be kept
4 `status`: the service answered, and it is not Ready; `list`: no vault is open, so the credentials are unknown
iron-vault serve
iron-vault serve [OPTIONS]
Run the service until SIGTERM or SIGINT.
In a protected installation systemd starts it as the iron-vault service account, so you never run it yourself. It starts Locked: run unlock after each start.
--log-to-stdout: Write the log to stdout until an approved config names a destination, as the Docker image does. The service refuses it when stdout is the systemd journal.
iron-vault ping
iron-vault ping [OPTIONS]
Check that the service is running and show its deployment profile.
iron-vault status
iron-vault status [OPTIONS]
Show the service, vault, approval, memory protection, host unlock outcome and credential states, without secrets. A credential that needs login shows its cause (refused or uncertain) and the routes it makes unavailable, including a cause a refresh met since the last config check. When an approved listener did not open (a TLS key that does not match its certificate, an address in use, a socket directory that is missing), it adds a Listeners not open: section naming each listener and a short reason; the other listeners keep serving, and that alone does not change the exit code. It exits 4 when the service answers and is not Ready.
iron-vault list
iron-vault list [OPTIONS]
List every credential with its kind, permitted origins and standing, never a secret. An OAuth client shows its token endpoint’s host and rotation; an OAuth account shows its client, the verified account’s display name and issuer, and the granted scopes. The standing is healthy, damaged with its damage, needs login with its cause, or unusable with its cause. It needs an open vault, and exits 4 while none is open.
iron-vault unlock
iron-vault unlock [OPTIONS]
Open the vault: the service prompts for the vault passphrase, read with echo off or from stdin.
--recovery: Open the Locked vault with the recovery key instead, when the vault passphrase is forgotten, and set a new vault passphrase in the same step. The service prompts for the key, then the new passphrase twice. Runlockfirst if the service is Ready or Unavailable.
iron-vault lock
iron-vault lock [OPTIONS]
Clear the vault identity and every cached secret from the service’s memory, leaving it Locked.
The lock lasts across restarts: run unlock to end it.
iron-vault init
iron-vault init [OPTIONS]
Create the vault: the service prompts for the vault and approval passphrases, shows the recovery key once on the controlling terminal, and once you confirm you saved it, writes the vault and approves the initial config as version 1. It needs a controlling terminal, and leaves the service Locked.
--host-unlock: Also enrol the identity in the unlock handoff as a recipient, so a restart unlocks with no owner present. The service refuses to startinitif there is no trusted host unlock identity to enrol. A dev-mode build does not accept this flag.
iron-vault import
iron-vault import [OPTIONS] <BUNDLE>
Make the vault from a migration bundle that export wrote on another machine. The service prompts for the export passphrase, shows a summary, prompts for a new vault passphrase, shows a new recovery key once on the controlling terminal and, once you confirm you saved it, writes the vault, the source’s credentials and approval counters included. It needs a controlling terminal, and leaves the service Locked. The vault routes nothing until you approve a config with config approve, at a version above every one the source reserved. The BUNDLE must be a regular file of at most 260 MiB. Before it connects, the command creates <BUNDLE>.config.toml beside the bundle with mode 0600, and refuses a name already taken. After the import it fills that copy from the bundle’s config, checked against the committed config’s digest, and prints the config approve command for it; if the copy cannot be made it removes it and prints the digest to check your own copy of the source’s config against, and still exits 0. Any other ending removes the copy. The first approval lists the whole config as added, since nothing is active.
With –host-unlock, the vault also enrols the identity in the unlock handoff as a recipient, as init --host-unlock does, so a restart unlocks with no owner present. The service refuses to start the import if there is no trusted host unlock identity to enrol, before any prompt.
<BUNDLE>: The bundle file to read.- required
--host-unlock: Also enrol the identity in the unlock handoff as a recipient. A dev-mode build does not accept this flag.
iron-vault reset
iron-vault reset [OPTIONS]
Discard the vault and the config, so init can make a new vault: the way out when no passphrase, recovery key or approver works. It asks for no owner factor, only a confirmation typed at a terminal, which is the vault ID, or the state directory’s path when no vault is Initialized. It refuses a pipe, a file or a missing /dev/tty with exit code 3 before it connects. The service locks first, then removes the store’s files and the config, keeps any foreign file, and ends Locked. Nothing can be recovered afterwards: keep your own copy of the config.
iron-vault export
iron-vault export [OPTIONS] <BUNDLE>
Write the vault as a migration bundle to BUNDLE, for import on another machine. The service checks the vault, prompts for the vault passphrase to authorize the export (switchable to a tpm approver’s TPM approval PIN), then for a new export passphrase, typed twice, which seals the bundle; import asks for it. The bundle arrives in .<BUNDLE name>.partial beside BUNDLE, created with mode 0600 before anything is sent, and takes BUNDLE’s name only once it is whole. An existing BUNDLE or a leftover partial file is refused before anything is sent. The source vault keeps serving afterwards.
<BUNDLE>: Where to write the bundle; it must not exist.- required
iron-vault caller-token
iron-vault caller-token [OPTIONS]
Issue a fresh caller token: it goes to stdout once, and its token_hash line to stderr. The service keeps no copy; the token works once a config naming the hash is approved with config approve.
iron-vault add
iron-vault add [OPTIONS] <NAME>
Enrol a new credential under NAME; the service prompts for the secret, read with echo off or from stdin, so pass show fx | iron-vault add fx --origin openexchangerates.org works. It never overwrites an existing name. With --kind oauth-client, the service first shows the provider definition the record will seal, then prompts for the client ID (echo on) and the client secret (echo off); the record’s origins are the definition’s endpoints.
<NAME>: The credential name, which routes reference.- required
--kind <KIND>: The credential’s kind: a static key, a Basic username and password, or an OAuth client that login signs accounts in with.- default:
static - possible values:
static: A provider key, sent as is.basic: A username and password, sent asAuthorization: Basic.oauth-client: An OAuth client: its ID, its secret and its provider definition.
- default:
--origin <ORIGIN>: A permitted origin:host,host:port,[v6]or[v6]:port, without a scheme (HTTPS is implied); the port defaults to 443. Repeat for each origin, up to 32. Not taken with--kind oauth-client.- repeatable
--provider <PROVIDER>: The OAuth client’s provider definition: a shipped name (googleorgithub-app), or the path of a TOML file of at most 16 KiB; a value with a/or ending in.tomlis a path. Only with--kind oauth-client.
iron-vault replace
iron-vault replace [OPTIONS] --origin <ORIGIN> <NAME>
Replace NAME’s record with a new one, and with it the kind and the origins; the old record need not be readable, so this also repairs a damaged one. The service shows what changes, asks for the approval passphrase as owner presence, then prompts for the new secret. On stdin, the first line is the approval passphrase and the rest the secret. Routes that use NAME keep working only if the new kind and origins suit them; otherwise nothing changes.
<NAME>: The credential name.- required
--kind <KIND>: The new kind: a static key, or a Basic username and password.- default:
static - possible values:
static: A provider key, sent as is.basic: A username and password, sent asAuthorization: Basic.
- default:
--origin <ORIGIN>: A new permitted origin, as foradd. Repeat for each origin, up to 32; the old origins are not kept.- required
- repeatable
iron-vault rm
iron-vault rm [OPTIONS] <NAME>
Remove the credential NAME after you type the approval passphrase. It refuses while a route of the active config uses the name: approve a config without those routes first.
<NAME>: The credential name to remove.- required
iron-vault login
iron-vault login [OPTIONS] --client <CLIENT> --origin <ORIGIN> --account <ACCOUNT> <NAME>
Sign a provider account in to the OAuth account record NAME by paste-back. The service shows a consent URL to open in a browser, then asks for the address the browser was sent to, read with echo on; it checks the account the provider verified against ACCOUNT. NAME is new or holds an OAuth account record, which the login replaces; another account or client, or an added scope or origin, needs the approval passphrase.
<NAME>: The account record’s credential name, which routes reference.- required
--client <CLIENT>: The OAuth client record to sign in with.- required
--scope <SCOPE>: A scope to ask for. Repeat for each scope, up to 64; the client’s provider definition says whether any is needed.- repeatable
--origin <ORIGIN>: A permitted origin, as foradd, matching the provider definition’s resource hosts. Repeat for each origin, up to 32.- required
- repeatable
--account <ACCOUNT>: The account you mean to sign in: Google’s email, or GitHub’s login.- required
iron-vault config
iron-vault config [OPTIONS] <COMMAND>
Change the approved configuration.
iron-vault config approve
iron-vault config approve [OPTIONS] <FILE>
Propose FILE as the new config: the service shows its summary, asks for confirmation and the approval passphrase, then commits, publishes and activates it. The summary ends with the verified account (display name, issuer and subject) each route reaches through an OAuth account, so you see whose account it is before you sign. Stdin is not read for the config, because it carries the answers to the prompts when it is not a terminal.
<FILE>: The proposed config file.- required
iron-vault config check
iron-vault config check [OPTIONS] <FILE>
Parse and validate FILE without contacting the service: no running service, vault or root is needed. It prints Config ok and exits 0, or prints why the config is not valid, with the line and column, and exits 1; it exits 2 when FILE cannot be read or is longer than the limit. It does not check what only an approval can: that each credential exists and permits its route’s host, that a peer caller’s account exists, or the upstream TLS and log destination settings. A config that passes can still be refused by config approve.
<FILE>: The config file to check.- required
iron-vault recovery
iron-vault recovery [OPTIONS] <COMMAND>
Check the owner’s offline recovery key.
iron-vault recovery check
iron-vault recovery check [OPTIONS]
Prove that your offline recovery key opens this vault: the service prompts for the key, read with echo off or from stdin, so pass show iron-vault-recovery | sudo iron-vault recovery check works. It works while the service is Locked or Ready, changes nothing but the time it records, and keeps no copy of the key.
iron-vault recipient
iron-vault recipient [OPTIONS] <COMMAND>
Manage the keys that can open the vault.
iron-vault recipient list
iron-vault recipient list [OPTIONS]
List every enrolled recipient, one line each: its age1... key, role, enrolment time and label. It works while the service is Ready, and refuses a missing or damaged recipient inventory without changing it.
iron-vault recipient add
iron-vault recipient add [OPTIONS] --label <LABEL> [RECIPIENT]
Enroll RECIPIENT, an age1... public key, as another way to open the vault. This is the alternate migration path: whoever holds the key can open the vault identity, and with it every credential. The service shows what changes, then asks for the vault passphrase, which an unlocked vault does not replace; the prompt can switch to a tpm approver’s TPM approval PIN. Old copies of identity.age are not affected.
With –recovery, the service instead generates a new offline recovery key and shows it once, as init does; save it, type yes, then authorize with the vault passphrase. Check it with recovery check, then remove the old recovery key with recipient remove.
With –host-unlock, RECIPIENT is a host unlock identity’s key, such as a new one provisioned after a lost TPM. It is enrolled with the host-unlock role and authorized the same way. Once a restart reaches Ready with no unlock, remove the old host-unlock recipient with recipient remove.
<RECIPIENT>: Theage1...public key to enroll.--recovery: Generate a new recovery key and enroll it, instead of enrolling a key you supply.--host-unlock: Enroll RECIPIENT as the host unlock identity’s recipient, rolehost-unlock, rather thanadded.--label <LABEL>: Which device or copy the key is, 1 to 64 bytes:alice laptop 2026.- required
iron-vault recipient remove
iron-vault recipient remove [OPTIONS] <RECIPIENT>
Remove an enrolled recipient by its age1... key. The service shows what will change, then asks for the approval passphrase. It refuses the operational recipient, the last recovery recipient and, in the Protected and Container profiles, the host-unlock recipient whose identity the unlock handoff holds. It says that copies of identity.age made before still open with the removed key.
<RECIPIENT>: The recipient’sage1...key, asrecipient listprints it.- required
iron-vault approver
iron-vault approver [OPTIONS] <COMMAND>
Manage the approvers that sign configuration approvals.
iron-vault approver list
iron-vault approver list [OPTIONS]
List every approver, one line each: its approver ID, signer kind, enrolment time, active when it signed the active approval, and label. The first line is the approver a prompt asks first. It works while the service is Ready.
iron-vault approver add
iron-vault approver add [OPTIONS] --label <LABEL>
Enroll another approval signer. The service shows what changes, asks for the approval passphrase of an approver already pinned, then for the new signer’s own approval passphrase, twice; choose one different from the vault passphrase. The new signer alone can approve a config, so keep its passphrase apart from the first. Prints the new approver’s ID.
--label <LABEL>: What the approver is, 1 to 64 bytes:backup passphrase.- required
--kind <KIND>: The signer kind.tpmis offered only on a protected or Compose install with the TPM signing helper, and asks for a PIN of at least 6 characters; the service refuses the kinds it does not offer.- default:
software - possible values:
software: A key sealed to its own approval passphrase.tpm: A TPM approval key with a PIN.hardware: A hardware key with PIN and touch.
- default:
iron-vault approver remove
iron-vault approver remove [OPTIONS] <APPROVER>
Remove an approval signer, named by the approver ID approver list prints. The service shows what changes, then asks for the approval passphrase of any pinned approver, the one being removed included. It refuses the last approver and the approver that signed the active approval: approve the config with another approver first. Copies of the state directory made before still pin the removed approver. Prints nothing on success.
<APPROVER>: The approver ID, a UUID.- required
iron-vault forget-machine
iron-vault forget-machine [OPTIONS] <RECIPIENT>
Check that a retired machine’s recipient key is gone from the vault, then print how to decommission the machine. Run it on the vault that stays, with the key recipient list showed for the machine. It exits 1 with machine-not-forgotten, telling you to run recipient remove, while the key is still enrolled. It warns when the vault no longer meets the independence rule or no recovery check has run lately. It changes nothing and runs no TPM tool: you run every step it prints.
<RECIPIENT>: The retired machine’sage1...recipient key.- required
iron-vault completions
iron-vault completions [OPTIONS] <SHELL>
Print a shell completion script to stdout. It never contacts the service, so it also runs at build time.
<SHELL>: The shell to generate the script for.- required
- possible values:
bash: Bash, through the bash-completion framework.
Configuration
This page lists every table and key of Iron Vault’s configuration file. For each key it gives the type, whether the
key is required, its default, the rule it must meet and the refusal you get when it doesn’t. The iron-vault-policy
crate checks the config, and every refusal below is copied from its code. Terms follow the glossary,
and the specification is the
source of the rules.
Check a config first
To catch mistakes before you approve, check the file. This needs no running service, no vault and no sudo:
iron-vault config check my-config.toml
It prints Config ok and exits 0 when the file parses and its sections agree with each other. Otherwise it exits 1 and
prints why, with the line and column; a file that cannot be read, or is longer than 61440 bytes, exits 2.
The check is advisory. It does not look at the vault or the host, so it cannot tell whether each route’s credential
exists, permits the route’s host and fits its slot, whether a caller’s account exists, or whether the upstream TLS and
log destination settings work. config approve checks all of those, and can still refuse a file that passed.
How approval works
You never edit the config the service runs. You edit your own copy, anywhere you like, and approve it:
iron-vault config approve my-config.toml
The CLI sends the file’s bytes to the service. The service then:
- writes them beside the active config as
config.toml.pending, and checks them as described on this page; - shows its own approval summary of what changes, and asks you to type
yes; - asks for the approval passphrase;
- reserves the next approval version, signs the config with it, and commits it to the vault;
- publishes the config as
config.toml, with its signatureconfig.toml.sig, in the config directory, and puts it into force without a restart.
The config directory is /etc/iron-vault in a protected install and $XDG_CONFIG_HOME/iron-vault-dev in development.
config-approval.md describes the transaction step by step.
Never edit the published copy. The signature covers every byte, comments and whitespace included. On SIGHUP the
service reloads the published pair, and only from Ready. A published config that doesn’t match its signature is
refused: the service stops proxying and reports policy invalid until you approve a config again. To change anything,
edit your own copy and approve it again.
A config that fails a check uses up no approval version, and the active config doesn’t change. The CLI refuses a file longer than 61440 bytes before sending it:
the config file {path} is longer than 61440 bytes
Reading a refusal
A refused config ends config approve with one line on stderr:
iron-vault: the service answered error 7 (config-invalid): the proposed config is invalid: <detail>
The checks run in four stages, and the detail depends on which stage refused the config.
-
Parsing reads each table and checks each key on its own: its type, its value, and that no key is unknown. The detail gives only the position of the first fault, because the parser’s message may quote a value from your file:
config is invalid at line 12, column 7Look at that line and check it against the rules below. The parser’s own message for each rule is listed in this page’s tables so that you can tell which rule a value breaks. Two parse faults are named in the detail:
config has no schema_version at line 1, column 1 config schema_version 2 is unsupported at line 1, column 18 -
Validation checks the tables against each other, for example that every route a caller is granted is defined. It reports every fault it finds, joined by
;, in full. -
Activation checks the config against the vault and the host: that each credential exists and permits the route’s upstream, and that each peer caller’s account exists. It also reports every fault in full.
-
Serving checks run last. The service builds the upstream HTTP clients the routes need and, when the config moves the log, checks the new log destination. A failure here gives one fixed phrase, such as
the upstream HTTP client could not be builtorthe log directory does not exist, and never a path.
The example
This config uses every table, and every kind of listener, caller and slot. A test in iron-vault-policy parses and
validates this exact file, so it stays valid as the schema changes. To approve it you would still need the credentials
in your vault and the accounts on your host.
# An annotated Iron Vault configuration.
#
# It uses every table and every kind of listener, caller and slot. A test in the iron-vault-policy crate parses and
# validates this file, so it stays valid as the schema changes. Before approving a copy of it, make the names, hashes,
# accounts, files and credentials match your own installation.
schema_version = 1
# --- Listeners: where callers connect ---------------------------------------------------------------------------
# A Unix socket. Any local account may connect; the account the kernel reports for the connecting process decides
# which caller it is.
[listeners.local]
unix_socket = "/run/iron-vault/proxy.sock"
# Plain HTTP on loopback. TCP reports no account, so every caller here presents a caller token. This listener reads
# the token from its own header instead of `Proxy-Authorization: Bearer <token>`.
[listeners.loopback]
address = "127.0.0.1:7878"
token_header = "X-Iron-Vault-Token"
# An address on one container network. It is not loopback, so TLS is required.
[listeners.backoffice]
address = "10.20.0.2:7878"
tls_certificate = "/etc/iron-vault/tls/server.crt"
tls_key = "/etc/iron-vault/tls/server.key"
# --- Callers: who may use which routes --------------------------------------------------------------------------
# Identified by OS account. The account must exist on the host, and must not be root, the service account or the
# overflow uid (`nobody`).
[callers.fx-mcp]
listener = "local"
auth = "peer"
user = "fx-mcp"
routes = ["fx"]
# A second peer caller on the same socket, as a different account.
[callers.code]
listener = "local"
auth = "peer"
user = "code"
routes = ["github"]
# A limit for this caller alone, applied on top of the route's own. It may be stricter, never looser.
[callers.code.rate_limits]
github = { requests = 30, per_seconds = 60, burst = 5 }
# Identified by caller token; `auth = "token"` is the default. Put the line `iron-vault caller-token` printed here.
[callers.brave-cli]
listener = "loopback"
token_hash = "blake2b:0123456789abcdef00112233445566778899aabbccddeeff0f1e2d3c4b5a6978"
routes = ["brave", "venice"]
# Identified by the listener it arrives on: it must be that listener's only caller.
[callers.backoffice]
listener = "backoffice"
auth = "isolated-network"
routes = ["venice", "tickets"]
# --- Routes: where requests go, and with which credential -------------------------------------------------------
# A query slot: the key is sent as `?app_id=<key>`. OpenExchangeRates serves one file per date, so `/historical/*`
# matches one segment such as `2026-11-01.json`. Its plans have monthly quotas, so the rate limit is low. The free
# plan serves rates against USD only, so a request should not set `base`.
[routes.fx]
prefix = "/fx"
upstream = "https://openexchangerates.org/api"
credential = "fx_key"
slot = { query = "app_id" }
methods = ["GET"]
paths = ["/latest.json", "/historical/*", "/currencies.json", "/usage.json"]
rate_limit = { requests = 10, per_seconds = 60, burst = 2 }
# A header slot with a format. The upstream has a base path, which `paths` leaves out: a request for
# /venice/chat/completions is sent to /api/v1/chat/completions.
[routes.venice]
prefix = "/venice"
upstream = "https://api.venice.ai/api/v1"
credential = "venice"
slot = { header = "Authorization", format = "Bearer {}" }
methods = ["POST"]
paths = ["/chat/completions"]
rate_limit = { requests = 120, per_seconds = 60, burst = 20 }
# A header slot without a format: the header holds the key alone.
[routes.brave]
prefix = "/brave"
upstream = "https://api.search.brave.com"
credential = "brave"
slot = { header = "X-Subscription-Token" }
methods = ["GET"]
paths = ["/res/v1/web/search"]
rate_limit = { requests = 60, per_seconds = 60, burst = 10 }
# `*` matches exactly one path segment: here the owner and the repository.
[routes.github]
prefix = "/github"
upstream = "https://api.github.com"
credential = "github"
slot = { header = "Authorization", format = "Bearer {}" }
methods = ["GET", "POST"]
paths = ["/user/repos", "/repos/*/*/issues"]
rate_limit = { requests = 60, per_seconds = 60, burst = 10 }
confirm = "none"
# A Basic slot, for a credential added with a username and password. The upstream is self-hosted, so the route trusts
# an administrator-installed CA instead of the built-in roots.
[routes.tickets]
prefix = "/tickets"
upstream = "https://tickets.internal.example/rest/api/2"
credential = "tickets"
slot = "basic"
methods = ["GET", "POST", "PUT"]
paths = ["/issue", "/issue/*", "/search"]
rate_limit = { requests = 20, per_seconds = 60, burst = 5 }
ca_file = "/etc/iron-vault/ca/tickets.pem"
# --- Service-wide settings --------------------------------------------------------------------------------------
# Overrides for some operational limits; the rest keep their defaults.
[limits]
max_request_body_bytes = 1048576
request_timeout_secs = 120
upstream_timeout_secs = 60
# Where the log goes. This is the protected install's default, written out.
[logging]
destination = "/var/log/iron-vault"
# Remind the owner to check the recovery key every 30 days instead of every 90.
[recovery]
reminder_days = 30
The file
The config is one TOML file in UTF-8. Its top level holds schema_version and these tables:
| Table | Required | What it holds |
|---|---|---|
[listeners.<name>] | no | where callers connect |
[callers.<name>] | no | who may connect, how they are identified, which routes |
[routes.<name>] | no | where requests go, and with which credential |
[limits] | no | operational limits for the whole service |
[logging] | no | where the log goes |
[recovery] | no | how often to remind you to check the recovery key |
An empty config with only schema_version = 1 is valid: init approves one as version 1. It opens no listener.
Unknown keys are refused in every table, so a misspelt key is an error rather than a silently ignored setting:
unknown field `backlog`, expected one of `unix_socket`, `address`, `tls_certificate`, `tls_key`, `token_header`
Names. Listener, caller, route and credential names are 1 to 64 bytes of a-z, 0-9, _ and -, starting with
a lowercase letter. A caller’s routes and a route’s credential refer to these names.
invalid listener name: must start with a lowercase ASCII letter, found 'L'
Paths. Every file or socket path (unix_socket, tls_certificate, tls_key, ca_file) must be absolute, with no
.. component and no NUL byte:
path "run/a.sock" must be absolute
path "/run/../a.sock" must not contain a '..' component
schema_version
| Type | Required | Default | Rule |
|---|---|---|---|
| integer | yes | none | must be 1 this release |
The version of the config’s format, and the only top-level key that is not a table. (The glossary’s schema version is the field of the same name in a log record; it is a different number.)
schema_version = 1
| Fault | Parser message |
|---|---|
| missing | configuration has no schema_version at line 1, column 1; expected schema_version = 1 |
| any other value | unsupported schema version 2 at line 1, column 18; this release reads schema_version = 1 |
[listeners.<name>]
A listener is one socket or address where callers connect. Each caller names the listener it arrives on.
| Key | Type | Required | Default |
|---|---|---|---|
unix_socket | path | exactly one of unix_socket and address | none |
address | string | exactly one of unix_socket and address | none |
tls_certificate | path | with tls_key; required off loopback | none (plain HTTP) |
tls_key | path | with tls_certificate | none |
token_header | string | no | Proxy-Authorization |
[listeners.local]
unix_socket = "/run/iron-vault/proxy.sock"
[listeners.backoffice]
address = "10.20.0.2:7878"
tls_certificate = "/etc/iron-vault/tls/server.crt"
tls_key = "/etc/iron-vault/tls/server.key"
address is an IP address and port, 127.0.0.1:7878 or [::1]:7878. A host name is refused, and so is port 0.
TLS off loopback. A listener on any address outside loopback must have tls_certificate and tls_key, so that
caller tokens never cross a network in clear. Loopback means 127.0.0.0/8 or ::1. ::ffff:127.0.0.1 is not
loopback. A Unix socket never takes TLS. Approval refuses a listener without them and names it:
listener public on 192.0.2.10:8443 needs tls_certificate and tls_key: plain HTTP is allowed only on loopback.
Socket activation. In a protected install, systemd opens TCP listeners and passes them to the service. Adding an
address listener there also needs a systemd socket unit:
see Add a TCP listener.
token_header is the header from which callers on this listener send their caller token:
- Not set, or set to
Proxy-Authorization: the caller sendsProxy-Authorization: Bearer <token>. The scheme may be in any case, followed by exactly one space. - Any other header, such as
X-Iron-Vault-Token: the whole header value is the token, andProxy-Authorizationis not read. Use this for a client that can add a fixed header but can’t sendProxy-Authorization.
A missing token, an unknown one, or the header sent more than once is refused with 401. The service strips the token
header before forwarding, so the upstream never sees it. The header must not be a
reserved header, apart from Proxy-Authorization and X-Iron-Vault-Token, and must not be the
slot header of a route that this listener’s callers can use. A caller token sent in any other header is forwarded
upstream as an ordinary header; see Reserved headers.
| Fault | Parser message |
|---|---|
neither unix_socket nor address | listener needs exactly one of unix_socket or address; neither is set |
| both | listener needs exactly one of unix_socket or address; both are set |
| not an IP address and port | listener address "localhost:7878" is not an IP address and port such as 127.0.0.1:7878 or [::1]:7878 |
| port 0 | listener address 127.0.0.1:0 uses port 0 |
| one TLS file | listener sets only one of tls_certificate and tls_key; set both or neither |
| TLS on a Unix socket | tls_certificate and tls_key apply only to an address listener, not a unix_socket |
reserved token_header | token_header X-Forwarded-Token is a reserved header; choose a dedicated header such as X-Iron-Vault-Token |
| malformed header name | header name "X Token" contains ' ', which is not allowed in an HTTP token |
One validation refusal, shown in full:
listener loopback token_header x-key is the credential slot of route brave, which its callers can use
[callers.<name>]
A caller is one program, or one group of programs, that Iron Vault recognises and grants routes to.
| Key | Type | Required | Default |
|---|---|---|---|
listener | listener name | yes | none |
auth | string | no | "token" |
token_hash | string | with auth = "token" only | none |
user | account name | with auth = "peer" only | none |
routes | array of names | yes, at least one | none |
rate_limits | table | no | none |
[callers.brave-cli]
listener = "loopback"
token_hash = "blake2b:0123456789abcdef00112233445566778899aabbccddeeff0f1e2d3c4b5a6978"
routes = ["brave", "venice"]
How a caller is identified: auth
auth is one of three values. Each listener uses one of them for all its callers.
"token", the default. The caller sends a caller token, and token_hash holds its hash.
iron-vault caller-token makes a token, writes it to stdout and prints the token_hash = "blake2b:..." line for the
config. The service keeps only the hash. A token is ivt_ followed by 43 base64url characters, and its hash is
blake2b: followed by 64 lowercase hex digits. Anyone who can read the token can use the caller’s routes, so keep it in
a file only the caller’s account can read. To rotate it, put the new hash in the config and approve: the old token
stops working at that moment. Token callers on one listener must have different hashes.
"peer". The caller is recognised by the OS account of the connecting process, which the kernel reports on a Unix
socket. There is no token to steal. user names the account: a-z or _, then a-z, 0-9, _ or -, with an
optional trailing $, at most 32 bytes. Peer callers need a unix_socket listener, and every caller on that listener
must be a peer caller with a different account. Activation checks the account on the host: it must exist, and must not
be root, the service account or the overflow uid, and no two peer callers on one listener may resolve to the same uid.
The service reads /etc/passwd afresh at each activation (an unlock, a reload, a config approve), so an account you
create while it runs can be named at once, without a restart. A peer account you delete fails the next activation: a
reload or unlock leaves the service Unavailable with reason policy invalid until you approve a config without that
caller. Accounts only a directory service such as LDAP or SSSD knows are not in /etc/passwd, so they are unknown.
Development mode runs the service as your own account, which is never a peer account, so peer callers are for a
protected install.
"isolated-network". The caller is recognised by the listener alone: it is the only caller on a TLS address
listener bound to an address only it can reach, such as its own container network. The address must be dedicated, so
neither loopback nor a wildcard address such as 0.0.0.0.
[callers.fx-mcp]
listener = "local"
auth = "peer"
user = "fx-mcp"
routes = ["fx"]
[callers.backoffice]
listener = "backoffice"
auth = "isolated-network"
routes = ["venice", "tickets"]
routes and rate_limits
routes lists the routes the caller may use. It must not be empty or repeat a route, and every route it names must be
defined.
rate_limits sets a rate limit for this caller on one of its routes. It applies on top
of the route’s own limit, which all the route’s callers share. It may be stricter than the route’s limit but never
looser, in rate or in burst.
[callers.code.rate_limits]
github = { requests = 30, per_seconds = 60, burst = 5 }
Refusals
Parser messages:
| Fault | Parser message |
|---|---|
token caller without token_hash | caller uses token authentication but has no token_hash |
| hash without the prefix | token hash must start with "blake2b:" |
| hash of the wrong length | token hash digest is 3 characters long; it must be 64 lowercase hex digits |
| hash with another character | token hash digest has a character other than 0-9 or a-f at byte 10 |
peer caller without user | caller uses auth = "peer" but has no user |
token_hash on a peer caller | caller sets token_hash but uses auth = "peer"; token_hash applies only to auth = "token" |
user on a token caller | caller sets user but uses auth = "token"; user applies only to auth = "peer" |
unknown auth | unknown variant `password`, expected one of `token`, `isolated-network`, `peer` |
empty routes | caller must be granted at least one route |
| repeated route | caller lists route fx more than once |
| limit for a route not granted | caller sets a rate limit for route brave, which is not in its routes |
| malformed account | invalid account name "Alice": must be a-z or '_', then a-z, 0-9, '_' or '-', with an optional trailing '$' |
Validation messages, shown in full:
caller code is granted route gitlab, which is not defined
caller code names listener lan, which is not defined
caller code rate limit for route github allows a higher request rate than the route's own limit
caller code rate limit for route github allows a larger burst than the route's own limit
caller fx-mcp uses auth = "peer", which needs a unix_socket listener; listener loopback is not one
caller backoffice uses auth = "isolated-network", which needs an address listener with TLS; listener local is not one
caller backoffice needs listener backoffice to bind a dedicated address
caller backoffice uses auth = "isolated-network", so it must be the only caller on listener backoffice, which brave-cli also use; callers that share a TCP listener must use tokens
listener local has peer callers, so every caller on it must use auth = "peer"; brave-cli do not
callers code, fx-mcp on listener local share user alice, so one account would identify more than one caller
callers brave-cli, chat on listener loopback share a token_hash, so one token would identify more than one caller
Activation messages:
caller fx-mcp names user fx-mcp, which is not an account on this host
caller fx-mcp names user root, which is root or the service account; neither may be a peer account
caller fx-mcp names user nobody, the overflow uid; the kernel reports this uid for processes outside this user namespace
callers code, fx-mcp on listener local name accounts with uid 1001, so one account would identify more than one caller
the host's account list cannot be read: permission denied
[routes.<name>]
A route maps requests under a path prefix to one upstream, with one credential in one slot.
| Key | Type | Required | Default |
|---|---|---|---|
prefix | string | yes | none |
upstream | string | yes | none |
credential | credential name | yes | none |
slot | string or table | yes | none |
methods | array of strings | yes | none |
paths | array of strings | yes | none |
rate_limit | table | yes | none |
confirm | string | no | "none" |
ca_file | path | no | none |
[routes.venice]
prefix = "/venice"
upstream = "https://api.venice.ai/api/v1"
credential = "venice"
slot = { header = "Authorization", format = "Bearer {}" }
methods = ["POST"]
paths = ["/chat/completions"]
rate_limit = { requests = 120, per_seconds = 60, burst = 20 }
prefix
The path under which the caller sends requests for this route. The service takes the prefix off and sends the rest of
the path to the upstream. A prefix matches whole segments: /fx matches /fx and /fx/latest, never /fx.evil or
/fxx. No two routes’ prefixes may overlap, so /fx and /fx/v2 can’t both be used.
A prefix is made of literal segments, with the same characters as a path pattern. It must
not be /, contain a wildcard, end in a slash or contain %.
| Fault | Parser message |
|---|---|
/ | route prefix must not be "/"; it would match every request path |
| trailing slash | route prefix breaks a path-pattern literal rule: path pattern "/r/" contains an empty segment or trailing slash |
| wildcard | route prefix "/r/*" must not contain a wildcard segment |
| overlap (a validation message) | route fx prefix overlaps route fx-v2 prefix |
upstream
The HTTPS URL that requests are sent to, with an optional base path. It must start with https:// in lowercase, and has
no user-info, query or fragment. An IP address host must be written in its canonical form, and the base path has no
dot segments. A trailing slash is dropped. The port defaults to 443.
| Fault | Parser message |
|---|---|
| not HTTPS | upstream URL must start with "https://" |
| user-info | upstream URL must not contain user-info |
| query | upstream URL must not contain a query |
| fragment | upstream URL must not contain a fragment |
| dot segment | upstream URL base path segment ".." is a dot segment |
| non-canonical IP | upstream URL host is invalid: host denotes an IP address but is not written as a canonical IPv4 or bracketed IPv6 literal |
| port 0 | upstream URL port is invalid: port 0 is not allowed |
credential, and where it may go
credential names a credential in the vault, which you stored with iron-vault add. The origins given to add are
kept inside the encrypted credential record. Activation refuses a route whose upstream is not one of them, so a config
change can never send an existing key to a new host. Only iron-vault replace changes the origins.
route venice uses credential venice, which the vault does not hold
route brave sends credential brave to an origin its record does not permit
route tickets uses credential tickets, of kind static, on a slot that kind cannot fill: a static key fills a header or query slot
methods
The HTTP methods the route allows: any of GET, HEAD, POST, PUT, PATCH, DELETE and OPTIONS, in upper
case. CONNECT and TRACE are never allowed. The list must not be empty or repeat a method. A request with another
method is refused before anything is sent.
| Fault | Parser message |
|---|---|
| empty | route must allow at least one method |
| repeated | route lists method GET more than once |
| not supported | unsupported method "get"; expected one of GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS |
| never allowed | method TRACE is never allowed |
paths and the base path
The path patterns the route allows. A request whose path matches none of them is refused before anything is sent.
Patterns match the request path after the route prefix, which is the path the provider documents, without the
upstream’s base path. The service adds the base path when it forwards the request. With
upstream = "https://api.venice.ai/api/v1" and prefix = "/venice", paths = ["/chat/completions"] allows a request
for /venice/chat/completions, which is sent to /api/v1/chat/completions. Patterns never see the query string.
caller sends /venice/chat/completions
└─────┘└───────────────┘
prefix matched against paths = ["/chat/completions"]
upstream gets https://api.venice.ai/api/v1/chat/completions
└─── upstream, with its ───┘└───────────────┘
base path /api/v1 the same path
Brave Search documents /v1/web/search, and its API lives under /res, so the route’s upstream and paths are:
[routes.brave]
upstream = "https://api.search.brave.com/res"
paths = ["/v1/web/search"]
A pattern that repeats the base path, such as /res/v1/web/search, is legal but means /res/res/v1/web/search, so
it matches nothing the provider serves.
Wildcards stand for whole segments.
*matches exactly one segment:/repos/*/*/issuesmatches/repos/octo/demo/issues, not/repos/octo/issues./historical/*matches/historical/2026-11-01.json.**matches zero or more segments:/files/**matches/files,/files/2024and/files/2024/01/02./alone has no segments and matches only the root path.["/**"]allows every path. It must be written out; an empty list is refused.
A pattern starts with /, has no empty segment or trailing slash, and no dot segment. A wildcard must be the whole
segment, so a* is refused. Literal segments may hold letters, digits and - . _ ~ ! $ & ' ( ) + , ; = : @; % and
other characters are refused. Each pattern may be listed only once.
| Fault | Parser message |
|---|---|
| empty list | path patterns must not be empty; use ["/**"] to allow every path explicitly |
| repeated | path pattern "/v1" is listed more than once |
| no leading slash | path pattern "v1" must start with '/' |
| trailing slash | path pattern "/v1/" contains an empty segment or trailing slash |
| partial wildcard | path pattern "/v1/a*" has a partial wildcard segment "a*" |
| dot segment | path pattern "/v1/../x" contains a dot segment |
| other character | path pattern "/v1/a%20b" contains disallowed character '%' |
slot: where the credential goes
The slot is the one place the service writes the credential. It first removes anything the caller sent there, so a placeholder key in the application is replaced, never forwarded. There are three kinds:
| Slot | Credential kind | What the upstream gets |
|---|---|---|
{ header = "X-Subscription-Token" } | static | X-Subscription-Token: <key> |
{ header = "Authorization", format = "Bearer {}" } | static | Authorization: Bearer <key> |
{ query = "app_id" } | static | ?app_id=<key>, added to the query |
"basic" | basic | Authorization: Basic <base64 of user:password> |
{ header = "Authorization", format = "Bearer {}" } | OAuth account | Authorization: Bearer <access token> |
headeris an HTTP header name that is not a reserved header.Authorizationis allowed.formatapplies only to a header slot, and defaults to{}. It is printable ASCII with exactly one{}, where the key goes, and no other braces.queryis a parameter name made only ofA-Z a-z 0-9 - . _ ~."basic"is for a credential added with a username and password.- An OAuth account record, which
loginmakes, fills a header slot only, with the access token the service refreshes. An OAuth client record fills no slot, so no route may name it.
| Fault | Parser message |
|---|---|
| reserved header | header Host is reserved for caller authentication or transport control and cannot be a slot |
format without {} | slot format "Bearer" has no {} substitution point |
format with two {} | slot format "{} {}" must contain exactly one {} and no other braces |
| format not printable ASCII | slot format "B\u{e9} {}" contains '\u{e9}'; only printable ASCII is allowed |
format on a query slot | `format` applies only to header slots |
| both or neither of header, query | a slot table must name exactly one of `header` or `query` |
| query name with another character | query parameter name "api key" contains ' '; only A-Z a-z 0-9 - . _ ~ are allowed |
| empty query name | query parameter name is empty |
| any other string | invalid value: string "bearer", expected "basic" or a table with `header` (and optional `format`) or `query` |
rate_limit: the token bucket
Every route has a rate limit, written as three nonzero whole numbers:
rate_limit = { requests = 60, per_seconds = 60, burst = 10 }
The limit is a token bucket. The bucket holds at most burst tokens and refills at requests tokens every
per_seconds seconds. Each request takes one token, and a request that finds the bucket empty gets 429. The example
above allows one request a second on average, and up to 10 at once after a quiet spell.
Every bucket starts empty each time the service becomes Ready, and fills from there: after unlock, an approval, a
SIGHUP reload, a repair, or a replace or rm. Each of these runs a config check, and every config check builds new
buckets. A service that has just started is Locked, so in practice its buckets begin at unlock. Neither a restart nor
a reload ever hands out a fresh burst. In the example, the first request is allowed one second after the service
becomes Ready, and the full burst of 10 only after ten quiet seconds.
All the route’s callers share its bucket. A caller’s rate_limits entry adds a second bucket of its own, and a request
needs a token from both. A route you don’t want limited still needs a limit: give it a generous one.
| Fault | Parser message |
|---|---|
| zero | invalid value: integer `0`, expected a nonzero u32 |
| missing key | missing field `burst` |
confirm
"none", the default and the only value v0 accepts. "touch" is reserved for a
later phase, where a touch route will need confirmation on a security key for each
request. No confirmation provider exists in v0, so a config that sets confirm = "touch" is refused when it is read,
before any prompt, at the position of the value.
| Fault | Parser message |
|---|---|
"touch" | confirm = "touch" is not yet available: v0 has no touch confirmation provider |
| any other | unknown variant `always`, expected `none` |
ca_file
A PEM file of CA certificates that the route trusts instead of the built-in roots, for a self-hosted upstream with its own CA. Install it where only an administrator can write. If the file can’t be read or parsed, the config is still approved, but the routes that pin it are unavailable until it is fixed.
ca_file = "/etc/iron-vault/ca/tickets.pem"
Reserved headers
The service removes these headers from every request before forwarding, and controls Host itself. None of them may be
a route’s slot, and none but Proxy-Authorization and X-Iron-Vault-Token may be a listener’s
token_header. Names are compared without regard to case.
- Hop-by-hop:
Connection,Keep-Alive,Proxy-Connection,Proxy-Authenticate,Proxy-Authorization,TE,Trailer,Transfer-Encoding,Upgrade. - Transport and routing:
Host,Content-Length,Forwarded,Via,X-Real-IP,True-Client-IP,X-Client-IP,CF-Connecting-IP,X-Host,X-Original-Host,X-HTTP-Host-Override. - Method override and URL rewrite:
X-HTTP-Method-Override,X-Method-Override,X-HTTP-Method,X-Original-URL,X-Rewrite-URL. - Caller token:
X-Iron-Vault-Token, the dedicated caller-token header. It is stripped on every listener, whether or not that listener reads its token from it, so a caller admitted by another means never sends a token upstream in it. - Any header starting with
X-Forwarded-.
The service also strips the listener’s own token_header and any header that Connection names.
Iron Vault strips a caller token only from Proxy-Authorization, X-Iron-Vault-Token and the listener’s own
token_header. A token a client sends in any other header, including another listener’s custom token_header, is
forwarded upstream as an ordinary header. Configure each client to send its token only in its listener’s token header.
[limits]
Service-wide limits. Every key is optional; a key left out keeps its default. Zero is refused, and so is a value above the ceiling.
| Key | Type | Default | Ceiling | What it bounds |
|---|---|---|---|---|
max_header_bytes | integer | 65536 (64 KiB) | 1048576 (1 MiB) | a request line and headers, in bytes |
max_header_count | integer | 100 | 1000 | a request’s headers, in count |
max_request_body_bytes | integer | 10485760 (10 MiB) | 1073741824 (1 GiB) | a request body |
max_decompressed_response_bytes | integer | 67108864 (64 MiB) | 4294967296 (4 GiB) | a response body after decompression for scrubbing |
max_decompression_ratio | integer | 100 | 10000 | decompressed size over compressed size |
request_timeout_secs | integer | 300 | 3600 | a whole request, in seconds |
upstream_timeout_secs | integer | 300 | 600 | waiting for the upstream’s response headers; at most request_timeout_secs |
max_connections | integer | 256 | 65536 | concurrent caller connections |
[limits]
max_request_body_bytes = 1048576
request_timeout_secs = 120
upstream_timeout_secs = 60
| Fault | Parser message |
|---|---|
| zero | limits.max_connections must not be zero |
| above the ceiling | limits.max_connections is 70000; the maximum is 65536 |
| timeouts crossed | limits.upstream_timeout_secs (400) must not exceed limits.request_timeout_secs (300) |
[logging]
| Key | Type | Required | Default |
|---|---|---|---|
destination | string | no | the bootstrap destination |
Where the log goes: "stdout", or an absolute directory in which the service writes iron-vault.log. When it is not
set, the bootstrap destination applies: /var/log/iron-vault in a protected install,
$XDG_STATE_HOME/iron-vault-dev-log in development, or stdout when serve has --log-to-stdout.
A directory must be absolute, with no control characters and no .., and outside the state and config directories.
It must also pass the log directory’s trusted-path rule; the
log operations guide gives the owner and modes. Create it before you
approve. A development build creates its missing bootstrap log directory at 0700 when serve starts, but never a
directory that a config names.
Checked at approval. When the config changes the destination, config approve checks the new one before it
reserves a version: that the directory exists, resolves to a canonical path outside the state and config directories,
and passes the trusted-path rule. It creates and writes nothing. A failure is config-invalid with a fixed phrase,
for example:
the log directory is, or is inside, the state directory
the log directory does not exist
the log directory, or a directory above it, is writable by others
[logging]
destination = "/var/log/iron-vault"
log destination must be "stdout" or an absolute directory: path "logs" must be absolute
Switching. When the service becomes Ready with a config that moves the log, it checks the destination again,
then switches to it. It writes service.log-destination-changed to the old destination and then to the new one, so
each file records where the log went. Removing the key moves the log back to the bootstrap destination the same way.
If the check fails at that point, the service stays Unavailable (policy invalid) and keeps writing where it was.
[recovery]
| Key | Type | Required | Default |
|---|---|---|---|
reminder_days | integer | no | 90 |
How many days may pass after the last iron-vault recovery check before the service reminds you to run another. It is
a whole number from 7 to 365. It is part of the approved config, so silencing the reminders needs the approval
passphrase. When the key is absent, the approval summary shows the interval as default.
[recovery]
reminder_days = 30
recovery.reminder_days must be a whole number of days from 7 to 365, not 3
Provider definitions
A provider definition describes one OAuth provider as data, in a TOML file: its endpoints, how it proves the
account, whether it rotates refresh tokens, how the client authenticates, how a grant is revoked, the resource hosts an
account’s tokens may go to, and its timing. add --kind oauth-client --provider <PROVIDER> reads it once and seals it
into the OAuth client record. After that, neither a config edit nor an edit to the file changes where the client secret
or a token can be sent. To change a definition, enroll a new client record and sign each account in again with it.
--provider takes a shipped name, google or github-app, or the path of a file of at most 16 KiB; a value with a /
or ending in .toml is a path. The OAuth recipe uses both shipped definitions and writes one of
its own. The design is in oauth.md § Provider definitions.
Fields
| Field | Required | Value | Default |
|---|---|---|---|
authorize | yes | The authorization endpoint, an endpoint URL | none |
token | yes | The token endpoint, an endpoint URL | none |
redirect | no | The loopback address the browser is sent to: exactly http://127.0.0.1:<port>/, with a port from 1 to 65535 | http://127.0.0.1:42213/ |
authorize_params | no | A table of fixed extra consent-URL parameters, such as { access_type = "offline" } | none |
scopes | yes | "required": every login names a --scope. "optional". "none": --scope is refused, as for a GitHub App, whose permissions are set on the app | none |
add_scopes | no | Scopes every login asks for besides its --scopes, such as ["openid", "email"] | none |
account | yes | How login proves which account signed in: one of the account mechanisms | none |
rotation | yes | "never" or "always": see rotation | none |
client_auth | yes | "client_secret_post": the client ID and secret in the token request’s form body. "client_secret_basic": as HTTP Basic | none |
revoke | yes | { style = "rfc7009", url = "…" }: the provider’s RFC 7009 revocation endpoint, an endpoint URL. { style = "none" }: the service tells you to revoke at the provider | none |
resource_hosts | yes | The host patterns an account record’s origins must match | none |
min_retry_seconds | no | The least time between the starts of two refresh attempts, whatever the first one’s outcome | 60 for never, 300 for always |
refresh_margin_seconds | no | How much lifetime an access token must have left to be used without a refresh: see timing. From 30 to 1800 | 300 |
Any other field is refused, as is any other value of scopes, rotation, client_auth, account.style or
revoke.style. The sealed definition names every field, with its default filled in, so it never changes meaning when
a default does; add shows it in that form before it prompts for the client ID.
Endpoints
authorize, token, account.url and revoke.url follow the rules for a route’s
upstream: lowercase https://, no user info, no query and no fragment. Their origins
become the client record’s permitted origins, the only ones its client secret can be sent to. Every request the
service sends to a provider goes to one of these URLs exactly, or is refused before it is sent; it trusts only the
built-in roots, never a route’s ca_file, and never follows a redirect.
Redirect
Nothing listens at the redirect: you paste the address the browser lands on back into login. So it must be the IPv4
loopback literal, with an explicit port and the path /; a host name could resolve elsewhere, and a path or query
would only add places for a code to leak. Register it with the provider if the provider asks for a callback URL.
authorize_params
The service sets response_type, client_id, redirect_uri, scope, state, code_challenge and
code_challenge_method itself, so a definition can’t name any of them, in any case.
Account
login checks that the account the provider verified is the one --account names, ignoring ASCII case, and records
its issuer, subject and display name in the account record.
| Mechanism | Fields | What the service checks |
|---|---|---|
{ style = "id_token", issuers = ["…"] } | issuers: the values the token’s iss may take | The token response carries an OpenID Connect id_token whose iss is one of issuers, whose aud is the client ID, whose exp is in the future and whose email_verified is true. The subject is sub and the display name email. Add openid and email to add_scopes so the provider sends it. |
{ style = "userinfo", url = "…", subject = "…", display = "…" } | url: the account endpoint; subject and display: top-level fields of its JSON answer | One GET of url with the new access token. subject holds a stable identifier (a number is kept as its decimal text) and display the name --account must match. The issuer is the URL’s origin. |
Rotation
always means every refresh may retire the refresh token it spends. The service then writes a marker to the record
before it sends the refresh and stores the new refresh token before it uses the new access token, so a crash at any
point leaves either a usable token or a record that needs login, never a spent token sent again. A provider that
rotates only sometimes is always.
never means a refresh writes nothing to disk, unless the provider does send a refresh token. A rotating provider
declared never fails closed: after a crash at the wrong moment its record needs login. When unsure, choose always.
Resource hosts
A pattern is a lowercase DNS name, which matches only that host, or *. followed by a DNS name, which matches exactly
one more label, as in a TLS certificate: *.example.com matches api.example.com but neither example.com nor
a.b.example.com. A pattern names hosts only, so any port matches.
A name on the Public Suffix List, bare or after *., is refused, since its subdomains
belong to many owners: com, co.uk, github.io and googleapis.com are all on it. The check uses the copy of the
list built into Iron Vault and runs at enrollment only.
login --origin must match a resource host, and a route naming the account record may send its access token only to
one of the record’s origins.
Timing
The refresh margin for never is refresh_margin_seconds, capped at half the token’s lifetime, so a provider whose
tokens live shorter than the margin doesn’t refresh on every request. For always it is the larger of the two, so a
rotating refresh starts at half the lifetime, which leaves time for the service-wide lock to come free.
While the last refresh attempt started less than min_retry_seconds ago, a request uses the current token if it is
still valid and otherwise gets 503 with the reason token_unavailable. This keeps a caller that keeps getting 401
from causing a refresh per request.
Shipped definitions
# google
authorize = "https://accounts.google.com/o/oauth2/v2/auth"
token = "https://oauth2.googleapis.com/token"
authorize_params = { access_type = "offline", prompt = "consent" }
scopes = "required"
add_scopes = ["openid", "email"]
account = { style = "id_token", issuers = ["https://accounts.google.com", "accounts.google.com"] }
rotation = "never"
client_auth = "client_secret_post"
revoke = { style = "rfc7009", url = "https://oauth2.googleapis.com/revoke" }
resource_hosts = ["gmail.googleapis.com", "www.googleapis.com"]
googleapis.com is a public suffix, so the definition names Gmail’s host and www.googleapis.com, which Calendar uses.
Another Google API host needs a definition that names it.
# github-app
authorize = "https://github.com/login/oauth/authorize"
token = "https://github.com/login/oauth/access_token"
scopes = "none"
account = { style = "userinfo", url = "https://api.github.com/user", subject = "id", display = "login" }
rotation = "always"
client_auth = "client_secret_post"
revoke = { style = "none" }
resource_hosts = ["api.github.com"]
GitHub’s revocation call isn’t RFC 7009, so this definition says none.
When a definition is refused
add --kind oauth-client reads the definition before any prompt and answers
credential-invalid with a message that starts invalid provider definition:
and names the rule. Where the parser can place the fault, the message ends with its place in the file, such as
at line 3, column 9. Nothing is written.
| Fault | Message |
|---|---|
| unknown field | unknown field `token_lifetime`, expected one of `authorize`, `token`, … |
| missing field | missing field `token` |
endpoint not https | an endpoint follows the rules for a route's upstream URL: upstream URL must start with "https://" |
| endpoint with a query | an endpoint follows the rules for a route's upstream URL: upstream URL must not contain a query |
| another redirect | redirect must be exactly http://127.0.0.1:<port>/, with a port from 1 to 65535 and nothing else |
| a parameter the service sets | authorize_params sets "state", which the service sets itself |
| a malformed host pattern | a resource host is a lowercase DNS name, or *. followed by one |
| a public suffix | resource host co.uk names a public suffix, whose subdomains belong to many owners |
| refresh margin out of range | refresh_margin_seconds is 10; it must be from 30 to 1800 |
Errors
Iron Vault refuses things in two places, and each has its own vocabulary:
- Admin commands (
init,unlock,config approve,addand the rest) talk to the service over the admin socket. A refused command ends with an error code: a stable number and name that scripts can act on, and a message for you that may change between releases. - Proxied requests get an HTTP status with a short fixed body. The audit log records the same request with a
reasonthat says exactly which check refused it.
Terms follow the glossary. The audit log reference lists every log field, and the service states page explains Locked, Checking, Ready and Unavailable, which many of these errors name.
Admin error codes
The CLI prints a refused command as one line on stderr and exits with status 1:
iron-vault: the service answered error 13 (wrong-state): ...
The number and the name are fixed; the text after them is the service’s message. A message never repeats a secret or
passphrase you typed, so it is safe to paste into a ticket, though it may name routes, credentials and hosts. For
three codes the CLI adds a line saying what to do: not-admin-principal, unsupported-version and
memory-unprotected.
The other exit statuses are 0 for success, 2 for a usage error caught before anything was sent, 3 when no answer
came back (the service is not running, this account may not connect, the exchange failed, a prompt got no value, or a
secret value the service sent could not be shown on a terminal), and 4 when status found the service in a state
other than Ready, or list found no vault open.
config check never reaches the service, so it has no error codes. It exits 0 for a config that parses and validates,
1 for one that does not (the line on stderr names the key, line and column), and 2 when the file cannot be read or is
longer than 61440 bytes. A config that passes can still be refused by config approve with config-invalid, because
only the service can check the credentials, accounts and upstream settings.
Protocol and connection
These can happen on any command.
| Code | Name | Meaning | What to do |
|---|---|---|---|
1 | unsupported-version | The CLI and the service speak different admin protocol versions. | Install the same release of the CLI and the service. In a protected install both are /usr/bin/iron-vault, so this means a service still running the old binary: restart it. |
2 | malformed-frame | A message on the admin socket broke the protocol’s rules. | This is a bug, or something other than the iron-vault CLI is talking to the socket. Report it with the command you ran. |
3 | unknown-command | The service does not know the command. | The CLI is newer than the service. Restart the service on the new binary. |
4 | unexpected-frame | A message arrived out of turn in the exchange. | As for malformed-frame. |
5 | not-admin-principal | The account you ran the command as may not use the admin socket. Nothing it sent was read. | In a protected install, run the command with sudo: only root is an admin principal. In a container, that is root on the host: run sudo iron-vault … on the host, against the bind-mounted admin socket. A plain docker exec arrives as the service’s own uid and is refused. In development, run it as the account that runs iron-vault serve. |
6 | busy | The service is already serving as many admin connections as it allows, or another command holds the lock this one needs. | Wait for the other command to finish, then try again. |
13 | wrong-state | The command is not allowed in the service’s current state. The message names the state. | See which commands run in which state. For example, unlock needs Locked, add needs Ready, and init needs Locked with no vault. |
init
| Code | Name | Meaning | What to do |
|---|---|---|---|
8 | declined | You did not type yes when asked to confirm you saved the recovery key. Nothing was written. | Run init again when you are ready to store the key. |
17 | already-initialized | The state directory already holds a vault, or files init did not write. Nothing was changed. | init never overwrites a vault. If you meant to start over, see Start over in development mode. If the key was already shown, discard it: it opens nothing. |
18 | passphrase-rejected | A passphrase broke a rule: it is under 12 characters, the two copies differ, or the vault and approval passphrases are the same. The message names the rule. | Choose a passphrase that meets the rule. |
19 | init-failed | A write failed. The message names the step. | Fix the cause the message names, then run init again: it discards the unfinished vault first. Discard the recovery key shown, unless the message says to keep it until the re-run decides. |
27 | memory-unprotected | A protected or container install’s memory is not locked against swap, so init would put the new keys and passphrases in swappable memory. Nothing was written, and no prompt was shown. | Raise the memory-lock limit as for unlock (see unlock), restart the service and run init again. |
unlock
| Code | Name | Meaning | What to do |
|---|---|---|---|
14 | unlock-denied | The vault passphrase was wrong. | Try again. After 5 wrong passphrases the attempt limit applies (unlock-rate-limited). |
15 | unlock-failed | The vault did not open for a reason other than the passphrase, such as a damaged or unreadable file. The service stays Locked. | Read the message and the log’s vault.* events. iron-vault recovery check tells you whether the recovery key still opens the vault. |
16 | unlocked-unavailable | The vault opened, but the config check failed, so the service is Unavailable. The message names the redacted reason. | Run status, and read the config.check-failed event in the log. For policy invalid, approve a good config with config approve. |
27 | memory-unprotected | A protected or container install’s memory is not locked against swap, so the vault was not opened. The service stays Locked. recovery check refuses with this code too. | Raise the memory-lock limit: LimitMEMLOCK=infinity on the systemd unit, or ulimits: memlock: -1 under Docker Compose. Then restart the service and unlock again. |
34 | unlock-rate-limited | Too many wrong vault passphrases, here or in migration authorization. No prompt was sent. The message gives the seconds to wait. | Wait that long. The cooldown starts at 30 seconds and doubles up to 15 minutes. lock does not clear it. |
unlock --recovery
The checks before the first prompt are unlock’s, except that the attempt limit is the recovery key’s own. Every
refusal leaves the vault files as they were, and the service Locked.
| Code | Name | Meaning | What to do |
|---|---|---|---|
13 | wrong-state | The service is not Locked. | Run iron-vault lock first, then unlock --recovery. |
14 | unlock-denied | The key does not open this vault, or opens it but is not one of its recovery keys. | Find this vault’s recovery key. If none is left, see Reset the vault. After 5 wrong keys the recovery key attempt limit applies. |
15 | unlock-failed | The vault is not initialized, a file could not be read or is malformed, the inventory check could not write, or a write step failed. For a write step, the message says which vault passphrase opens the vault now. | Read the message and the log’s vault.recovery-unlock-failed. After a failed write step, run unlock --recovery again. |
16 | unlocked-unavailable | The new vault passphrase is in force, but the config check after it left the service Unavailable. | As for unlock: run status, and read config.check-failed in the log. |
18 | passphrase-rejected | The new vault passphrase is under 12 characters, its two copies differ, or it opens an approver key. The message names the rule. | Run the command again with a passphrase that meets the rule. |
27 | memory-unprotected | As for unlock. | As for unlock. |
30 | recovery-key-invalid | The text is not a recovery key: it does not look like AGE-SECRET-KEY-1.... No passphrase was asked for. | Check you pasted the whole key. This does not count as a wrong key. |
34 | unlock-rate-limited | Too many wrong recovery keys. Wrong vault passphrases do not count here. The message gives the seconds to wait. | Wait that long. The cooldown starts at 30 seconds and doubles up to 15 minutes. |
38 | recipient-set-invalid | The vault already has 64 recipients, so the new vault passphrase cannot be enrolled. | Remove a recipient you no longer need with recipient remove. That needs the approval passphrase. |
39 | recipient-inventory-damaged | The recipient inventory (recipients.age) is missing or damaged, so the other recipients could not be kept. | Do not delete or rewrite either file. With the vault passphrase lost, the way out is reset. |
config approve
| Code | Name | Meaning | What to do |
|---|---|---|---|
7 | config-invalid | The proposed config does not parse, does not validate, or would not activate. Nothing was reserved, and the active config is unchanged. | Fix what the message names and approve again. A common case: a route sends a credential to a host its record does not permit, which only replace can change. |
8 | declined | You did not type yes at the summary. | Nothing was changed. |
9 | approval-denied | The approval passphrase did not open the approver key, the key it opened is not the vault’s pinned approver, or the TPM refused a TPM approver’s PIN. Nothing was reserved. | Type the approval passphrase, not the vault passphrase. For a TPM approver, type its TPM approval PIN; each wrong PIN counts against the TPM’s lockout, so stop after one miss. |
10 | approval-unavailable | The service cannot run an approval now, no pinned approver can be asked on this install, the TPM signing helper refused a TPM approver for a reason other than its PIN or a lockout (the message names its status), or a lock cancelled the approval at its prompt. No version was reserved. | Read the message; the service may be in a state that cannot approve. Try again once status shows Ready, or Unavailable with policy invalid. |
11 | approval-failed | The approval failed after it reserved a version and before it committed. That version number is used up. | Read config.approval-failed in the log for the step, fix it and approve again. The next approval gets a higher version. |
12 | committed-not-active | The approval committed, but it was not published or did not activate, so the service is Unavailable. | Run status and read config.activation-failed in the log. Approve a corrected config to recover. |
Credentials: add, replace, rm, list
| Code | Name | Meaning | What to do |
|---|---|---|---|
20 | name-taken | add: a credential of that name exists, healthy or damaged. add never overwrites. | Use replace to change it, or choose another name. |
21 | credential-invalid | add, replace, rm: the name, an origin or the secret breaks its rule. The message names the rule, never what you typed. | Fix the argument. Names are what routes reference; origins are host or host:port, without a scheme. |
22 | vault-write-failed | add, replace, rm, recipient remove: writing the vault failed. The message says whether the change may have committed. | Run list to see what the vault now holds, fix the cause (often disk space or permissions) and retry. |
23 | unknown-credential | replace, rm: no credential of that name. | Check the name with list. |
24 | credential-in-use | replace, rm: a route of the active config uses the credential and would not activate after the change, or the credential is the client record of an OAuth account record. For rm the message names each route; for replace, each route and why; for a client record, the account record. login: a route that uses the account record would not activate with the requested origins. | For rm, approve a config without those routes first. For replace, give origins that still suit the routes. For a client record, remove the account record or sign it in again with another client first. For login, ask for origins that still suit the routes. |
9 | approval-denied | replace, rm, recipient remove: the approval passphrase was wrong, or opened a key that is not the asked approver’s. Nothing was written. | Type the approval passphrase. |
10 | approval-unavailable | replace, rm, recipient remove: owner presence could not be checked, or a lock cancelled the change at its passphrase prompt. Nothing was written. | Unlock if needed, and run the command again. |
12 | committed-not-active | replace, rm: the change committed, but the config check after it left the service Unavailable. | Run status and read the log’s config.check-failed. |
26 | list-too-large | list: the credential list does not fit one admin message. The message gives the count. | Remove credentials you no longer need. |
caller-token
| Code | Name | Meaning | What to do |
|---|---|---|---|
25 | random-source-failed | The operating system’s random source failed, so no token was made. | This points to a broken host. Check the kernel log; do not work around it. |
recovery check
| Code | Name | Meaning | What to do |
|---|---|---|---|
30 | recovery-key-invalid | The text is not a recovery key: it does not look like AGE-SECRET-KEY-1.... | Check you pasted the whole key from where you stored it. |
31 | recovery-check-failed | The key does not open this vault. | This is not the key for this vault. Find the right one; if you cannot, the vault has no working recovery key. See Check and store your recovery key. |
32 | recovery-check-unavailable | The vault is not initialized, or a file the check reads could not be read or is malformed, so the key was not judged. | Read the message, which names the file and error kind. |
recipient list, recipient add and recipient remove
| Code | Name | Meaning | What to do |
|---|---|---|---|
8 | declined | recipient add --recovery: you did not type yes when asked to confirm you saved the new recovery key. Nothing was changed, and the key shown opens nothing. | Discard the key shown, and run the command again when you are ready to store a new one. |
35 | recipient-invalid | The key is not an age1... X25519 recipient key, or (for recipient add) the label breaks its rule. The message names the rule. | Copy the key from recipient list, or check the key and the label you typed. |
36 | recipient-enrolled | recipient add: the key is already enrolled. It was refused before any prompt. Nothing was changed. | Run recipient list to see the enrolled keys. |
37 | unknown-recipient | recipient remove: no enrolled recipient has this key. Nothing was changed. | Run recipient list and copy the key from it. |
38 | recipient-set-invalid | recipient add: the set after the change would break the independence rule or hold more than 64 recipients. recipient remove: the vault would be left without its operational recipient or without a recovery recipient, or, in a Protected or Container service, the key is the host-unlock recipient whose identity the unlock handoff holds. The message names which part. Nothing was changed. | Read the message. The vault always needs its operational recipient and one recovery recipient. To replace the host unlock identity, enrol the new one with recipient add --host-unlock and restart until the stack reaches Ready with no unlock, then remove the old one. To retire host unlock, stop and disable the handoff unit and remove its credential first. |
39 | recipient-inventory-damaged | The recipient inventory (recipients.age) is missing or damaged, or does not describe the identity.age on disk. The message names the damage. Nothing was changed, and the service stays Ready. | Do not delete or rewrite either file. A vault initialized before recipient commands has no inventory, and the message says so. Keep your recovery key, which opens the vault without the inventory. |
All three commands also answer wrong-state outside Ready, busy while another command holds the service-wide lock, and
vault-write-failed when settling a staged recipient change failed or, for recipient add and recipient remove, the
change itself did; the message says whether it may have committed.
forget-machine
| Code | Name | Meaning | What to do |
|---|---|---|---|
52 | machine-not-forgotten | The key is still a recipient of the vault. The message gives its role and says to run recipient remove with the same key. Nothing was changed. | Run the command the message names, then forget-machine again. If recipient remove refuses because the key is this machine’s own host unlock identity, run forget-machine on the vault that stays. |
forget-machine also answers recipient-invalid for a key that is not an age1... recipient key, wrong-state
outside Ready, busy while another command holds the service-wide lock, recipient-inventory-damaged and vault-write-failed as the
recipient commands do. A warning (a recovery check that is overdue, has never run or is not on record, or a broken
independence rule) is not an error: it goes to stderr and the exit status is 0.
login
login signs a provider account in to an OAuth account record, under a new name or over an account record. Signing
the same account in again through the same client needs no approval passphrase; another account or client, or an
added scope or origin, does. A name that holds any other record, or a damaged one, answers name-taken. When a login
is refused, no record changes.
| Code | Name | Meaning | What to do |
|---|---|---|---|
53 | not-implemented | The service knows the command but this build does not carry it out. Nothing was changed. No command answers it in this release. | Check that the CLI and the service are the same release. |
54 | client-invalid | --client names no credential, a damaged one, or one that is not an OAuth client record. | Check the name with list; enrol the client first. |
55 | address-invalid | The pasted address does not parse, is not the redirect address the consent URL named, or lacks exactly one state and one code. | Run login again and paste the whole address from the browser’s address bar. |
56 | state-mismatch | The pasted address belongs to another login: its state is not the one this exchange made. | Run login again, and paste the address from the consent URL this run showed. |
57 | consent-refused | The pasted address carries an error: you or the provider refused consent. The message is fixed: it never repeats what you pasted. | Run login again and approve the consent screen. |
58 | provider-request-failed | The token request or the account request failed, was refused, or its response did not parse, or its answer has no refresh token. The message names the request (token or account) and the HTTP status or error kind, never a response byte. | Check the network and the client record, then run login again. A refused code cannot be redeemed twice. |
59 | account-unverified | The provider’s answer does not prove which account signed in. | Check that the client record’s provider definition matches the provider, then run login again. |
60 | account-mismatch | The account the provider verified is not --account. | Sign in to the browser as the account you named, or name the account you meant. |
61 | scopes-missing | The provider granted fewer scopes than you asked for; the message names the missing ones. Google lets you untick scopes. | Run login again and leave every requested scope ticked. |
62 | account-taken | Another account record already holds this account with this client. | Use that record, or remove it with rm before signing in under a new name. |
login also answers wrong-state outside Ready, busy while another command holds the service-wide lock,
name-taken when the name holds a record that is damaged or not an OAuth account record, credential-in-use when a
route that uses the account record would not activate with the requested origins, credential-invalid for a name,
scope or origin that breaks its rule or the client’s provider definition, approval-denied, approval-unavailable and
tpm-locked-out when owner presence fails, random-source-failed, and vault-write-failed and
committed-not-active as replace does.
approver add and approver remove
| Code | Name | Meaning | What to do |
|---|---|---|---|
40 | approver-invalid | approver add: the label breaks its rule. approver remove: the ID is not a version 4 UUID. The message names the rule. Nothing was changed. | Give a label of 1 to 64 bytes with no control characters, or copy the approver ID from approver list. |
41 | unknown-approver | approver remove: no pinned approver has this ID. It was refused before any prompt. Nothing was changed. | Run approver list and copy the ID from it. |
42 | approver-set-invalid | approver add: 16 approvers are already pinned. approver remove: it is the last approver. export: no software approver is pinned, and a TPM approver’s key cannot move to another machine. Each was refused before any prompt. Nothing was changed or exported. | For add, remove an approver you no longer use first. The last approver stays: enroll another one before you remove it. For export, enroll a software approver with approver add first. |
43 | approver-in-use | approver remove: this approver signed the active approval, and removing it would stop the active config verifying and take every route down. It was refused before any prompt. Nothing was changed. | Approve the config again with another approver (switch to it at the prompt), then remove this one. |
44 | approver-kind-unavailable | This install does not offer that signer kind, or cannot make that kind of signer now. software is always offered; tpm only on a protected or Compose install whose TPM signing helper socket exists; hardware is not built yet. For tpm, the message names why the helper refused (a lockout is tpm-locked-out, below). Nothing was changed. | Leave out --kind, or use --kind software. For tpm, fix what the message names, such as raising the TPM’s dictionary-attack lockout interval to at least 600 seconds. |
9 | approval-denied | The passphrase did not open the asked approver’s key. The vault passphrase and a recovery key never authorize an approver change. Any pinned approver may authorize a removal, the one being removed included. Nothing was written. | Type the approval passphrase of the approver the prompt names, or switch to another approver. |
10 | approval-unavailable | Owner presence could not be checked, or a lock cancelled the change at its passphrase prompt. Nothing was written. | Unlock if needed, and run the command again. |
18 | passphrase-rejected | The new approval passphrase is under 12 characters, or the two copies differ. Nothing was written. | Run the command again and choose a passphrase that meets the rule, different from the vault passphrase. |
22 | vault-write-failed | The approval state (approval.age) did not read back before any prompt, or the enrollment or removal failed. The message says whether it may have committed. | When the message says nothing was changed, read the log’s approver.change-failed and fix its cause. When it may have committed, check the approvers before trying again. |
Both also answer wrong-state outside Ready (approver add also when a lock cancels it at the new passphrase
prompt), and busy while another command holds the service-wide lock.
TPM approvers
| Code | Name | Meaning | What to do |
|---|---|---|---|
51 | tpm-locked-out | config approve, replace, rm, recipient remove, recipient add, approver add, approver remove and export: the TPM is in dictionary-attack lockout, or the signing helper is holding back its share of the tries to keep the rest for other users of the TPM. The message gives the whole seconds to wait. Nothing was reserved, signed or changed. | Wait that long, or switch to another approver at the prompt (the software approver is unaffected). The TPM forgets one wrong try per lockout interval. |
reset
| Code | Name | Meaning | What to do |
|---|---|---|---|
49 | nothing-to-reset | No vault file is there, at the request or after you confirmed. The message says to run init, or names the first file that is there and says to move it aside first. Nothing was removed. | Run iron-vault init, or move the named file aside. |
50 | reset-failed | Writing the reset marker or removing a file failed. The message says whether the vault is intact (the marker was not written) or the next reset finishes the job. | Fix the cause the message names, then run iron-vault reset again. status shows reset unfinished until it ends. |
reset also answers wrong-state in Starting, Checking and Stopped, and declined when what you typed does not
match, or when the vault changed between the summary and your confirmation. When stdin is not a terminal or /dev/tty
cannot be opened, the CLI exits with 3 before it connects.
Migration authorization
recipient add and export share these codes.
| Code | Name | Meaning | What to do |
|---|---|---|---|
28 | migration-denied | Migration authorization was refused: the vault passphrase or TPM approval PIN was wrong, the envelopes the passphrase opened are not this vault’s, or the authorization expired, was used already or is for another operation. Nothing was exported or rewrapped. | Start the command again with the right vault passphrase or PIN. Each wrong PIN counts against the TPM’s lockout. |
29 | migration-unavailable | Migration authorization could not be checked (for a TPM approver, the message names the signing helper’s status), no method could be asked, or a lock cancelled the command at its authorization prompt, or at export’s export passphrase prompts. Nothing was exported or rewrapped. | Read the message and try again, or switch to the vault passphrase at the prompt. |
33 | migration-rate-limited | Too many wrong vault passphrases in a row. The message gives the seconds to wait. | Wait that long. The limit is the one unlock shares. |
Migration bundle
export raises export-failed; import raises the other three. import also answers declined, already-initialized,
passphrase-rejected, memory-unprotected and wrong-state as init does, and busy while another init or import
holds the service. export also answers passphrase-rejected when the export passphrase is
under 12 characters or its two copies differ, and wrong-state outside Ready.
| Code | Name | Meaning | What to do |
|---|---|---|---|
45 | export-failed | export: the snapshot checks found damage before any prompt, or the snapshot or the transfer failed after you authorized it: a deadline passed, or a lock cancelled it between frames. The message names the step and, for a file, its name and the error kind. No bundle was completed. | Read the message, fix what it names, and run export again. |
46 | bundle-invalid | import: the bytes are not a migration bundle this version reads, are larger than the limit, or fail a check with the vault identity. The message names the rule or check, never a byte of the bundle. Nothing was written. | Export the bundle again from the source with a matching version. |
47 | import-denied | import: the export passphrase does not open the bundle’s identity envelope. Nothing was written. | Run import again with the passphrase chosen at export. |
48 | import-failed | import: --host-unlock was asked for and the service has no host unlock identity to enrol (a build or profile without host unlock, an absent handoff, or one that is not trusted), raised before any prompt so nothing was written; or a write failed. The message names the reason or the step. | For a missing host unlock identity, provision the handoff and run import again, or run it without --host-unlock and enrol later with recipient add --host-unlock. For a failed write, run import again: it discards the unfinished import. Follow the message’s advice about the recovery key shown. |
Proxy refusals
A refused request gets one of these statuses. Each status has one short fixed body, whichever check refused the request, so a
caller learns nothing about other callers’ routes. The reason is in the log’s request.completed record, never in
the response. A refusal before the route’s credential is added sends nothing upstream.
| Status | Body | reason values |
|---|---|---|
400 | bad request, or for a request form the service does not accept, the rule broken (below) | connect_not_supported, not_origin_form, upgrade_not_supported, unsupported_version, bad_target, bad_method, bad_header, ambiguous_framing, foreign_marker, malformed_marker |
401 | unauthorized | unauthenticated |
403 | forbidden | not_granted, method_not_allowed, path_not_allowed |
404 | not found | no_route |
408 | empty | request_timeout |
413 | empty | request_too_large |
429 | too many requests, with Retry-After in whole seconds | rate_limited |
500 | internal error | service_defect |
502 | bad gateway | upstream_connect, upstream_tls, upstream_protocol, upstream_body, unsupported_coding, redirect_refused |
503 | the unavailable reason (locked, policy invalid, checking or recovery needed), or service unavailable | locked, policy_invalid, checking, recovery_needed, withdrawn, route_unavailable, credential_unavailable, credential_needs_login, token_unavailable, credential_unusable |
504 | gateway timeout | upstream_timeout |
400: the request is malformed
reason | Cause | What to do |
|---|---|---|
connect_not_supported | A CONNECT request. The body is CONNECT is not supported. | Iron Vault is a base-URL proxy, not a forward proxy. Point the application’s base URL at the route prefix instead of setting HTTPS_PROXY. |
not_origin_form | The request target is not a path such as /route/..., for example a full URL. The body is the request target must be origin-form. | As above: use the route prefix as the base URL. |
upgrade_not_supported | A protocol upgrade, such as WebSocket. The body is protocol upgrades are not supported. | Not supported in v0. |
unsupported_version | Not HTTP/1.0 or HTTP/1.1. The body is only HTTP/1.0 and HTTP/1.1 are supported. | Configure the client for HTTP/1.1. |
bad_target | The path or query broke a rule, such as a .. segment or an encoded separator. | Fix the URL the application builds. |
bad_method | The method is not one a route may allow. | Use a standard method. |
bad_header | A request header could not be read. | Fix the client. |
ambiguous_framing | The request’s length is ambiguous, for example both Content-Length and Transfer-Encoding. | Fix the client. |
foreign_marker, malformed_marker | The request holds a credential placeholder that is not this route’s, or is malformed. | Check the placeholder the application sends where its API key goes. |
401, 403, 404: who may use what
Status and reason | Cause | What to do |
|---|---|---|
401 unauthenticated | No caller token, a wrong one, or a peer account no caller names. | Send the token in Proxy-Authorization: Bearer <token>, or in the listener’s token_header. After a token rotation, the old one stops working at once. |
403 not_granted | The caller is known but its routes do not include this route. | Grant the route in the caller’s table and approve. |
403 method_not_allowed | The route’s methods do not allow this method. | Widen methods, or call it differently. See Widen or narrow a route. |
403 path_not_allowed | The route’s paths do not match. Patterns match the path after the route prefix, as the provider documents it, without the upstream’s base path. | Check paths against the path you call after the prefix; leave the upstream’s base path out. |
404 no_route | No route has this prefix. Every caller gets the same answer, so it reveals nothing about other callers’ routes. | Check the prefix in the URL. |
An upstream’s own 401 is relayed as it came, with outcome success and no reason. On a route that names an OAuth
account, Iron Vault also drops the access token that request carried, so the next request refreshes it once the
provider’s minimum retry interval has passed. It never sends the request again.
413, 408 and 429: limits
Status and reason | Cause | What to do |
|---|---|---|
413 request_too_large | The request body is over max_request_body_bytes, declared or as it streamed. | Send less, or raise the limit in [limits] and approve. |
408 request_timeout | The service had not answered within request_timeout_secs. | Check the upstream’s latency, or raise the limit in [limits] and approve. |
429 rate_limited | The route’s or caller’s token bucket is empty. Retry-After says when a request will pass. | Wait, or raise rate_limit and approve. |
500: a service defect
service_defect means a final check that should never fail did. Nothing was sent upstream. It is also logged as
request.defect at ERROR, with the label of the check. Report it as a bug with that record.
502 and 504: the upstream
Status and reason | Cause | What to do |
|---|---|---|
502 upstream_connect | The service could not connect to the upstream. | Check DNS and the network from the service’s host. |
502 upstream_tls | The upstream’s TLS certificate did not verify. | Iron Vault never skips verification. For a private CA, set the route’s ca_file. |
502 upstream_protocol | The upstream broke the HTTP protocol. | Check the upstream URL is an HTTPS API. |
502 upstream_body | The upstream’s body stopped before its end. | Usually the upstream’s problem; retry. |
502 unsupported_coding | The response uses a content coding the scrubber cannot decode, so it could not be screened for secrets. | The service decodes gzip, deflate and br. Ask the upstream for one of those, or for none. |
502 redirect_refused | The upstream redirected outside the route’s upstream base path, or sent an ambiguous Location. | Expected for a redirect that could land in another route. A redirect to another site is passed through instead. |
504 upstream_timeout | The upstream sent no response headers within upstream_timeout_secs, or before the request deadline. | Check the upstream, or raise the limit in [limits] and approve. |
503: not available now
When the service is not Ready, every request gets 503 before any caller is identified, and the body is the reason
itself:
| Body | reason | Meaning | What to do |
|---|---|---|---|
locked | locked | The service is Starting or Locked. | iron-vault unlock. |
checking | checking | A config check is running: after an unlock, a reload, an approval or a credential change. | Retry in a moment. |
policy invalid | policy_invalid | The config or its approval did not verify, for example after a hand edit. | Approve a good config: see Tamper detection and recovery. |
recovery needed | recovery_needed | Shared vault state is damaged, or a committed change is unfinished. | Read vault.shared-state-damaged or config.activation-failed in the log, and its remediation. |
When the service is Ready but this request cannot be served, the body is service unavailable:
reason | Meaning | What to do |
|---|---|---|
route_unavailable | The route cannot serve: its pinned CA did not load, or it has no upstream client. | status lists route faults; the log has route.pinned-ca-unavailable. |
credential_unavailable | The route’s credential record is damaged, or the OAuth client record an OAuth account names is missing or damaged. Other routes keep working. | status shows the credential as damaged; repair it with replace. |
credential_needs_login | The route’s OAuth account needs a new login. Other routes keep working. | status shows the credential as needing login, with its cause; sign in again. |
token_unavailable | The route’s OAuth account has no access token now: the last refresh failed, or an upstream 401 dropped the token, and the next refresh waits for the provider’s minimum retry interval. For a GitHub App account, also while an admin command holds the vault and the token has expired, or while a refreshed token waits for its refresh token to be written. | Retry after the provider’s minimum retry interval: 60 s for Google, 300 s for a GitHub App. If it persists, credential.refresh-failed or credential.refresh-write-failed in the log says why. |
credential_unusable | The record loaded but its kind could not produce the request’s credential. | Replace the credential with one of the right kind. |
withdrawn | The policy changed while the request waited, and its snapshot was withdrawn. | Retry. |
Failures after the response started
Some failures happen after the status line has gone to the caller. The status in the log is then that head’s, the
caller’s connection is cut, and the reason says why:
reason | Meaning |
|---|---|
body_corrupt | The upstream’s compressed body did not decode. |
body_truncated | The upstream’s body ended early. |
body_size_limit, body_ratio_limit | The decoded body passed the size limit or the decompression ratio limit. |
body_encode | Re-encoding the scrubbed body failed. |
upstream_body | The upstream’s body stopped. |
deadline | The request deadline passed while the body streamed. |
caller_gone | The caller closed the connection. |
service_closed | The service closed the connection: a lock, a stop, or a config change that dropped the listener. |
Refusals with no log record
A few refusals happen before Iron Vault’s code sees a request, so they write no request.completed: hyper’s own 431
for oversized headers and 414 for an oversized target, a connection closed because max_connections are open (a
WARN diagnostic record), and a TLS handshake or header read that timed out.
Service states
The service is always in one of five states: Starting, Locked, Checking, Ready or Unavailable. The state decides what
the request listeners do with a request and which admin commands run. Only Ready serves requests; every other state
answers 503 with a short reason, so a caller can tell a locked vault from a broken one
(§15).
Terms follow the glossary. The errors reference lists every refusal these states cause.
The state diagram
stateDiagram-v2
[*] --> Starting
Starting --> Locked: interactive unlock required
Starting --> Checking: TPM or host unlock succeeds and memory is locked
Locked --> Checking: authorized unlock succeeds and memory is locked
Checking --> Ready: storage and current approval verify
Checking --> Unavailable: invalid policy or damaged shared state
Ready --> Checking: explicit reload
Ready --> Locked: explicit lock or configured key removal
Unavailable --> Checking: authorized repair or committed transaction recovery
Unavailable --> Locked: explicit lock
Ready --> [*]: stop and clear memory
The diagram is the one in the specification. The table below says the same in words.
| From | To | When |
|---|---|---|
| Starting | Locked | The vault needs an interactive unlock: every Development start, and a Protected or Container start whose host unlock handoff was absent or refused. |
| Starting | Checking | A host unlock succeeded: in the Protected and Container profiles, the unlock handoff opened the vault at startup. On a protected install the host’s handoff unit unseals that identity from the TPM (TPM unlock). |
| Locked | Checking | iron-vault unlock succeeded. |
| Checking | Ready | The config check passed: storage and the current approval verify. |
| Checking | Unavailable | The config check failed: the policy is invalid, or shared state is damaged. |
| Ready | Checking | A reload (SIGHUP), a config approve about to commit, or a committed replace or rm. |
| Ready | Locked | iron-vault lock. Key removal (a YubiKey) comes in a later phase. |
| Unavailable | Checking | A config approval from policy invalid, or an authorized repair. |
| Unavailable | Locked | iron-vault lock. |
| Ready | stopped | The service stops and clears its memory. |
Any other move is refused, not performed. status can also print stopped, a marker for a service that has stopped
from Ready; it is not one of the five states.
What each state means
| State | Vault identity in memory | Requests get | What to do |
|---|---|---|---|
| Starting | no | 503 locked | Wait; it lasts a moment. |
| Locked | no | 503 locked | iron-vault unlock, or iron-vault init if there is no vault yet. |
| Checking | yes | 503 checking | Wait for the check to finish. |
| Ready | yes | served | Nothing. |
| Unavailable | yes, but no policy or records | 503 policy invalid or 503 recovery needed | Read status and the log’s config.check-failed. For policy invalid, approve a good config. |
While the service is not Ready, the request listeners come from the published config.toml without its approval
verified. They answer only 503 with the reason: they never identify a caller, select a route or touch a credential.
That way a caller sees why it is refused, instead of a refused connection.
A listener that cannot be opened, whether provisional or approved, is left out and the others keep serving, so the
state does not change. iron-vault status lists it under Listeners not open: with a reason: tls-key-mismatch,
tls-file-unreadable, tls-certificate-invalid, tls-key-unusable, address-in-use, plain-http-off-loopback,
socket-path, socket-activation-missing, socket-activation-mismatch or bind-refused. The log names the path or
address. Fix the cause and approve a config again to open it; the entry drops off when the listener opens or the config
no longer names it.
Unavailable has two reasons:
- policy invalid: the config or its approval did not verify, or a verified config would not activate. A hand edit of the published config is the usual cause (Tamper detection and recovery). Approving a good config moves the service through Checking to Ready.
- recovery needed: the vault’s shared state is damaged, or a committed change could not be finished. The log’s
remediationfield says what to do.
A damaged credential record is not a state. Only the routes that use it answer 503, and the rest keep working.
status lists it. The same goes for an OAuth account record that needs login or is unusable.
Admin commands by state
ping, status and caller-token run in every state. list runs in every state too, but shows credentials only
when the vault is open. The rest run only where this table says; elsewhere they are refused with wrong-state, or for
config approve with approval-unavailable.
| Command | Starting | Locked | Checking | Ready | Unavailable |
|---|---|---|---|---|---|
unlock, unlock --recovery | yes | ||||
init, import | yes | ||||
recovery check | yes | yes | |||
lock | yes | yes | |||
config approve | yes | policy invalid only | |||
add, replace, rm, export | yes | ||||
| reload (SIGHUP) | yes |
A SIGHUP in any state but Ready is ignored, so a reload is never a way out of Unavailable.
status
iron-vault status prints one field per line, in a fixed order. It changes nothing, holds no secret, and works in
every state. It exits 0 when the service is Ready and 4 otherwise, so a script can wait on it.
service: ready
profile: development — no isolation from malware running as alice
vault: unlocked
vault id: 2a682de7-b14d-4900-9ea9-0c968e1a6589
approval committed: 4
approval highest reserved: 4
memory protection: NOT protected, swap protection unavailable (RLIMIT_MEMLOCK soft limit is 8315834368 bytes, not unlimited)
recovery last checked: 2026-11-06 (1 day ago)
credential httpbin_key: healthy
credential venice_chat: healthy
| Field | Values | Meaning |
|---|---|---|
service | starting, locked, checking, ready, unavailable, stopped | The service state. |
reason | policy invalid, recovery needed | Only when the service is unavailable: why. |
profile | protected, container, development — no isolation from malware running as <user> | The deployment profile, fixed when the binary was built (below). |
vault | locked, unlocked, not initialized (run iron-vault init), initialization unfinished (run iron-vault init again), import unfinished (run iron-vault import again), reset unfinished (run iron-vault reset again) | Whether a vault exists and is open. unlocked means Checking or Ready. Unavailable shows locked: a failed check closes the vault’s records, though the service keeps the vault identity. |
vault id | a UUID, or unknown | The vault’s ID. Unknown while no vault is open. |
approval committed | a number, none, or unknown while the vault is locked | The approval version of the active config. |
approval highest reserved | a number, or unknown while the vault is locked | The highest version ever reserved. Higher than the committed version after an approval that failed once it had reserved one. |
memory protection | locked against swap, NOT protected, swap protection unavailable (<why>), NOT protected, unsupported on this platform | Whether the service’s memory is kept out of swap. Only locked against swap means it is. |
host unlock | unlocked, absent, unseal_failed, owner_locked, refused | How the startup host unlock came out; the line is absent in the development profile, which tries none. unseal_failed means the host’s TPM unseal failed, as after a firmware dbx or KEK update, and the service waits for a passphrase unlock. |
recovery last checked | see below | When recovery check last proved the recovery key opens this vault. |
credential <name> | healthy, or damaged (<damage>); unavailable routes: <routes>, or needs login (<cause>); unavailable routes: <routes>, or unusable (<cause>); unavailable routes: <routes> | One line per credential, in name order. The damage is missing, substituted or unreadable. A needs-login cause is refused or uncertain. An unusable OAuth account record loaded but cannot serve: its cause is client missing, client damaged, not a client record (the record it names as its client is another kind), or origin outside resource hosts (it may reach a host its client’s provider definition does not list). |
credentials | none, unknown while the vault is locked | Printed instead of the credential lines when there are none, or they are unknown. |
route <name> | unavailable (pinned CA unavailable) | One line per route that cannot serve for a reason of its own. |
Listeners not open: | then one line per listener, <name>: <what failed> (<reason>) | Printed only when a listener failed to open; the reasons are listed above. |
The vault ID, the approval versions and the credentials are sealed with the vault identity, so they are unknown in
Starting, Locked and Unavailable, and status prints them as unknown.
recovery last checked takes one of these forms:
| Form | Meaning |
|---|---|
2027-02-01 (37 days ago) | The UTC date of the last good check, and the days since. today and 1 day ago for zero and one. |
never (reminders counting since 2026-11-06) | No check yet; reminders count from that date. |
unknown (the vault is not initialized) | There is no vault. |
unknown (no check record yet) | recovery.toml does not exist. |
unknown (the check record is unusable (<error kind>)) | recovery.toml could not be read. |
Any of these ends in , overdue inside the parentheses when a recovery reminder is due. Run iron-vault recovery check: see Check and store your recovery key.
Development mode and a protected install
The deployment profile is fixed at build time, never by config or flag, so a packaged binary cannot be switched into
development mode. Each profile is named in status, in ping, and as deployment_profile in every log record.
| Protected | Development | Container | |
|---|---|---|---|
| Built with | no feature (the .deb) | --features dev-mode | --features container |
| Runs as | the iron-vault system account | you | the iron-vault account in the image |
| Admin principals | root, so you use sudo | you | root only |
| Unlock at startup | from the host unlock handoff when one is there (files); otherwise Locked, unlock with the vault passphrase | none: starts Locked | from the host unlock handoff when one is there (files); otherwise Locked, as protected |
| Memory not locked against swap | stays Locked: unlock, init and import are refused with memory-unprotected | unlocks anyway; status says NOT protected | as protected |
| Callers | peer account, token or listener | token or listener only: a peer caller may never be the service’s own account, and in development that is you | see docker-compose.md |
| TCP listeners | from systemd socket units | bound by the service | bound by the service |
| Files | system paths | your XDG directories | the protected paths, inside the container |
| Isolation from malware running as you | yes | none | from the host’s ordinary accounts, not from whoever controls Docker |
Development mode relaxes nothing else: callers still authenticate, routes are still checked, TLS is still verified, responses are still scrubbed, the vault is still encrypted and configs still need approval. It refuses to run as root.
A protected install’s memory rule is why it can sit in Locked with nothing wrong in its config: the service has not
failed, so systemd does not restart it. Fix the limit (LimitMEMLOCK=infinity on the unit), restart the service and
unlock. After any restart or upgrade a passphrase install starts Locked again and needs unlock.
Audit log
The log is JSON Lines: one flat JSON object per line, in one file, iron-vault.log
(where it is). A line is one of three things:
- a request event,
request.completed: one per request the service received, served or refused; - an audit event: an administrative or security fact, such as an approval, a lock transition or a damaged record;
- a diagnostic record: anything else, for a developer. It has no
eventfield.
No record holds a secret, a caller token, a passphrase, a header value, a request or response body, a raw query string or a library error’s text (§18).
This page lists what the records hold. The log operations guide covers rotation, permissions, Docker, collectors and more queries; Investigate with the audit log walks through an investigation. The design is audit-logging.md.
Record envelope
Every record has these fields:
| Field | Type | Value |
|---|---|---|
timestamp | string | RFC 3339 in UTC with fractional seconds, such as 2026-11-05T10:15:30.123456Z |
level | string | ERROR, WARN, INFO, DEBUG or TRACE |
target | string | iron-vault.request for the request event, iron-vault.audit for audit events, a module path for a diagnostic record |
service | string | always iron-vault |
service_version | string | the release version |
schema_version | number | 1. It rises when a field or event is renamed or removed, or a label changes meaning; additions do not change it |
deployment_profile | string | protected, development or container |
message | string | a short fixed phrase; values are in fields, never in the message |
event | string | the event name; request and audit events only |
Request and audit events are always written, at any level set for diagnostic records, so no setting can turn
the audit log off. A field with no value is left out, never written as null or "". Fixed labels are snake_case
(policy_invalid, wrong_passphrase); event names are kebab-case after the dot. A list is one string with its items
separated by ,.
Shared fields
These mean the same, with the same type, in every event that has them:
| Field | Type | Meaning |
|---|---|---|
request_id | string | A random UUID per request; joins request.completed to response.scrubbed and request.defect |
caller, route, credential | string | Configured names |
record_id | string | A credential record’s ID |
token_host | string | The host of the token endpoint an OAuth client record’s provider definition names |
approver_id | string | The approver that was asked for the approval passphrase, or that signed: its ID, a hyphenated UUID |
approver_label | string | That approver’s label, escaped; init labels the approval passphrase’s approver approval passphrase |
version | number | An approval version |
committed_version | number | The committed approval version; absent when none is committed |
config_digest | string | blake2b: and 64 hex digits |
file | string | A state or config file name, never a path |
step | string | A fixed step label |
refusal | string | Why something was refused: a fixed label |
unavailable_reason | string | locked, policy_invalid, checking or recovery_needed |
detail | string | A check failure’s detail: fixed phrases with versions and configured names only |
error_kind | string | A library error’s fixed kind label, never its text |
remediation | string | A fixed phrase saying what to do |
log_destination | string | stdout, or the log directory’s absolute path |
The request event
request.completed, at INFO, target iron-vault.request. It is written when the service has finished with the
request: when the response body ends, fails or is dropped, or at once for a fixed refusal.
| Field | Type | Present | Meaning |
|---|---|---|---|
request_id | string | always | The request ID |
listener | string | always | The listener it arrived on |
http_method | string | always | The method as received, escaped |
caller | string | once the caller is identified | The caller’s name |
route | string | once a route is selected | The route’s name |
credential | string | once a route is selected | The route’s credential |
upstream_host | string | once a route is selected, unless the answer was replaced | The upstream host; never the port, path or query |
status | number | once a response existed | The HTTP status sent |
request_bytes | number | always | Body bytes read from the caller |
response_bytes | number | always | Body bytes sent to the caller, after scrubbing |
duration_ms | number | always | Whole milliseconds from receipt to the end of the response body |
scrubbed | boolean | once a relayed response was sent | Whether a scrub pattern matched |
outcome | string | always | success (an upstream response was relayed in full, with any status) or failure |
reason | string | when outcome is failure | The reason code. The errors reference lists every one with its status |
Audit events
Every audit event has the target iron-vault.audit. The fields are those beyond the envelope.
Service and lock state
| Event | Level | When | Fields |
|---|---|---|---|
service.started | INFO | The log is open, before the admin socket is bound | log_destination, core_dumps (disabled or not_disabled), memory_protection (locked, unavailable or unsupported) |
service.hardening-incomplete | ERROR | At startup, when core dumps are not disabled or memory is not locked | core_dumps, memory_protection, remediation |
service.log-destination-changed | INFO | An approved config moved the log; written to both the old and the new destination | log_destination, previous_log_destination, version |
service.lock-transition | INFO | Locked to Checking on an unlock, or Starting to Checking on a host unlock, the check’s outcome, and Ready or Unavailable to Locked | from_state, to_state (starting, locked, checking, ready, unavailable or stopped); unavailable_reason when to_state is unavailable |
vault.unlock-refused | WARN | An unlock was refused, or init or the host unlock at startup was refused for unprotected memory (memory_unprotected) | refusal: wrong_passphrase, rate_limited, memory_unprotected, wrong_state, state_read, passphrase_envelope, identity_envelope, initialization_unfinished, import_unfinished, reset_unfinished, not_initialized, unrecognized_files, state_unreadable or interrupted; memory_protection for memory_unprotected; retry_after (whole seconds) for rate_limited |
vault.host-unlock | INFO when unlocked, absent or owner_locked, WARN when refused or unseal_failed | A Protected or Container service tried the unlock handoff at startup, or skipped it because an earlier lock left the owner-lock file; a Development service never writes it | host_unlock_outcome (unlocked, absent, unseal_failed, owner_locked or refused); unseal_failed means no handoff and the handoff unit left its unseal-failure file, as after a firmware dbx or KEK update; refusal when refused: memory_unprotected, untrusted, unreadable, not_an_identity, not_initialized or not_a_recipient. Never the handoff’s bytes or its recipient key. A memory_unprotected refusal also writes vault.unlock-refused. |
vault.foreign-file | WARN | unlock found a file beside the manifest that the vault does not use; the file is never read, and the unlock goes on | file, escaped |
vault.presence-refused | WARN | The approval passphrase or TPM approval PIN for replace, rm, recipient remove or approver add was refused, or the TPM was locked out; nothing was written | refusal (wrong_passphrase, key_mismatch, wrong_pin or tpm_refused), tpm_status (a TPM approver only, and only for an answer the TPM signing helper was asked about, so never for one that was empty, not UTF-8 or shorter than an enrolled PIN: wrong_pin, locked_out, not_this_tpm, key_mismatch, weak_da_settings, refused_message, tpm_error, malformed, unreachable or bad_signature), approver_id, approver_label |
vault.lock-incomplete | WARN | A lock finished while a request still held a snapshot or the vault identity | snapshots_held (number), identity_held (boolean) |
Admin commands and caller tokens
| Event | Level | When | Fields |
|---|---|---|---|
admin.command | INFO | An admin principal’s command was read | command (config_approve, caller_token, unlock and so on), principal_uid |
admin.refused | WARN | An admin connection or request was refused before any command ran | refusal: not_admin_principal, peer_unreadable, busy, unsupported_version, malformed_frame, unknown_command or unexpected_frame; peer_uid and peer_pid when known; peer_pid is absent when the peer is in another PID namespace, such as the host CLI in the Container profile |
caller.token-issued | INFO | A caller token was issued | none; the token is never logged |
caller.token-failed | ERROR | No caller token could be issued | error_kind |
A command refused after it was read, such as init in the wrong state, records only admin.command.
Config approvals and checks
| Event | Level | When | Fields |
|---|---|---|---|
config.approval-refused | WARN | The approval passphrase or TPM approval PIN was wrong, opened the wrong key, or the TPM was locked out; nothing was reserved | refusal (wrong_passphrase, key_mismatch, wrong_pin or tpm_refused), tpm_status (a TPM approver only; as for vault.presence-refused), config_digest, approver_id, approver_label |
config.version-reserved | INFO | A version was reserved, before signing | version, config_digest, approver_id, approver_label |
config.approval-failed | WARN | The approval failed after its reservation and before its commit; the version is used up | version, config_digest, step, error_kind |
config.commit-uncertain | WARN | The commit’s rename landed but its directory fsync failed | version, error_kind |
config.approval-completed | INFO | The commit is durable | version, config_digest, summary (the approval summary’s text, or initial config for version 1), approver_id, approver_label |
config.activation-failed | WARN | The config check after a committed approval failed | version, unavailable_reason, detail |
config.check-failed | WARN | Any config check failed | unavailable_reason, failure (a fixed label), detail; log_destination when the log destination failed |
config.reload-failed | WARN | The config check of a SIGHUP reload failed | committed_version, unavailable_reason, detail |
config.recovery-published | WARN | A config check finished publishing a committed approval | version, renames |
config.recovery-discarded | INFO | A config check removed an uncommitted file | file; signed_for for a staged approval whose version is known |
config.conflicting-approval-discarded | ERROR | A staged approval for the committed version but another config was found and discarded. Only a second signature or a file the service did not write can cause it | version |
A reserved version is never a completed approval: look for config.approval-completed.
Credentials and vault writes
| Event | Level | When | Fields |
|---|---|---|---|
credential.added | INFO | An add committed, of any kind but an OAuth client | credential, record_id, kind, origins |
credential.oauth-client-added | INFO | An add --kind oauth-client committed | credential, token_host |
credential.login | INFO | A login wrote its account record; a config check that then fails is reported separately | credential, client, display_name (the verified account), outcome (added) |
credential.login-refused | WARN | A login ended without writing | credential and client when they are valid names, reason: the error code’s name, or cancelled when the connection closed or the paste prompt timed out |
credential.replaced | INFO | A replace committed | credential, old_record_id, record_id, kind, origins; old_kind and old_origins when the old record was healthy |
credential.removed | INFO | An rm committed | credential, record_id |
credential.short-secret | WARN | A record just written has a short secret, which the scrubber may also match in innocent text | credential, secret_field, len |
credential.refreshed | INFO, or WARN | A refresh put a new access token in an OAuth account’s token slot. WARN when the provider sent a new refresh token that could not be written to the vault yet, so a restart goes back to the stored one | credential, client, rotated |
credential.refresh-failed | WARN | A refresh gave no access token, and the account does not need login. The next refresh is tried after the provider’s minimum retry interval | credential, client, failure; provider_status when the provider answered |
credential.refresh-write-failed | ERROR | A refresh of an account whose provider rotates refresh tokens, such as a GitHub App, succeeded, but the new refresh token could not be written to the vault. The account’s routes answer token_unavailable until the next request’s retried write stores it; a restart before then finds the account needs login | credential, client, error_kind |
credential.needs-login | WARN | An OAuth account needs a new login | credential, client, cause |
credential.revoked | INFO | The provider revoked the grant of an OAuth account that rm removed, or that a login moved to another account or client or ended without writing | credential; client when the vault still holds the client record |
credential.revoke-failed | WARN | That revocation was not sent, or the provider refused it, so the service told you to revoke the app’s access at the provider. The command still succeeded. A client whose provider has no revocation endpoint gets that notice only, with no event | credential, failure; client when the vault still holds the client record; provider_status when the provider answered |
vault.unindexed-removed | WARN | A vault write first removed a record file the manifest does not list | file |
vault.superseded-left | WARN | A write committed but could not remove the file it replaced; the next write removes it | file, error_kind |
vault.commit-uncertain | ERROR | A state file was replaced but the directory fsync failed, so the change may not survive power loss | file, error_kind |
vault.record-upgraded | INFO | Opening the vault rewrote a credential record written by 0.6.0-alpha in the current format, with no owner action | credential, record_id, from_version (1), to_version (2) |
vault.record-upgrade-failed | WARN | That rewrite failed. The credential keeps serving, and the next unlock or reload tries again | credential, record_id, error_kind |
kind is static or basic. origins lists https://host:port values.
For the OAuth events, credential is the account and client is the OAuth client record it names. failure is
request_check (the request broke the provider definition, so nothing was sent), not_delivered, maybe_delivered,
server_error, unparseable or provider_error (the provider refused with another error code, such as
invalid_client). For credential.revoke-failed, failure is not_serving (the service was not serving, so
nothing was sent; this includes a change that was written but whose config check then failed), client_unreadable,
request_check, not_delivered, maybe_delivered, server_error, unparseable or refused (an error answer, or
a status other than 2xx). cause is refused (the provider refused the refresh token) or uncertain (a rotating
refresh may have reached the provider). No event carries a token, the client secret or the provider’s answer.
Corruption
Each of these also has remediation.
| Event | Level | When | Fields |
|---|---|---|---|
vault.record-damaged | ERROR | A listed record is damaged and was not loaded; its routes answer 503 | credential, record_id, file, damage (missing, substituted or unreadable); error_kind when a read failed |
vault.unindexed-file | WARN | Opening the vault found a record file the manifest does not list; it was not loaded | file |
vault.approval-state-unrecorded | WARN | The approval state exists but the manifest does not record it | none beyond remediation |
vault.shared-state-damaged | ERROR | The vault’s shared state is damaged | file, damage |
vault.state-dir-unreadable | ERROR | The state directory cannot be listed | error_kind |
Initialization
| Event | Level | When | Fields |
|---|---|---|---|
vault.init-discarded | WARN | An unfinished initialization was discarded | files |
vault.initialized | INFO | init’s last step is durable | vault_id, recipients (the enrolled roles’ names, such as operational,recovery) |
vault.init-failed | WARN | An init step failed | step, error_kind |
A reset writes three more, all at WARN:
| Event | Level | When | Fields |
|---|---|---|---|
vault.reset-confirmed | WARN | You confirmed; written before the reset marker | vault_id (an Initialized vault only), verified, initialization, from_state, resumes |
vault.reset | WARN | The vault is discarded | vault_id, files, foreign (escaped names), finish_uncertain |
vault.reset-failed | WARN | Writing the marker or a removal failed | step (begin, remove or finish), file, error_kind, removed |
init also writes config.version-reserved and config.approval-completed for version 1.
Routes and responses
| Event | Level | When | Fields |
|---|---|---|---|
route.pinned-ca-unavailable | WARN | A route’s pinned CA could not be loaded, so the route is unavailable | route, config_field (ca_file) |
response.scrubbed | WARN | A relayed response had a scrub pattern match in its headers or body | request_id, route, credential, matches |
request.defect | ERROR | A request was refused by a service defect (reason service_defect) | request_id, route, credential, defect (the label of the check that failed) |
Recovery
| Event | Level | When | Fields |
|---|---|---|---|
recovery.checked | INFO when the key opened the vault, WARN otherwise | recovery check finished | recovery_outcome: opened with vault_id and recorded (and error_kind when the record was not written); failed with recovery_failure (not_a_recipient or identity_unverified); invalid; or unavailable with file and error_kind |
recovery.reminder | INFO | A recovery check is due | recovery_record (checked with last_checked, never_checked with reminders_since, unusable with error_kind), reminder_days, remediation |
vault.recovery-unlock | INFO | A recovery unlock finished its writes, and the new vault passphrase is in force | vault_id, recipient (the new operational recipient key, which is public), retired (the operational recipients retired), recorded; error_kind when the recovery check record was not written |
vault.recovery-unlock-refused | WARN | A recovery unlock was refused before its first write; the service stays Locked | refusal: rate_limited, invalid_key, passphrase_rejected, not_a_recipient, identity_unverified, not_recovery_role, unavailable, inventory_damaged or set_invalid; retry_after (whole seconds) for rate_limited; file and error_kind for unavailable; inventory_damage for inventory_damaged. A refusal for the state, initialization or memory writes vault.unlock-refused instead |
vault.recovery-unlock-failed | WARN | A recovery unlock’s write step failed; the service stays Locked | step (open, enroll, passphrase or retire), error_kind, vault_passphrase (which passphrase opens the vault now: old, either or new); committed for enroll and retire |
Recipients
Every recipient command, recipient list included, first runs an inventory check, which may write
recipient.inventory-damaged or recipient.change-recovered; neither carries a recipient key or label. recipient add
and recipient remove write recipient.added, recipient.removed and recipient.change-failed, which name the public
recipient key; the first two also carry the label, escaped. forget-machine writes recipient.forget-checked.
| Event | Level | When | Fields |
|---|---|---|---|
recipient.added | INFO | A recipient add committed | recipient, recipient_role (added, recovery for recipient add --recovery, or host-unlock for recipient add --host-unlock), recipient_label (escaped), recipients (the count after the change) |
recipient.inventory-damaged | WARN | The inventory check found the recipient inventory missing or damaged, and wrote nothing | inventory_damage: envelope_unreadable, missing, unreadable, mac, malformed, unknown_role, other_vault, envelope_mismatch or count_mismatch |
recipient.change-recovered | WARN | The inventory check finished a committed recipient change or removed a staged inventory | recovery: completed or discarded |
recipient.removed | INFO | A removal committed | recipient, recipient_role, recipient_label, recipients (the count after the removal) |
recipient.change-failed | WARN | An add or a removal was refused because the key is already enrolled, is not enrolled or would break the independence rule, or it failed while written | change (add or remove), recipient, failure: already_enrolled, unknown_recipient, set_invalid or write_failed; for write_failed also step, error_kind and committed (no, unknown or yes) |
recipient.forget-checked | INFO when the key is not a recipient, the independence rule holds and the recovery path is verified (a check ran, no reminder due), else WARN | forget-machine checked a key | recipient, forget_outcome (forgotten or still_enrolled), recipient_role (still_enrolled only), independence (holds or broken) and recovery (verified or unverified; forgotten only) |
Approvers
approver add and approver remove write these. They name approvers by their public approver ID and label (escaped);
no passphrase or key file byte is logged.
| Event | Level | When | Fields |
|---|---|---|---|
approver.enrolled | INFO | An approver add committed | approver_id, approver_label, signer_kind (software or tpm), approvers (the count after the change), authorizing_approver_id and authorizing_approver_label (the approver whose passphrase authorized it) |
approver.removed | INFO | An approver remove committed | as approver.enrolled, for the approver removed, and key_file: removed, or left when the key file could not be deleted (the next approver command removes it) |
approver.change-failed | WARN | An approver add or approver remove was refused (16 approvers pinned, the new passphrase broke a rule, no such approver, the last approver or the active approval’s signer), the approval state did not read back, or the change failed | change (add or remove), failure: set_invalid, passphrase_rejected, unknown_approver, in_use or write_failed; approver_id when known; for write_failed also step (read_back, tpm_helper, key_file, key_check or approval_state), error_kind and committed (no or unknown) |
approver.orphan-removed | WARN | Before its prompts, approver add or approver remove removed a key file no pinned approver has, left by an enrollment that failed or a removal that could not delete it | approver_id, the ID in the file’s name |
Migration authorization
recipient add and export write these events: they come from the authorization step the two share.
| Event | Level | When | Fields |
|---|---|---|---|
migration.challenge-issued | INFO | A migration challenge was issued | operation (export or add_recipient), method (the method asked first: vault_passphrase or tpm_pin); destination_recipient for add_recipient |
migration.authorized | INFO | The owner proved the challenge | operation, method (the method that proved it); approver_id for tpm_pin; destination_recipient for add_recipient |
migration.authorization-refused | WARN | The challenge was refused or cancelled, or the authorization was refused when used | operation, method (the method answered, or the one asked first), refusal (including wrong_pin and tpm_locked_out for tpm_pin); approver_id for tpm_pin; destination_recipient for add_recipient; retry_after for rate_limited |
Migration bundle
export writes the first two; import writes the last four. A refused authorization or a rejected export passphrase
writes neither: the authorization’s own records say what happened. None of these carries a passphrase, a key or a byte
of a credential record.
| Event | Level | When | Fields |
|---|---|---|---|
migration.exported | INFO | The whole bundle was sent | vault_id, records (the credentials it carries), approvers (the approvers it carries), committed_version, highest_reserved (the highest reserved approval version) |
migration.export-failed | WARN | The snapshot check before the prompts failed, or the export failed after its authorization was used | step (check, snapshot, seal or transfer), error_kind (locked for a lock, deadline for a missed deadline); file when a file failed |
migration.import-refused | WARN | An import was refused after the bundle arrived and before anything was written | refusal (bundle_invalid or wrong_passphrase); detail, the fixed name of the failed rule or check, for bundle_invalid |
migration.import-discarded | WARN | An unfinished import was discarded by import or init | files: the names removed, config.toml among them when the import wrote one |
migration.imported | INFO | The import’s last write is durable | vault_id, records, approvers, committed_version, highest_reserved, recipients (the enrolled roles’ names) |
migration.import-failed | WARN | A write of the import failed | step (the import’s step number), error_kind |
jq recipes
These run against a development log (tee of serve --log-to-stdout). In a protected install set
LOG=/var/log/iron-vault/iron-vault.log and run them with sudo. Investigate with the audit
log works through more.
LOG=~/iron-vault-dev.log
# one line per request: who asked, which route, and what happened
jq -c 'select(.event == "request.completed")
| {caller, route, http_method, status, outcome, reason, scrubbed, duration_ms}' $LOG
# refusals, counted by reason: unauthenticated, method_not_allowed, rate_limited, ...
jq -r 'select(.event == "request.completed" and .outcome == "failure") | .reason' $LOG | sort | uniq -c
# the administrative trail: commands, credential changes and config approvals (the strings filter handles null values)
jq -c 'select(.event | strings | test("^(admin|credential|config|caller)\\."))
| {timestamp, event, command, credential, version}' $LOG
# responses the scrubber had to clean, and how many matches it removed
jq -c 'select(.event == "response.scrubbed") | {request_id, route, credential, matches}' $LOG
# the test secret from getting started never reaches the log: this prints 0
grep -c -F 'not-a-real-key-123' $LOG
The log operations guide has more, and the queries for Loki and Elastic.
Log operations guide
How to run, rotate, collect and query the Iron Vault log. Audit logging defines what the log holds; this guide covers the host and the tools around it (specification §18). Terms follow the glossary. Field, event and reason names below are those of audit-logging.md; when the two disagree, that document wins.
The log is JSON Lines: one JSON object per line, UTF-8, in one file, iron-vault.log. A line is a request event
(request.completed), an audit event (config.approval-completed, service.lock-transition and so on) or a diagnostic
record with no event field. Every line has timestamp, level, target, service, service_version,
schema_version, deployment_profile and message (Record shape).
The service writes to the bootstrap destination, switches to the approved config’s [logging] destination, follows a
rename by logrotate and stops when a write fails. The repository holds the packaged unit
(packaging/linux/iron-vault.service, with LogsDirectory=iron-vault and LogsDirectoryMode=0750), the shipped
/etc/logrotate.d/iron-vault (packaging/linux/logrotate.d/iron-vault), the Docker image and the Compose file
(packaging/compose/).
Location and permissions
| Deployment | Log destination |
|---|---|
| Protected install (systemd) | /var/log/iron-vault/iron-vault.log |
| Development build | $XDG_STATE_HOME/iron-vault-dev-log/iron-vault.log (default ~/.local/state/iron-vault-dev-log) |
| Docker or Compose | stdout (Docker) |
An approved config can move the log: the [logging] destination key of config.toml is an absolute directory path or
"stdout". It takes effect only once the config is approved and a config check activates it; the service never reads
it from an unapproved config.toml, and it appears in the approval summary. Moving the directory also needs a new
rotation rule (Rotation).
The log directory in a protected install:
- It is owned by the service account, mode
0750; the log file is0640. Callers have no access, so they cannot read or edit the audit log. - The packaged unit’s
LogsDirectory=iron-vaultandLogsDirectoryMode=0750make systemd create the directory for the service account before the service starts. The service never creates a protected log directory. - A missing bootstrap directory, or one that fails the trusted-path rule, stops
serveat startup with one line on stderr. - A directory set by the approved config is yours to create, with the same owner and mode. If it is missing or fails the
rule, the config check fails: the service writes
config.check-failedwith failurelog_destination_unusable, settles Unavailable (policy_invalid) and keeps writing to its current destination (Switching at activation). - The service creates
iron-vault.logitself, at0640. It refuses a file or directory that any group or other account can write, so never loosen the modes to give a tool access.
Giving a collector read access. Add the collector’s account to the service account’s group
(Permissions). The directory is 0750 and the files 0640, so that
group reads and never writes.
- Add only the collector’s own service account. Never add a caller account or a login account: anyone who can read the log sees every route, caller and refusal.
- Keep the modes at
0750and0640. The service refuses a directory or file that its group or others can write. - Restart the collector after changing its groups, and check
systemctl status iron-vaultafter any change to the directory: the service reports an unusable directory there, not in the log.
A separate reader group is undecided. Setting one up by hand fails today: systemd resets the directory’s group to the
unit’s on every start (LogsDirectory=), the service creates each new file with its own primary group, and the rotation
rule’s su sets the group of rotated files.
Rotation
The service writes one fixed file. Before each record it checks that the name iron-vault.log still points to the
file it has open. After logrotate renames the file, the name points nowhere, so the service creates a fresh
iron-vault.log and carries on. No signal is involved.
sequenceDiagram
participant S as iron-vault service
participant L as logrotate
participant D as /var/log/iron-vault
S->>D: check the name, append to iron-vault.log
L->>D: rename iron-vault.log to iron-vault.log.1 (nocreate)
Note over S,D: a record already past its check lands in iron-vault.log.1
S->>D: next record: the name is gone, so create iron-vault.log (0640) and append
L->>D: next run: compress iron-vault.log.1 (delaycompress)
The package ships /etc/logrotate.d/iron-vault, owned by root, mode 0644:
/var/log/iron-vault/iron-vault.log {
daily
rotate 30
compress
delaycompress
missingok
notifempty
nocreate
su iron-vault iron-vault
}
nocreateis required. It overrides the globalcreatein/etc/logrotate.conf, sologrotateonly renames the file and the service creates the new one. Withcreatethe two race (The shipped rule).delaycompressleaves the renamed file uncompressed until the next rotation. A record written between the rename and the service’s reopen lands in it, so no record is lost.su iron-vault iron-vaultrunslogrotateas the service account, in a directory root does not own.- A size limit is a
maxsizeline added to the same rule, for examplemaxsize 100M.logrotateevaluates it when it runs (normally once a day from its timer), so run it more often if you need a hard cap. - A moved log directory needs its own rule: copy the one above with the new path. The shipped rule then matches
nothing, and
missingokkeeps it quiet. The service never writes to/etc/logrotate.d.
Do not use these:
copytruncate. It loses every record written between its copy and its truncate. An audit log must not have that window, and the rename-based rule above needs no copy.- A
postrotatesignal.SIGHUPmeans “reload the config” (§12), so a rotation script would trigger a reload. The service needs no signal to follow a rename. - Rotating by hand with
mvis fine for the same reason. Never delete the file, which destroys audit records. Nevertouchor createiron-vault.logyourself: at its next record the service stops if the file is not owned by the service account, or if its group or others can write it.
In development nothing rotates the log; remove the file, or run a user logrotate with its own state file.
Docker
In Docker the service writes to stdout (iron-vault serve --log-to-stdout, the image’s default command) and the
container runtime keeps the log. Rotation is the runtime’s: set the log driver and its options in the Compose file.
services:
iron-vault:
image: iron-vault
logging:
driver: json-file
options:
max-size: "50m"
max-file: "30"
- Do not use the
journaldlog driver, in Docker or in Podman. The journal’s readers are not bound by the log directory’s mode, and it breaks the decision that the service writes no journald output. Podman’s default driver on Fedora and RHEL isjournald, so select another explicitly:--log-driver k8s-file --log-opt max-size=50m, orlog_driverandlog_size_maxincontainers.conf. - The
json-filedriver wraps each line in its own JSON object ({"log":"...","stream":"stdout","time":"..."}). A collector must unwraplogbefore it reads the record. - Whoever controls the Docker daemon can read these logs, replace the service and run commands in its container (§17). A collector that reads container logs through the daemon’s socket holds that control; prefer a host agent that reads the driver’s files, owned by root.
- The service refuses
stdoutwhen stdout is the systemd journal, so--log-to-stdoutis for containers and pipes, not for a unit.
Collectors
Each example follows the file at its default path, keeps up with logrotate renaming it, and reads the lines as JSON.
The collector’s account needs read access (Location and permissions). Examples are checked by
reading against the field names, not run against a live service.
Anyone who can query the backend (Loki, Elastic or an OTLP store) reads every route, caller and refusal in the log. Give
callers no access to it, and reach it over TLS. The examples use plain http:// endpoints for brevity.
Loki labels are service, event and level, and route if you want it. Never label request_id or caller:
each distinct value would become its own stream. Keep them in the line and filter with | json. A diagnostic record has no
event, so its event label is empty or absent.
Grafana Alloy to Loki
local.file_match "iron_vault" {
path_targets = [{ "__path__" = "/var/log/iron-vault/iron-vault.log" }]
}
loki.source.file "iron_vault" {
targets = local.file_match.iron_vault.targets
forward_to = [loki.process.iron_vault.receiver]
}
loki.process "iron_vault" {
stage.json {
expressions = { service = "service", event = "event", level = "level", route = "route", ts = "timestamp" }
}
stage.timestamp {
source = "ts"
format = "RFC3339Nano"
}
stage.labels {
values = { service = "", event = "", level = "", route = "" }
}
forward_to = [loki.write.default.receiver]
}
loki.write "default" {
endpoint {
url = "http://loki:3100/loki/api/v1/push"
}
}
Vector
[sources.iron_vault]
type = "file"
include = ["/var/log/iron-vault/iron-vault.log"]
[transforms.iron_vault_json]
type = "remap"
inputs = ["iron_vault"]
source = '''
. = parse_json!(.message)
.timestamp = parse_timestamp!(.timestamp, "%+")
'''
[sinks.loki]
type = "loki"
inputs = ["iron_vault_json"]
endpoint = "http://loki:3100"
encoding.codec = "json"
labels.service = "{{ service }}"
labels.event = "{{ event }}"
labels.level = "{{ level }}"
Vector’s file source identifies a file by content, so it follows a rename.
Fluent Bit
fluent-bit.conf:
[SERVICE]
Parsers_File parsers.conf
[INPUT]
Name tail
Path /var/log/iron-vault/iron-vault.log
Parser iron_vault
DB /var/lib/fluent-bit/iron-vault.db
[OUTPUT]
Name loki
Match *
Host loki
Port 3100
Label_Keys $service,$event,$level
parsers.conf:
[PARSER]
Name iron_vault
Format json
Time_Key timestamp
Time_Format %Y-%m-%dT%H:%M:%S.%LZ
The tail input follows a renamed file and keeps its place in the DB file.
Filebeat to Elastic
filebeat.inputs:
- type: filestream
id: iron-vault
paths:
- /var/log/iron-vault/iron-vault.log
parsers:
- ndjson:
target: "iron_vault"
processors:
- timestamp:
field: iron_vault.timestamp
layouts:
- "2006-01-02T15:04:05.999999999Z07:00"
- drop_fields:
fields: ["iron_vault.timestamp"]
output.elasticsearch:
hosts: ["https://elastic:9200"]
The timestamp processor writes the record’s timestamp to @timestamp, so the service keeps its own field name. The
target keeps the record under iron_vault: Filebeat’s index template (ECS) maps event and service as objects, and
Iron Vault’s event and service are strings, which Elasticsearch would reject. Field types are stable across events by
rule (Field rules), so a mapping built from the first record holds.
OpenTelemetry Collector
Iron Vault does not send OTLP; a collector can convert the file.
receivers:
filelog:
include: [/var/log/iron-vault/iron-vault.log]
operators:
- type: json_parser
timestamp:
parse_from: attributes.timestamp
layout_type: gotime
layout: "2006-01-02T15:04:05.999999999Z07:00"
severity:
parse_from: attributes.level
processors:
resource:
attributes:
- key: service.name
value: iron-vault
action: upsert
batch: {}
exporters:
otlp:
endpoint: otel-backend:4317
service:
pipelines:
logs:
receivers: [filelog]
processors: [resource, batch]
exporters: [otlp]
Querying
For local use with jq. Run it as root or as the collector’s account; do not add a login or caller account to the
log’s group. Rotated files have the same format: iron-vault.log.1 is uncompressed, so read it with jq, and read the older
iron-vault.log.*.gz files with zcat.
Every failed request for a route (brave is a route name):
jq -c 'select(.event == "request.completed" and .route == "brave" and .outcome == "failure")
| {timestamp, request_id, caller, status, reason}' /var/log/iron-vault/iron-vault.log
Everything about one request, which includes response.scrubbed and request.defect when they fired:
jq -c 'select(.request_id == "0f8fad5b-d9cb-469f-a165-70867728950e")' /var/log/iron-vault/iron-vault.log
Approvals in a time range (timestamp is UTC RFC 3339 with fractional seconds, so date-only bounds compare correctly
as strings):
jq -c 'select(.event == "config.approval-completed"
and .timestamp >= "2026-11-01" and .timestamp < "2026-12-01")
| {timestamp, version, config_digest}' /var/log/iron-vault/iron-vault.log
Recovery reminders. recovery.reminder (INFO, at most one a week) is a v0 owner’s only prompt to run
iron-vault recovery check, so alert on it in the collector:
jq -c 'select(.event == "recovery.reminder")
| {timestamp, recovery_record, last_checked, reminders_since, error_kind}' /var/log/iron-vault/iron-vault.log
Host unlocks, in the Protected and Container profiles. Each start writes one vault.host-unlock:
unlocked, atINFO;absent(no unlock handoff), atINFO;owner_locked(an earlierlockleft the owner-lock file, so the service skipped the handoff), atINFO;unseal_failed(no unlock handoff because the host’s TPM unseal failed, as after a firmwaredbxor KEK update), atWARN;refused, atWARN, with itsrefusal, such asuntrustedornot_a_recipient.
Every outcome but unlocked leaves the service Locked until a passphrase unlock, so alert on refused and
unseal_failed. iron-vault status shows the same outcome as host unlock: <label>:
docker compose logs --no-log-prefix iron-vault \
| jq -c 'select(.event == "vault.host-unlock") | {timestamp, host_unlock_outcome, refusal}'
Not supported
- journald output. The owner chose files. JSON inside journald’s
MESSAGEfield loses journald’s own field queries, and the journal’s readers are not bound by the log directory’s mode (Owner decisions). - OTLP export from the service. It brings heavy dependencies, possibly another copy of
rand, and a further network path out of the process that holds the secrets. Use the OpenTelemetry Collector outside it.
Files and locations
Iron Vault keeps its files in four directories: one for the config, one for the vault (the state directory), one for the log and one at runtime for the sockets. Where they are depends on the deployment profile, which is fixed when the binary is built (Service states). The file names inside each directory are the same for every profile.
Before the service unlocks anything, it checks each path it reads: every directory above the file must be owned by
root or the service account and not writable by anyone else, and the file must have the owner and mode below. The log
directory is the exception: a directory above it may be group-writable when root owns it, because Debian and Ubuntu
ship /var/log as drwxrwxr-x root syslog. The service refuses to start on an unsafe path and names the path that
failed. The service never repairs a directory: an existing one with the wrong mode is refused. On a protected install,
the package’s tmpfiles.d puts back the owner and mode of its three directories (/etc/iron-vault,
/var/lib/iron-vault and /run/iron-vault) at boot and on upgrade, so that refusal shows only until then.
The four directories of a protected install, with the main files in each:
/etc/iron-vault/ config directory config.toml, config.toml.sig
/var/lib/iron-vault/ state directory identity.age, operational.age, recipients.age, approval.age,
approver-<id>.age, manifest.age, record-<id>-<digest prefix>.age,
recovery.toml
/var/log/iron-vault/ log directory iron-vault.log
/run/iron-vault/ runtime directory admin.sock, request sockets such as proxy.sock
Protected install
The .deb package runs the service as the iron-vault system account.
| Path | Owner | Mode | Made by | What it is |
|---|---|---|---|---|
/usr/bin/iron-vault | root | 0755 | the package | The binary. |
/etc/iron-vault/ | iron-vault | 0700 | the package (tmpfiles.d) | The config directory. |
/etc/iron-vault/config.toml | iron-vault | 0600 | the service | The published approved config. |
/etc/iron-vault/config.toml.sig | iron-vault | 0600 | the service | Its approval signature. |
/var/lib/iron-vault/ | iron-vault | 0700 | the package (tmpfiles.d) | The state directory: the vault. |
/var/log/iron-vault/ | iron-vault | 0750 | systemd (LogsDirectory=) | The log directory, until an approved config names another. |
/var/log/iron-vault/iron-vault.log | iron-vault | 0640 | the service | The log. |
/run/iron-vault/ | iron-vault | 0711 | the package (tmpfiles.d) | The runtime directory. |
/run/iron-vault/admin.sock | iron-vault | 0600 | the service | The admin socket; you reach it with sudo. |
a listener’s unix_socket, such as /run/iron-vault/proxy.sock | iron-vault | 0666 | the service | A request socket. Callers are told apart by peer account or token, not by the socket’s mode. |
/usr/lib/systemd/system/iron-vault.service, iron-vault-listener@.socket | root | 0644 | the package | The service unit, and the template for TCP listener sockets. |
/usr/lib/sysusers.d/iron-vault.conf, /usr/lib/tmpfiles.d/iron-vault.conf | root | 0644 | the package | Create the account and the directories above. |
/etc/logrotate.d/iron-vault | root | 0644 | the package | Log rotation (log operations). |
/usr/lib/systemd/system/iron-vault-host-unlock.service | root | 0644 | the package | The handoff unit: at each boot it unseals the host unlock blob and installs the handoff. It has no [Install] section; iron-vault.service pulls it in at every start. |
/usr/libexec/iron-vault/iron-vault-tpm-signer | root | 0755 | the package | The TPM signing helper, the only program that opens the TPM for approvals (recipe). /usr/bin/iron-vault never links the TPM library. |
/usr/lib/systemd/system/iron-vault-tpm-signer.socket, iron-vault-tpm-signer@.service | root | 0644 | the package | The helper’s socket, and the instance started for each connection, as the iron-vault-tpm account with the tss group. |
/run/iron-vault-tpm/signer.sock | iron-vault | 0600 | systemd | The helper’s socket. Only the service account and root can connect, one connection at a time. The service offers the tpm approver kind while it exists. |
/usr/sbin/iron-vault-provision-host-unlock | root | 0755 | the package | The provisioning helper, iron-vault-provision-host-unlock(8). It seals a new host unlock identity to the TPM (TPM unlock). |
/etc/iron-vault-host/ | root | 0700 | the helper | The host unlock directory. The service cannot see it. Kept when the package is removed; purged only when the vault is. |
/etc/iron-vault-host/host-unlock.cred | root | 0600 | the helper | The host unlock blob: the host unlock identity sealed by systemd-creds to this TPM and PCR 7. It opens only on this machine at this Secure Boot policy, and a backup copy opens there too. |
/etc/iron-vault-host/provisioning.txt | root | 0600 | the helper | The acceptance record of the last provisioning: the mode (server or portable), each --portable warning, how it was accepted (terminal or flag) and SUDO_USER, with the time. Replaced whole each time; the same lines are in the journal under iron-vault-host-unlock. |
The unit lets the service write only /etc/iron-vault, /var/lib/iron-vault, /run/iron-vault and its log
directory. A protected install also reads the host unlock handoff when it is there; its two paths are in the
handoff table below. Uninstalling keeps the vault and the config. Purging deletes
/etc/iron-vault and asks before it deletes the vault
(installation guide).
Development mode
A build with --features dev-mode runs as you and keeps its files in your XDG directories. Every file and directory
is owned by you.
| Path | Mode | What it is |
|---|---|---|
$XDG_CONFIG_HOME/iron-vault-dev/ (default ~/.config/iron-vault-dev/) | 0700 | The config directory. |
.../iron-vault-dev/config.toml and config.toml.sig | 0600 | The published approved config and its signature. |
$XDG_STATE_HOME/iron-vault-dev/ (default ~/.local/state/iron-vault-dev/) | 0700 | The state directory. |
$XDG_STATE_HOME/iron-vault-dev-log/ | 0700 when created; up to 0750 accepted | The log directory. It sits beside the state directory, not inside it, because any other file in the state directory is a foreign file. |
.../iron-vault-dev-log/iron-vault.log | 0640 | The log. With serve --log-to-stdout the log goes to stdout instead, until an approved config names a destination. |
$XDG_RUNTIME_DIR/iron-vault-dev/ | 0711 | The runtime directory. XDG_RUNTIME_DIR must be set; it has no default. |
.../iron-vault-dev/admin.sock | 0600 | The admin socket. |
The service creates each missing directory with the mode shown. The binary and every directory above it must be owned by you or root and not writable by group or others (Development mode). A Unix socket path must be under 108 bytes, so keep these directories short.
Container
A build with --features container uses the protected install’s paths inside the container: /etc/iron-vault,
/var/lib/iron-vault and /run/iron-vault, owned by iron-vault with the same modes. They are mounted in two ways:
- The config and state directories are named volumes. The image creates both directories, so Docker copies their owners and modes into new volumes.
/run/iron-vaultis a host directory, bind-mounted read-write. The host’s tmpfiles.d creates it at boot, owned byiron-vaultwith mode0711, and the mount hides the image’s copy. The service bindsadmin.sockthere, so host root reaches it.
Listener TLS certificates and keys are mounted read-only at /etc/iron-vault-tls. The binary is
/usr/bin/iron-vault, owned by root, 0755. The image runs serve --log-to-stdout, so the log goes to the
container runtime (log operations). The
host layout and mounts
tables in docker-compose.md list every host path and mount.
Host unlock handoff
The Protected and Container profiles read one more file when it is there, the host unlock handoff:
| Path | Owner | Mode | Made by | What it is |
|---|---|---|---|---|
/run/iron-vault-unlock/ | root | 0711 on its ramfs; neither group nor others may write it | the host’s handoff unit | In the Container profile, the host directory, bind-mounted read-only into the container at the same path. The directory is mounted, not the file, so the container sees a file missing or replaced on the host as missing or replaced. In a protected install it is the host’s own ramfs, which the package’s handoff unit iron-vault-host-unlock.service mounts over a root 0711 directory that tmpfiles.d creates. |
/run/iron-vault-unlock/host-unlock | iron-vault | 0400 (no group or other bits; at most 0600 is accepted) | the host’s handoff unit | The host unlock identity’s secret text, one AGE-SECRET-KEY-1… line of at most 128 bytes. It lets the service unlock at startup without a passphrase. |
The file must be a regular file, never a symlink, and no directory above it may be writable by group or others, not
even a sticky one such as /tmp. A file that breaks the rule is refused, not read.
At startup a Protected or Container service reads this file. If the identity in it opens the vault, the service goes
from Starting to Checking with no passphrase. If the file is missing, or is refused (an unsafe path, an unreadable file,
a key that is not one of the vault’s recipients, or memory not locked against swap), the service stays Locked and a
passphrase unlock still works. Each start writes one vault.host-unlock record
(audit log).
When the handoff file is missing, the service also looks for the unseal-failure file,
/run/iron-vault-unlock/unseal-failed: an empty file that the host’s handoff unit leaves when it fails, such as when a
firmware update changes PCR 7. It counts only as a regular file owned by root, not a symlink. If it is there, the record
says unseal_failed instead of absent. Either way the service stays Locked, so the file is a diagnostic only. The
service does not look for it when the handoff file is there. The host side, which unseals the identity from the TPM onto
a ramfs, is in docker-compose.md.
The config directory
| File | What it is |
|---|---|
config.toml | The active config, as last approved. |
config.toml.sig | The active config’s approval: a signature over the vault ID, the approval version and the config’s digest. |
config.toml.pending | A config being approved, before it is published. |
config.toml.sig.staged | An approval being committed, before it is published. |
config.toml.lock | The lock that keeps one writer at a time. |
.<name>.tmp | A temporary file a durable write uses before its rename. |
All are 0600 and owned by the service account. The pending, staged and temporary files exist only while an approval
runs, or after one was interrupted; the next config check finishes or discards them and logs
config.recovery-published or config.recovery-discarded.
The dev-config.toml you edit is yours, anywhere you like. config approve sends its text to the service, which
writes its own copy.
The state directory
| File | What it is |
|---|---|
identity.age | The identity envelope: the vault identity, sealed to each recipient. |
recipients.age | The recipient inventory: who can open the vault (the operational identity, the recovery key and any recipient added since), each with its role, label and enrolment time. init writes it. |
recipients.age.staged | A recipient change being committed. The next recipient command finishes or discards it. |
operational.age | The passphrase envelope: the operational identity, sealed with the vault passphrase. |
approver-<id>.age | An approver key envelope, one per software approver: the key that signs config approvals for it, sealed with its approval passphrase. init writes one for its approver. |
approver-<id>.tpm | A TPM key blob, one per TPM approver, mode 0600: the wrapped key only the TPM that made it can load. It is not secret. |
approval.age | The approval state: the committed and highest reserved approval versions. |
manifest.age | The vault manifest: which credential records exist, sealed with a code only the vault identity can make. |
record-<id>-<digest prefix>.age | One credential record: its kind, secret and permitted origins. <digest prefix> is the first 8 bytes of the file’s digest in the manifest, in hex, so a rewritten record gets a new name. |
recovery.toml | When recovery check last proved the recovery key. Holds no secret. |
init.unfinished | An empty marker of an init that has not finished. init run again discards it. |
import.unfinished | An empty marker of an import that has not finished. While it is there unlock refuses; import or init run again discards it. |
locked-by-owner | An empty file that lock writes and a passphrase unlock removes. While it is there, a starting service skips host unlock and stays Locked, so a lock survives a restart. init and reset remove it. |
lock | The lock that keeps one writer at a time. |
.<name>.tmp | A temporary file a durable write uses before its rename. |
All are 0600 and owned by the service account. Any other file in the state directory is a foreign file, except
lost+found, which is ignored. What a foreign file does depends on whether the manifest is there:
- With
manifest.age, the foreign file is never read, and the unlock goes on without it.unlocklogsvault.foreign-filefor each one. - Without it, the service cannot tell a vault from files someone else left there, so it touches nothing.
unlockrefuses withunlock-failed(15), naming up to five of the files, and logsvault.unlock-refusedwith refusalunrecognized_files.initrefuses withalready-initialized.
How the vault is locked explains the envelopes.
A migration bundle
export and import read and write these beside the bundle path you give, wherever you choose; none is in the state
or config directory. See move a vault to a new machine.
| File | What it is |
|---|---|
<bundle> | The migration bundle: a .tar.gz of the encrypted record files, manifest, approval state, approver key envelopes and config, with the vault identity sealed with the export passphrase. 0600. It holds no plaintext secret. |
.<bundle>.partial | The bundle while export receives it, created 0600 before anything is sent. It takes the bundle’s name once it is whole, and is removed on any other ending. export refuses to start while one is there. |
<bundle>.config.toml | The source’s committed config, which import writes beside the bundle, 0600, for the first config approve. Holds no secret. |
The log
iron-vault.log, 0640, in a directory the service account owns with a mode of at most 0750. An approved config
can move it to another directory, which must pass the same rule; service.log-destination-changed records the move
in both places. The audit log reference lists what it holds, and the
log operations guide covers reading it, rotation and collectors.
Never edit these files by hand
The config pair is signed and the .age vault files are sealed, so a change the service did not make to any of them
is caught, not obeyed. Editing one by hand, even to fix a typo, makes the service refuse it. recovery.toml,
init.unfinished, the lock files, the temporary files and the log are neither signed nor sealed: only the owner and
mode rules above protect them.
config.tomlandconfig.toml.sig. On a SIGHUP, or at unlock, the service reads the pair and checks the signature against the vault ID and the committed approval version. A config changed without approval does not verify: the service goes to Unavailable (policy invalid), answers every request with503, and logsconfig.reload-failedorconfig.check-failed. An older config with its own valid signature is refused too, because its version is below the committed one. To recover, approve a good config:iron-vault config approve dev-config.toml. See Tamper detection and recovery.manifest.ageandrecord-<id>-<digest prefix>.age. Anyone with the vault’s public key can write a file that looks like a credential record, so a record is trusted only when the manifest lists it. A record file the manifest does not list is never loaded (vault.unindexed-file). A listed record that is missing, swapped for another or unreadable is reported as damaged (vault.record-damaged); only the routes that use it answer503.iron-vault replacewrites a good record.identity.age,operational.ageandapproval.age. Damage to the shared state makesunlockrefuse, or sends the service to Unavailable (recovery needed), withvault.shared-state-damagedin the log.approver-<id>.age. Only that approver’s prompt reads it: a damaged or swapped key file makes its answer fail forconfig approve,replace,rmandrecipient remove, and signs nothing.recovery.tomlis plain text, so reminders work while the vault is locked. It holds only two times, when reminders started counting and when the last recovery check ran, so an edit can change no more than whenstatusreminds you to check the recovery key.- The lock files and temporary files. Removing them while the service runs can let two writers race. Leave them; the service cleans up after itself.
To change the config, approve a new one. To change a credential, use add, replace or rm. To start again from
nothing, see Start over.
Iron Vault glossary
One name per concept, in docs and code alike. Definitions follow the product specification.
Adding a term: add it here before the code that uses it. Keep entries alphabetical, give one one-sentence definition, name the owning bounded context, and cite the specification section that introduces it. Fill in the Rust type once one exists.
Bounded contexts
From implementation spec §1. Each crate owns its model; crates do not reach into each other’s private storage models.
| Crate | Owns |
|---|---|
iron-vault-policy | Caller grants, routes, slots, markers, and the final outgoing-request decision; pure, no I/O |
iron-vault-kinds | Credential resolution, token lifecycle, and provider signing rules |
iron-vault-store | Vault identity, recipient envelopes, record files, approval metadata, durable transactions and recovery |
iron-vault | Service binary, HTTP/admin interfaces, CLI client, config loading, deployment adapters and scrubbing |
iron-vault-tpm-protocol | The TPM signing helper’s wire protocol, the TPM key blob’s framing, and the TPM approval PIN; pure, no TPM |
iron-vault-tpm-signer | The TPM signing helper: the TPM approval key, its signatures and the lockout reserve; the only crate that links tpm2-tss |
Actor disambiguation
| Term | Meaning | Protected install | Development |
|---|---|---|---|
| Owner | The person at the end of the authority chain | Alice, but only by passing sudo | Alice |
| Service account | The OS account that runs the service and owns its config (0600), vault and runtime directory. The code’s ExpectedOwner is this account’s uid. | iron-vault | Alice’s login account |
| Admin principal | An OS account the admin socket accepts, checked from the socket’s peer credentials | root | the invoking user |
| Login account | The owner’s everyday OS account | alice, which has no authority | the same account as the service account |
| Host administrator | Anyone who can become root, e.g. through sudo. Outside the threat model (§2). | Alice, if she’s in sudoers | not applicable |
Terms
| Term | Definition | Context | Rust type | Spec |
|---|---|---|---|---|
| Abandoned grant | A refresh token’s grant that no OAuth account record uses any more: the old one after rm of an account record or a login that moves the record to another account or client, or the new one of a login that ends after redeeming its code, when no account record holds its verified account with that client. The service revokes it best effort once the change has settled in Ready and the service-wide lock is released: an rfc7009 definition gets a revocation request, a none definition a notice telling the owner to revoke at the provider; a failed revocation is a notice and an audit event, never a failed command. A change that committed but did not settle in Ready sends nothing: the owner is told to revoke at the provider, and the event says not_serving. A grant some record still uses is never revoked, since a provider may end the whole grant with one token. See oauth.md. | iron-vault | AbandonedGrant, RevocationFailure | future spec §1 |
| Access token | The short-lived bearer token a provider issues for an OAuth account record, which the service puts into the route’s header slot. It lives only in the record’s token slot, never in a record, and carries the record ID it was issued for, so an account record resolves only a token of its own. See oauth.md. | iron-vault-kinds | AccessToken, resolve_token | future spec §1.2 |
| Active policy | A validated config activated against this service’s credential catalog and account directory: the routes it may serve, with routes whose credential record is unusable marked unavailable, and the uid each peer caller’s account had at activation. | iron-vault-policy | ActivePolicy | §6, §7, §12 |
| Admin command | What an admin request asks the service to do, named by its command ID; the admin server dispatches each one to the handler registered for it. | iron-vault | AdminCommand, AdminHandler | §5 |
| Admin operation | The class of admin command the service state gate decides on (ping, status (which list shares), unlock, lock, reload, approve, repair, vault change (the credential changes, every recipient and approver command, and export), initialize (init and import), issue caller token, recovery check); each wire-level admin command maps onto exactly one class (AdminCommand::operation), and a state allows only some classes. | iron-vault | AdminOperation | §15, §16 |
| Admin principal | An OS account the admin socket accepts, checked from the socket’s peer credentials: root in a protected or container install, the invoking user in development; never the service account or the owner’s login account in a protected install. | iron-vault | AdminPrincipal, AdminPrincipals | §5 |
| Admin protocol | The framed byte protocol on the admin socket: one admin request per connection, then zero or more prompt and owner-input round trips, then one admin response; versioned, with exactly one encoding per value. See admin-protocol.md. | iron-vault | admin::protocol | §5 |
| Admin request | One command with its arguments, sent by the CLI as the first frame of an exchange; the service, not the CLI, then decides what to prompt for. | iron-vault | AdminRequest | §5 |
| Admin response | The final frame of an exchange: success, carrying the command’s result when it has one, or an error with a stable error code and a message the service wrote, which never contains owner input. | iron-vault | AdminResponse, ErrorCode | §5 |
| Admin socket | The Unix socket admin.sock in the runtime directory on which the service serves the admin protocol: owned by the service account with mode 0600, never connectable at a wider mode, and serving only peers whose peer identity is an admin principal, checked before a byte is read. | iron-vault | AdminSocket, admin::server | §5, §7 |
| Admission pause | The part of an approval transaction in which no request is admitted: from the move to Checking, made just before the commit, until the config check that follows ends in Ready or Unavailable. Entering it is one store of refuse in the snapshot holder, and a request’s one load from the holder is its admission, so no request is admitted under the old policy after the commit. Requests arriving during it get 503 checking. An approval started from Unavailable (policy invalid) makes no move to Checking, because requests already get 503 policy invalid; its pause lasts until Repaired and the config check that follows end. See config-approval.md. | iron-vault | SnapshotHolder::pause, AdmissionPause, ServiceEvent::ApprovalCommitting; the store’s commit takes it as AdmissionPaused | §12, §15 |
| Approval envelope | The byte format of config.toml.sig: a format version, the signature algorithm, the approver ID of the signer, the approval payload and the signature over that payload’s exact encoding. It carries no public key; each approver’s key is pinned in protected vault metadata, and the approver ID names which one to verify against. | iron-vault-store | ApprovalEnvelope | §12, implementation spec §2.2 |
| Approval passphrase | The owner’s non-empty secret that opens one software approver’s approver key envelope, and nothing else. It is a separate concept and type from the vault-unlock passphrase, and is never derived from it or interchangeable with it: unlocking the vault must never imply authority to approve a config. Held in memory cleared on drop and never displayed. Chosen at vault initialization, or at approver add for a later software approver, under the passphrase rules. | iron-vault-store | ApprovalPassphrase | §12 |
| Approval payload | The bytes a config approval signs: the fixed purpose iron-vault-config-v1, the vault ID, the approval version and the config digest, in one deterministic, versioned encoding. | iron-vault-store | ApprovalPayload | §12 |
| Approval recovery | The first part of every config check, decided from the committed approval alone: serve the published pair when it verifies as the committed approval, finish publishing the committed transaction when its pending config and staged approval wait to be published, and otherwise refuse with a recovery failure and touch nothing. Pending and staged files beside a published pair that verifies are uncommitted leftovers and are discarded, their versions staying consumed. It reads the approval state and never writes it. The recovery failure is the store’s counterpart of the failure reason, which the service maps it to: recovery needed when a committed transaction cannot be completed or a config file is there but cannot be read, policy invalid when nothing is committed or the published pair does not verify. See config-approval.md. | iron-vault-store | recover_approval, RecoveredApproval, ApprovalRecoveryError, RecoveryFailure | §12 |
| Approval signer | The owner’s second factor for owner presence, separate from the unlock method: whatever signs approval payloads for one pinned approver, such as the software signer or the TPM signer, with YubiKey signers later. The owner may enroll several, each with its own label, and any one of them approves. It signs only typed payloads, each starting with its own magic, never arbitrary bytes, so it cannot be used as a general signing oracle: approval payloads, and for a TPM signer also presence payloads and migration proof payloads. Every kind produces the same approval envelope. | iron-vault-store | ApprovalSigner | §12, implementation spec §2.2 Q-9 |
| Approval state | The protected approval metadata of one vault, in the state-directory file approval.age: the vault ID, its state generation and peer generation, the pinned approvers (from 1 to 16), the highest reserved version and the committed approval. It is sealed to the vault public key and authenticated with a MAC keyed from the vault identity, and every change is one durable replace, so its counters never go backwards while the state directory is intact. | iron-vault-store | ApprovalState | §12, §13 |
| Approval summary | The service’s own account of what an approval changes, which the owner reviews before the approval passphrase and the audit log records: a header (vault ID, the version to be committed, the config digest, the committed version), then a deterministic diff of the pending validated config against the active one, in fixed sections (callers, route grants, routes, listeners, limits, logging, recovery, “text changed” alone, or “same config as version N” alone), each in name order with configured names escaped, then an accounts section naming the verified account each route reaches through an OAuth account record. Its headline is one bounded line of counts per section. The CLI’s display of it is never evidence of what was signed. See config-approval.md. | iron-vault-policy | ApprovalSummary, summarize | §5, §12 |
| Approval transaction | The six ordered steps that make a pending config the active one: write the pending config durably, reserve a version, sign, stage the approval, commit, then publish and run the config check. Each step is durable before the next starts, the commit is its one commit point, and it runs under the service-wide lock. The store owns the durable steps, as types that run them in order: a pending config is prepared (reserved, signed and staged), and a prepared approval is committed and published only with proof that admission is paused. The binary owns the approval summary, the prompts, the admission pause and the state transitions. See config-approval.md. | iron-vault-store, iron-vault | PendingConfig, PreparedApproval, CommittedApproval, ApprovalError | §12 |
| Approval version | A per-vault unsigned 64-bit counter that strictly increases for every reserved signing attempt; always positive, and it never wraps. | iron-vault-store | ApprovalVersion | §3, §12 |
| Approver change | Enrolling or removing one pinned approver: one durable replace of the approval state, its commit point, keeping both counters, plus the software signer’s own key file, written before an enrollment commits and removed after a removal commits. approver add and approver remove each run one, from Ready, under the service-wide lock, after owner presence from a pinned approver. See approval-signers.md. | iron-vault-store, iron-vault | §12, §14 | |
| Approver ID | A random UUID v4 that names one pinned approver, generated when the approver is enrolled and never reused. The approval envelope carries it outside the signed payload, which is safe because a changed ID selects a different key and the signature then fails. | iron-vault-store | ApproverId | §12, §14 |
| Approver key envelope | The state-directory file approver-<approver ID>.age, one per software approver, the ID in lowercase hyphenated form: that software signer’s 32-byte Ed25519 private key as a plain age file with exactly one scrypt stanza, opened only by that approver’s approval passphrase. See storage-formats.md. | iron-vault-store | seal_signer_key, open_signer_key | §12 |
| Approver order | The order in which an approver prompt offers the pinned approvers: the approver that signed the active approval first, then the others by enrolment time, earliest first, ties broken by approver ID; with no active approval, enrolment order alone. Nothing stores a preference: approving once with another approver puts it first. approver list prints approvers in this order. See approval-signers.md. | iron-vault | §14 | |
| Approver prompt | The prompt that asks one pinned approver to authorize owner presence or a config approval, naming it by its label, such as Approval passphrase for "work laptop". With more than one approver it is switchable: before answering, the owner may switch to the next approver in approver order. A wrong answer ends the exchange and never moves on to another approver. See approval-signers.md. | iron-vault | §14 | |
| Audit event | One record in the audit log of an administrative change, approval step, lock transition, corruption, policy failure or other security fact, separate from request events: a typed struct with a fixed event name, level, message and fields, emitted under the target iron-vault.audit, which no module path prefix-matches, so no header value or URL has a field to go into. See audit-logging.md. | iron-vault | audit::AuditEvent, audit::AUDIT_TARGET | §18, §12 |
| Authorized request | The immutable plan for one request: the route it selected, its method, its upstream path and its query, after the caller’s grant and the route’s method and path restrictions all passed. | iron-vault-policy | AuthorizedRequest | §6, §8, §9 |
| Basic token | The base64 encoding, standard alphabet with padding, of a Basic credential’s UTF-8 username:password; the slot value a Basic slot writes as Basic <token>. The username is non-empty and has no : (RFC 7617 §2). | iron-vault-kinds | CredentialMaterial::Basic | §9, future spec §2.2 |
| Binding digest | The BLAKE2b-256 digest, personalized with iv-migration-v1, of a migration challenge’s canonical encoding: its vault ID, migration operation, destination recipient, nonce, issue time and expiry. A signing source-owner method signs it, and the service takes a challenge out of its pending slot only by it, so a proof for one pending migration matches no other. See migration-authorization.md. | iron-vault | BindingDigest | §16 |
| Bound credential | A slot value together with the permitted origins of the credential record it came from, borrowed from one resolved credential so the final outgoing-request check can never pair one record’s secret with another record’s destinations. | iron-vault-policy | BoundCredential | §6, §9, future spec §2.2 |
| Bundle check | One check that import step 4 runs on a migration bundle with the vault identity the export passphrase opened, before it trusts or writes any of the bundle: the manifest and approval state open, name the header’s vault ID, pair and hold a committed approval; the header’s counts, the config’s digest, the record files and the bundled approver keys match what those two MAC’d files name. Each check has a fixed short name, given in the bundle-invalid message and the migration.import-refused event’s detail, never a byte of the bundle. See migration-bundle.md. | iron-vault-store | BundleCheckError, ControlFiles | §16 |
| Bundle data frame | The admin-protocol frame, kind 9, whose body is up to 65 536 raw bytes of a migration bundle, never parsed as fields; an empty one ends the bundle. export sends them from the service to the CLI and import from the CLI to the service, so the CLI only ever holds the bundle’s ciphertext and the service never reads or writes a path the owner names. See migration-bundle.md. | iron-vault | BundleChunk, Frame::BundleData, Exchange::send_bundle_chunk, Exchange::receive_bundle_chunk, Bundle (the CLI side) | §5, §16 |
| Bundle header | The first entry of a migration bundle, bundle-header: the magic IVBH, the bundle format version, the vault ID and the approver and record counts. It is not authenticated: import checks it against the files the vault identity opens. See storage-formats.md. | iron-vault-store | migration_bundle::BundleHeader | §16 |
| Bundle transfer deadline | How long a migration bundle may take to cross the admin socket: 10 minutes for the whole bundle, with each bundle data frame also written or read within the request deadline. It bounds how long export holds the service-wide lock and how long import holds a bundle in memory; a missed one ends the export with export-failed and closes an import. See migration-bundle.md. | iron-vault | Limits::transfer_deadline, ExchangeError::TransferTimedOut | §16 |
| Bundled approver key | A migration bundle entry approver-<approver ID>.age: an approver key envelope encrypted again, to the vault public key, so it opens only with the vault identity and therefore sits under the export passphrase. Import opens it and writes the envelope inside, byte for byte, as the destination’s approver key file. Only a software approver has one: a tpm approver’s key stays in the source machine’s TPM. Rust: seal_bundled_approver_key, open_bundled_approver_key and check_approver_key_form. See storage-formats.md. | iron-vault-store | migration_bundle::EntryName::Approver | §16 |
| Caller | An authenticated program identity with grants to named routes. | iron-vault-policy | CallerName, CallerConfig | §3, §7 |
| Caller identification | Deciding which caller a request comes from, before any route is selected: an isolated-network listener names its sole caller; on a peer listener, the caller whose peer account is the connecting process’s uid; on a token listener, the caller whose token hash matches the caller token presented in the listener’s token_header, whose whole value is the token, or else in Proxy-Authorization as Bearer <token> (scheme in any case, one space). Every token caller on the listener is compared; a missing, repeated or malformed header, or no match, is unauthenticated (401). | iron-vault-policy | identify_caller, Unauthenticated | §7, §8, §15 |
| Caller network | An internal Docker network that holds Iron Vault and exactly one caller container, with no route out and no address on the host, so the isolated-network listener Iron Vault binds on it identifies that caller. | iron-vault | §7, §17 | |
| Caller token | A high-entropy secret a caller presents in Proxy-Authorization or its listener’s token_header: ivt_ followed by 43 unpadded base64url characters encoding 32 random bytes. The service generates it at the owner’s request (iron-vault caller-token), shows it once and keeps no copy; an approved config holds only its BLAKE2b-256 hash over the full text, prefix included, which the service compares in constant time. | iron-vault-policy | CallerToken, TokenHash | §6, §7 |
| Check failure | Why a config check left the service Unavailable, without anything the owner must not see. Either damaged shared state or a committed transaction that cannot be completed (failure reason recovery needed), or a config approval that does not verify (policy invalid), or a verified config that does not parse, validate, activate or form a serving snapshot (also policy invalid, with its own fixed status text), including a log destination the config chooses that cannot be opened or verified (log_destination_unusable, whose detail is a fixed phrase and never the path). The 503 body carries only the failure reason’s text; the owner’s log carries a detail that names versions, routes and credentials and never config bytes, URLs, paths or key material. A damaged credential record, or a pinned CA that fails to load, is not a check failure: only the routes it affects are unavailable. | iron-vault | CheckFailure | §12, §15 |
| Check generation | How many config checks the service context has run, an approval’s own included. Each check discards uncommitted pending files, so an approval records the generation and the service state it started at, and commits only if both are unchanged. A replace or rm records the generation the same way, and writes only if the service is still Ready at it. Each comparison is its write’s backstop for a change made without the service-wide lock, which today is only a stop: a lock cancels an approval or a vault change at its prompt, and every other config check waits for the service-wide lock. | iron-vault | Inner::checks | §12 |
| Checked request | An outgoing request that passed the final outgoing-request check against its authorized request, its route’s upstream and slot, and its bound credential: the slot value its slot must hold and its credential record’s permitted origins; the only form the transport accepts. | iron-vault-policy | CheckedRequest | §6, §9, implementation spec §1 |
| Checking | The service state in which storage and the current approval are being verified, entered from Starting or Locked after an unlock, from Ready on an explicit reload, just before an approval’s commit (the admission pause) or after a vault change by replace or rm, and from Unavailable after an authorized repair or committed-transaction recovery. It leaves to Ready when the check passes and to Unavailable otherwise; request listeners answer 503 while it runs. The work done in it is the config check. A vault change enters it through its own event, so it is never logged as a reload. | iron-vault | ServiceState::Checking, ServiceEvent::VaultChanged | §15 |
| CLI | The thin client half of the iron-vault binary: it sends one admin request per command over the admin socket and shows the admin response. It never opens vault files, calls a TPM or edits policy, and no argument ever takes a secret value; the service prompts for secrets instead. | iron-vault | cli::Cli, cli::Command | §4, §5 |
| Committed approval | The approval version and config digest the service last committed, the only pair startup and reload accept; its version is always a reserved version, and a new commit must name a newer one. | iron-vault-store | ApprovalState::committed | §12 |
| Config approval | A service-generated signature binding a vault identifier, approval version, and exact configuration hash. | iron-vault-store | ApprovalEnvelope | §3, §12 |
| Config check | The procedure the service runs in the Checking state (after an unlock, a reload, an approval’s commit, a vault change by replace or rm, or an authorized repair) to decide what it serves: finish or refuse any committed transaction left half published, read config.toml and config.toml.sig, verify them as the committed approval, validate and activate the config, and build the serving snapshot. Passing leads to Ready, failing to Unavailable with a failure reason, never to an older policy. It never writes the approval state. Not to be confused with the offline config check, the CLI’s advisory config check command. Checking is the state; the config check is the work done in it. | iron-vault | check_config | §12, §15, implementation spec §2.2 Q-5 |
| Config digest | The BLAKE2b-256 digest of the exact config bytes the service reviewed; any byte change, whitespace and comments included, gives a different digest and needs a fresh approval. | iron-vault-store | ConfigDigest | §12 |
| Config directory | The directory holding config.toml and the files the approval transaction writes beside it (config.toml.sig, config.toml.pending, config.toml.sig.staged, config.toml.lock): /etc/iron-vault in a protected install, $XDG_CONFIG_HOME/iron-vault-dev in development. The service account owns it with mode 0700, and only the service writes it. | iron-vault-store, iron-vault | ConfigFileName, TrustedPathRule::ConfigDir | §4, §12 |
| Config-directory lock | An exclusive, non-blocking lock on <config directory>/config.toml.lock, taken right after the state-directory lock and held for the service’s lifetime, so a second instance that shares the config directory fails to start, even with another state directory. | iron-vault-store | ConfigDirLock | §4, §13 |
| Config schema version | The integer the config file’s top-level schema_version key must hold, 1 in v0; it names the config file format. Not to be confused with the log schema version. | iron-vault-policy | SCHEMA_VERSION | §6 |
| Confirmation | A route’s owner-confirmation policy: none, the default and the only value v0 accepts. touch is named for a later phase, and v0 refuses a config that sets it when the config is read, because no confirmation provider exists. | iron-vault-policy | Confirmation | §6, future spec §2.1 |
| Consent URL | The provider’s authorization endpoint with the query a login sends the owner’s browser to: response_type=code, the client ID, the redirect, the requested scopes and the definition’s add_scopes, the PKCE challenge, the login state and the definition’s authorize_params, form-encoded. It carries no secret. See oauth.md step 2. | iron-vault-kinds | consent_url | §16, future spec §1.1 |
| Container profile | The Container deployment profile, built with the container Cargo feature for a Docker Compose stack: Protected’s paths, service account and locked-memory rule, with the same root-only admin principal, TCP listeners bound by the service itself, and a host unlock at startup; installed with the Compose install guide. | iron-vault | §5, §7, §17 | |
| Content coding | The Content-Encoding transform an upstream applied to a response body. The service decodes gzip, deflate and br; identity means none. | iron-vault | ContentCoding | §11, implementation spec §3 |
| Credential | A named provider secret and the rules that govern its use. | iron-vault-kinds | §3 | |
| Credential standing | One credential name’s state in a status report: healthy, or damaged with the kind of damage the vault’s open report found (missing, substituted, unreadable), or needs login, or unusable with its cause. It names the routes the credential makes unavailable (never a route unavailable only through a route fault) and never a secret value or record digest. A credential whose record loaded (healthy, needing login or unusable) also carries its kind and permitted origins, which list shows and status leaves out, and for an OAuth record what is not secret about it: a client record’s token host and rotation, an account record’s client record name, verified display name and issuer, and granted scopes. A damaged record’s origins cannot be trusted, so they are never held. status and list read a needs-login cause a refresh learned from the token slots, since the config check cannot see it. | iron-vault | CredentialStanding, Standing | §15, §16 |
| Credential catalog | The service’s view of the vault for activation: per credential name, unknown, unusable (damaged, needing login, or an unusable account record), or usable with its permitted host and port pairs. | iron-vault-policy | CredentialCatalog, CatalogEntry | §6, §12 |
| Credential material | The decrypted secret fields of one credential record, in the shape its kind consumes; the store maps a record into it, and a kind never reads records itself. | iron-vault-kinds | CredentialMaterial | §6, future spec §2.2 |
| Credential kind | The name of the kind a credential record declares, static, basic, oauth_client or oauth_refresh; activation uses it to check that the route’s slot suits the kind, without implementing the kind. A static key fills a header or query slot; a Basic credential fills only a Basic slot; an OAuth account record fills only a header slot; an OAuth client record fills none. | iron-vault-policy | CredentialKind | §6, future spec §2.2 |
| Credential listing | The structured, secret-free answer to list: one entry per credential in the vault manifest, in name order, each a credential standing with the kind and permitted origins of a healthy record. Unknown while no vault is open. Allowed in every state, like status. See admin-protocol.md. | iron-vault | CredentialStanding, RecordSummary | §16, §15 |
| Credential record | The encrypted record containing a credential’s secret, kind, permitted origins, and provider settings. | iron-vault-store | CredentialRecord | §3 |
| Damaged record | A credential record the vault manifest lists whose file is missing, substituted (its digest differs from its manifest entry, whatever the file contains, in which case it is never decrypted; or it decrypts to another record ID or name) or unreadable (it could not be read, is over the size limit, or its digest matches but it does not decrypt or decode); it is never loaded, its routes are unavailable, and the other records still load. | iron-vault-store | RecordDamage | §13, §15 |
| Decompression budget | The per-response count of decoded bytes, checked after every piece the response decoder yields against max_decompressed_response_bytes and, once the decoded total passes a floor, against max_decompression_ratio; an identity body is counted against the size limit only. Exceeding either aborts the response; the error carries only the two counters, never a byte. | iron-vault | DecompressionBudget, BudgetExceeded | §11, §15, implementation spec §3 |
| Deployment profile | How this build is installed, Protected, Container or Development, fixed at build time and never chosen by config, flag or detection; it decides the install paths, the service account, the admin principals, whether unlock requires locked memory, whether TCP listeners come from socket activation, and whether the service tries a host unlock at startup, and nothing else. | iron-vault | DeploymentProfile | §4, §5, §17 |
| Destination invariant | A credential leaves only for its route upstream’s host and port, only when its credential record permits that pair, only inside the upstream base path, and only in the route’s slot; property-tested from request parsing to the final outgoing-request check. | iron-vault-policy | §9, implementation spec §2 | |
| Development mode | The Development deployment profile, built only with the dev-mode Cargo feature: it runs as the invoking user, gives no isolation from that user’s malware, and never relaxes caller authentication, route policy, the final outgoing-request check, TLS verification, scrubbing, encryption at rest or config approval. | iron-vault | DeploymentProfile::Development | §4 |
| Diagnostic record | A log record that is neither an audit event nor a request event, such as a listener’s accept error: it shares the log with them, carries the constant fields but no event name, and follows the same never-logged list. | iron-vault | §18 | |
| Digest prefix | The first 8 bytes of a record file’s digest in its vault manifest entry, in lowercase hex. It ends the record file’s name, record-<record ID>-<digest prefix>.age, so rewriting a record under the same record ID writes a new file, and the old one is removed only after the manifest commit; a file under another prefix is unindexed, and its entry’s record counts as missing. | iron-vault-store | DigestPrefix, StateFileName::record | §13 |
| Durable remove | Unlinking a state file, then fsyncing the state directory, so the deletion survives power loss. | iron-vault-store | durable_remove | §13, §19 |
| Durable replace | Writing a state file’s new bytes to a private .<name>.tmp in the state directory, fsyncing it, renaming it over the file and fsyncing the directory; the file holds the old bytes or the new ones, never a mix. | iron-vault-store | durable_replace | §13, §19 |
| Envelope digest | The BLAKE2b-256 of the identity envelope’s bytes exactly as they sit on disk; a recipient inventory describes only the envelope whose digest it carries. See recipients.md. | iron-vault-store | §13 | |
| Error kind label | The fixed snake_case label a log record gives a library error in its error_kind field, chosen from the error’s kind, predicates or type and never from its Display or Debug: an io::Error’s io::ErrorKind (not_found), a reqwest error’s transport error class (timeout, tls), or one label per error type (random_source). | iron-vault-store, iron-vault | ErrorKindLabel | §18, audit-logging.md |
| Event name | The stable name of an audit or request event, <subject>.<name> such as config.version-reserved or request.completed, written in its event field; renaming or removing one changes the log schema version. | iron-vault | audit::EventName | §18 |
| Exchange | One connection on the admin socket: one admin request, zero or more prompt and owner-input round trips, then one admin response, after which the service closes the connection. A prompt that gets no owner input cancels the exchange’s command before it changes anything. | iron-vault | Exchange, ExchangeError | §5 |
| Expected owner | The service account’s uid, which must own a trusted path’s service-owned parts: iron-vault in a protected deployment, the invoking user in development. Root is always also trusted for ancestors. Not to be confused with the owner, who is a person. | iron-vault | ExpectedOwner | §4 |
| Export passphrase | The passphrase the owner chooses during export, after migration authorization has succeeded, to seal the exported identity envelope, and types again on import. It protects the transfer only and never authorizes a migration. The specification also calls it the bundle passphrase. Rust type: ExportPassphrase. See migration-bundle.md. | iron-vault-store | §16 | |
| Export snapshot | The vault files export checks under the service-wide lock before any prompt, and reads again after it consumes its migration authorization: the manifest and approval state, opened and checked; the committed config.toml, checked against the committed config digest; every pinned approver’s key file, checked for form and encrypted to the vault public key unopened; and every record file the manifest names, each checked against its entry’s digest and never decrypted. See migration-bundle.md. | iron-vault-store | check_export_snapshot, stream_export_snapshot, SnapshotSummary, SnapshotStep, ExportedBundle, SnapshotError, SnapshotDamage | §16 |
| Exported identity envelope | The migration bundle entry exported-identity.age: the vault identity’s secret text sealed to the export passphrase with one scrypt stanza, in the passphrase envelope’s format. It exists only inside a bundle and is never written to the state directory, so identity.age never holds an scrypt stanza. Rust: seal_exported_identity and open_exported_identity. See storage-formats.md. | iron-vault-store | §14, §16 | |
| Failure reason | Why a check left the service Unavailable: the policy is invalid, or shared state is damaged and a recovery is needed. It is the part of the unavailable reason set that a check can produce; Locked is a state of its own. | iron-vault | FailureReason | §15 |
| Fault filesystem | A test-only, in-memory StoreFs that records every call, fails chosen calls with a chosen error, and models power loss: file contents survive a crash only once fsynced, and directory entry changes only once the directory is fsynced. | iron-vault-store | FaultFs | §13, implementation spec §2 |
| Forget machine | The admin command iron-vault forget-machine <age1…>, allowed in Ready on the vault that stays: it checks that a retired machine’s recipient key is no longer in the recipient inventory (else machine-not-forgotten, naming recipient remove), warns when the independence rule fails or the recovery path is not verified (no check has run, or it is overdue), and prints the decommission guidance for the retired machine. It changes nothing and runs no TPM tool; the administrator runs every step. See forget-machine.md. | iron-vault | ForgetCheck, ServiceContext::check_forgotten | §16 |
| Frame | One message of the admin protocol: a header holding the protocol version, the frame kind and the body length, then the body. | iron-vault | Frame | §5 |
| Handoff unit | The host’s root-run oneshot systemd unit iron-vault-host-unlock.service that unseals the host unlock blob once per boot and installs the unlock handoff on a ramfs before the service, or Docker in the Container profile, starts; it is a unit of its own so that a failed unseal fails only it, and the service still starts and waits Locked; when it fails it leaves the unseal-failure file. See tpm-unlock.md. | iron-vault | §17 | |
| Hardware key | A removable device, initially a YubiKey, that protects keys and supports PIN and touch policies. | iron-vault-store | §3 | |
| Header scrub | Scrubbing every value of a response’s headers whole, through the same matcher as the body so both follow one rule; header names are not scrubbed, since a secret in a name is implausible and rewriting names would change semantics. Returns the number of matches replaced. | iron-vault | scrub_headers | §11 |
| Header value | The bytes of one HTTP field value; never contains CR, LF or NUL, may contain obs-text, and is never rendered in logs or errors. | iron-vault-policy | HeaderValue | §9 |
| Host | An upstream host name or IP literal in its one canonical form; hosts compare exactly, never by suffix or wildcard. | iron-vault-policy | Host | §9 |
| Host administrator | Anyone who can become root, e.g. through sudo; outside the threat model, and the only way the owner reaches the admin socket in a protected install. | iron-vault | §2, §5 | |
| Host unlock | A Protected or Container service’s unlock at startup with the unlock handoff, with no owner present: once memory is locked, the handoff is read, the vault must be Initialized, and the host unlock identity unwraps identity.age, after which the service goes from Starting to Checking. Any other outcome leaves it Locked for passphrase unlock, and none counts toward the passphrase attempt limit. Each attempt is recorded as the audit event vault.host-unlock; a Development service never tries one. See docker-compose.md. | iron-vault | ServiceContext::unlock_at_start, HostUnlockOutcome, HostUnlockRefusal, audit::vault::HostUnlock | §15, §17 |
| Host unlock blob | The file /etc/iron-vault-host/host-unlock.cred, root 0600, holding the host unlock identity’s secret text sealed by systemd-creds to the host’s TPM and PCR 7 under the name host-unlock; the only copy of that identity on disk, and useless off this TPM. systemd calls it an encrypted credential, its word for any secret it hands a unit; it is not a Credential. See tpm-unlock.md. | iron-vault | §14, §17 | |
| Host unlock identity | A generated X25519 recipient identity with the recipient role host-unlock, whose secret text is sealed to the host’s TPM by systemd-creds and handed to a Protected or Container service at startup; an intermediate identity that never substitutes for the recovery key and never authorizes migration. init --host-unlock enrols it in a new vault. | iron-vault-store | RecipientRole::HostUnlock | §13, §14, §17 |
| Identity envelope | The state-directory file identity.age: the vault identity’s secret text as a plain age file with one X25519 stanza per recipient key and no scrypt stanza, so every enrolled recipient opens it independently. | iron-vault-store | wrap_identity, unwrap_identity | §13, §14 |
| Incoming connection | A connection accepted on a request listener, tagged by the transport with its listener name and, on a Unix socket, the peer identity; these tags are the only inputs to caller identification besides the request headers. On a TLS listener its handshake has not run yet: establishing the connection runs it in the connection’s own task, so a slow client never holds up accepting. | iron-vault | IncomingConnection, RequestStream | §7, §8 |
| Independence rule | The check every recipient change must pass on the inventory it would write: it keeps the recipient of each configured unlock method and at least one unlock-class recipient, the operational recipient while the vault passphrase is the only source-owner method, at least one recovery recipient, and from 2 to 64 recipients, so the vault always keeps two independent ways in: its unlock method and an offline recovery key. See recipients.md. | iron-vault-store | §14, §16 | |
| Init passphrases | The vault passphrase and the approval passphrase as the owner chose them at vault initialization, valid only together: each at least 12 Unicode scalar values and the two different, compared in constant time. A refusal names the rule and carries none of the input. Typing a passphrase to unlock or approve never applies these rules. See vault-initialization.md. | iron-vault-store | InitPassphrases | §14 |
| Init step | One step of vault initialization’s write order, numbered 1 to 9, or the discard of an unfinished initialization before step 1; a failed initialization names the step it failed at. See vault-initialization.md. | iron-vault-store | InitStep | §13 |
| Initial config | The exact 19 bytes schema_version = 1\n that vault initialization approves as version 1: no listener, caller or route, because the vault holds no credential yet; it lets the first unlock reach Ready, where credentials can be added. See vault-initialization.md. | iron-vault-store | INITIAL_CONFIG | §12, §16 |
| Initialization state | What the state and config directories hold, read without the vault identity and checked in this order: reset.unfinished present (Unfinished reset, whatever else is there; see reset.md), else init.unfinished present (Unfinished, unless import.unfinished is there too, or a record file, a foreign file or a config file that is not the initial config is), else import.unfinished present (Unfinished, unless a foreign file or a config file but config.toml is there), else manifest.age present (Initialized, whatever else is there), else only the lock file, lost+found, temp files and a recovery check record, and no config file (Uninitialized), else Unrecognized. A foreign file is one not on the lists in the design; it matters only beside init.unfinished, import.unfinished or with no manifest. The Unfinished state records which run left it. init and import proceed only on Uninitialized and Unfinished; unlock only on Initialized. See vault-initialization.md. | iron-vault-store | InitializationState, UnfinishedKind | §13, §16 |
| Intermediate identity | A generated X25519 recipient identity whose recipient key is enrolled in the identity envelope and whose secret text is kept in a separate file that only one device or passphrase can open, so a hardware key or passphrase reaches the vault without any stanza but X25519 in the identity envelope. The operational identity is the passphrase case. | iron-vault-store | §13, §14, future spec §2.1 | |
| Inventory check | How every recipient command opens the recipient inventory, under the service-wide lock: it must match the identity envelope’s digest and stanza count; a matching staged inventory finishes a committed recipient change, and anything else is damaged shared state, never repaired. See recipients.md. | iron-vault-store | §13, §15 | |
| Kind | The operation that turns a credential into request bytes, such as a static key, an OAuth access token, or a signature. | iron-vault-kinds | §3 | |
| Library error | An error value from a dependency, such as io::Error, reqwest::Error or hyper::Error, or a workspace error that carries one in its text, such as RandomSourceError; its text may hold a URL with its query, a header value or a path, so a log records it only by its error kind label. | iron-vault | LibraryError | §18, audit-logging.md |
| Linux package | The .deb that installs a protected Linux deployment: built with cargo-deb from the iron-vault crate, never with dev-mode, it installs the binary and the systemd units, creates the service account and the service’s directories, and enables the service unit. See linux-package.md. | iron-vault | §4 | |
| Listener | A configured endpoint, a Unix socket or TCP address, on which callers reach the request interface. | iron-vault-policy | ListenerName, ListenerConfig | §6, §7 |
| Listener failure | A status report entry for an approved or provisional listener that did not open: the listener’s name and one fixed reason category (such as tls-key-mismatch or address-in-use), never a path, a file’s contents or a key. The other listeners keep serving and the service state does not change. | iron-vault | ListenerFailure, ListenerFailureReason | §15 |
| Listener rebuild | What entering Ready does to the request listener set before the serving snapshot is served: a socket is kept only when the verified configuration names its listener with exactly the same endpoint, TLS files and token header, and it is then checked again (its socket and socket file, its TLS files read again); every other socket is closed, with its connections, before anything is bound; every verified listener not kept is adopted from the passed sockets, or else bound. One that cannot be opened is logged at WARN and is left out and listed by status until a later approval opens it or removes it, and the service still enters Ready. A kept listener’s connections stay open while the operational limits are unchanged, so requests admitted before a reload or an approval finish on the old serving snapshot; a change of limits closes every connection. | iron-vault | RequestListeners::rebuild, Rebuilt | §7, §12, §15 |
| Listener provenance | Whether the request listener set was taken from the unverified config.toml (provisional, every state but Ready, answering only 503) or from the verified configuration (approved, Ready only). | iron-vault | ListenerProvenance | §15 |
| Listener socket unit | An instance iron-vault-listener@<listener>.socket of the Linux package’s template socket unit, named after one request listener: systemd binds the endpoint that the administrator’s drop-in names and passes it to the service under the listener’s name, and the service checks it against the approved listener before serving on it, so changing one needs no config approval. See linux-package.md. | iron-vault | §7 | |
| Location rewrite | The response-stage decision that maps an upstream redirect’s Location to what the caller sees: a same-origin destination inside the upstream base path rewritten under the route prefix with the query slot’s parameter removed, a cross-origin destination written as an absolute scheme://authority URL passed through unchanged, or a refusal. | iron-vault-policy | LocationRewrite, LocationRefusal, rewrite_location | §8, §11 |
| Lock drain | The bounded wait at the end of an explicit lock for the requests still holding a withdrawn serving snapshot to end. The service answers lock as cleared only when every snapshot was released within it and nothing else still holds the vault identity; otherwise it says so and logs the count, instead of claiming the secrets are gone. | iron-vault | Withdrawn, LockOutcome | §12, §14, §16 |
| Lock transition | A change of service state that the vault identity’s presence in memory drives: Locked to Checking on an unlock or Starting to Checking on a host unlock, and the outcome the config check that follows settles in, and Ready or Unavailable to Locked on lock. Each is recorded as the audit event service.lock-transition at INFO, naming the two states and nothing an unlock was given (audit-logging.md). | iron-vault | audit::LockTransition | §15, §18 |
| Locked | The service state in which the vault identity is not in memory and an authorized unlock is awaited; entered from Starting when interactive unlock is required, and from Ready or Unavailable on an explicit lock. The configuration cannot be verified, because the approval state is sealed to the vault identity, so the request listeners named in the unverified config.toml are bound with a provisional listener set. They answer only 503 with the redacted reason and never authenticate a caller, select a route or resolve a credential; unlock is possible only over the admin socket. Accepted residual risk: a swapped config.toml can open an extra port, expose the HTTP and TLS code there, take a port another service needs, or tell a remote host the vault is locked. | iron-vault | ServiceState::Locked | §15 |
| Lockout reserve | The part of the TPM’s shared dictionary-attack counter the TPM signing helper never spends, at least half the TPM’s maximum. The helper tries a PIN only while the counter is below its share, the smaller of half the maximum (rounded down) and 16, and refuses outright when that share is 0 or the lockout interval is below 600 seconds; otherwise it answers locked out with the seconds the TPM needs to forget enough failures. It reads the device’s counter rather than keeping a count of its own, so Iron Vault never brings the TPM into lockout and other PIN users keep their tries. It rests on the helper serving one request at a time: two instances at once could both read the counter below the share. See tpm-approval-signer.md. | iron-vault-tpm-signer | LockoutReserve | §12, §15 |
| Log destination | Where the service writes its log records: the one file iron-vault.log in a log directory, or stdout. The active approved config’s [logging] destination chooses it; until one is active, and when it sets none, the bootstrap destination applies: /var/log/iron-vault in a protected install, $XDG_STATE_HOME/iron-vault-dev-log in development, or stdout when serve is given --log-to-stdout, as the Docker image is. It is never taken from the unverified config.toml; it switches when a config check activates a config that moves it, never on lock. A configured directory must be absolute, outside the state and config directories, and pass the log directory’s trusted-path rule (the leaf is the service account’s with no group or other write; an ancestor may be group-writable only when root owns it, as stock /var/log is, and never writable by others; only root-controlled symlinks above the leaf), checked through the one descriptor the service opens with `O_DIRECTORY | O_NOFOLLOWand verifies withfstat; stdout is refused when stdout is the journal (JOURNAL_STREAM`). A destination that cannot be opened or written stops the service. See audit-logging.md. | iron-vault | logging::LogDestination |
| Log destination setting | The [logging] destination key of the approved config as the policy crate parses it: the literal "stdout", or an absolute directory path with no control character and no .. component, which must also lie outside the state and config directories (LogDestinationSetting::check_outside, which the config check and config approve’s pre-check call with canonicalised paths). It is carried in the validated and activated config; it chooses nothing until the service applies it at activation. Absent, the bootstrap destination applies. See audit-logging.md. | iron-vault-policy | LogDestinationSetting | §18 |
| Log file | The writer for a log directory: it writes only through the directory descriptor the trust check opened and verified, and appends each record whole to iron-vault.log, opened relative to it with openat and O_NOFOLLOW, created by the service alone, and verified with fstat after every open (a regular file the service account owns, with no group or other write); it reopens the name when logrotate has renamed it (its device and inode no longer match the open file), and on the first failed write trips the latch that stops the service, as the stdout writer does on EPIPE. See audit-logging.md. | iron-vault | logging::LogFile, logging::LogStdout, logging::LogFailure | §18, §15 |
| Log schema version | The integer every log record carries in schema_version; it increases when a field or event name is removed or renamed, a field’s type or unit changes, or a reason code or label changes meaning, and not when one is added. | iron-vault | audit::SCHEMA_VERSION | §18 |
| Log switch | The writer the log subscriber holds: the open writer of the current log destination, which activation can point at another. The config check opens and verifies the destination the approved config chooses as its last step, and only when it differs from the current one; entering Ready then writes service.log-destination-changed to the old destination, switches, and writes it again as the new one’s first record. A record already being written finishes where it began. Every writer it holds trips the same LogFailure latch. | iron-vault | logging::LogSwitch, logging::LogOpener, logging::OpenedLog | §18, §15 |
| Login account | The owner’s everyday OS account; it has no authority in a protected install, and is the service account in development. | iron-vault | §4, §5 | |
| Login state | The 32 random bytes, as base64url without padding, that a login sends as the consent URL’s state and requires back, exactly once, in the pasted address, so the code redeemed is the one this login asked for. A mismatch ends the exchange. It is not secret: the owner sees it. See oauth.md step 3. | iron-vault-kinds | LoginState | §16, future spec §1.1 |
| MAC’d file | A sealed file framed by a clear header (magic, format version, vault ID) and a trailing BLAKE2b MAC keyed from the vault identity with a per-file persona and domain tag; the MAC is checked before anything is decrypted, so only the service can write one that opens. The vault manifest, the approval state and the recipient inventory are MAC’d files. | iron-vault-store | MacFileKind | §13 |
| Manifest entry | One record in the vault manifest: a record ID mapped to its credential name and the BLAKE2b-256 digest of that record file’s ciphertext bytes, so a substituted or altered record file no longer matches. | iron-vault-store | ManifestEntry | §6, §13 |
| Marker | An inert SDK placeholder such as {iv:fx_key} that Iron Vault interprets only in the selected slot, where it must name the route’s own credential; it never selects a credential. | iron-vault-policy | markers, MarkerError | §3, §9, implementation spec §2.2 |
| Memory protection status | Whether the service’s memory is kept out of swap: Locked only after mlockall succeeded; Unavailable with the RLIMIT_MEMLOCK soft limit or the error when it was not locked; Unsupported on a platform with no locking adapter. Only Locked means swap protection is in effect. A protected install unlocks the vault, and init generates its keys, only when it is Locked. | iron-vault | MemoryProtection | §14 |
| Method | An HTTP method from the allowlist a route may grant; CONNECT and TRACE are never allowed. | iron-vault-policy | Method | §6, §8 |
| Migration authorization | The move-only proof, constructed only after a source-owner method proved a pending migration challenge, that the owner authorized one migration operation. It holds that challenge, and the operation that consumes it checks that the vault ID, operation and destination recipient are its own and that the challenge has not expired. It is never cloned, stored or reused; an unlocked vault, an admin connection, an earlier unlock or a new export passphrase never makes one. A refusal is migration-denied or migration-unavailable. See migration-authorization.md. | iron-vault | MigrationAuthorization, AuthorizedMigration, MigrationRefusal | §16, §19 |
| Migration bundle | The versioned .tar.gz file export writes and import reads: a bundle header, the exported identity envelope, the vault’s manifest, approval state and record files copied byte for byte, the committed config.toml without its signature, and the bundled approver keys. It holds no plaintext secret and no recipient of the source; nothing in it becomes a filesystem path. Import reads it with a strict streaming decoder that accepts only the one encoding the encoder writes. See migration-bundle.md and storage-formats.md. | iron-vault-store | migration_bundle::{BundleEncoder, BundleDecoder, DecodedBundle, BundleError, EntryName} | §16 |
| Migration challenge | The short-lived, single-use value the service issues just before it asks for a source-owner proof: the vault ID, the migration operation with its destination recipient, a 32-byte nonce from the operating system’s random source, and an issue time and an expiry 2 minutes later on the monotonic clock. The service holds at most one pending. Taking it out of that slot to verify it retires it, as do being taken after its expiry, a cancelled prompt, lock and the end of its exchange, so it is never verified twice. See migration-authorization.md. | iron-vault | MigrationChallenge, PendingMigration | §16, §19 |
| Migration operation | What a migration authorization permits: Export, before export writes a migration bundle, or AddRecipient, which names the destination recipient key recipient add enrolls in the identity envelope. See migration-authorization.md. | iron-vault | MigrationOperation | §16 |
| Migration proof payload | The bytes a TPM approver signs to prove a migration challenge: magic IVMA, a format version and the challenge’s 32-byte binding digest, 37 bytes in all. Wrapping the digest keeps a signature over a challenge from being read as one over any other structure. See tpm-approval-signer.md. | iron-vault-store | MigrationProofPayload | §16 |
| Needs login | A credential standing of an OAuth account record: it holds no refresh token the service may use, so only a new login clears it. Its routes answer 503 with reason credential_needs_login while other routes keep serving. It is durable when the record’s refresh marker is set, and otherwise held in the record’s token slot only, so a restart tries the refresh token once more. Its cause is refused (the provider refused the refresh token) or uncertain (a rotating refresh may have reached the provider). See oauth.md. | iron-vault | Standing::NeedsLogin, NeedsLoginCause | §15, future spec §1.3 |
| New vault keys | Every key vault initialization generates, before anything is written: the vault identity, the operational identity, the recovery key, the software signer key with its pinned approver, and the vault ID. The recovery key’s text leaves them once, for the reveal; after it only the recovery key’s recipient identity stays, for the identity envelope’s unwrap check, and every key is dropped when initialization returns. | iron-vault-store | NewVaultKeys, then SealingKeys without the recovery key’s text | §14, §16 |
| Normalized path | A caller’s validated request path, unreserved escapes decoded and others in uppercase hex; authorized and forwarded as is. | iron-vault-policy | NormalizedPath | §6, §9 |
| Notice | An admin protocol frame (kind 6) in which the service sends text for the owner to read, such as an approval summary; it is never answered. The CLI writes consecutive notices’ texts one after another, so text of any length reaches the owner, split across notices and never truncated. See admin-protocol.md. | iron-vault | Notice, Exchange::notice | §5 |
| OAuth account record | A credential record of kind oauth_refresh for one signed-in provider account: the refresh token, the record ID of its OAuth client record, the granted scopes, the permitted origins its access token may go to, the verified account and the refresh marker. It never holds an access token, and fills header slots only. login creates and replaces one; a refresh writes it again only to store a new refresh token or the refresh marker, always to a new digest-named file under the same record ID. It is the only kind an update in place may write. See oauth.md. | iron-vault-kinds | OAuthAccount | §6, future spec §1 |
| OAuth client record | A credential record of kind oauth_client for one provider app: its client ID, client secret and provider definition, sealed at enrollment. Its permitted origins are the origins of the definition’s endpoints, set by the service. No route may name it, since it fills no slot; OAuth account records name it by record ID. rm and replace of one that an account record references are refused, and no update in place ever writes one. See oauth.md. | iron-vault-kinds | OAuthClient | §6, future spec §1 |
| Offline config check | What iron-vault config check FILE does: parse the file and validate its sections against each other, with no service, vault or root, and say Config ok or why not. It is advisory. It does not run activation (that each credential exists, permits its route’s host and fits its slot, that a peer caller’s account exists), nor the upstream TLS and log destination checks, so a config that passes can still be refused by config approve. Not the config check, which the service runs in the Checking state against the committed approval. | iron-vault | check_file | §5, §16 |
| Open report | What opening the vault found besides its healthy records: each damaged record by credential name and damage, and each unindexed record file; it holds no secret content. | iron-vault-store | OpenReport | §13, §15 |
| Operational identity | A generated X25519 recipient identity whose recipient key is enrolled in the identity envelope and whose secret text is kept only in the passphrase envelope, so a passphrase can unlock the vault without an scrypt stanza ever sitting beside other recipients. A recovery unlock replaces it with a new one. | iron-vault-store | OperationalIdentity | §14, implementation spec §2.2 Q-4 |
| Operational limits | Service-wide bounds on request head and body size, decompressed response size, timeouts, and concurrent connections. | iron-vault-policy | Limits | implementation spec §3 |
| Orphan key file | An approver-<approver ID>.age file (a software approver’s key) or approver-<approver ID>.tpm file (a TPM approver’s key blob) whose approver ID no pinned approver has, left by an enrollment that failed before its commit point or by a removal that could not delete it. It signs nothing, because the service opens a key file only for the pinned approver it names; approver add and approver remove delete it after the approval state is read back, and only against the state that read-back returned. See approval-signers.md. | iron-vault-store | remove_orphan_key_files | §12, §13 |
| Origin | One host and port pair a credential’s secret may reach, written by the owner as host, host:port, [v6] or [v6]:port with no scheme (HTTPS is implied) and no path; the port defaults to 443. A permitted origins set is made of these. | iron-vault-policy | parse_origin, OriginError | §6 |
| Out-of-base redirect | A same-origin Location that resolves outside the upstream base path; it is refused rather than rewritten, so it cannot land in another local route. | iron-vault-policy | LocationRefusal::OutOfBase | §11 |
| Outgoing headers | The ordered header list an upstream request carries; built from sanitized caller headers and never holding a reserved header. | iron-vault-policy | OutgoingHeaders | §9 |
| Outgoing request | The request about to leave the service: the authorized method, the upstream target and the outgoing headers, with the route’s slot filled exactly once; the input to the final outgoing-request check. | iron-vault-policy | OutgoingRequest | §8, §9 |
| Overflow uid | The uid the kernel reports for a peer whose real uid has no mapping in the receiver’s user namespace: 65534 (nobody) by default, set by /proc/sys/kernel/overflowuid. Many unrelated processes share it, so it is never a peer account. | iron-vault-policy | AccountDirectory::overflow_uid, ActivationError::OverflowAccount | §7 |
| Owner | The person at the end of the authority chain, authorized to enroll credentials, approve policy, recover the vault, and authorize destructive changes; never an OS account, and acts on the service only through an admin principal. | iron-vault | §3, §5 | |
| Owner console | Where the CLI collects owner input: the controlling terminal when stdin is a terminal, with echo off for a secret prompt, and otherwise stdin, one line per prompt. It holds what the owner types only until the value is sent. | iron-vault | OwnerConsole | §5, §16 |
| Owner input | The bytes the owner typed in answer to a prompt, carried as the whole body of one frame; a secret-bearing type, never decoded through a general field decoder or serde. | iron-vault | OwnerInput | §5, §14 |
| Owner presence | A one-time check, made by the service during a single admin exchange, that the owner is taking part in that exchange. The owner proves it the same way as approving a config: in v0, by typing the approval passphrase, which must open the approver key envelope to a pinned approver’s key; later, any pinned approver’s signer. It authorizes only the one change the service described in its own summary just before asking, and is never kept or reused. It doesn’t say which account connected, which the admin principal shows, nor prove what the owner saw, since a compromised desktop can fake the screen. It is required before replace, rm, recipient remove, approver add, approver remove, and a login that moves a record to another account or client, or widens its scopes or origins. It reserves no approval version, signs nothing and writes nothing; a failure is approval-denied. See credential-commands.md. | iron-vault | OwnerPresence, require_owner_presence | §3, §6, §16 |
| Owner-lock file | The empty file locked-by-owner in the state directory, written durably by lock and removed by a passphrase unlock or a recovery unlock; while anything is at that name, a starting service skips host unlock and stays Locked, so an explicit lock survives a crash, a restart or a reboot. It is store-owned but not a vault file: reset, init and import remove it, and a migration bundle never carries it. See tpm-unlock.md. | iron-vault-store | §15, §16 | |
| Parsed config | A configuration document whose listeners, callers, routes and limits each passed their own validation, before cross-references are checked. | iron-vault-policy | ParsedConfig | §6 |
| Partial restore | A manifest and approval state that no sequence of writes leaves on disk together: the file written last does not record the other’s current state generation as its peer, or approval.age is missing although the manifest records one. It means a MAC’d file was restored from an older copy or deleted, so the vault refuses to open, the approval state to load and either file to be written, until the owner recovers or resets the vault; it is never repaired automatically. | iron-vault-store | PartialRestore | §12, §13 |
| Passed sockets | The sockets systemd passed by name under socket activation, held from startup until a listener of the same name adopts one. A socket is checked against its listener’s endpoint only when it is adopted, so one the unverified config does not name, or names wrongly, stays held for a later listener rebuild to adopt against the verified configuration. A socket whose check fails stays held. | iron-vault | PassedSockets | §7 |
| Passphrase | The owner’s non-empty vault-unlock secret for the passphrase envelope, distinct from the approval passphrase; held in memory cleared on drop and never displayed. At vault initialization it and the approval passphrase are each entered twice and must match, are UTF-8 of at least 12 Unicode scalar values, and must differ from each other, compared in constant time; a refusal names the rule and carries none of the input. Opening a vault checks only that it is non-empty. | iron-vault-store | Passphrase | §14, §15 |
| Passphrase attempt limit | A bound on how many wrong vault passphrases the service accepts before it refuses further attempts for a time. In v0: 5 consecutive failures, then a cooldown of 30 s that doubles with each further failure up to 15 min; one count covers unlock and migration authorization, so a failure at either adds to it and a success at either clears it; it survives lock and resets on success or restart. See migration-authorization.md. | iron-vault | AttemptLimiter, AttemptsCoolingDown | §16 |
| Passphrase envelope | The state-directory file operational.age: the operational identity’s secret text as a plain age file with exactly one scrypt stanza and no other; unlock goes passphrase, then operational identity, then vault identity. | iron-vault-store | seal_passphrase_envelope, open_passphrase_envelope | §14, §19 |
| Paste-back login | The way login gets the authorization code: the service shows a consent URL whose redirect is a loopback address nothing listens on, and the owner pastes back the address the browser was sent to. The service checks its state value and redeems the code with a PKCE verifier that never leaves the service, so the pasted address alone is useless. It works where no browser can reach the service, such as a Compose deployment. See oauth.md. | iron-vault | LoginExchange | §16, future spec §1.1 |
| Pasted address | The address the owner’s browser was sent to after consent, pasted back in a paste-back login. It must be the definition’s redirect followed by a query with one error, which ends the login, or exactly one state, equal to the login state, and exactly one code, the authorization code. No error names the code. See oauth.md step 3. | iron-vault-kinds | AuthorizationCode::from_paste, PasteError | §16, future spec §1.1 |
| Path component | One entry on the way from / to a trusted path, as the platform adapter reports it: its path, owning uid and gid, the owning user’s name when the adapter resolves one (owner_name), permission bits, and kind (directory, regular file, symlink with its resolved target, or other). | iron-vault | PathComponent | §4 |
| Path caution | A directory above the binary, in the protected profile, that passes its trusted-path rule but is owned by an account other than root, so anything running as that account can replace the binary before the next start; the service warns and starts anyway. | iron-vault | PathCaution, CautionedFile | §4 |
| Path pattern | A route restriction on the normalized request path below the upstream base path (the segments after the route prefix), built from literal, * and ** segments and matching the whole path. | iron-vault-policy | PathPattern | §6 |
| Peer account | The OS account a peer caller must connect as: named by the caller’s user, resolved to a uid when policy activates through the service’s account directory, never root, the service account or the overflow uid, and compared with the uid in the connecting process’s peer identity. It proves which account connected, never which program. | iron-vault-policy | AccountName, CallerAuth::Peer, AccountDirectory, ActivePolicy::peer_uids | §7 |
| Peer generation | The state generation the other MAC’d file had when a MAC’d file was written, recorded in it so that restoring one MAC’d file from an older copy can be told apart from the current pair; a vault’s first manifest records none, because no approval state exists yet. | iron-vault-store | VaultManifest::peer_generation, ApprovalState::peer_generation | §12, §13 |
| Peer identity | The uid, gid and pid the kernel reports for the process at the other end of a Unix socket; only the uid decides who the peer is, whether an admin principal or a peer account, and the pid is kept for the audit log, never used to identify an executable. | iron-vault | PeerIdentity | §5, §7 |
| Pending config | The config bytes config approve proposes, durably written as config.toml.pending beside config.toml before they are validated: the one immutable byte snapshot that is validated, summarized, digested and signed, and that publish renames to config.toml. | iron-vault-store | write_pending | §12 |
| Permitted origins | A credential record’s non-empty set of exact host and port pairs its secret may reach; the scheme is always HTTPS, so it is implicit and never stored, and a configuration edit cannot change the set. | iron-vault-store | PermittedOrigins | §6 |
| Pinned approver | One enrolled approval signer as the approval state records it: its approver ID, signature algorithm, signer kind, public key, label and enrolment time; its kind always allows its algorithm. A config approval must verify against the pinned approver its envelope names, never a key taken from the config or signature file. Enrolling or removing one keeps both counters; removing the approver that signed the active signature stops it verifying until a new approval, and the last approver is never removed. | iron-vault-store | PinnedApprover, with ApproverPublicKey, ApproverLabel and SignerKind | §12 |
| Pinned CA | A route’s ca_file: one or more CA certificates in an administrator-installed PEM file, read through its trusted-path rule, holding no other PEM item, each certificate accepted as a trust anchor. It replaces the built-in roots for that route’s upstream trust. One that fails to load is not a check failure: the routes that pin it are unavailable, and the others keep serving. | iron-vault | PinnedCa | §10 |
| Pipeline refusal | The typed reason the request pipeline stopped a request, one per step that can fail, each answered with one §15 status; it keeps only what is safe to log: route, caller and credential names, never a header value, query text or slot value. | iron-vault | PipelineRefusal | §8, §15 |
| PKCE verifier | The 32 random bytes, as base64url without padding, from which a login’s S256 code challenge is made (RFC 7636). It never leaves the service except in the token request that redeems the code, so a pasted address alone can’t be redeemed. A secret. See oauth.md step 2. | iron-vault-kinds | PkceVerifier | §16, future spec §1.1 |
| Pre-boot secret | A secret typed while the machine boots, before its root filesystem opens: a full-disk-encryption passphrase, or the PIN of a TPM key slot that needs one. It is the second secret §14 asks for before a portable machine uses TPM unlock, because the host unlock blob lives on the disk it opens; a key slot the TPM opens with no PIN is not one, and nor is the approval passphrase. Without one, setup warns and continues only if the administrator accepts the risk. See tpm-unlock.md. | iron-vault | §14 | |
| Presence payload | The bytes a TPM approver signs to prove owner presence: magic IVPP, a format version, the vault ID, the asked approver’s ID and a 32-byte nonce the service chose for this prompt, 69 bytes in all. The service verifies the signature against the pinned key and drops the nonce, so an earlier signature proves nothing. Signed for owner presence, at step 2 of a config approval, and at enrollment’s read-back. See tpm-approval-signer.md. | iron-vault-store | PresencePayload | §12 |
| Process hardening | The startup step, run before any secret exists, that disables core dumps (RLIMIT_CORE 0 and, on Linux, PR_SET_DUMPABLE 0), locks memory when it safely can, and returns a hardening report of what took effect; it measures and reports, and refusing to start on an incomplete report is a profile decision. The CLI disables core dumps too, because it holds owner input, but does not lock memory. | iron-vault | harden_process, disable_core_dumps, HardeningReport | §4, §14 |
| Prompt | The service asking the CLI to collect one value from the owner: a label, whether the value is secret, so the CLI turns echo off, and whether it is switchable, so the CLI may answer with a switch frame instead. | iron-vault | Prompt | §5 |
| Prompt deadline | How long the service waits for owner input after sending a prompt: 5 minutes, longer than the request deadline because a person is typing. When it passes, the exchange’s command is cancelled. | iron-vault | Limits::prompt_deadline | §5 |
| Provider definition | A description of one OAuth provider as data, in a TOML file: its authorization, token, revocation and account endpoints, what it adds to the consent URL, and its choice of a few compiled-in mechanisms for proving the account (id_token or userinfo), refresh-token rotation (never or always), client authentication and revocation (rfc7009 or none), plus the resource hosts an account’s origins may name and its timing. Enrolling a client seals it into the OAuth client record, so no later config or file edit can send an existing secret to another endpoint. Iron Vault ships definitions for Google and GitHub App; adding a provider needs no code. See oauth.md. | iron-vault-policy | ProviderDefinition | §6, future spec §1.1 |
| Provider request | A request the service itself sends to a provider endpoint: a token request, an account request or a revocation. Its URL must equal one of the endpoints of the provider definition sealed in the OAuth client record, and be among that record’s permitted origins; its headers and form fields come from fixed sets, and only the account request carries a bearer header, holding the new access token. It is the one place a secret may go into a body. Its response, at most 16 KiB, is never relayed to a caller or the CLI. Caller requests never become provider requests. See oauth.md. | iron-vault-policy | CheckedProviderRequest, check_provider_request, ProviderRequestPlan, ClientCredentials, UpstreamClient::send_provider, ProviderResponse, ProviderFailure | §9, future spec §1 |
| Proxy handler | The request handler that serves one request end to end: it loads the serving snapshot once, runs the request pipeline, sends the checked request with the caller’s body through the route’s upstream client before the request deadline, and relays the response without hop-by-hop headers or caller authentication material. A route with no upstream client answers 503, a transport failure 502, and no response headers by the deadline 504, each with a fixed body. | iron-vault | ProxyHandler | §8, §15, §18 |
| Publish | Step 6’s file change, and the only way config.toml and config.toml.sig are written: rename the pending config to config.toml, then the staged approval to config.toml.sig, then fsync the config directory once. The two renames are separate, never one atomic swap, so a half-published state is resolved from the committed approval, not from which file landed. Runs only for the committed approval, in the transaction or in the config check. | iron-vault-store | publish | §12, §13 |
| Rate limit | A route’s token-bucket allowance: requests per per_seconds, with at most burst available at once. | iron-vault-policy | RateLimit | §6, §8 |
| Rate limiter | The token buckets for one active policy: one per route shared by all its callers, plus one per caller/route pair with a stricter limit; a request takes a token from both or neither, and a reload starts every bucket empty. | iron-vault-policy | RateLimiter | §8, §15, §19 |
| Read-back | Loading approval.age from disk, with the manifest pair check, before an approver change deletes or asks anything: when the in-memory approval state is unsettled the state read replaces it, and otherwise the two must be equal, so an enrollment the in-memory state missed is never taken for an orphan. It refuses a partial restore (an older approval.age beside a newer manifest) whether or not the in-memory state is unsettled, and only the state it returns reaches the orphan sweep. See approval-signers.md. | iron-vault-store | read_back_approval_state, ReadBack | §12, §13 |
| Ready | The service state in which storage and the current approval have been verified: the only state that serves requests and the only one whose listener set is approved, rebuilt from the verified configuration on entry. | iron-vault | ServiceState::Ready | §15 |
| Reason code | The fixed snake_case label a request event gives for a failed request, such as not_granted, upstream_tls or service_defect; every refusal of the request server and of the request handler (form-gate rule, body limit, request timeout, pipeline refusal, unavailable reason, transport error, relay failure) maps to exactly one, and none carries the caller’s input. See audit-logging.md. | iron-vault | audit::ReasonCode | §18, §15 |
| Recipient | Anything that can unwrap the vault identity. It is always an X25519 recipient key in the identity envelope; a hardware key or a passphrase reaches the vault through an intermediate identity. | iron-vault-store | §3, §13 | |
| Recipient change | Rewrapping the vault identity for a new recipient set and writing the recipient inventory that describes it, with the identity envelope’s durable replace as the single commit point; recipient add and recipient remove run one. Nothing else in the vault changes. See recipients.md. | iron-vault-store | §13, §16 | |
| Recipient identity | The X25519 private key matching a recipient key, used only to unwrap the identity envelope; passphrase unlock and the recovery key each yield one. | iron-vault-store | RecipientIdentity | §13, §14 |
| Recipient inventory | The MAC’d state-directory file recipients.age: every recipient key the identity envelope is wrapped for, each with its recipient role, recipient label and enrolment time, and the envelope digest of the envelope it describes. Only the service writes it; init writes the first. See recipients.md. | iron-vault-store | §13, §14 | |
| Recipient key | An X25519 public key, written as an age1… string, listed as a recipient of the identity envelope. | iron-vault-store | RecipientKey | §13, §14 |
| Recipient label | Owner text, 1 to 64 bytes with no control or format character and no surrounding whitespace, that says which device or copy a recipient key is. Never interpreted and need not be unique: commands name a recipient by its key. See recipients.md. | iron-vault-store | §16 | |
| Recipient role | What reaches the vault through a recipient: operational, recovery, added or host-unlock, with tpm and hardware reserved for later epics. A role’s class (unlock, recovery or none) decides how it counts toward the independence rule. See recipients.md. | iron-vault-store | §14 | |
| Recipient set | The recipient keys an identity envelope is wrapped for: at least two, so a vault always has a second way in, and at most a fixed bound, so the envelope always reads back. | iron-vault-store | RecipientSet | §14 |
| Record ID | A credential record’s random version 4 GUID, written in lowercase hyphenated form; it is new on every add and every replace, so a name never stands in for the record behind it, and kept when a refresh writes an OAuth account record again. | iron-vault-kinds | RecordId | §3, §6 |
| Record upgrade | Rewriting a credential record read as record payload version 1, a static or basic record written by 0.6.0-alpha, as version 2, keeping its record ID, name, material and permitted origins, so its routes stay attached. The service upgrades each such record, with no owner present, whenever it opens the vault for a config check; a record whose upgrade fails keeps serving as version 1 and is tried again at the next open. It is not a migration, which moves a vault to another machine. See storage-formats.md. | iron-vault-store | Vault::upgrade_record, OpenReport::records_to_upgrade | §13 |
| Recovery check | The admin command iron-vault recovery check, allowed in Locked and Ready: it proves that a recovery key the owner types opens the current identity envelope and that what it unwraps is this vault’s identity, because the manifest’s MAC verifies with it. It changes nothing but the recovery check record: no recipient, approval state, service state or other vault file. The unwrapped identity is dropped before the answer. See recovery.md. | iron-vault, iron-vault-store | AdminOperation::RecoveryCheck, check_recovery_key, RecoveryCheckError | §16, §18, §19 |
| Recovery check record | The plaintext state-directory file recovery.toml: since, when the reminder schedule started counting, and last_checked, the time of the last successful recovery check, absent when there has been none, both UTC to the second. It has no MAC, so reminders work while the vault is locked; forging it can only move a reminder. Written only by a successful check, by a successful recovery unlock and by the first reminder evaluation that finds an Initialized vault without one. Unusable when it cannot be read or parsed. See recovery.md. | iron-vault-store | RecoveryCheckRecord | §16, §13 |
| Recovery key | A generated offline age X25519 identity that opens the vault identity independently of the primary recipient; the owner keeps its secret text, and the service keeps only its recipient key. | iron-vault-store | RecoveryKey, RecoveryKeySecret | §3, §14, §16 |
| Recovery key attempt limit | A bound on how many wrong recovery keys a recovery unlock accepts before it refuses further attempts for a time, with the passphrase attempt limit’s constants and rules: 5 consecutive failures, then a cooldown of 30 s that doubles up to 15 min; it survives lock and resets on success or restart. It is a count of its own: a wrong recovery key does not add to the passphrase attempt limit, and that limit’s cooldown does not refuse a recovery unlock, so the wrong passphrases that usually come first do not block the recovery path. Only a key that does not open this vault counts. recovery check keeps no limit. See recovery-unlock.md. | iron-vault | AttemptLimiter | §16 |
| Recovery reminder | The audit event recovery.reminder, written when [recovery] reminder_days (7 to 365, default 90) have passed since the recovery check record’s last_checked, or its since when never checked, or while the record is unusable; evaluated at startup, after each unlock and every 24 hours in every state, and written at most once every 7 days. It tells the owner to run a recovery check and to keep copies of the approved config and of iron-vault list with the recovery key. v0 reminds through the log only. See recovery.md. | iron-vault, iron-vault-policy | reminder_due, ReminderInterval | §16 |
| Recovery unlock | The admin command iron-vault unlock --recovery, allowed in Locked only: it opens the vault with a recovery key the owner types, when the vault passphrase is forgotten, and sets a new vault passphrase in the same step. It enrolls a new operational identity in the identity envelope, seals it into a new passphrase envelope under the new passphrase, and only then retires every other operational recipient, so a crash at any point leaves the recovery key and the old or the new passphrase opening the vault. It needs no approval passphrase and changes no route policy, approver or other recipient. A success records a recovery check and removes the owner-lock file. See recovery-unlock.md. | iron-vault, iron-vault-store | AdminCommand::RecoveryUnlock (labelled recovery_unlock), ServiceContext::recovery_unlock, replace_operational_identity | §14, §16 |
| Refresh marker | A field of an OAuth account record, written durably before a rotating refresh request is sent and cleared when the new refresh token is written. A record found with its marker set is needs-login, because the provider may already have retired the token it holds, unless its token slot holds a newer refresh token that a failed completion write left there. A provider definition with rotation = "never" never sets it. See oauth.md. | iron-vault-kinds | RefreshMarker | future spec §1.3 |
| Refusal response | The fixed answer a pipeline refusal maps to: one §15 status, a constant text/plain body that never repeats caller input, a route the caller is not granted or a library error, and Retry-After on 429; a service defect (final-check or construction failure, or a limiter that does not know an authorized route or caller) answers 500 “internal error” and raises a high-severity event. | iron-vault | RefusalResponse, PipelineRefusal::respond | §9, §15, §18 |
| Relative cross-origin redirect | A Location that resolves to another origin but is not written as an absolute scheme://authority URL, such as //host/x or http:/x; it is refused, because the caller would resolve it against the proxy listener’s URL, where it could land in another local route or fall back to cleartext. | iron-vault-policy | LocationRefusal::RelativeCrossOrigin | §11 |
| Relay failure | Why a relayed body failed after its head was sent: corrupt or truncated coding, the decompression budget’s size or ratio limit, a re-encoding error, or an upstream body error. It names only the kind, and is recorded once, as the request event’s reason code. | iron-vault | RelayFailure | §11, §15 |
| Relayed body | An upstream response body on its way to the caller, each chunk decoded, counted against the decompression budget, scrubbed and, when the caller’s Accept-Encoding rules identity out, re-encoded as it arrives; the one place response-body stages attach. A relay failure drops the held bytes unreleased and aborts the caller’s connection, so a truncated body never looks complete and a held secret prefix never goes out. | iron-vault | RelayedBody | §8, §11, §15 |
| Reload | The SIGHUP operation, and nothing else: in Ready it moves the service to Checking (requests get 503 checking) and runs the config check, which passes to Ready with a new serving snapshot or fails to Unavailable, withdrawing the old one so no old route policy is kept. It is ignored in every other state, so it is never a way out of Unavailable, and it never writes the approval state. The service never reloads by watching files. | iron-vault | ServiceEvent::Reload | §12, §15, implementation spec §2.2 Q-5 |
| Reminder interval | The days between recovery reminders: the [recovery] reminder_days key of the approved config, a whole number from 7 to 365 that is in force as 90 when the table or key is absent. An absent table is kept apart from an explicit 90, and the approval summary shows it as default. It is valid on construction, and the approval summary shows a change to it. See recovery.md. | iron-vault-policy | ReminderInterval | §16, §12 |
| Request body | A caller’s request body as the request server received it, counted against max_request_body_bytes as it streams; reading past the limit fails with TooLarge, and the server then answers 413 itself. | iron-vault | RequestBody, RequestBodyError | §8, §15 |
| Request event | The one record, request.completed, the service writes under the target iron-vault.request for each request the request server received, served or refused, including the refusals the request server makes itself, when its response body ends: request ID, caller, route, credential, upstream host, method, status, sizes, duration, whether scrubbing occurred, the outcome and, for a failure, a reason code. See audit-logging.md. | iron-vault | audit::RequestEvent, audit::REQUEST_TARGET | §18, §9 |
| Request form gate | The check, run first in the request server and before any authentication, that answers 400 with a fixed text naming the rule (never the target) for a CONNECT request, a target that is not origin-form (absolute-form, authority-form or *), an Upgrade header or Connection: upgrade, and an HTTP version other than 1.0 or 1.1; it never reaches the request handler. | iron-vault | FormViolation, check_form | §8, §9, §15 |
| Request ID | A random version 4 UUID the request server gives each request, in its request event and in every audit event about the same request; never sent to the caller or the upstream. | iron-vault | audit::RequestId | §18 |
| Request pipeline | The fixed sequence of §8 steps 3-8 that turns an incoming request into a checked request or a pipeline refusal, split around the one step that may wait (oauth.md): admit, synchronous (caller identification, authorization, sanitizing the caller’s headers, the rate-limit charge and the record lookup); acquire, asynchronous and only for an OAuth account record (an access token from its token slot); and build, synchronous (credential resolution, assembly and the final outgoing-request check). No step runs before the one ahead of it has passed, so no credential is resolved for a caller that is not authenticated, authorized and charged, and a request that admission refuses never acquires a token, so it never causes a refresh. | iron-vault | pipeline::admit, pipeline::acquire, pipeline::build, Admitted, Prepared, RequestHead, ConnectionTags | §8, §9, implementation spec §2.2 Q-1 |
| Request record | The one value that writes a request’s request event: created by the request server when it receives the request, filled in by the request handler through a shared handle (which can set facts but never write), carried by the outermost response body, and written exactly once when that body ends or is dropped, so a handler the request server drops still yields one event. A drop of a body hyper never polls, because it is empty or the response cannot carry one, is a clean end; any other drop is service_closed when the service closed the connection, else caller_gone. The request server’s own 413 or 408 overrides the handler’s reason; otherwise the first reason recorded wins. See audit-logging.md. | iron-vault | audit::RequestRecord, audit::RequestFacts | §18 |
| Request server | Serves HTTP/1.1 (never HTTP/2) on every incoming connection under the operational limits, before anyone is authenticated, and hands each request within them to the request handler with its connection tags: the listener name and, on a Unix socket, the peer’s uid, taken only from the incoming connection. A connection over max_connections is closed unread; an over-limit head gets 431, an over-limit body 413, a request the handler has not answered at the request timeout 408 (the handler is given that deadline, so it can answer first); a client that has not sent its headers within the header read timeout (10 s, or the request timeout if shorter) is dropped. It writes the request event for every request it receives, including the ones it refuses itself. | iron-vault | RequestServer, RequestHandler, ConnectionTags | §8, §15, implementation spec §3 |
| Request socket | A Unix socket on which callers reach the request interface: mode 0666 inside a directory only the service account can write, so any local account may connect but none can replace it; a connection’s identity comes from its peer account or a caller token, never from being able to connect. | iron-vault | RequestSocket | §7 |
| Request-content restriction | A v1 route restriction: an allow-list of values for a named query parameter or JSON body field, checked before the credential is resolved; v0 routes narrow by method and path only. | iron-vault-policy | future spec §1.4 | |
| Requested origin | An origin as an add request carries it: the host as text, which the service parses again with parse_origin’s host rule, and a non-zero port. | iron-vault | RequestedOrigin | §6, §16 |
| Reserved header | A caller-authentication or transport-control header that is stripped before forwarding and can never be a slot. | iron-vault-policy | reserved_headers | §9 |
| Reserved version | An approval version the service has durably handed out for one signing attempt. The highest reserved version is 0 only in a new vault, rises by one per reservation, never resets or wraps, and a version is consumed whether or not its signing succeeds. | iron-vault-store | ApprovalState::reserve | §12 |
| Reset | The reset command: an admin principal, after a reset confirmation typed at a terminal, discards the vault so the owner can run init and rebuild from their own copy of the config and reissued credentials. It runs in Locked, Ready or Unavailable, withdraws the vault as lock does, writes reset.unfinished (its commit point), removes every store-owned file, the config files included, then removes reset.unfinished, leaving the service Locked over an Uninitialized directory, or Unrecognized when a foreign file stays. It asks for no owner factor. See reset.md. | iron-vault, iron-vault-store | ResetPlan, ResetOutcome, AdminOperation::Reset | §16, §5 |
| Reset confirmation | What the owner types, at a terminal and never through a pipe, to let a reset go ahead: the vault ID shown in the reset summary when the initialization state is Initialized, read from the manifest’s clear header (unverified while locked) and compared ASCII case-insensitively; otherwise the state directory’s absolute path, compared exactly. Step 4 of the exchange, under the service-wide lock, also requires the initialization state and vault ID to be unchanged, so a vault finished or replaced in between is not discarded. See reset.md. | iron-vault | ResetPlan::confirmation, ResetPlan::confirmed_by, ResetRefusal | §16 |
| Resolved credential | The slot value and scrub patterns one credential record’s kind produced for one request, kept with a borrow of that same record’s permitted origins; the only intended source of a bound credential and of the scrub patterns for the request. | iron-vault-store | ResolvedCredential | §6, §11, future spec §2.2 |
| Response decoder | The per-response streaming decoder that turns a content-coded body back into the bytes the scrubber screens, yielding output in pieces of bounded size so the caller can check a budget between pieces. | iron-vault | ResponseDecoder | §11, Q-6 |
| Response encoder | The per-response streaming encoder that recompresses a scrubbed body for a caller that forbids identity; each pushed chunk is sync-flushed, so every byte pushed so far can be decoded from the bytes returned so far and a streamed response keeps streaming. It sees only scrubbed bytes and holds no secret. | iron-vault | ResponseEncoder | §11, implementation spec §3 |
| Response outcome | What the response stage knows about one relayed response once it has ended cleanly: whether scrubbing occurred, meaning any scrub pattern matched in its headers or body, and how many bytes the scrubber screened (the body after decoding). The request event’s scrubbed field comes from the same match count, kept up to date as matches are found, so a body that fails or is dropped mid-stream still reports it (audit-logging.md). | iron-vault | ResponseOutcome | §18 |
| Retired machine | A machine that no longer unlocks or holds the vault, and whose recipient key is the argument of forget-machine; the vault does not keep a removed recipient’s role, so the command prints the guidance for what such a machine can hold (a sealed host unlock blob, or an added or recovery key). | iron-vault | §16 | |
| Reveal | An admin protocol frame (kind 7) in which the service shows the owner a secret value it generated, once, such as the recovery key at init; never answered. Its body is the value itself, decoded into a clearing buffer and shown only on the controlling terminal, never on stdout. See admin-protocol.md. | iron-vault | RevealedSecret | §5, §16 |
| Route | A caller grant and upstream mapping that selects one credential, its slot, and usage restrictions. | iron-vault-policy | RouteName, RouteConfig | §3, §6 |
| Route fault | A status report entry for a route that is unavailable for a cause of its own, which no credential standing explains: in v0 only pinned CA unavailable, its pinned CA failed to load. It names the route and the fault, never the CA’s path, its PEM bytes or the load error. A route can have a fault and also be listed under its damaged credential. | iron-vault | RouteFault, RouteFaultKind | §10, §15 |
| Route prefix | The literal leading request-path segments, such as /fx, that select a route; never / alone and never a wildcard. | iron-vault-policy | RoutePrefix | §6, §9 |
| Scrub event | The one WARN event a relayed response raises when it ends, cleanly or not, if any scrub pattern matched in its headers or body: it names the request ID, the route, the credential and the match count, never the matched bytes or their position. It is the audit event response.scrubbed (audit-logging.md), written by the request record beside the request event. | iron-vault | audit::route::ResponseScrubbed | §11, §18 |
| Scrub patterns | Every byte form of the secret a kind injected that response scrubbing watches for: the exact value, its URL-encoded forms in both hex cases, and its base64 encodings; for a Basic credential, the Basic token, the complete Basic <token> value, username:password with its URL-encoded forms, and the password with its URL-encoded forms, or, when the password is empty, the username with its URL-encoded forms, because the username is then the secret; never case-folded. | iron-vault-kinds | ScrubPatterns | §11 |
| Scrub replacement | The fixed ASCII text [iron-vault:scrubbed] the scrubber writes in place of every match, the same for every pattern; never a length-preserving mask, which would reveal the secret’s length and position. | iron-vault | SCRUB_REPLACEMENT | §11 |
| Scrubber | The per-response streaming matcher that replaces every occurrence of a request’s scrub patterns in a byte stream, holding back only bytes that could still begin a match. | iron-vault | Scrubber | §11 |
| Sealed file | Binary age ciphertext encrypted to the vault public key whose header holds only X25519 stanzas, besides the inert grease stanza age writes into every file; the on-disk form of credential records and control metadata. A file with a passphrase (scrypt) or plugin stanza is refused before any key work. | iron-vault-store | seal, open | §13 |
| Secret-bearing type | A type whose value holds provider credential bytes, a caller token, a private key or a passphrase, directly or through a field; it redacts Debug, clears its bytes on drop and has no Clone, Copy, Display or serde impl. | all | listed in design/secret-handling.md | §14 |
| Serving snapshot | The active policy, the vault’s healthy credential records, the upstream clients and the rate limiter that one request is served with, taken once when the request arrives and never changed while it runs; a reload or an approval replaces the whole snapshot. The snapshot holder holds either serve with the current snapshot or refuse with an unavailable reason, and a request’s one load from it is its admission. | iron-vault | ServingSnapshot, SnapshotHolder, Admission | §8, §12 |
| Short secret | A stored secret field shorter than 8 bytes: a static key, a Basic password, or a Basic username when the password is empty. It is allowed but logged as a warning, because it usually means the wrong field was pasted and scrubbing blanks every occurrence of it in responses. | iron-vault-kinds | ShortSecret, SecretField, SHORT_SECRET_LEN | §11, §18, future spec §2.2 |
| Signature algorithm | The algorithm a config approval is signed with, named in the approval envelope by a one-byte ID: Ed25519 (01) for the software signer and ECDSA P-256 with SHA-256 (02) for the TPM signer, whose 64-byte r ‖ s signature must have a low s. | iron-vault-store | SignatureAlgorithm | §12, implementation spec §2.2 |
| Signer kind | Which kind of approval signer a pinned approver is, recorded with it so the service knows how to ask for it: software (code 1), the software signer; tpm (2), the TPM signer; hardware (3) is reserved for the hardware-key signer. Each kind allows its own signature algorithms: software allows Ed25519 only, tpm ECDSA P-256 only. See approval-signers.md. | iron-vault-store | SignerKind | §14 |
| Slot | The route’s permitted credential location: a named header, a named query parameter (RFC 3986 unreserved characters only, so the URL keeps it unchanged), or Basic authorization. | iron-vault-policy | Slot | §3, §6 |
| Slot format | The fixed text around a header slot’s credential, with exactly one {} substitution point, such as Bearer {}. | iron-vault-policy | SlotFormat | §9 |
| Slot value | The credential text a kind produces for the route’s slot, before the slot’s format or encoding is applied. | iron-vault-policy | SlotValue | §9, §14, future spec §2.2 |
| Socket activation | systemd binds a listener and passes it to the service by name (FileDescriptorName= in the .socket unit equals the listener name), so the port or socket path is held from boot and across restarts; the service verifies each adopted socket against its listener before using it. In a protected Linux install it is required for every TCP listener. | iron-vault | ActivationEnv, Inheritance, PassedSockets, check_origin | §7 |
| Software signer | The approval signer for machines without a TPM: an Ed25519 key whose private half is kept in its own approver key envelope and decrypted only inside the service, for one approval, then dropped. It signs only when the decrypted key matches the pinned approver. | iron-vault-store | SoftwareSigner, SoftwareSignerKey | §12, §14 |
| Source | The origin of a credential imported into the vault, initially direct entry and later password-manager sync. | iron-vault-store | Source | §3 |
| Source-owner method | A way to prove authority over the vault identity through a factor already enrolled for this vault, which the service starts and verifies itself for one migration challenge: the vault passphrase, read against the envelopes on disk, and a tpm approver’s TPM approval PIN, proved by the TPM signing a migration proof payload, in v0; a YubiKey touch later. One switchable prompt offers the methods an install can ask, the vault passphrase first. The recovery key, the approval passphrase, an earlier unlock, an admin connection and the export passphrase are not methods. A method refuses with an owner refusal (a wrong secret, or a factor that is not this vault’s) or as unavailable; only the vault passphrase’s owner refusals count toward the passphrase attempt limit. See migration-authorization.md. | iron-vault | SourceOwnerMethod, VaultPassphraseMethod, MethodRefusal, OwnerRefusal | §16 |
| Service account | The OS account that runs the service and owns its config (0600), vault and runtime directory: iron-vault in a protected install, the owner’s login account in development. | iron-vault | ExpectedOwner (its uid) | §4, §12 |
| Service context | The one owned value the running service is: the state-directory and config-directory locks, the filesystem, the current service state, the approval state while the vault is open, the vault identity from unlock until lock or stop, the snapshot holder (whose serving snapshot owns the open vault), the request listener set and the hardening report. Every change goes through the service state model’s next under one async mutex; the request side reads only the snapshot holder. Startup enters Locked with provisional listeners; entering Checking opens a new vault from the kept vault identity, with its approval state, and runs the config check; Ready is entered only after the listener rebuild. | iron-vault | ServiceContext, ServiceLocks | §4, §14, §15 |
| Service paths | The trusted paths a deployment names (config file, state directory, optional runtime directory) with its profile and expected owner; the running binary is found from the process itself. | iron-vault | ServicePaths | §4 |
| Service state | Which of Starting, Locked, Checking, Ready and Unavailable the service is in; each transition between them is a named event, and any pair not drawn in the specification diagram is refused rather than performed; a terminal Stopped marker follows Ready’s stop. It decides what the request interface does, which admin commands run and whether the listener set is provisional or approved. | iron-vault | ServiceState, ServiceEvent, next, RequestInterface | §15 |
| Service unit | iron-vault.service, the root-owned systemd unit that runs iron-vault serve as the service account, with the resource limits and sandbox the Linux package sets: Restart=on-failure, LimitCORE=0, LimitMEMLOCK=infinity, ProtectSystem=strict and the rest of linux-package.md. | iron-vault | §4, §14, §15 | |
| Service-wide lock | The one in-process lock that serializes approvals, vault writes, reloads and every config check. config approve, replace, rm and the recipient commands hold it from their request to their response, prompts included; meanwhile other approvals and vault writes get busy, a reload or an unlock waits, and lock cancels an approval or a vault change still waiting at a prompt. add takes it only once the material is in hand. | iron-vault | ServiceContext::review_approval, ApprovalReview, ServiceContext::plan_vault_change, VaultChangePlan, ServiceContext::begin_migration, MigrationSession | §12, §13 |
| Staged approval | The config approval the service signed for its pending config, durably written as config.toml.sig.staged beside it before the commit; publish renames it to config.toml.sig. Until its version is committed it is never promoted, and a config check discards it. | iron-vault-store | write_staged | §12 |
| Staged inventory | The recipient inventory a recipient change durably writes as recipients.age.staged before the identity envelope; the inventory check finishes the change from it when it matches the envelope on disk, removes it once recipients.age matches the envelope, and otherwise leaves it in place. | iron-vault-store | §13 | |
| Stale temp file | A .<name>.tmp left in the state directory or the config directory, for one of that directory’s file names, by a durable replace that never finished; at startup the stale temp sweep durably removes every one, under that directory’s lock. | iron-vault-store | sweep_stale_temps, sweep_stale_config_temps | §13 |
| Status report | The structured, secret-free answer to status, built from what the service context holds: service state with its redacted reason, deployment profile, vault lock state and ID, approval versions, memory protection, each credential’s standing, each route fault, and, read from disk, the recovery check record’s time with whether a recovery reminder is due. A value sealed behind the vault identity (vault ID, approval versions, credentials, route faults) is unknown while no vault is open: while the vault is locked, and in Unavailable, where the failed check dropped the vault and kept only the vault identity. Allowed in every state. See admin-protocol.md. | iron-vault | StatusReport | §15, §16 |
| Stanza kind | The type of one recipient stanza in an age header, read from its tag without decrypting: X25519, scrypt, age’s inert grease stanza, or any other tag by name. | iron-vault-store | StanzaKind | §14, §19 |
| Starting | The service state from process start until it knows whether it can unlock itself: Locked when interactive unlock is required, Checking when a TPM or host unlock succeeded. | iron-vault | ServiceState::Starting | §15 |
| State directory | The service-owned directory holding vault, control and lock files; the binary resolves it from the deployment profile. | iron-vault-store | §13 | |
| State file name | One flat file name inside the state directory: non-empty ASCII [A-Za-z0-9._-], no leading . (which temp names use) and never lock in any letter case. | iron-vault-store | StateFileName | §13 |
| State generation | A vault-wide u64 count of MAC’d file writes: every write of the vault manifest or the approval state takes one above the newer of the two files’ state generations as they are on disk and records it, so it starts at 1, increases by exactly one per write, never wraps, and is never 0. Opening the vault or the approval state checks both files’ state generations and peer generations against each other, so a partial restore is refused. Outside v0 it is to be anchored in a TPM monotonic counter, so a rollback of every MAC’d file together is detected too. | iron-vault-store | StateGeneration | §12, §13 |
| State-directory lock | An exclusive, non-blocking lock on <state directory>/lock, held for the service’s lifetime; a second writer fails to start. | iron-vault-store | StateDirLock | §4 |
| Store-owned file | A file whose name the store writes, and the only kind reset removes: in the state directory the vault’s envelopes, manifest, approval state, recipient inventory (staged too), approver key envelopes, record files, init.unfinished, import.unfinished, reset.unfinished, the owner-lock file and recovery.toml; in the config directory config.toml, config.toml.sig, config.toml.pending and config.toml.sig.staged; and the stale temp file of each. Not the lock files, lost+found or any foreign file. One list, shared by the initialization state, every discard and reset. See reset.md. | iron-vault-store | store_owned::STATE_FILES, store_owned::CONFIG_FILES | §13, §16 |
| Switch frame | The admin-protocol frame, kind 8 with an empty body, with which the CLI answers a switchable approver prompt instead of owner input, asking for the next approver in approver order. The CLI sends one when the owner presses Ctrl-Y at a terminal. See approval-signers.md. | iron-vault | Frame::Switch, PromptAnswer::Switch, Exchange::prompt_or_switch_unless | §5, §14 |
| TLS listener | The TLS acceptor configuration of a TCP listener that terminates TLS (it holds no socket), built from the listener’s administrator-installed certificate chain and private key: the chain is one or more CERTIFICATE PEM items, the key file exactly one private-key item that matches the leaf certificate, both read through their trusted-path rules when the listener is opened. It offers rustls’s default protocol versions and ALPN http/1.1, asks for no client certificate, and drops a client that does not finish the handshake within the handshake timeout, the longest a connection may take from accept to a completed TLS handshake (10 s until implementation spec §3’s listener limits are published). A non-loopback TCP listener must be one. | iron-vault | ListenerTls | §7 |
| Token bucket | A route’s rate-limit counter: it starts empty, refills at requests / per_seconds up to burst, and spends one token per request. | iron-vault-policy | TokenBucket | §8, §15 |
| Token enrollment | A caller token is enrolled when an approved config names its token_hash for a token caller; it authenticates that caller from the moment that config is active. Issuing a token returns it to the owner but enrolls nothing, and rotation and revocation are approvals of a config with a new token_hash, or without one. | iron-vault-policy | TokenHash | §7 |
| Token response | A token endpoint’s JSON answer to a code redemption or a refresh, at most 16 KiB: the access token, its expires_in, and optionally a refresh token, the granted scopes and an id_token. Any error field makes it a refusal, such as invalid_grant or GitHub’s bad_refresh_token, whatever the HTTP status. An absent scope grants every requested scope. See oauth.md. | iron-vault-kinds | TokenResponse, ProviderError | future spec §1 |
| Token slot | The service’s in-memory working state for one OAuth account record: the access token, the instant it expires and its generation number, a rotated refresh token not yet in the serving snapshot, whether the access token is held back until that refresh token is stored, the needs-login cause, and when the last refresh attempt started. One mutex per slot makes refresh single-flight. Token slots outlive a serving snapshot, keyed by record ID; a new snapshot keeps only its own healthy account records’ slots, and lock, a failed config check and Unavailable clear them all. See oauth.md. | iron-vault | TokenSlots, TokenSlot, AcquiredToken, AcquireRefusal, TokenGeneration | future spec §1.2, future spec §1.3 |
| TPM approval key | A TPM approver’s ECDSA P-256 signing key: a child of a transient storage primary under the owner hierarchy, generated inside the TPM, bound to it (fixedTPM, fixedParent), authorized by the TPM approval PIN, and never exempt from dictionary-attack lockout. Separate from every TPM unlock object. Its public point is pinned as the approver’s key, algorithm 02; its signatures are 64-byte r ‖ s with low s. See tpm-approval-signer.md. | iron-vault-tpm-signer | §12 | |
| TPM approval PIN | The secret that authorizes a TPM approval key, after §12’s “approval PIN”: typed twice at enrollment, UTF-8 of at least 6 Unicode scalar values, and typed again at each approver prompt as TPM approval PIN for "<label>". The service turns it into a 32-byte authorization value (BLAKE2b-256, persona iv-tpm-pin-v1, over the approver ID and the PIN), clears the PIN at once and holds the value for one exchange only; the TPM’s lockout limits guesses. Not the TPM PIN of §4 and §14, which would unlock the vault and which v0 does not have. See tpm-approval-signer.md. | iron-vault-tpm-protocol | TpmApprovalPin, TpmAuthValue | §12 |
| TPM key blob | The file approver-<approver ID>.tpm in the state directory: magic IVTK, the approver ID, the parent’s name, and the TPM approval key’s public and private areas as the TPM wrapped them. Not secret, and loadable only on the TPM that made it; the helper refuses a blob whose parent name or key differs from the pinned approver’s. An orphan like any approver key file. See tpm-approval-signer.md. | iron-vault-tpm-protocol | TpmKeyBlob | §12, §13 |
| TPM signer | The approval signer of signer kind tpm: a TPM approval key used through the TPM signing helper, asked as TPM approval PIN for "<label>". Offered on a protected Linux install or a Compose host whose helper socket exists. It cannot leave its machine, so a migration bundle carries no key for it, and a forgotten approval PIN or cleared TPM is recovered through another approver. See tpm-approval-signer.md. | iron-vault | TpmSigner | §12, §14 |
| TPM signing helper | iron-vault-tpm-signer: the socket-activated process, one per request and one request at a time (MaxConnections=1), that alone opens the TPM for approval signing, running as iron-vault-tpm with the TPM device the service never gets. It answers only the service account, checked by SO_PEERCRED, creates TPM approval keys, and signs only an approval payload, a presence payload or a migration proof payload, each under a PIN-derived authorization value in a salted session, keeping the lockout reserve. It holds no state. See tpm-approval-signer.md. | iron-vault-tpm-signer | §14, §17 | |
| TPM unlock | The unlock method in which the machine’s TPM opens an intermediate identity at startup with no owner present, bound to the Secure Boot policy (PCR 7) rather than to who is asking; in v0, unattended on a server, and on a portable machine behind a pre-boot secret unless the administrator accepts the risk of going without. On Linux it is delivered as host unlock: the handoff unit unseals the host unlock blob and the service never opens the TPM, supported on Ubuntu 26.04 and allowed on 24.04. Host unlock runs in the Protected and Container profiles, as its entry says. See tpm-unlock.md. | iron-vault | §14, §15 | |
| Trusted path | A path the service relies on before it unlocks anything (its binary, config directory, config, state directory, state files, runtime directory and log directory), or an administrator-installed file it reads (a TLS listener’s certificate chain and key, a route’s pinned CA file); every component from / down must pass its trusted-path rule, or the service refuses it and names the first unsafe component. An administrator-installed certificate (AdminCertificate) is a regular file owned by root or the service account that no one else can write; an administrator-installed private key (AdminPrivateKey) is a regular file the service account owns with no group or other permission bits. The log directory (LogDir) is the service account’s with no group write and no access for others, and may sit under a root-owned group-writable ancestor such as /var/log. Neither certificate nor key may sit under a shared sticky directory such as /tmp, and each is read through admin_file::read, which opens the checked file without following a symlink and refuses it if it is not the file the walk saw. | iron-vault | TrustedPathRule, UnsafePath, AdminFile | §4, §7, §10 |
| Trusted-path report | The result of checking every trusted path a deployment names, in a fixed order (binary, config directory, config, config-directory lock file, state directory, state-directory lock file, runtime directory): each path with whether it is trusted, its first unsafe component, or why its metadata could not be collected, including a running binary that was deleted or replaced on disk, and the path cautions of each trusted path. Startup refuses its first untrusted or unchecked path, except a config or lock file that does not exist yet. status shows it. | iron-vault | TrustedPathReport | §4 |
| Typed at a terminal | How reset reads its confirmation: the CLI checks that stdin is a terminal and that /dev/tty opens before it connects, reads the answer from /dev/tty, and otherwise exits with code 3 having sent nothing, so a pipe, a heredoc or a cron job cannot confirm a reset. See reset.md. | iron-vault | cli::reset::require_terminal | §16 |
| Unavailable | The service state after a check found invalid policy or damaged shared state; it holds a failure reason and keeps no route policy. It holds no open vault either: entering Checking drops what the service kept of the last one, and a failed check opens none, so the status report shows the vault as locked although the vault identity is kept. Its request listeners may come from an unverified config, a provisional listener set, and answer only 503 with the reason. It leaves to Checking after an authorized repair or committed-transaction recovery, and to Locked on an explicit lock, which clears the vault identity it keeps. | iron-vault | ServiceState::Unavailable | §12, §15 |
| Unavailable reason | The fixed, redacted set of reasons a request listener gives with a 503 when it cannot serve: locked, policy invalid, checking, recovery needed. | iron-vault | UnavailableReason | §12, §15 |
| Unavailable route | A route of the active policy that serves no request, with one or more causes: its credential record is unusable (damaged, needing login, or an unusable account record), or its pinned CA could not be loaded. Activation sets the first and the config check the second; neither fails the check, and every other route keeps serving. ActivePolicy::route omits it whatever the cause, so a request to it is answered 503 before any upstream client is used. Not the service state Unavailable. | iron-vault-policy | UnavailableCause | §10, §12 |
| Unfinished import | An import that started writing and has not reached its commit point, shown by the empty state-directory file import.unfinished, written first and durably removed last; the initialization state reads it as Unfinished, of kind Import, if the state directory holds nothing but the files an import writes and the config directory nothing but config.toml. The marker is a store-owned file. unlock refuses it, and the next import or init discards the files an import writes, its config.toml included, then starts over. See migration-bundle.md. | iron-vault-store | UnfinishedKind::Import, StateFileName::unfinished_import, begin_import, finish_import | §13, §16 |
| Unfinished initialization | A vault initialization that started and has not reached its commit point, shown by the empty state-directory file init.unfinished, written first and durably removed last; also the initialization state with that file, no record file, no foreign file and no config file but init’s own. unlock refuses it, and the next init or import discards exactly the files an initialization writes (a config file only if it is the initial config), then starts over with a new vault ID and approver. | iron-vault-store | UnfinishedKind::Initialization, StateFileName::unfinished_initialization, begin_initialization, finish_initialization | §12, §13 |
| Unfinished reset | A reset past its commit point and not yet done, shown by the empty state-directory file reset.unfinished, written durably before the first removal and removed last; also the initialization state with that file, checked before every other, whatever else is there. unlock, host unlock, init, import and recovery check refuse it, startup leaves it, and only the next reset finishes it. See reset.md. | iron-vault-store | InitializationState::UnfinishedReset, StateFileName::unfinished_reset, discard_vault | §13, §16 |
| Unindexed record file | A record file in the state directory that the vault manifest does not list, or whose digest prefix is not its entry’s; it is never loaded or trusted, because anyone holding the vault public key can write one, and the next vault write removes it. | iron-vault-store | OpenReport::unindexed, WriteReport | §6, §13 |
| Unlock handoff | The read-only file /run/iron-vault-unlock/host-unlock, on a host ramfs, through which the host gives a Protected or Container service the host unlock identity’s secret text in the recovery key’s format; read once while Starting, by the host unlock, where a missing or unsafe file leaves the service Locked, by init --host-unlock to enrol it, and by recipient remove, which keeps the host-unlock recipient whose key it holds. A replacement identity, provisioned after a lost TPM, is enrolled by its recipient key with recipient add --host-unlock. | iron-vault | unlock_handoff::read_handoff, HANDOFF_PATH | §15, §17 |
| Unlock method | How the owner opens the vault identity into service memory once per service start: a passphrase, a TPM or a hardware key, chosen by the owner with none the default. Each reaches the vault through its own intermediate identity. It is independent of the approval signer and never counts as recovery. In v0 the passphrase, through the operational identity, is the only one. | iron-vault-store | §14 | |
| Unseal-failure file | The empty root-owned file /run/iron-vault-unlock/unseal-failed that the handoff unit’s ExecStopPost= writes when the unit fails, beneath its ramfs mount, so that a service finding no unlock handoff records host unlock outcome unseal_failed rather than absent; a diagnostic only, it never changes what the service does. See tpm-unlock.md. | iron-vault | §15, §17 | |
| Unsettled approval state | An in-memory approval state whose last write renamed approval.age into place but failed the directory fsync, so the disk may hold a state it does not. It accepts no more writes until the read-back or a load replaces it with the state from disk. | iron-vault-store | ApprovalState::is_unsettled | §13 |
| Unusable account record | A credential standing of an OAuth account record that loaded but cannot serve because of what it names: its client record is missing (cause client missing), damaged (client damaged) or not an OAuth client record (not a client record), or one of its permitted origins matches none of the client definition’s resource_hosts (origin outside resource hosts). Its routes are unavailable, as for a damaged record, while other routes keep serving; status and list show it as unusable (<cause>). It is checked before needs login, because a login through the same client and origins would be refused. Not damaged: the record itself loaded, so its kind and permitted origins are known. Not the credential catalog’s wider unusable, which also covers damaged records and those that need login. See oauth.md. | iron-vault | Standing::Unusable, UnusableCause | §15 |
| Upstream | The HTTPS service to which Iron Vault forwards an authorized request. | iron-vault-policy | UpstreamUrl | §3 |
| Upstream body | The caller’s body as forwarded in an upstream request: empty, or a stream of byte chunks with the caller’s declared length when it sent one. It is never inspected or modified, since no credential goes into a caller body, and is forwarded as it arrives, so it is never buffered whole. A declared length is enforced: a stream that fails partway, ends short of it, or runs past it aborts the upstream request instead of completing it with a different body. The chunk that reaches the declared length is held until the stream ends, and a declared length of zero is settled before sending. It travels beside the checked request, not inside it. | iron-vault | UpstreamBody, UpstreamBodyError | §8, §9, implementation spec §3 |
| Upstream client | The only way the service reaches an upstream: built by one constructor from an upstream trust, it sends only a checked request, with its upstream body beside it, ignores ambient proxy and trust settings, and never follows a redirect. A transport failure is a TransportError that carries no URL or library diagnostic. One is built per upstream trust in the active policy (UpstreamClients). | iron-vault | UpstreamClient, UpstreamClients, UpstreamResponse, ResponseChunks, TransportError | §8, §10, §15, implementation spec §1 |
| Upstream target | The URL the service will send to, built from the configured upstream and the authorized request and checked to read back as exactly the authorized path and query. | iron-vault-policy | UpstreamTarget | §8, §9 |
| Upstream trust | The trust anchors an upstream’s certificate must chain to: the built-in webpki roots, or a route’s pinned CA (ca_file), which replaces them for that route; never SSL_CERT_FILE, SSL_CERT_DIR or the operating system’s stores. A pinned CA changes only which certificates verify, never the permitted origins a credential may reach. | iron-vault | UpstreamTrust | §10 |
| UTC second | A UTC time to whole seconds, from 1970-01-01T00:00:00Z to 9999-12-31T23:59:59Z, written as RFC 3339 with Z. The store never reads a clock: the caller passes the time. The recovery check record holds two. | iron-vault-store | UtcSecond | §13 |
| Validated config | A parsed config whose cross-references all resolve and whose listeners, token hashes, route prefixes and slots cannot conflict. | iron-vault-policy | ValidatedConfig | §6, §7, §8, §9 |
| Vault | The service-owned encrypted storage and protected metadata on disk; opened, it holds the vault identity, the vault manifest and every healthy credential record. | iron-vault-store | Vault | §3, §13 |
| Vault change check | The dry run replace and rm make before any prompt: activate the active config against the credential catalog as it would be after the change (the name unknown for rm; usable with the new kind and permitted origins for replace), writing nothing. It refuses the change with credential-in-use when a route that uses the name would not activate, naming each route (and, for replace, why), so rm is refused while any route uses the name and every name the active config references stays in the vault manifest. Errors on other routes or peer accounts do not refuse it. See credential-commands.md. | iron-vault | vault_change_check, PlannedChange, AffectedRoute | §6, §12, §16 |
| Vault change summary | The service’s own account of one replace or rm, or of a login over an account record that needs owner presence, sent as notices before the owner presence prompt and, for replace and rm, recorded in the audit log: the credential name, its record ID (and, for replace, that a new one will be assigned), the old and new kind and permitted origins (unknown for a damaged record), and the routes that use the name with the callers granted them, in name order with configured names escaped. The CLI’s display of it is never evidence of what the owner authorized. See credential-commands.md. | iron-vault | VaultChangeSummary | §5, §6 |
| Vault ID | A vault’s random version 4 GUID, generated with the vault and written in the header and payload of its manifest and its recipient inventory, which must agree; another vault’s manifest is refused by its MAC, not by this ID. | iron-vault-store | VaultId | §13 |
| Vault identity | The generated age X25519 private key that decrypts individual credential files and keys the MAC’d files. While the vault is unlocked it lives in the service context, from unlock until lock or stop (in Checking, Ready and Unavailable), and each vault opened from it for a config check shares that one copy; its key bytes are cleared when the last holder drops it. | iron-vault-store | VaultIdentity | §3, §13 |
| Vault initialization | The init command: in Locked only, with the owner’s two passphrases, it generates every key, shows the recovery key once and waits for the owner’s confirmation, then writes init.unfinished, the identity, passphrase and approver key envelopes, the manifest and the approval state, commits approval version 1 on the initial config, and removes init.unfinished, its commit point. It leaves the service Locked. See vault-initialization.md. | iron-vault, iron-vault-store | initialize, InitializedVault | §12, §14, §16 |
| Vault manifest | The service’s index of which credential records exist: the vault ID, its state generation and peer generation, and one manifest entry per record with names unique; sealed to the vault public key and authenticated with a MAC keyed from the vault identity, so a party holding only the public key cannot forge one. | iron-vault-store | VaultManifest | §6, §13 |
| Vault public key | The public half of the vault identity, written as an age1… string; anything sealed to it only the vault identity opens, and it is safe to log. Not a recipient: a recipient unwraps the vault identity itself. | iron-vault-store | VaultPublicKey | §13 |
| Vault write | An already authorized add, replace or remove of one credential record: new record files are written first, the durable replace of the vault manifest at the next state generation is the single commit point, and files the manifest stops listing are removed after it. The admin commands add, replace and rm each run one in the service, from Ready only, under the service-wide lock, through a vault freshly opened from the kept vault identity; replace and rm run one only after owner presence and the vault change check, and run the config check after it. | iron-vault-store, iron-vault | Vault::add, Vault::replace, Vault::remove, ServiceContext::add_credential | §6, §13 |
| Verified account | The provider account an OAuth account record belongs to, as the provider proved it at login: issuer, subject identifier (Google sub, GitHub numeric id) and display name (Google email, GitHub login). Issuer and subject decide whether a login is to the same account; the display name must match --account. See oauth.md. | iron-vault-kinds | VerifiedAccount | §6, future spec §1.1 |
| Verified approval | A config approval whose envelope names a pinned approver and whose signature verifies against that approver’s key under its algorithm, for this vault, over the exact config bytes, and whose version and config digest are the committed approval; the only approval startup and reload may activate. Verifying never changes the approval state. | iron-vault-store | VerifiedApproval, verify_approval | §12, §19 |
| Verified bundle | A migration bundle whose exported identity envelope opened with the export passphrase and which passed every bundle check: the only value import’s write order takes and its summary is built from. It holds the vault identity, what import reports (vault ID, record count, approvers, committed and highest reserved versions, committed config digest) and the bytes to write. See migration-bundle.md. | iron-vault-store | open_bundle, OpenedBundle, OpenBundleError, verify_bundle, VerifiedBundle | §16 |
| Wall clock | The service’s source of the current UTC time, as a trait with a system implementation and a settable one for tests, so the reminder schedule and the recovery check record are tested without sleeping. Spacing between reminders is not read from it: it uses the monotonic clock, which a wall-clock jump cannot move. See recovery.md. | iron-vault | WallClock | §16 |
| Withdrawn snapshot | A serving snapshot whose requests have been told to stop: the snapshot holder withdraws every snapshot it has served when it stores a refusal other than checking (a failed check, a lock), so the service keeps no old route policy. A request not yet answered gets 503; one streaming its response has its caller’s connection aborted, because it cannot be retracted from an upstream it already reached. A pause that ends in Ready withdraws nothing: requests admitted before it finish on the old snapshot. | iron-vault | ServingSnapshot::withdrawn | §12 |
| Write report | What a vault write did besides its change, for the audit log: the unindexed record files it removed first, and the superseded record file it could not remove after the commit; the binary records them as vault.unindexed-removed and vault.superseded-left (audit-logging.md). | iron-vault-store | WriteReport | §13, §18 |
Context notes for terms that span crates:
- Credential:
iron-vault-kindsowns resolving a credential into request bytes; its encrypted form is the credential record iniron-vault-store. - Owner: the binary’s admin interface authenticates an admin principal, never the owner directly; store and policy only act on approved changes. See Actor disambiguation.
- Hardware key, Source:
iron-vault-storeholds recipient envelopes and connector storage, so it owns both. - Upstream:
iron-vault-policydecides whether a request may go to an upstream; the binary performs transport.
Security model
The security promise and limits in the specification say what Iron Vault protects against and what it doesn’t. This page explains how the vault is locked.
How the vault is locked
Iron Vault encrypts with age. This section needs no knowledge of cryptography.
One vault identity opens everything
Each vault has one secret key, its vault identity. Every stored credential is locked with it, along with the vault’s list of which credentials exist. When the service starts, it unlocks the vault identity once and keeps it in memory. It never needs a key per credential.
Several people or devices can unlock the vault identity
The vault identity lives in one file, identity.age. Think of that file as a safe with one copy of the vault
identity inside. Fixed to the outside of the safe are several small lockboxes, one for each recipient: the
operational identity that your vault passphrase opens, your offline recovery key, the host unlock identity sealed to
the TPM if you set one up, and later a YubiKey. Every lockbox holds the same thing, the
combination to the safe.
identity.age
+---------------------------------------------------------------+
| lockbox: operational lockbox: recovery lockbox: host |
| identity key unlock (optional) |
| | | | |
| +----------------------+--------------------+ |
| | each holds the same combination |
| v |
| +---------------------------------------------------------+ |
| | safe: the vault identity | |
| +---------------------------------------------------------+ |
| seal over all the lockboxes |
+---------------------------------------------------------------+
- Each lockbox opens only with its own recipient’s private key.
- Any one recipient can open their lockbox, read the combination, open the safe and take out the vault identity.
- The recipients never share a secret with each other. Each has their own lockbox.
- A seal over all the lockboxes catches any damage to them, or a lockbox added, removed or swapped, when the safe is opened. The seal is made with the combination itself, so it doesn’t stop someone who can already open a lockbox from building a new safe. That is why only the service may write the vault’s files.
Adding or removing a recipient only rebuilds identity.age with a different set of lockboxes. The stored
credentials don’t change.
Every vault has at least two recipients, so losing one device or forgetting one passphrase doesn’t lose the vault.
If you forget the vault passphrase, iron-vault unlock --recovery opens the vault with the recovery key and replaces
the passphrase’s recipient with one for a new passphrase. A copy of identity.age made before still opens with the
forgotten one, so this is no remedy for a passphrase that leaked: rotate the credentials at their providers.
How a lockbox is locked for one recipient
Each recipient has a key pair: a public key that anyone may see, and a private key only they hold. To lock a lockbox for a recipient, Iron Vault:
- makes a brand-new, single-use key pair of its own;
- combines its single-use private key with the recipient’s public key to get a shared secret;
- uses that shared secret to lock the combination inside the lockbox;
- stores its single-use public key on the outside of the lockbox, then throws away the single-use private key.
To open the lockbox, the recipient combines their own private key with the single-use public key stored on it. The maths gives them the same shared secret, which opens the lockbox. Nobody else can work it out from the public parts.
For readers who want the names: the key pairs are X25519, the shared secret goes through HKDF-SHA256, the locking is ChaCha20-Poly1305, and the seal over the lockboxes is HMAC-SHA256.
Unlocking with a passphrase
age won’t put a passphrase lockbox on the same safe as key-pair lockboxes. So for passphrase unlock, Iron Vault
makes one extra key pair, the operational identity:
- its public half gets an ordinary lockbox on
identity.age; - its private half is kept in a separate file,
operational.age, locked only by your passphrase.
Unlocking goes: passphrase → operational identity → vault identity. The other recipients skip the first step:
flowchart LR
P[Vault passphrase] --> O[operational.age:<br/>operational identity]
O --> I
R[Offline recovery key] --> I
H[Host unlock identity,<br/>sealed to the TPM] --> I
I[identity.age:<br/>vault identity] --> C[Credential records]
Several approval signers
Approving a config, and the changes that need your presence, is a separate lock from unlocking the vault. The vault
pins one or more approvers, each backed by an approval signer, and any one of them speaks for you. The vault
passphrase and the recovery key open the vault identity but never count as approval: the vault passphrase can mint a
new recovery key, so a stolen vault passphrase would otherwise approve any config. Only a pinned approver’s
passphrase enrolls or removes an approver. The price is that losing every approver’s passphrase leaves
reset as the only way out, so
keep a second one.
An approver can be a key held in the machine’s TPM behind a PIN (recipe). The service never
opens the TPM: a separate helper, running as its own account and reachable only by the service account, signs the three fixed
payloads the service sends it, and only under the PIN you typed. The TPM limits guessing by itself, and the helper refuses to
work on a TPM whose lockout interval is under 600 seconds, so a compromised service gets at most 16 guesses and then at most one
per ten minutes; the PIN is at least 6 characters for that reason. The TPM keeps no copy of the PIN, so a forgotten PIN is recovered
through another approver, and a vault whose only approver is a lost TPM one is back to reset. This protects the approval from
a stolen vault passphrase or a service that took over a running process. It does not protect against someone who controls the
host: root, or any member of the tss group, can weaken the TPM’s lockout settings, and the helper then refuses to sign.
What this doesn’t protect against
- Removing a recipient doesn’t reach old copies. It only changes future versions of
identity.age. A backup made earlier can still be opened with the removed key. If a machine is lost, rotate the provider credentials it could reach. - Encryption doesn’t say who wrote a file. Anyone with the vault’s public key can create a file that looks like a stored credential. So the vault keeps its own list of which credential files are real, sealed with a code that only the holder of the vault identity can produce. A file missing from that list is never trusted.