Repository navigation
OSS-368 P1: enrollment contract revision and harmless fixtures - #518
Merged
Merged
Conversation
Extends only node_control.proto with digest/salt, required approved SPKI/fingerprint, pre-registration CSR_PRE, bounded challenge nonce, fresh SIG_CLAIM proof, channel-binding evidence and signed public certificate response metadata. No plaintext secret in any response; key_fingerprint stays descriptive. Regenerates Go/TS with the pinned canonical script. Adds ten deterministic test-only fixtures covering synthetic key/CSR/signature, valid claim, mismatched key, stale nonce, replay, revoked/generation mismatch, wrong and preflight scope, topology refusal, digest-only storage/no secret reads, atomic rollback and durable rotation. No enrollment RPC handler is mounted; no stub success is claimed.
Add real domain/scope validation to the test-only fixture seam and assert all four ADR 0019 refusals: bootstrap credential on node operations, node certificate on operator enrollment management, cross-node object_id and over-scope preflight reports. Split topology refusal into its own fixture. Sign the mismatched-key and stale-nonce cases over the exact canonical context so each isolates one requirement, and assert CSR_PRE-as-proof is refused. Make the descriptor secret guard substring-based with explicit public-metadata suffixes.
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.
OSS-368 / Track C — P1 enrollment contract revision + harmless fixtures ONLY
Executable preparation for the P1-DESIGN gate (design in PR517 / ADR 0019). No enrollment server RPC handler is mounted, no agent/daemon lifecycle, no live/owned deployment work, no releases. The fixture seam is test code only.
Contract (only
node_control.proto, Track C owned)CreateEnrollmentRequest: requiredapproved_public_key_spki,approved_key_fingerprint,enrollment_secret_digest,enrollment_salt,node_id, plus registeredcsr_pre(pre-registration material only).BeginEnrollmentChallengeRPC returns a single-usechallenge_id+server_nonceand server-derived channel context; no secret.ClaimEnrollmentRequest: challenge ID, freshSIG_CLAIMby the approved key over node ID / enrollment ID / challenge / nonce / expiry / capabilities / verified channel context, channel-binding evidence.key_fingerprintremains descriptive metadata, never an auth factor.enrollment_tokencarries the node-generated secret only in this request.ClaimEnrollmentResponse: signed public X.509 client certificate metadata (DER, serial, fingerprint, expiry, CA digest, generation). No plaintext secret in any response message.OneTimeEnrollmentmetadata gains node ID and approved key fingerprint.bun scripts/proto-generate.mjs; only this proto's generated outputs changed.Harmless fixture seam (test-only)
internal/rpc/node_control_enrollment_fixture_test.goimplements ten deterministic cases with synthetic Ed25519 keys, CSR_PRE, fake TLS channels and an owned in-memory snapshot: synthetic key/CSR/fresh signature, valid claim, mismatched approved key, stale/replayed nonce, replay, revoked/generation mismatch, wrong + preflight scope and unsupported topology, digest-only storage/no secret in reads, atomic rollback, durable rotation across a modelled restart.Acceptance evidence
buf lint+buf format -dclean; canonicalproto-generate.mjs --checkoutputs match.go test ./internal/rpc ./pkg/proto/... -count=1andgo vetpass; all ten fixture subtests pass.enrollment_secretadded to forbidden response fields) and passes.bun run check(0 errors/warnings),bun run test(360 pass),bun run lintpass.knowledge-lint -fix+ final pass (64 concepts, 38/38 queries).knowledge/decisions/adrs.mdnot edited.Limits
No production enrollment implementation, no stub success evidence, no live compatibility claim.
docs/adr/0019-node-control-contract.mdandknowledge/architecture/node-control-protocol.mdgained explicit test-only status notes.Do not merge here: independent review and green CI required.