Repository navigation
test(enroll): qualify production boundary lifecycle through shared seam - #543
Merged
Merged
Conversation
Adds a harmless owned-fixture test that drives the complete enrollment lifecycle through the shared production Boundary (NewBoundary): operator create, bootstrap challenge+claim, Ed25519 server-stored nonce in the NUL-delimited canonical SIG_CLAIM context, atomic consume/replay refusal, issuance-failure rollback with retry, three non-crossing domains, and digest-only secret handling. No RPC mount or live trust boundary.
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.
Summary
Focused follow-up to OSS-385 / PR #532: adds a harmless owned-fixture test that drives the complete enrollment lifecycle through the real shared production
Boundary(NewBoundary) ininternal/noderuntime/enroll. Cherry-picked from local commita309d545onto currentorigin/main(4e461789).internal/noderuntime/enroll/boundary_qualification_test.go—TestBoundaryProductionLifecycleQualificationexercises, through the boundary seam rather than authority helpers:ErrScope). Required approved-key/Ed25519 bundle, protocol version and digest-only view assertions.ClaimContextover node ID, enrollment ID, challenge ID, server-stored nonce, enrollmentexpires_at, NUL-delimited capability names and channel context. Asserts the nonce is bound, there is no client nonce, and no canonical-JSON{"encoding is reintroduced.PENDINGand a fresh challenge + claim then succeeds (issue-first/rollback + retry). Replaying the stale/failed claim after the successful consume is refused.object_idand granted scopes; bootstrap/operator credentials, cross-node IDs, ungranted scopes and over-scope preflight reports are all refused.assertNoSecreton the claim and claims responses proves the node secret never appears.No production RPC mount, live host, trust boundary, release, registry write or deployment. Synthetic Ed25519 keys, temp-dir 0600 private bundle and a fixed clock only.
Verification
Pinned toolchain
GOTOOLCHAIN=go1.26.11(go version go1.26.11 windows/amd64):go build ./...— passgo vet ./...— passgo test -count=1 ./...— pass (all packages;internal/noderuntime/enrollincludes the new qualification test)knowledge-lint -fixthen final — 40/40 queries pass, 75 concepts, indexes currentgolangci-lint run --new-from-rev=4e461789 ./...(v2.13.2) — 0 issuesNo merge requested; requires exact-head review and green CI.