CLI
ferritor operates a server (init, unseal, keys, policies) and reads and
writes its secrets, over gRPC with a client certificate. Every command
says more with --help; this page lists them all, and the guides linked
from each say how they fit together.
Install
Section titled “Install”- Linux: a release’s archive holds it with the other binaries, static (production fetches and verifies the latest).
- macOS and Windows Server: the CLI alone, for operators’ machines,
verified the same way:
ferritor-cli-<version>-aarch64-apple-darwin.tar.gz(Apple silicon),ferritor-cli-<version>-x86_64-apple-darwin.tar.gz(Intel Macs) andferritor-cli-<version>-x86_64-pc-windows-msvc.zip(releases up to 1.2.0:…-x86_64-pc-windows-gnu.zip).
On macOS:
version=1.3.0f=ferritor-cli-$version-aarch64-apple-darwin.tar.gz # Intel Macs: x86_64-apple-darwinfor a in "$f" "$f.sigstore.json" SHA256SUMS; do curl -fsSLO "https://github.com/ferritor/ferritor/releases/download/v$version/$a"donecosign verify-blob "$f" --bundle "$f.sigstore.json" \ --certificate-identity https://github.com/ferritor/ferritor/.github/workflows/release-plz.yml@refs/heads/main \ --certificate-oidc-issuer https://token.actions.githubusercontent.com && grep " $f\$" SHA256SUMS | shasum -a 256 -c - && tar -xzf "$f" && # ferritor-cli-$version-aarch64-apple-darwin/ferritor sudo install -m 0755 "${f%.tar.gz}/ferritor" /usr/local/bin/ferritor --versionOn Windows, in an elevated PowerShell (Run as administrator), since it
installs under Program Files; without one, use a folder of your own, such
as $env:LOCALAPPDATA\Programs\ferritor, in its place:
$version = "1.3.0"$f = "ferritor-cli-$version-x86_64-pc-windows-msvc.zip" # up to 1.2.0: x86_64-pc-windows-gnuforeach ($a in $f, "$f.sigstore.json", "SHA256SUMS") { Invoke-WebRequest "https://github.com/ferritor/ferritor/releases/download/v$version/$a" -OutFile $a}cosign verify-blob $f --bundle "$f.sigstore.json" ` --certificate-identity https://github.com/ferritor/ferritor/.github/workflows/release-plz.yml@refs/heads/main ` --certificate-oidc-issuer https://token.actions.githubusercontent.comif ($LASTEXITCODE -ne 0) { throw "the signature doesn't verify" }$want = (Select-String -Path SHA256SUMS -SimpleMatch " $f").Line.Split(" ")[0]if ((Get-FileHash $f).Hash -ne $want) { throw "the checksum doesn't match" } # -ne ignores case$out = New-Item -ItemType Directory (Join-Path $env:TEMP "ferritor-cli-$([guid]::NewGuid())") # fresh, emptyExpand-Archive $f -DestinationPath $out -ErrorAction Stop # …\ferritor-cli-$version-x86_64-pc-windows-msvc\ferritor.exeNew-Item -ItemType Directory "$env:ProgramFiles\ferritor" -Force | Out-NullCopy-Item "$out\$($f -replace '\.zip$')\ferritor.exe" "$env:ProgramFiles\ferritor\" -ErrorAction Stop$env:Path += ";$env:ProgramFiles\ferritor" # this shell; for good: System Properties, Environment Variablesferritor --versionEither stops before unpacking if the signature or the checksum doesn’t
match. They’re not notarized or signed by a publisher: fetched
with curl they run as they are, but downloaded with a browser macOS
refuses to start the binary until xattr -d com.apple.quarantine ferritor,
and Windows SmartScreen asks first. On Windows, Windows Server is the
target: desktop Windows 11’s Smart App Control, where it’s on, refuses a
binary no publisher signed.
Connecting
Section titled “Connecting”Every command takes these, before or after its name, each also from its environment variable:
| Option | Variable | Default | |
|---|---|---|---|
--addr |
FERRITOR_ADDR |
http://127.0.0.1:7070 |
the server: http:// for a dev-mode server on loopback, else https:// |
--ca |
FERRITOR_CA |
the CA certificate (PEM) to verify the server with; with https:// |
|
--cert, --key |
FERRITOR_CERT, FERRITOR_KEY |
your client certificate (carrying your ferritor://<name> identity) and its key, PEM; both or neither, required with https:// |
|
--token-file |
FERRITOR_TOKEN_FILE |
workload identity instead of --cert and --key: a platform token exchanged for a short-lived certificate first, kept in memory for this one command |
|
--exchange |
FERRITOR_EXCHANGE |
with --token-file or login --oidc: the server’s token exchange (its [identity] listen_addr), https://, verified with --ca |
export FERRITOR_ADDR=https://ferritor.internal:7070 FERRITOR_CA=ca.pem \ FERRITOR_CERT=alice.pem FERRITOR_KEY=alice-key.pemferritor statusA misspelled FERRITOR_… variable is ignored, not refused. For many
commands under one workload identity, exchange once with ferritor login
(below) and pass the certificate it writes as --cert and --key.
Conventions
Section titled “Conventions”- Values and shares are never arguments: they’d end up in shell
history and
/proc/<pid>/cmdline.put,unsealand the rekey’ssubmitandverifyread stdin, all of it byte for byte, or one line at a hidden prompt on a terminal. - Results go to stdout, everything else to stderr:
getprints the value’s raw bytes and nothing else, soferritor get app/db > fileis the value. Errors areerror: …on stderr, often with ahint: …line saying what to do (a sealed server, a missing permission, a namespace that doesn’t exist). - Exit status: 0 on success, 1 on any error;
policy checkexits 1 when not allowed, andaudit verify2 when nothing is broken but something is unproven. - Nothing sent, for sure: over
https://every command makes a health call first, so a server it can’t reach (or whose certificate doesn’t verify) fails before the real call: nothing was sent, safe to retry. - Rate limits: a call refused for a wait of up to 3 seconds is retried after it, saying so on stderr; a longer one fails, saying when to retry.
Commands
Section titled “Commands”Server state and keys
Section titled “Server state and keys”| Command | Options | |
|---|---|---|
ferritor status |
whether the server is initialized and sealed, its shares and threshold, the root key’s generation, an unseal or rekey in progress, auto-unseal, how many namespaces; the rotation reminders: when the root key’s rotation is due, how many namespaces’ KEKs are overdue or due soon, and with the namespace action each namespace’s active KEK and its due date (key management); the scheduled tasks: when each is next due, how its last run ended, whether it’s paused or running (scheduled tasks) |
|
ferritor init |
--shares (5), --threshold (3) |
create the root key and print its shares, once only (key management) |
ferritor unseal |
--reset, --recommit, --auto, --release-hold |
submit one share from stdin; --reset discards those submitted so far, --recommit stores a missing root commitment once a secret proves the key (the root commitment), --auto releases the auto-unseal hold and unseals through the KMS, --release-hold releases it once unsealed (auto-unseal) |
ferritor seal |
drop the server’s keys; always succeeds, and holds auto-unseal (unseal and seal) | |
ferritor rekey start |
--shares (5), --threshold (3), --seal (shamir, awskms, gcpkms) |
start replacing the root key and its shares; --seal changes how it’s protected (rekey) |
ferritor rekey submit |
--nonce |
one current share (stdin); the last prints the new shares |
ferritor rekey verify |
--nonce |
one new share (stdin); the last commits the rekey |
ferritor rekey cancel |
--nonce |
abandon it; the current shares keep working |
ferritor rotate |
--namespace |
a new active KEK for a namespace (rotate) |
ferritor rewrap |
--namespace (every one), --max-rows (the server’s) |
move DEKs onto the active KEK, then retire versions nothing uses, now (the servers also do it on a schedule); repeats until done, safe to interrupt (rewrap) |
ferritor purge |
--max-rows (the server’s) |
remove deleted versions past the server’s retention for good, now (the servers also do it on a schedule: scheduled tasks) |
ferritor destroy-kek |
--namespace, VERSION |
destroy a retired KEK for good: irreversible (destroy) |
ferritor schedule pause |
TASK (purge, rewrap) |
stop a task on every server, scheduled or by hand: none claims it, ferritor purge or rewrap is refused, and a run under way ends at its next batch; the schedule action (scheduled tasks) |
ferritor schedule resume |
TASK |
let it run again, at once if it’s due |
Namespaces
Section titled “Namespaces”Namespaces: a secret’s path starts with one, and nothing is stored outside one.
| Command | Options | |
|---|---|---|
ferritor namespace create |
NAME, --label KEY=VALUE (repeatable), --past-lost-keks |
create one (or re-create a deleted one) with its first KEK; --past-lost-keks is the recovery for one the keys database lost |
ferritor namespace delete |
NAME |
delete an empty one, destroying its KEKs: irreversible |
ferritor namespace list |
every namespace, live and deleted | |
ferritor namespace get |
NAME |
its state, KEKs, KEK floor and labels |
ferritor namespace label |
NAME, KEY=VALUE… |
set labels |
ferritor namespace unlabel |
NAME, KEY… |
remove labels |
Secrets
Section titled “Secrets”Secrets: versions, check-and-set, delete and restore, labels.
| Command | Options | |
|---|---|---|
ferritor get |
PATH, --version |
the latest value, or that version’s, raw bytes |
ferritor put |
PATH, --expected-version, --label KEY=VALUE (repeatable), --allow-empty |
store the next version from stdin; --expected-version stores only if the latest is still that one (0: only if new); an empty value is refused unless --allow-empty |
ferritor generate |
PATH, --profile NAME (default), --expected-version, --label KEY=VALUE (repeatable) |
store the next version with a value the server makes up from a generate profile, as put would store it; prints the version, never the value (get reads it) (generated secrets) |
ferritor delete |
PATH, --version |
delete every version, or with --version only that one (the newest live one left becomes the latest); restorable within the server’s retention |
ferritor restore |
PATH, --version |
undo a delete, or bring back a deleted or trimmed version |
ferritor versions |
PATH |
its history, newest first: metadata only |
ferritor list |
PREFIX (everything), --label KEY=VALUE (repeatable), --overdue, --older-than <n>d |
the latest version of every secret below a prefix, every page. --overdue: only secrets with the rotation flag past the server’s rotation_max_age_days; with --older-than 60d, older than 60 days instead (an age cutoff: the overdue ones included, not the due-soon window of the gauges); --older-than alone: any secret that old. With either, each line also gives when its version was created (rotation) |
ferritor metadata get |
PATH |
created, updated, versions, labels: never the value |
ferritor metadata set |
PATH, KEY=VALUE… |
set labels |
ferritor metadata unset |
PATH, KEY… |
remove labels |
Policies
Section titled “Policies”Policy: the config rules (read-only here, as
config:…) and the stored policies, the applications’ grants.
| Command | Options | |
|---|---|---|
ferritor policy list |
--identity |
the config rules and the stored policies |
ferritor policy get |
NAME |
one rule |
ferritor policy put |
NAME, --identity, --action (repeatable), --path (repeatable) or --all-paths, --description, --expected-version |
create or replace one stored policy |
ferritor policy delete |
NAME, --expected-version |
delete one |
ferritor policy apply |
-f/--file (TOML or JSON, - for stdin), --prune, --dry-run, --expected-revision |
make the stored policies match a file in one call, checked here first (apply) |
ferritor policy check |
--identity, --action, --path |
whether an identity may do it, and which rules grant it: exit status 0 if allowed, 1 if not |
ferritor policy review |
--identity, --path, --format table|csv|json, --partial |
every grant, one per identity, action, scope and rule (access review); refused unless complete (secured mode, unsealed, the stored policies in force) without --partial |
Workload identity
Section titled “Workload identity”Workload identity: platform tokens exchanged for short-lived certificates.
| Command | Options | |
|---|---|---|
ferritor identity init |
create the issuing CA, once | |
ferritor identity rotate |
--now |
a new issuing key; the old one’s certificates stay trusted until they expire, unless --now |
ferritor identity status |
every issuing key and its state | |
ferritor login |
--cert-out, --key-out, --oidc, --oidc-issuer, --oidc-client-id, --oidc-ca, --oidc-scope (repeatable) |
exchange a token at --exchange once, and write the certificate and its key (yours alone: 0600, on Windows a protected access list) for later commands: --token-file’s (the CLI), or with --oidc the ID token of a sign-in at your identity provider, by the device flow (operator sign-in) |
Audit log
Section titled “Audit log”| Command | Options | |
|---|---|---|
ferritor report |
--since, --until, --audit-log (repeatable), --public-key (repeatable), --format text|json, --partial |
a compliance report for a period: the audit logs verified, what happened from them (who unsealed, rekeyed, rotated, changed policies; the flagged secrets’ new versions), the ages now from the server; refused unless complete without --partial (compliance report) |
ferritor audit verify |
--public-key (repeatable) |
check a log from stdin, offline: every line’s link and every signature; exit status 0 if every entry is signed, 2 if something is unproven, 1 if broken (verifying) |