Repository navigation
fix(attest): 리프 인증서 검증 node:crypto 폴백 — 엣지 런타임 P-384+SHA-256 미구현 - #211
Merged
Merged
Conversation
Apple App Attest 리프는 P-384 중간 CA 가 ecdsa-with-SHA256 으로 서명하는데,
Supabase Edge 런타임의 WebCrypto 는 이 조합(P-384 키 + SHA-256 해시)의 verify 를
NotSupportedError('Not implemented')로 던진다 — 실기기 첫 등록이 전부
attest_invalid/parse_error:Not implemented 로 거절되던 원인(2026-09-28 실측,
1회용 crypto-selftest 함수로 조합별 확인 후 삭제).
certSignedBy 가 NotSupportedError 에 한해 node:crypto verify(DER 서명 그대로)로
폴백한다. CI 의 플레인 Deno 는 이 조합을 지원해 폴백을 안 타므로, 테스트는
verifyEcdsaViaNode 를 직접 호출해 같은 픽스처(P-384 CA 가 SHA-256 서명한 리프)로
정상·변조 양쪽을 잰다. RSA(Play SA JWT)·P-256(assertion)·P-384+SHA-384(중간↔루트)는
런타임 지원 확인됨 — 변경 없음.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Owner
Author
|
실기기 검증 완료(2026-09-28 06:36 UTC, 선반영 배포 attest-register v3·verify-location v33·verify-post-photo v39): attest-register 등록 성공 — app.device_attest_keys 1행 생성 → 직후 verify-location 에서 단언 검증 ios / pass 기록, sign_count 1 로 전진. 수정 전 같은 기기·같은 빌드는 400(parse_error:Not implemented)이었다. |
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.
무엇이
iOS 실기기 첫 attest-register 가 전부
400 attest_invalid / parse_error:Not implemented로 거절되던 문제 수정.certSignedBy가 WebCryptoNotSupportedError에 한해 node:crypto 검증(DER 서명 그대로)으로 폴백한다.원인
Apple App Attest 리프 인증서는 P-384 중간 CA 가 ecdsa-with-SHA256 으로 서명한다. Supabase Edge 런타임의 WebCrypto 는 이 조합만 미구현이라
NotSupportedError: Not implemented를 던진다 — 2026-09-28 실기기 등록 시도(iPhone, 개발 빌드)에서 발견, 1회용 crypto-selftest 함수로 조합별 실측 후 삭제:CI 의 플레인 Deno(v2.9.4)는 이 조합을 지원해서 기존 x509 체인 테스트가 통과했고, 런타임 갭이 배포 후에야 드러났다.
검증
verifyEcdsaViaNode를 직접 호출해 정상 서명 통과·변조 tbs 거절을 잰다(플레인 Deno 에선 폴백 분기가 안 타므로 직접 호출).deno test14/14 통과,deno check깨끗.🤖 Generated with Claude Code