Skip to content

feat(verifier): bind attested runs to a registered per-run secret - #121

Draft
prdai wants to merge 1 commit into
mainfrom
feat/issue-120-run-pcr-validation
Draft

prdai wants to merge 1 commit into
mainfrom
feat/issue-120-run-pcr-validation

Conversation

@prdai

@prdai prdai commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

what changed

  • execution-service generates a per-run secret, registers (runId, runSecret) with verifier-service over mTLS (POST /runs) before launching, and passes the secret in user data. The host serves it to the enclave on vsock 5001.
  • verifier-service stores SHA-256(runSecret) in RunBindingTable (1 h TTL). /challenge rejects a runId whose secret is not registered, and the issued challenge row carries the hash.
  • sce-unit sends the secret on /challenge and sets user_data = SHA-256(secret) in the NSM attestation. /attest rejects a document whose user_data does not match the challenge row.
  • New execution-service mTLS client cert (make -C secure/sce gen-client-cert), added to the verifier truststore. VERIFIER_RUNS_URL and the @srads/common/tls pin helper wire it up.
  • Docs updated: READMEs, docs/e2e-secure-rads.txt, docs/getting-started.md, docs/cost-service.md.

why

Refs #120. The host chooses the runId the enclave runs under, so a compromised host can attribute a genuine, correctly measured enclave's PDM fetch, KMS decrypt, DSAR entry and cost to another run. The registered secret makes the runId a capability: only that run's host receives it, and the verifier refuses a challenge for any other id.

PCRs cannot fix this. One EIF per algorithm means PCR0/1/2 are identical for every run, so the binding lives in the attestation user_data and the challenge row, not in a measurement.

verification

  • gofmt -l . && go build ./... && go vet ./... && go test ./... in secure/sce-unit (no test files).
  • tsc --noEmit and biome check src in secure/verifier-service and secure/sce/execution-service.
  • Both modified serverless.yml files parsed as YAML.
  • Not verified: nothing deployed or run end to end against AWS. The truststore must be re-uploaded with execution-service's client cert before deploy.

notes

Draft. This binds the enclave's attested work to its run. The GET /run/{runId} result body still needs #93's signed result to be trustworthy.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

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