Skip to main content
Back to Security

Hardware authentication and continuity

YubiKey: protect your accounts with a physical key

Start with what a YubiKey is and why to use one. Then explore a two-key setup, recovery procedures and advanced certificate architecture for individuals and businesses.

Understand in 60 seconds

What is a YubiKey?

A YubiKey is a small physical security key, usually USB and sometimes NFC. It proves you actually have the key when you sign in to an account. On compatible services it can replace SMS codes and even the password.

01

Phishing-resistant sign-in

With FIDO2/WebAuthn, the key checks the website you sign in to, so a fake lookalike site cannot reuse the sign-in in the same way.

02

Private secrets stay on the key

For FIDO2 and PIV keys generated on the device, the private key need not leave the YubiKey.

03

Convenient protection

Depending on the service, plug it in or use NFC, touch the sensor and sometimes enter a PIN.

04

Independent recovery

Registering a second key ahead of time avoids relying on a single device if one is lost or broken.

How does it work in practice?

  1. Register the YubiKey as a security key in a supported account’s settings.
  2. When signing in, choose security key or passkey.
  3. Plug in or tap the key, then confirm with touch and a PIN if requested.

Important: a YubiKey is not a universal password backup. The service must support the selected method. FIDO2/WebAuthn, OTP, OpenPGP and PIV are different features: for most web accounts, FIDO2 is enough and no X.509 certificate is needed.

Choose your reading path

I am new to security keys

Learn how to secure an online account with FIDO2, without certificates or a PKI.

See examples

I configure my two YubiKeys

Review known inventory, checks, backups and recovery procedures for this environment.

See my setup

I design enterprise authentication

Explore PIV, X.509 certificates, Entra CBA, Vault PKI and role-based choices.

Read expert guidance

Public conceptual diagram. No serial numbers, PINs/PUKs, OTP seeds, private keys, personal certificates, escrow paths or account identifiers are published. 'Documented' reflects a past observation, not a check performed today.

Show all sections

My two YubiKeys — quick reference

ykman-style view based on inspections from 31 October to 4 November 2026 and on the slot 2 restoration of 29 November, not a live scan. Each state only describes the specific check performed.

Primary

USB-C · NFC (PIV and OpenPGP off) · firmware 5.4.3

OTP 1
Configured · type to confirm
OTP 2
HMAC-SHA1 · KeePassXC unlock verified · slot kept for KeePassXC
PIV
9A only slot in use · 82 clear (3 Nov)
FIDO2
SSH-sk and GitHub passkeys verified · kill switch signature tested (29 Nov)

Backup

USB-A · NFC (PIV and OpenPGP off) · firmware 5.4.3

OTP 1
Configured · type to confirm
OTP 2
HMAC-SHA1 · KeePassXC unlock verified · slot kept for KeePassXC
PIV
9A: expired legacy certificate · 82 clear (3 Nov)
FIDO2
SSH-sk and GitHub passkeys verified (1 Nov) · kill switch signature tested (29 Nov)
What do OTP slots 1 and 2 do?

Slot 1 = short touch: triggers OTP configuration 1, here Yubico OTP used by Vaultwarden (WebAuthn being rolled out). A stray touch has already typed a code into a terminal.

Slot 2 = long touch (~3 s) for keyboard OTP output. In HMAC-SHA1 mode, KeePassXC sends a challenge to the key: a long touch alone does not type any code. An approval touch may be required. The homelab kill switch does not use this slot: its disarm uses a FIDO2 signature (decided on 29 Nov after a conflict with KeePassXC).

FIDO2, SSH or PIV touch confirmation does not trigger an OTP slot. PIV slots 9A/82 are a separate namespace.

PIN and PUK: which one and how many retries?
ProtectionFactory defaultFactory retry limit
FIDO2 / passkeysNo default PIN8 (reinsert after 3 failures)
PIV PIN1234563
PIV PUK123456783
OpenPGP user PIN123456Read from device
OpenPGP admin PIN12345678Read from device

These are factory defaults, not the device's current codes. The PIV PUK only unblocks the PIV PIN. OpenPGP has its own reset code; FIDO2 has no PUK. The PIV management key (AES-256 on the inspected devices) is distinct from the PIN.

