VA-14: TPM 2.0-backed agent identity (Linux) #60
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/VA-14-tpm-identity"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Agent identity hardening (VA-14): refactor the identity to a signing-backend abstraction and add a TPM-backed key on Linux so the private key never leaves the chip.
What changed
Identityholds aSigner(Software|Tpm) instead of a rawRsaPrivateKey;sign_handshakeroutes through it and is now fallible (a hardware signer can fail - one caller updated).identity::tpm(thetpmfeature, Linux,tss-esapi/tpm2-tss): a non-exportable RSA-2048 signing key under the Owner hierarchy, evicted to a persistent handle. The TPM signs the handshake digest and the self-signed certificate (via rcgen'sRemoteKeyPair); only the persistent handle + cert are stored.tpmfeature is off by default, so the standard build carries no libtss2 dependency.Decisions
Foundation refactor + Linux TPM now, with a swtpm CI lane; Windows NCrypt/CNG deferred.
tss-esapi(mature, swtpm-tested) rather than the issue'stpm-rs, which is not production-ready - noted as a follow-up. Re-pair on reimage.Verification
A CI lane runs the TPM backend against
swtpm: create a sealed key, sign + verify the handshake against the cert key, reload it (AC1/AC2).oci-build/check.Dockerfilenow also installs libtss2/swtpm and runscargo test --features tpmagainst it. Full check (fmt, clippy --deny warnings, build, tests, the swtpm TPM test, Windows cross-check) is green. AC3 (software fallback) and AC4 (existing installs unchanged) are covered by the load precedence.Follow-ups
Windows NCrypt/CNG backend (the other half of the issue); real-TPM hardware validation beyond swtpm.
Refs VA-14.