Verify downloaded snapshots through service identity endorsements - #8361
Draft
cjen1-msft wants to merge 2 commits into
Draft
Verify downloaded snapshots through service identity endorsements#8361cjen1-msft wants to merge 2 commits into
cjen1-msft wants to merge 2 commits into
Conversation
Follow bounded, authenticated COSE endorsement chains from the configured join service certificate to older snapshot signers. Preserve direct verification and leave recovery-time fallback unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow joining nodes to verify downloaded COSE snapshots signed by earlier service identities, provided a valid endorsement chain connects the signer to the configured current service certificate.
The snapshot download path previously required the snapshot signer to match
join_config.service_certdirectly. An already-open service may still serve a snapshot from before recovery, even though it has endorsed the signing identity.Add a
SnapshotRead-gatedGET /node/snapshot/{snapshot_name}/endorsementsendpoint returning base64-encoded COSE endorsements, newest first. Joiners request it only when direct COSE verification fails to match the configured identity. They verify every link, service-epoch continuity, snapshot and receipt epoch coverage, and the snapshot signature/body binding before writing or installing the snapshot. Chain length and byte sizes are bounded.Directly signed snapshots retain their existing path. Legacy JSON receipts remain direct-certificate-only. Snapshot bytes and range responses are unchanged; backup fetching is unchanged. Recovery-time fallback to another snapshot or ledger replay is intentionally out of scope.
Related to #8043. This is separate from the recovery-infrastructure changes.
Debug
loggingandsnapshotter_testbuilds pass. The snapshotter unit tests, existing local recovery endorsement scenario, new join scenarios after one and two recoveries, generated OpenAPI schema, and existing snapshot download/failure scenarios pass.scripts/ci-checks.shpasses.Documentation build was attempted with
nix shell nixpkgs#doxygen --command build-debug/env/bin/sphinx-build --fail-on-warning -b html doc doc/html. Doxygen 1.17.0 aborts on the existingccf::pal::ccf::ds::Mutexalias before Sphinx processes the documentation. A full documentation build remains outstanding.