How to inspect each key without changing it

Connect one key at a time. These commands read metadata and counters without entering a PIN. Do not publish output: it may contain identifiers.

ykman info
ykman otp info
ykman piv info
ykman fido info
ykman openpgp info
Where are the generated files and backups?
FIDO2 SSH
Both resident SSH keys generated on the workstation (~/.ssh). The _sk file is a recoverable handle, not the hardware private key. GitHub access verified with each key (backup key on 1 Nov).
GPG / OpenPGP
Software keyring and settings on the workstation (~/.gnupg). Local GPG keys are not hardware OpenPGP keys: 0/3 slots filled on the device examined on 31 Oct. GPG backup and recovery remain unverified.
KeePassXC
Encrypted KDBX database kept separate from its local key file under ~/.local/share/keepassxc (mode 600). The NAS copy was refreshed on 31 Oct; an offline key-file copy was made on 1 Nov (age archive read back).
SOPS / age
The workstation may load its age identity from ~/.config/sops/age or a mise-managed file: verify the exact recipient before recovery. A separate recovery identity lives on a LUKS2-encrypted SanDisk.
Encrypted copies
An age archive is backed up to TrueNAS and an encrypted workstation copy was compared and restored using the SanDisk. An independent backup of the SanDisk's private identity remains outstanding.

Detailed runbook: provenance, filenames, mounts, verification and restore

Migration and validation status (nabla-yubikey)

Public guide: only generic paths appear here. Operational details belong in the runbooks. No private identity, PIN or vault contents are shown.

Yubico references: OTP · PIV · FIDO2 · OpenPGP

Latest evidence and recovery

State recorded in nabla-yubikey as of 29 November 2026, with the checks run from 31 October to 4 November. This is not live telemetry: a GO diagnostic does not prove a backup can be restored.

KeePassXC vault

Verified with both keys

Vault opened using OTP slot 2 HMAC-SHA1 on each key alone. After slot 2 was restored on 29 Nov, the NAS copy opens again (attested by the owner) and the Dropbox copy opens with one of the keys.

Read the runbook

FIDO2 SSH

Verified for GitHub

GitHub accepts each key on its own: the primary on 31 Oct, the backup on 1 Nov. The TrueNAS server still refused the FIDO2 SSH keys on 3 Nov. A fix for the SSH agent starting without a display under Wayland is documented.

Read the runbook

PIV, OpenPGP and NFC applets

Configured, primary to replay

On 4 Nov, NFC was restricted (PIV and OpenPGP off over NFC) and YubiHSM Auth disabled on both keys. The probe is GO on the backup; it still has to be replayed on the primary connected alone. No OpenPGP key slot was filled on the device inspected on 31 Oct.

Read the runbook

Accounts and passkeys

GitHub verified

Both keys are GitHub passkeys (attested on 1 Nov). For other services, registering both keys is only declared by the operator, and AWS is still to do. Vaultwarden is moving from Yubico OTP to WebAuthn (guide of 4 Nov). No TOTP account is shared by the two keys.

Read the runbook

Backup and recovery

Incomplete

The KeePassXC key file has an offline copy (age archive read back on 1 Nov) and a copy on the encrypted escrow USB; the local and NAS encrypted copies are identical (3 Nov). A full restore is not proven.

Homelab kill switch

Gate tested, disarm not run

Decision of 29 Nov: the disarm uses a FIDO2 signature with the existing SSH-sk keys (PIN and touch), public keys only on the verifier; slot 2 stays with KeePassXC. The first HMAC-SHA1 design was dropped: it had overwritten the vault secret, restored the same day. Gate test with each key alone: passed (owner-observed). arm and disarm on the homelab: not run (NOT_RUN).

Read the runbook
How to recheck without changing either key

From a nabla-yubikey checkout, with one YubiKey connected at a time. These commands do not enter a PIN or unlock a vault. GO only applies to the checks performed.

just dependencies-readonly
just applets-readonly
just ssh-fido2-readonly
just keepassxc-readonly
Where to find source evidence and next steps

Migration done: nabla-yubikey PR #1 (merged)

