Skip to content

test(enroll): qualify production boundary lifecycle through shared seam - #543

Merged
athNdev merged 1 commit into
mainfrom
codex/enrollment-qualification-test
Nov 18, 2026
Merged

athNdev merged 1 commit into
mainfrom
codex/enrollment-qualification-test

Conversation

@athNdev

@athNdev athNdev commented Nov 18, 2026

Copy link
Copy Markdown
Owner

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) in internal/noderuntime/enroll. Cherry-picked from local commit a309d545 onto current origin/main (4e461789).

internal/noderuntime/enroll/boundary_qualification_test.go — TestBoundaryProductionLifecycleQualification exercises, through the boundary seam rather than authority helpers:

  • Operator creates the enrollment; a bootstrap marker is refused (ErrScope). Required approved-key/Ed25519 bundle, protocol version and digest-only view assertions.
  • Bootstrap begins a bounded challenge; operator is refused; the response carries a server-stored nonce and channel context.
  • The node re-derives ClaimContext over node ID, enrollment ID, challenge ID, server-stored nonce, enrollment expires_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.
  • Injected issuance failure leaves state PENDING and a fresh challenge + claim then succeeds (issue-first/rollback + retry). Replaying the stale/failed claim after the successful consume is refused.
  • The issued serial is accepted for the node's own object_id and granted scopes; bootstrap/operator credentials, cross-node IDs, ungranted scopes and over-scope preflight reports are all refused.
  • assertNoSecret on 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 ./... — pass
  • go vet ./... — pass
  • go test -count=1 ./... — pass (all packages; internal/noderuntime/enroll includes the new qualification test)
  • knowledge-lint -fix then final — 40/40 queries pass, 75 concepts, indexes current
  • golangci-lint run --new-from-rev=4e461789 ./... (v2.13.2) — 0 issues

No merge requested; requires exact-head review and green CI.

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.
@athNdev
athNdev merged commit 5d87846 into main Nov 18, 2026
12 checks passed
@athNdev
athNdev deleted the codex/enrollment-qualification-test branch November 18, 2026 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant