Skip to content

feat: nitro provider — runtime/enclave attestation (closes #1) - #3

Merged
scttfrdmn merged 1 commit into
mainfrom
feat/nitro-provider
Jun 9, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
feat/nitro-provider

Conversation

@scttfrdmn

Copy link
Copy Markdown
Contributor

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 — 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:
    1. Native nonce binding — the document must carry the run's issued challenge (bytes.Equal(doc.Nonce, in.Nonce)). This is the platform-native freshness vet cannot do.
    2. Signature — verifies the COSE_Sign1 against the aws-nitro trust root via an injected Verifier.
    3. PCR policy — every expected_pcr<N> param must match the measured PCR.
    • 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 (vet workload.* riding the kernel SIG; nitro platform.* binding the nonce natively).

Invariants held

  • Kernel packages contain zero nitro branches — the only nitro/aws-nitro mentions in term/ev/trust/asp/cvm/lower are comments (the falsifiable test).
  • Measurer returns unsigned evidence; binding is an appraisal check; the kernel owns the nonce.

Verification

go vet clean · go test -race green (pass / nonce-mismatch / bad-signature / PCR match+mismatch / missing-root / CollectFailed) · govulncheck 0 · go run ./cmd/slice shows both providers.

Unblocks

  • ground#12 — deploy the nitro-attested IAM trust-policy condition.
  • attest#104 — inject nitro:// runtime attributes into context.platform.* (the evaluator's buildContext from #103 already handles context.<group>.<attr> generically, so platform needs 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.

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).
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.

Add the nitro provider — runtime/enclave attestation (ASP + appraiser)

1 participant