Runbooks are pinned to a master commit; the kill switch note is pinned to PR #6, still a Draft. Never expose serial numbers, PINs, private fingerprints, vault names or export files on the website.

Authentication and recovery graph

Select a node to explore its role. Links describe intended dependencies, not automatic synchronization of private keys between devices.

The backup YubiKey must be enrolled separately with each service; its private keys are not cloned automatically.
Accessible list of diagram relationships
  • Trusted workstation → Primary YubiKey — daily usage
  • Trusted workstation → Backup YubiKey — independent recovery
  • Primary YubiKey → WebAuthn accounts — FIDO2 authentication
  • Primary YubiKey → SSH access — FIDO SSH key
  • Primary YubiKey → PIV certificates — certificate and PIV key
  • Primary YubiKey → OpenPGP signing — signing and encryption
  • Primary YubiKey → OTP / HMAC — challenge-response
  • Backup YubiKey → Recovery rehearsals — read-only checks
  • Backup YubiKey → Encrypted age escrow — verified restoration
  • Backup YubiKey → KeePassXC — unlock to be tested

The backup YubiKey must be enrolled separately with each service; its private keys are not cloned automatically.

Vault PKI and PIV certificates

Planned architecture

Target design, not deployed: each YubiKey retains its private key. Vault signs certificate requests (CSRs) and publishes certificates and revocation information.

Certificate lifecycle

  1. Delegate issuance

    An offline root CA delegates signing to a Vault PKI intermediate issuing authority.

  2. Generate requests

    Each YubiKey creates its own private PIV 9A key and CSR without exporting private material.

  3. Sign and validate

    Vault signs both CSRs. Clients verify the X.509 chain and certificate revocation status (CRL).

  4. Renew or revoke

    Each certificate has an independent lifecycle and can be renewed or revoked separately.

Two separate security keys require distinct key pairs and certificates. Corporate credentials remain governed by enterprise PKI. This guide does not write to either YubiKey.

PIV and Microsoft Entra ID: decision guide

A YubiKey 5 has PIV slots, but identity certificates in 9A/9C/9D/9E are not automatically preinstalled. The factory attestation certificate is not an Entra ID login certificate.

YubiKey 5 PIV slot architecture

9A — User authentication

X.509 certificate for smartcard/Entra CBA; not factory-provisioned.

9C — Digital signature

Signing certificate when provisioned; not automatically present.

9D — Key management / decryption

Plan recovery before use.

9E — Card authentication

Not automatically an Entra CBA identity.

82–95 — Retired key management

Encryption key history, not interchangeable login identities.

F9 — Manufacturer attestation

Factory Yubico attestation certificate; not a workplace identity.

9B — PIV management key

Administration secret, not an X.509 certificate.

PIV slots are separate from the two physical OTP slots. PIN, PUK and management key are shared by the PIV application; multiple certificates do not mean independent environments.

How does Microsoft Entra CBA work?

The browser or operating system performs certificate authentication; YubiKey proves possession of its private key without exposing it. Entra validates CA trust, expiry, CRL revocation and user mapping; Conditional Access then determines access. CBA is not automatically MFA: configure strong mapping and authentication policy.

A PIV applet without an X.509 identity certificate is insufficient for Entra CBA. FIDO2/WebAuthn works without a personal PIV certificate.

Lifecycle of a 9A certificate with Entra CBA
  1. 1. Verify identity and approve enrollment
  2. 2. Generate a private key in YubiKey slot 9A
  3. 3. Generate a CSR containing the public key
  4. 4. Sign the CSR using an issuing CA (Vault PKI or corporate PKI)
  5. 5. Import the public certificate without replacing an existing key
  6. 6. Configure CA trust, strong user binding and Entra CBA
  7. 7. Test sign-in, Conditional Access and revocation
  8. 8. Renew before expiry; revoke on loss or departure

The corporate CA must remain governed by the company. Do not add a personal Vault PKI CA to the tenant trust list without formal IAM approval. The private key stays on YubiKey.

Should an enterprise deploy CBA?

