Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Errors

Iron Vault refuses things in two places, and each has its own vocabulary:

  • Admin commands (init, unlock, config approve, add and 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 reason that 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.

CodeNameMeaningWhat to do
1unsupported-versionThe 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.
2malformed-frameA 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.
3unknown-commandThe service does not know the command.The CLI is newer than the service. Restart the service on the new binary.
4unexpected-frameA message arrived out of turn in the exchange.As for malformed-frame.
5not-admin-principalThe 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.
6busyThe 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.
13wrong-stateThe 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

CodeNameMeaningWhat to do
8declinedYou 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.
17already-initializedThe 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.
18passphrase-rejectedA 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.
19init-failedA 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.
27memory-unprotectedA 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

CodeNameMeaningWhat to do
14unlock-deniedThe vault passphrase was wrong.Try again. After 5 wrong passphrases the attempt limit applies (unlock-rate-limited).
15unlock-failedThe 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.
16unlocked-unavailableThe 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.
27memory-unprotectedA 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.
34unlock-rate-limitedToo 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.

CodeNameMeaningWhat to do
13wrong-stateThe service is not Locked.Run iron-vault lock first, then unlock --recovery.
14unlock-deniedThe 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.
15unlock-failedThe 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.
16unlocked-unavailableThe 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.
18passphrase-rejectedThe 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.
27memory-unprotectedAs for unlock.As for unlock.
30recovery-key-invalidThe 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.
34unlock-rate-limitedToo 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.
38recipient-set-invalidThe 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.
39recipient-inventory-damagedThe 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

CodeNameMeaningWhat to do
7config-invalidThe 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.
8declinedYou did not type yes at the summary.Nothing was changed.
9approval-deniedThe 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.
10approval-unavailableThe 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.
11approval-failedThe 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.
12committed-not-activeThe 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

CodeNameMeaningWhat to do
20name-takenadd: a credential of that name exists, healthy or damaged. add never overwrites.Use replace to change it, or choose another name.
21credential-invalidadd, 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.
22vault-write-failedadd, 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.
23unknown-credentialreplace, rm: no credential of that name.Check the name with list.
24credential-in-usereplace, 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.
9approval-deniedreplace, 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.
10approval-unavailablereplace, 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.
12committed-not-activereplace, rm: the change committed, but the config check after it left the service Unavailable.Run status and read the log’s config.check-failed.
26list-too-largelist: the credential list does not fit one admin message. The message gives the count.Remove credentials you no longer need.

caller-token

CodeNameMeaningWhat to do
25random-source-failedThe 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

CodeNameMeaningWhat to do
30recovery-key-invalidThe 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.
31recovery-check-failedThe 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.
32recovery-check-unavailableThe 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

CodeNameMeaningWhat to do
8declinedrecipient 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.
35recipient-invalidThe 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.
36recipient-enrolledrecipient add: the key is already enrolled. It was refused before any prompt. Nothing was changed.Run recipient list to see the enrolled keys.
37unknown-recipientrecipient remove: no enrolled recipient has this key. Nothing was changed.Run recipient list and copy the key from it.
38recipient-set-invalidrecipient 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.
39recipient-inventory-damagedThe 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

CodeNameMeaningWhat to do
52machine-not-forgottenThe 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.

CodeNameMeaningWhat to do
53not-implementedThe 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.
54client-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.
55address-invalidThe 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.
56state-mismatchThe 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.
57consent-refusedThe 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.
58provider-request-failedThe 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.
59account-unverifiedThe 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.
60account-mismatchThe account the provider verified is not --account.Sign in to the browser as the account you named, or name the account you meant.
61scopes-missingThe 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.
62account-takenAnother 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

CodeNameMeaningWhat to do
40approver-invalidapprover 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.
41unknown-approverapprover 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.
42approver-set-invalidapprover 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.
43approver-in-useapprover 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.
44approver-kind-unavailableThis 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.
9approval-deniedThe 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.
10approval-unavailableOwner 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.
18passphrase-rejectedThe 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.
22vault-write-failedThe 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

CodeNameMeaningWhat to do
51tpm-locked-outconfig 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

CodeNameMeaningWhat to do
49nothing-to-resetNo 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.
50reset-failedWriting 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.

CodeNameMeaningWhat to do
28migration-deniedMigration 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.
29migration-unavailableMigration 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.
33migration-rate-limitedToo 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.

CodeNameMeaningWhat to do
45export-failedexport: 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.
46bundle-invalidimport: 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.
47import-deniedimport: the export passphrase does not open the bundle’s identity envelope. Nothing was written.Run import again with the passphrase chosen at export.
48import-failedimport: --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.

StatusBodyreason values
400bad 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
401unauthorizedunauthenticated
403forbiddennot_granted, method_not_allowed, path_not_allowed
404not foundno_route
408emptyrequest_timeout
413emptyrequest_too_large
429too many requests, with Retry-After in whole secondsrate_limited
500internal errorservice_defect
502bad gatewayupstream_connect, upstream_tls, upstream_protocol, upstream_body, unsupported_coding, redirect_refused
503the unavailable reason (locked, policy invalid, checking or recovery needed), or service unavailablelocked, policy_invalid, checking, recovery_needed, withdrawn, route_unavailable, credential_unavailable, credential_needs_login, token_unavailable, credential_unusable
504gateway timeoutupstream_timeout

400: the request is malformed

reasonCauseWhat to do
connect_not_supportedA 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_formThe 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_supportedA protocol upgrade, such as WebSocket. The body is protocol upgrades are not supported.Not supported in v0.
unsupported_versionNot 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_targetThe path or query broke a rule, such as a .. segment or an encoded separator.Fix the URL the application builds.
bad_methodThe method is not one a route may allow.Use a standard method.
bad_headerA request header could not be read.Fix the client.
ambiguous_framingThe request’s length is ambiguous, for example both Content-Length and Transfer-Encoding.Fix the client.
foreign_marker, malformed_markerThe 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 reasonCauseWhat to do
401 unauthenticatedNo 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_grantedThe caller is known but its routes do not include this route.Grant the route in the caller’s table and approve.
403 method_not_allowedThe route’s methods do not allow this method.Widen methods, or call it differently. See Widen or narrow a route.
403 path_not_allowedThe 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_routeNo 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 reasonCauseWhat to do
413 request_too_largeThe 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_timeoutThe service had not answered within request_timeout_secs.Check the upstream’s latency, or raise the limit in [limits] and approve.
429 rate_limitedThe 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 reasonCauseWhat to do
502 upstream_connectThe service could not connect to the upstream.Check DNS and the network from the service’s host.
502 upstream_tlsThe upstream’s TLS certificate did not verify.Iron Vault never skips verification. For a private CA, set the route’s ca_file.
502 upstream_protocolThe upstream broke the HTTP protocol.Check the upstream URL is an HTTPS API.
502 upstream_bodyThe upstream’s body stopped before its end.Usually the upstream’s problem; retry.
502 unsupported_codingThe 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_refusedThe 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_timeoutThe 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:

BodyreasonMeaningWhat to do
lockedlockedThe service is Starting or Locked.iron-vault unlock.
checkingcheckingA config check is running: after an unlock, a reload, an approval or a credential change.Retry in a moment.
policy invalidpolicy_invalidThe config or its approval did not verify, for example after a hand edit.Approve a good config: see Tamper detection and recovery.
recovery neededrecovery_neededShared 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:

reasonMeaningWhat to do
route_unavailableThe 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_unavailableThe 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_loginThe 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_unavailableThe 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_unusableThe record loaded but its kind could not produce the request’s credential.Replace the credential with one of the right kind.
withdrawnThe 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:

reasonMeaning
body_corruptThe upstream’s compressed body did not decode.
body_truncatedThe upstream’s body ended early.
body_size_limit, body_ratio_limitThe decoded body passed the size limit or the decompression ratio limit.
body_encodeRe-encoding the scrubbed body failed.
upstream_bodyThe upstream’s body stopped.
deadlineThe request deadline passed while the body streamed.
caller_goneThe caller closed the connection.
service_closedThe 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.