The Backend of LuckTrainingRoadmaps

HSM Root of Trust and OpenBao Key Hierarchy (Chapters 20 + 20b)

HSM Root of Trust and OpenBao Key Hierarchy (Chapters 20 + 20b) An architecture diagram generated by Archify. YubiHSM 2 FIPS · root of trust · Inside the HSM · TRNG, wrap keys, FIPS L3 YubiHSM 2 FIPS root of trust TRNG, wrap keys, FIPS L3 yubihsm-connector · PKCS#11 / HTTP bridge · Architecture component yubihsm-connector PKCS#11 / HTTP bridge Transit + PKI Engines · sign, encrypt, PKI · OpenBao process · AES-256-GCM; pki_int leaf certs Transit + PKI Engines sign, encrypt, PKI AES-256-GCM; pki_int leaf certs OpenBao 2.5 · Raft HA, auto-unseal · OpenBao process OpenBao 2.5 Raft HA, auto-unseal KV v2 + DB + AppRole · versioned secrets, dynamic creds · OpenBao process · rotate-root leases KV v2 + DB + AppRole versioned secrets, dynamic creds rotate-root leases HSM Proxy API · envelope encryption · Application plane · DEK cache, 1h TTL HSM Proxy API envelope encryption DEK cache, 1h TTL HKDF Rust Service · 6 domain keys, 30d epochs · Application plane HKDF Rust Service 6 domain keys, 30d epochs Platform Services · mTLS, JWT/session signing · Application plane Platform Services mTLS, JWT/session signing PostgreSQL TDE · AES-XTS + pgcrypto PII · Application plane · AcmeToCasino pg_tde PostgreSQL TDE AES-XTS + pgcrypto PII AcmeToCasino pg_tde Operator Dashboard · reads cached Redis health · Application plane Operator Dashboard reads cached Redis health Recovery Custodians · Shamir 5-shard, threshold 3 · Offline custody Recovery Custodians Shamir 5-shard, threshold 3 Backup & Snapshots · raft snapshot, offline · Offline custody · + wrap-key backup Backup & Snapshots raft snapshot, offline + wrap-key backup PKCS#11 / HTTP auto-unseal (~3s) mounts mounts encrypt/decrypt/sign HSM entropy datakey AppRole auth derived domain keys encrypted PII writes dynamic creds wrap-key backup raft snapshot save Inside the HSM OpenBao process Application plane Offline custody

Root of Trust

  • • YubiHSM 2 keeps wrap keys and the transit master key from ever leaving hardware
  • • PKCS11 auto-unseal reconstructs the master key in ~3 seconds, no human step
  • • Losing the HSM and its recovery shards together is unrecoverable

Engines & Consumers

  • • Transit signs and encrypts without ever exporting a key
  • • mTLS leaf certs from pki_int expire in 1 hour, max 72
  • • HKDF turns 64 bytes of HSM entropy into six domain keys on 30-day epochs

Fail-Closed Operations

  • • OpenBao seals itself if the audit device cannot write
  • • The operator dashboard reads cached Redis health, never OpenBao directly
  • • Annual control verifies the recovery shard custodian inventory