Not solely for phishing-resistant MFA: FIDO2 is simpler to operate. CBA makes sense with an existing PKI, smartcards, legacy applications or certificate/compliance requirements. It entails issuance, renewal, CRLs, recovery and user support.

Administrators / privileged accounts

Hardware FIDO2 first; CBA only when smartcard/PKI is required.

Employees

Passkeys, Windows Hello for Business or Mac Platform SSO; CBA only when needed.

B2B contractors

Home-tenant MFA with Cross-Tenant Access trust and corporate policy.

Signing / encryption teams

PIV 9C/9D certificates with defined CA and recovery process.

WebAuthn service users

YubiKey FIDO2 alone: no PIV certificate needed.

Acronyms and concepts
PIV — Personal Identity Verification
YubiKey smartcard application.
CBA — Certificate-Based Authentication
X.509 certificate-based authentication.
PKI — Public Key Infrastructure
Certificate trust and lifecycle infrastructure.
CA — Certificate Authority
Authority that signs certificates.
CSR — Certificate Signing Request
Signing request containing a public key.
CRL — Certificate Revocation List
CA-published revoked certificate list.
X.509 — Certificate standard
Identity certificate format.
FIDO2 — Fast Identity Online 2
Phishing-resistant public-key authentication.
WebAuthn — Web Authentication
Web API for passkeys and FIDO2 security keys.
EKU — Extended Key Usage
Allowed certificate uses, e.g. Client Authentication.
SAN — Subject Alternative Name
Additional identities in the certificate.
UPN — User Principal Name
Microsoft Entra account identifier.
MFA — Multi-Factor Authentication
Multiple-factor authentication.
SSO — Single Sign-On
Single sign-on across applications.

Reference documentation: Microsoft Entra CBA · Yubico PIV · Vault PKI

Configuration plan and validation

01Documented

Read-only device inventory

Inspect USB/NFC, firmware and FIDO2, OTP, PIV and OpenPGP capabilities on both devices without changing slots.

02Planned

FIDO2 / WebAuthn

Enroll both keys separately on each critical account, retain an independent recovery method, and test sign-in with each.

03Documented

Touch-confirmed SSH

Keep a dedicated backup hardware SSH key (ed25519-sk), verify touch and PIN requirements, and test access non-destructively.

04Blocked

PIV and certificates

Inspect slots (including 9A and 82), expiration and trust chain; renew expired certificates only after backup and explicit authorization.

05Planned

OpenPGP / GPG agent

Document OpenPGP and GPG-agent/pcscd integration; distinguish PIV certificates, OpenPGP subkeys and FIDO-backed SSH.

06Documented

HMAC-SHA1 OTP

Keep the legacy challenge-response mechanism separate from FIDO2. Validate the slot and client without revealing or reprogramming the secret.

07Blocked

Independent encrypted backups

Create two separate age archives; validate fingerprints and recovery paths without secrets in logs. Stop if both backups refer to the same file.

08Planned

KeePassXC and rotation

Verify unlock using the primary key and a backup scenario; document dependencies and rotation after loss.

09Planned

Recovery drill

Simulate losing the primary key: critical accounts, SSH, vault, certificates, archive recovery and redacted evidence.

Use cases: everyday and advanced

Illustrative commands for an already configured environment. Variables prefixed with $ and hostnames are examples. This page never provisions a physical YubiKey.

Filter the examples locally, without sending your query to a server.

15 of 15 examples

CommonFIDO2 / WebAuthn

MFA for critical accounts

Enroll both YubiKeys separately on GitHub, Cloudflare, or another WebAuthn-compatible identity provider. Test each key independently.

Prerequisites / Caution

Prerequisites : Compatible account, existing working access, and independent recovery method.

Caution : Use the service security settings: register the primary and backup keys separately. Do not depend on one authenticator.

Reference : FIDO Alliance

CommonOpenSSH / FIDO2

SSH login to a host or workstation

Use an already-enrolled ed25519-sk hardware identity. Authentication normally requires touch and optionally PIN.

Prerequisites / Caution

Prerequisites : FIDO-enabled OpenSSH, public key registered in authorized_keys, and independent SSH recovery access.

Caution : Do not replace the only working SSH access. The local key file is a handle, not the hardware private key.

