Skip to content

feat(verifier): allow each run to attest only once - #125

Merged
prdai merged 3 commits into
mainfrom
feat/issue-124-single-attestation
Nov 19, 2026
Merged

prdai merged 3 commits into
mainfrom
feat/issue-124-single-attestation

Conversation

@prdai

@prdai prdai commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

what changed

  • verifier-service records the first successful attestation for a runId in a new RunAttestationTable.
  • The claim is a conditional PutItem (attribute_not_exists(RunId)) made after the PCR check, so concurrent attestations race safely and only one mints tokens.
  • A second /attest for the same runId returns 409. Docs updated.

why

Closes #124. Without a record, the same run id can be launched and attested again, and every attestation mints a fresh token pair. One run can then hold many attested sessions, each fetching from PDM, unwrapping the key through KMS, writing a subject-access entry, and reporting cost under the same id.

verification

  • tsc --noEmit and biome check src pass in secure/verifier-service.
  • secure/verifier-service/serverless.yml parsed as YAML.
  • Not verified: no deploy or concurrency test against AWS. The repo has no TS test harness.

notes

@prdai
prdai marked this pull request as ready for review November 19, 2026 04:09
@prdai
prdai merged commit 3e9eefc into main Nov 19, 2026
5 checks passed
@prdai
prdai deleted the feat/issue-124-single-attestation branch November 19, 2026 04:10
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.

Single-use attestation: a run id can be attested repeatedly

1 participant