Repository navigation
provider: tighten attestation challenge handling - #2808
Merged
Merged
Conversation
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)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
4 of 5 tasks
davidtai
approved these changes
Dec 1, 2026
davidtai
left a comment
Collaborator
There was a problem hiding this comment.
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:
- Low,
AppAttestShadowClient.swift:216: the attest guard checks onlyData(base64Encoded:)?.count == 32. A non-canonical challenge still reachesattestKey, which uses up the key, and the reply at:166then leaves the challenge out. Usecanonical32here, asWorkerProtocol.swift:130does, and remove the filter at:166. - Low:
SealedChallengeShape.isBase64Of32andWorkerRequestValidation.canonical32define the same rule twice. Keep one and have the other call it.
This was referenced Dec 2, 2026
This branch was successfully deployed
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.
SealedChallengeShapeTests.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-botwith what you need.