ssh -V
ssh -i ~/.ssh/id_ed25519_sk user@host.example

Reference : Yubico SSH FIDO2

AdvancedFIDO2 / Git / SSH

Hardware SSH Git commit signing

Sign commits with a dedicated FIDO-backed SSH identity, preferably separate from the SSH login key.

Prerequisites / Caution

Prerequisites : Existing ed25519-sk signing identity; public key registered for signing on GitHub; compatible Git.

Caution : These commands change repository-local Git settings. A GitHub Verified badge still requires server-side verification.

git config --local gpg.format ssh
git config --local user.signingkey "$HOME/.ssh/id_ed25519_sk_git_signing.pub"
git config --local commit.gpgsign true

Reference : Yubico Git FIDO2

AdvancedOpenPGP / GPG

GPG-signed Git commits and tags

Use an OpenPGP signing subkey stored on the YubiKey. Git invokes gpg-agent and may require touch/PIN.

Prerequisites / Caution

Prerequisites : Working OpenPGP signing subkey and gpg-agent; verified public fingerprint.

Caution : Do not confuse PIV, OpenPGP, and FIDO-backed SSH keys. Do not automate PIN or key changes.

gpg --card-status
git config --local gpg.format openpgp
git config --local user.signingkey "$GPG_SIGNING_FINGERPRINT"
git config --local commit.gpgsign true

Reference : GitHub signing commits

CommonSOPS / age

Encrypted workstation development secrets

Keep sensitive configuration encrypted in Git and inject it only when needed. SOPS uses an age recipient, either software-based or via a YubiKey plugin.

Prerequisites / Caution

Prerequisites : Already encrypted file, recipient configured in .sops.yaml, accessible age identity, approved local dev command.

Caution : Never commit plaintext .env files or print environment secrets. Software age identities are not automatically YubiKey-backed.

sops edit config/dev.enc.yaml
sops exec-env config/dev.enc.yaml 'just dev-up'

Reference : SOPS

AdvancedSOPS / age / PIV

SOPS secrets protected by a YubiKey-backed age identity

Decrypt workstation development secrets using an already-provisioned YubiKey age identity, without persisting plaintext. Access follows the configured device PIN/touch policy.

Prerequisites / Caution

Prerequisites : Existing age-plugin-yubikey identity, readable identity descriptor, compatible plugin installed, YubiKey recipient already present in the SOPS policy, and a separate recovery recipient.

Caution : This is a read/decrypt workflow, not PIV provisioning. exec-env requires flat top-level scalar secrets; do not print the environment or commit decrypted credentials.

age-plugin-yubikey --list
SOPS_AGE_KEY_FILE="$HOME/.config/sops/age/yubikey-identity.txt" \
  sops exec-env config/dev.enc.yaml 'just dev-up'

Reference : age-plugin-yubikey

Advancedage-plugin-yubikey / PIV

Hardware-backed file encryption with age

After explicitly approved age-plugin-yubikey provisioning, encrypt for the hardware recipient and decrypt with the plugin identity file.

Prerequisites / Caution

Prerequisites : Installed plugin, approved PIV slot, backed-up plugin identity file, verified recipient, independent recovery plan.

Caution : Initial plugin setup can mutate a PIV slot: never run it without approval. An identity stored on a USB drive is not automatically hardware-resident.

age-plugin-yubikey --list
age -r "$AGE_YUBIKEY_RECIPIENT" -o artifact.age artifact.txt
age -d -i "$AGE_YUBIKEY_IDENTITY_FILE" artifact.age | sha256sum

Reference : age-plugin-yubikey

AdvancedPostgreSQL / age

Stream-encrypted PostgreSQL backup

Encrypt a pg_dump stream directly without creating an intermediate plaintext dump. Use multiple independent recovery recipients.

Prerequisites / Caution

Prerequisites : Restricted pg_dump permissions, verified age recipients in recipients.txt, secured backup storage, planned recovery drill.

Caution : Listing an archive is not a full restore test. Use independent recovery recipients and verify pipeline exit status.

