Skip to content

provider: tighten attestation challenge handling - #2808

Merged
jonathan308 merged 1 commit into
devfrom
fix/attestation-challenge-formats-dev
Dec 2, 2026
Merged

jonathan308 merged 1 commit into
devfrom
fix/attestation-challenge-formats-dev

Conversation

@jonathan308

@jonathan308 jonathan308 commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator
  • The provider answers an attestation challenge (code identity, App Attest assertion) only when it has one of the exact nonce formats the coordinator sends, and sends nothing for any other.
  • Tests: SealedChallengeShapeTests.
  • Cherry-picked from 0a81277.

Part of landing the 0.10.20 release content on dev before the release is cut, as the release review on #2800 asked.


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

Answer a code-identity challenge only when it holds one of the nonce
shapes the coordinator sends: base64 of 32 bytes, or that value, a dot
and the unpadded URL-safe base64 of a 32-byte digest. Any other text
gets no reply. The App Attest assertion path checks for its 32-byte
nonce before the value goes into a reply, and the shadow client returns
only that shape.

Tests cover each coordinator nonce shape and near-miss shapes.

(cherry picked from commit 0a81277)
@jonathan308 jonathan308 added the run-ci Trigger one-shot PR CI run (auto-removed when run starts) label Dec 1, 2026
@vercel

vercel Bot commented Dec 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
d-inference-landing Ready Ready Preview Dec 1, 2026 9:26pm UTC
darkbloom-status Ready Ready Preview Dec 1, 2026 9:26pm UTC
eigen-homepages-darkbloom Ready Ready Preview Dec 1, 2026 9:26pm UTC

Request Review

@github-actions github-actions Bot removed the run-ci Trigger one-shot PR CI run (auto-removed when run starts) label Dec 1, 2026

@davidtai davidtai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved by David. The accepted challenge shapes match exactly what the coordinator sends on dev and master:

  • APNs push: 44 characters (identity_push_dispatch.go:61-66);
  • WebSocket resume: 88 characters (identity_resume_challenge.go:42-49);
  • App Attest: canonical base64 of 32 bytes (appattest/exchange/sender.go:34-44,78).

No legitimate challenge is dropped and there is no downgrade. It also closes a real hole: before this, anyone with the provider's public key could get the Secure Enclave key to sign any text.

Requests:

  1. Low, AppAttestShadowClient.swift:216: the attest guard checks only Data(base64Encoded:)?.count == 32. A non-canonical challenge still reaches attestKey, which uses up the key, and the reply at :166 then leaves the challenge out. Use canonical32 here, as WorkerProtocol.swift:130 does, and remove the filter at :166.
  2. Low: SealedChallengeShape.isBase64Of32 and WorkerRequestValidation.canonical32 define the same rule twice. Keep one and have the other call it.

This branch was successfully deployed

3 active deployments
Preview – eigen-homepages-darkbloom — 35a342dd Deployed Dec 1, 2026 by vercel[bot]
Preview – d-inference-landing — 35a342dd Deployed Dec 1, 2026 by vercel[bot]
Preview – darkbloom-status — 35a342dd Deployed Dec 1, 2026 by vercel[bot]
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.

2 participants