Pin the root public key (SPKI) so the fingerprint survives in-place renewal #15

Merged
gsadmin merged 1 commits from dev into main 2026-08-11 10:26:44 +00:00

1 Commits

Author SHA256 Message Date
gsadmin fa5205715b Pin the root public key (SPKI), not the cert, so the pin survives renewal [skip ci]
The bootstrap-token fingerprint now hashes the root CA's SubjectPublicKeyInfo
instead of the certificate DER. The in-place root renewal keeps the same key but
re-issues the cert, so a cert hash would change at renewal (invalidating tokens
minted just before it); the key hash stays constant, matching the same-key
renewal design. The agent matches the pin against each fetched cert's SPKI — only
the root carries that key. Test asserts the fingerprint is unchanged across an
in-place renewal. Backend 104, Agent 60 tests pass.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-11 06:23:15 -04:00