set -o pipefail
pg_dump -Fc --no-owner "$PGDATABASE" | age -R recipients.txt -o postgres.dump.age
age -d -i "$AGE_IDENTITY_FILE" postgres.dump.age | pg_restore --list

Reference : PostgreSQL pg_dump

AdvancedOpenPGP / PostgreSQL

GPG signing a PostgreSQL backup

Add a detached signature to an already encrypted archive to verify origin and integrity before a restore.

Prerequisites / Caution

Prerequisites : YubiKey-accessible GPG signing subkey, existing postgres.dump.age file, trusted signer public key.

Caution : A signature does not encrypt a backup. Check the signer fingerprint and verify before restoring.

gpg --local-user "$GPG_SIGNING_FINGERPRINT" --detach-sign --armor --output postgres.dump.age.asc postgres.dump.age
gpg --verify postgres.dump.age.asc postgres.dump.age

Reference : GnuPG

CommonPIV / PKCS#11 / X.509

PIV authentication and signing certificates

Inspect the slot 9a authentication certificate, its issuer and expiration. For TLS client authentication, configure PKCS#11 middleware.

Prerequisites / Caution

Prerequisites : Connected YubiKey, ykman installed, existing certificate, approved trust chain.

Caution : Export is public certificate only, but may expose personal identity information. Do not publish; never regenerate keys during diagnostics.

ykman piv info
ykman piv certificates export 9a auth-public.pem
openssl x509 -in auth-public.pem -noout -subject -issuer -dates

Reference : Yubico PIV

CommonVaultwarden / WebAuthn

Vaultwarden vault MFA

Use WebAuthn/FIDO2 for vault login, enroll a second key independently and verify offline recovery codes.

Prerequisites / Caution

Prerequisites : Compatible server/client, recovery session, securely stored recovery code.

Caution : In account settings, turn on WebAuthn two-step login and independently enroll and test both keys.

Reference : Bitwarden two-step login

AdvancedHashiCorp Vault / OIDC

Vault login through an identity provider

Protect human HashiCorp Vault login with an OIDC identity provider enforcing FIDO2/WebAuthn; Vault can also apply supported native MFA methods.

Prerequisites / Caution

Prerequisites : Configured OIDC method in Vault and upstream identity provider enforcing FIDO2.

Caution : Vault does not automatically offer native WebAuthn MFA. Distinguish IdP MFA from Vault's built-in login MFA.

vault login -method=oidc

Reference : HashiCorp Vault MFA

CommonKeePassXC / OTP HMAC-SHA1

KeePassXC challenge-response unlock

Bind a KeePassXC database to the YubiKey HMAC-SHA1 OTP challenge-response slot. Plan independent recovery.

Prerequisites / Caution

Prerequisites : Existing challenge-response slot, compatible KeePassXC, test copy of the database and validated recovery plan.

Caution : Never reprogram an OTP slot without secure secret backup. Separate keys cannot automatically unlock the same database.

Reference : KeePassXC

CommonOATH-TOTP / Yubico Authenticator

Time-based one-time passcodes

Keep OATH-TOTP credentials on the YubiKey and obtain codes through Yubico Authenticator when WebAuthn is unavailable.

Prerequisites / Caution

Prerequisites : Provisioned OATH app, TOTP-enabled service and recovery method.

Caution : TOTP is less phishing-resistant than WebAuthn. OATH-TOTP and the HMAC-SHA1 OTP challenge-response slot are separate applications.

Reference : Yubico Authenticator

AdvancedFIDO2 / SSH-sk signature / nabla-compose

Homelab panic kill switch

Both YubiKeys are the unlock key for the disarm step of the nabla-compose homelab panic kill switch: a FIDO2 signature of a random challenge with one of the existing SSH-sk keys, PIN and touch required by the key, either key is enough. The verifier keeps public keys only and slot 2 stays with KeePassXC. Arming cuts public access, stops AI and bots, freezes Vaultwarden and cuts the NAS outbound traffic while keeping the admin channel, then stops services by criticality tier. Only disarming requires the YubiKey.

Prerequisites / Caution

Prerequisites : nabla-compose checkout on the workstation with its virtualenv, SSH-sk keys created with verify-required and enrolled with enroll (public keys only, nothing is written to the YubiKey), an admin SSH session already opened with the YubiKey and the plan reviewed with check before any run.

