Repository navigation
Key roles, step 1: signing goes through a RealmSigner seam (REQ-SIGNERSEAM-001); DD-041 records the role decisions - #313
Merged
Conversation
…of key roles dsse_sign_typed becomes a thin wrapper over dsse_sign_with(&dyn RealmSigner); FileSigner is today's file-backed key as one implementation. _with variants for layer manifests, attestations, release sums and deposit (which now self-verifies with signer.public_key()). Envelope bytes are unchanged, proven against goldens captured from the pre-refactor code. Records DD-041 (key-role decisions of 2026-11-04); no role logic lands here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r-seam # Conflicts: # artifacts/requirements.yaml
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.
This is step 1 of REQ-KEYROLES-001 (key roles): every signature now goes through a
RealmSignerseam (REQ-SIGNERSEAM-001). Nothing about what is signed, or how it verifies, changes.Why it comes first
Key roles mean a different key signs each kind of document:
Before any of that, signing has to stop taking raw key bytes. A signer has to be something a caller passes in. That could be a file today, or a hardware key or a role key later.
Change
verify.rs:RealmSigner, which is aDsseSignerpluspublic_key()andrealm_key_id();FileSigner:newrefuses a mismatched keypair, andnew_uncheckedkeeps the legacy wrappers byte-for-byte as they were;dsse_sign_with;dsse_sign_typedis now a thin wrapper over it._withvariants:sign_layer_manifest_with;attest::sign_with;sign_release_sums_with;deposit_with_signer, whose self-verify now usessigner.public_key()rather than slicing the secret key.realm_key_id, notkey_id, becauseDsseSigner::key_id()already exists.Evidence
Byte identity: Ed25519 signatures are deterministic, so old and new code must produce identical bytes. Signatures for 5 envelopes were captured from main's unmodified code with a fixed key:
every_signing_entry_point_still_emits_the_pre_seam_bytesasserts that both the old wrappers and the new_withpaths produce exactly those envelopes.Negative control: with the payload type altered inside
dsse_sign_with, that test fails. The file was then restored.Mock signer: an in-memory counting signer, not a file, is accepted by every
_withsite, and its envelopes verify.Deposit: depositing through the mock gives the same digest as depositing with the key, with one
signcall.FileSigner::newrefuses a mismatched keypair.Gates:
clippy -D warningsis clean;cargo test --workspacepasses after merging current main;rivet validatepasses.Mutation run, CI flags, on
verify.rsandselfverify.rs:55 mutants tested in 10m: 53 caught, 2 unviable(0 missed).attest.rs,keys.rsanddeposit.rsare exempt inmutation-scope.toml.Test order: the seam tests were written after the code. Their oracle, the captured goldens, was taken before the refactor, and the negative control shows the test can fail.
Next
keyroles.rs). It is ready locally.🤖 Generated with Claude Code
https://claude.ai/code/session_019TNtfRjLNhEz82G2ggeeNu