Repository navigation
feat: nitro provider — runtime/enclave attestation (closes #1) - #3
Merged
Merged
Conversation
Phase-two Stream B, step 1 of ADR 0001. nitro is the kernel's second (ASP, appraiser) pair and the genuinely new capability: runtime/enclave attestation, which nothing in the suite covered (ground/attest enforce config, not runtime state). Per the build order (vet -> nitro -> qualify -> attest), nitro is the Nitro shape and the first to exercise native nonce binding and a real hardware trust root — proving the abstraction vet established generalizes. - providers/nitro/nitro.go: the pair. NSMDoc models the parsed AWS Nitro attestation document (module_id, nonce, PCR map, raw COSE_Sign1). The measurer gathers via an injected Source (CollectFailed when not in an enclave). The appraiser performs NATIVE NONCE BINDING (the document must carry the run's issued challenge — the platform-native freshness vet cannot do), verifies the signature against the aws-nitro trust root via an injected Verifier, enforces a PCR policy from expected_pcr<N> params, and emits platform.* claims (nitro_attested, module_id, nonce_verified, signature_valid, pcr0/1/2/8). - COSE/CBOR decode + X.509 chain verification are behind the injected Source/Verifier, so the evidence module stays stdlib-only (go.mod unchanged, govulncheck 0). Real AWS parsing lives in the consuming tool / a future awsnsm subpackage. - cmd/slice now demos both providers end to end; CHANGELOG + README updated. Invariants held: kernel packages contain ZERO nitro branches (the only nitro/aws-nitro mentions in term/ev/trust/asp/cvm/lower are comments); the measurer returns unsigned evidence and binding is an appraisal check; the kernel owns the nonce. go vet clean, go test -race green (pass / nonce-mismatch / bad-signature / PCR match+mismatch / missing-root / CollectFailed). Unblocks ground#12 (nitro-attested IAM trust condition) and attest#104 (inject nitro:// into context.platform.* — the evaluator's buildContext from #103 already handles context.<group>.<attr> generically, so platform needs no evaluator change).
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.
Closes #1. Phase-two Stream B, step 1 of ADR 0001 — epic hub #2. The first new capability after Stream A re-pointed the existing tools.
What this is
nitro is the kernel's second
(ASP, appraiser)pair and the genuinely new capability: runtime/enclave attestation — proving the node about to touch sensitive data is in a known-good state (ground/attest enforce config, not runtime). Per the build order (vet → nitro → qualify → attest), nitro is the Nitro shape and the first to exercise native nonce binding and a real hardware trust root — proving the abstraction vet established generalizes.Design (mirrors vet; kernel stays stdlib-only)
providers/nitro/nitro.go—NSMDocmodels the parsed AWS Nitro attestation document (module_id, nonce, PCR map, raw COSE_Sign1). The measurer gathers via an injectedSource(CollectFailedwhen not in an enclave). The appraiser:bytes.Equal(doc.Nonce, in.Nonce)). This is the platform-native freshness vet cannot do.aws-nitrotrust root via an injectedVerifier.expected_pcr<N>param must match the measured PCR.platform.*claims:nitro_attested,module_id,nonce_verified,signature_valid,pcr0/1/2/8.awsnsmsubpackage.cmd/slicenow demos both providers end to end (vetworkload.*riding the kernel SIG; nitroplatform.*binding the nonce natively).Invariants held
nitro/aws-nitromentions interm/ev/trust/asp/cvm/lowerare comments (the falsifiable test).Verification
go vetclean ·go test -racegreen (pass / nonce-mismatch / bad-signature / PCR match+mismatch / missing-root / CollectFailed) ·govulncheck0 ·go run ./cmd/sliceshows both providers.Unblocks
nitro://runtime attributes intocontext.platform.*(the evaluator'sbuildContextfrom #103 already handlescontext.<group>.<attr>generically, soplatformneeds no evaluator change).Follow-up
Implement the production
Verifier(real COSE/CBOR/X.509 NSM parsing) where a consumer needs it — out of scope for the stdlib-only kernel repo.