Caution : State on 29 Nov 2026: unlock-test passed with each key alone (PIN and touch observed by the owner); arm and disarm have never been run on the homelab. Owner only: automated agents only run check. Do not add --include-critical unless required: stopping the critical tier needs a physical NAS restart. On disarm the firewall rule is removed and services restart most-critical first; Vaultwarden is unlocked by hand, its master password is never automated. This card documents the procedure, not the live state of the homelab.

# Read the plan: read-only, runs nothing
python3 scripts/truenas/kill-switch.py check

# Test the YubiKey gate alone, runs nothing else (PIN + touch)
python3 scripts/truenas/kill-switch.py unlock-test

# ARM (emergency): public access, AI and bots, then services by criticality
python3 scripts/truenas/kill-switch.py arm --apply --acknowledge I_ARM_THE_HOMELAB_KILL_SWITCH

# DISARM: PIN then YubiKey touch (either key works)
python3 scripts/truenas/kill-switch.py disarm --apply

Reference : nabla-compose kill switch runbook (PR #473)

Security rules

  • Never change PIN, PUK, PIV management key, OTP slots or private keys in an automated diagnostic.
  • Never publish secrets, hardware identifiers, personal certificates, backup contents or private paths in Git or on a public page.
  • Enroll, test and store the backup key independently with its own PIN.
  • Distinguish configured, last-known working and unverified. A read-only test does not prove recovery.

Acronym glossary

Terms used throughout the diagram and plan.

FIDO2

Fast IDentity Online 2

Strong authentication standard with hardware keys, including passwordless sign-in.

WebAuthn

Web Authentication

Browser API to register and authenticate a security key.

CTAP

Client to Authenticator Protocol

Protocol between the client system and a hardware authenticator.

SSH

Secure Shell

Remote access protocol; the -sk key type uses a FIDO authenticator.

PIV

Personal Identity Verification

Smartcard application for certificate-based authentication and cryptographic operations.

PKCS#11

Public-Key Cryptography Standards #11

Standard interface to cryptographic modules and smartcard objects.

GPG

GNU Privacy Guard

Software to manage OpenPGP keys and signatures.

OpenPGP

Open Pretty Good Privacy

Open standard for signing and encrypting data.

OTP

One-Time Password

Single-use password; not the same as WebAuthn.

HMAC

Hash-based Message Authentication Code

Authentication code derived from a secret key and hash function.

SHA-1

Secure Hash Algorithm 1

Legacy hash function used by some challenge-response modes; not a recommendation for new digital signatures.

NFC

Near Field Communication

Short-range radio communication with phones and readers.

PIN

Personal Identification Number

Personal code protecting key access.

PUK

PIN Unblocking Key

Unlock code for the PIV application, kept offline.

CA

Certificate Authority

Authority issuing or signing certificates.

age

age encryption tool

File encryption tool used for encrypted recovery archives.

MFA

Multi-Factor Authentication

Authentication with multiple independent factors, for example a password and hardware key.

SOPS

Secrets OPerationS

Editor and encryption tool for structured secrets, including age recipients.

OIDC

OpenID Connect

Identity protocol built on OAuth 2.0, used for federated Vault login.

IdP

Identity Provider

Provider authenticating users and optionally enforcing WebAuthn.

OATH

Initiative for Open Authentication

Standards for authentication passcodes, distinct from the OTP challenge-response application.

TOTP

Time-based One-Time Password

Short-lived time-based code, often six digits.

TLS

Transport Layer Security

Protocol securing network connections, optionally using client certificates.

X.509

ITU-T X.509

Standard for public-key certificate format and validation.

SQL

Structured Query Language

Database language used by PostgreSQL.

Exit criteria

  1. Read-only inventory both keys and record dated, redacted results.
  2. Enroll the backup separately on every critical service and validate recovery without losing access.
  3. Repair the PIV trust chain/certificates and independent age backups before destructive changes.
  4. Test KeePassXC and perform one complete restoration drill.

Reference documentation: Yubico · FIDO Alliance · age