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.