iOS 설정 및 백엔드 검증
이 플러그인의 설치 단계와 전체 마크다운 가이드가 포함된 설정 프롬프트를 복사하세요.
사용된 iOS 네이티브 시스템
“iOS 네이티브 시스템 구성” 섹션iOS에서 이 플러그인은 다음을 사용합니다: Apple App Attest 에서 DeviceCheck framework.
요구 사항
“요구 사항” 섹션- iOS 14 이상
- 실제 검증 흐름 테스트를 위해 실기기 사용 권장
- App Attest 기능이 활성화된 Xcode target
Xcode 설정
“Xcode 설정” 섹션- Xcode에서 iOS 앱 타겟을 엽니다.
- 다음으로 이동: Signing & Capabilities.
- 클릭 + Capability 추가 그리고 추가 App Attest.
다음 항목에 대한 별도의 iOS 권한 설정은 필요하지 않습니다: Info.plist App Attest 자체를 사용하는 데에는 별도의 권한이 필요하지 않습니다.
클라이언트 흐름
“클라이언트 플로우” 섹션import { AppAttest } from '@capgo/capacitor-app-attest';
const { keyId } = await AppAttest.prepare();
const attestation = await AppAttest.createAttestation({ keyId, challenge: 'backend-registration-challenge',});
const assertion = await AppAttest.createAssertion({ keyId, payload: 'backend-request-payload',});보내기 attestation.token 및 assertion.token 백엔드로 전송하세요. 앱에서 검증하지 마세요.
백엔드 워크플로우 (iOS)
“백엔드 워크플로우 (iOS)” 섹션등록 (createAttestation)
“등록 (createAttestation)” 섹션- 백엔드에서 일회용 값 생성
challenge. - 앱에서 호출
createAttestation({ keyId, challenge }). - 백엔드에서 App Attest 증명을 검증합니다:
- 인증서 체인이 유효하며 Apple App Attest에 연결되어 있습니다
- 앱 식별자가 귀하의 앱과 일치합니다 (
bundleId, 팀) clientDataHash일치함SHA256(challenge)
- 저장된 디바이스 키 상태 (
keyId, 공개 키 및 검증자 메타데이터).
요청 보호 (createAssertion)
“요청 보호 (createAssertion)” 섹션- 백엔드에서 일회용 값 생성
payload(또는 canonical request hash 입력값). - 앱에서 호출
createAssertion({ keyId, payload }). - 백엔드에서 이전에 저장된 키 자료로 assertion 서명을 검증합니다.
- Replay protection과 nonce TTL 검사를 강제하세요.
iOS 스키마
“iOS 스키마” 섹션sequenceDiagram participant App as iOS App participant Plugin as AppAttest plugin participant Apple as Apple App Attest participant BE as Backend
BE->>App: one-time challenge App->>Plugin: prepare() Plugin->>Apple: generateKey() Apple-->>Plugin: keyId
App->>Plugin: createAttestation(keyId, challenge) Plugin->>Apple: attestKey(keyId, SHA256(challenge)) Apple-->>Plugin: attestation token Plugin-->>App: token + platform + format + keyId App->>BE: token + challenge + keyId BE->>BE: verify Apple attestation rules
BE->>App: one-time payload App->>Plugin: createAssertion(keyId, payload) Plugin->>Apple: generateAssertion(keyId, SHA256(payload)) Apple-->>Plugin: assertion token Plugin-->>App: token + platform + format + keyId App->>BE: token + payload + keyId BE->>BE: verify signature + replay policy최소한의 백엔드 페이로드 규격
“최소한의 백엔드 페이로드 규격” 섹션등록:
{ "platform": "ios", "format": "apple-app-attest", "keyId": "string", "challenge": "string", "token": "string"}어서션:
{ "platform": "ios", "format": "apple-app-attest", "keyId": "string", "payload": "string", "token": "string"}iOS Setup & Backend Verification 단계부터 계속 진행하세요
“iOS Setup & Backend Verification 단계부터 계속 진행하세요” 섹션사용 중이라면 iOS 설정 및 백엔드 검증 보안 및 컴플라이언스 계획을 세우려면, 다음 항목과 연결하세요: @capgo/capacitor-app-attest 사용하기 @capgo/capacitor-app-attest 사용 시 네이티브 기능을 위해, 암호화 암호화 구현 상세 정보: 컴플라이언스 컴플라이언스 구현 상세 정보: Capgo 보안 스캐너 Capgo Security Scanner에서 제품 워크플로우는, 그리고 Capgo 보안 Capgo Security의 제품 워크플로를 위해.