메뉴로 바로가기

iOS 설정 및 백엔드 확인

GitHub

__CAPGO_KEEP_4__

__CAPGO_KEEP_5__

__CAPGO_KEEP_6__ __CAPGO_KEEP_7__ __CAPGO_KEEP_8__ DeviceCheck __CAPGO_KEEP_9__

__CAPGO_KEEP_10__

__CAPGO_KEEP_11__
  • iOS 14+
  • 실제 인증 흐름을 위해 물리 장치가 권장됩니다.
  • Xcode에서 App Attest 기능이 활성화된 앱 대상

Xcode 설정

Xcode 설정
  1. iOS 앱 대상을 Xcode에서 열어주세요.
  2. Go to 인증 및 기능.
  3. Click + 기능 App Attest 추가하기 and add.

No custom 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.tokenassertion.token 앱에서 검증하지 마십시오.

백엔드 워크플로우 (iOS)

iOS 백엔드 워크플로우

등록 (createAttestation)

등록 (createAttestation)
  1. 백엔드가 한번만 생성 challenge.
  2. 앱이 호출 createAttestation({ keyId, challenge }).
  3. 백엔드가 앱 attestation:
    • 인증서 체인은 유효하고 Apple App Attest에-anchor
    • 앱 식별자가 앱 (bundleId, 팀)과 일치
    • clientDataHash 일치 SHA256(challenge)
  4. 스토어 디바이스 키 상태 (keyId, 공개 키, 및 검증자 메타데이터).
  1. 백엔드가 한번만 생성 payload (또는 canonical request hash 입력).
  2. App calls createAssertion({ keyId, payload }).
  3. 백엔드가 이전에 저장된 키 자료와 함께 서명 확인을 합니다.
  4. 재생 방지 및 nonce TTL 확인을 위해 강제합니다.

iOS schema

iOS schema
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 설정 및 백엔드 검증에서 계속하기

iOS 설정 및 백엔드 검증에서 계속하기 제목

iOS 설정 및 백엔드 검증을 사용하는 경우 iOS 설정 및 백엔드 검증 보안 및 규정 준수 계획을 위해 연결하세요. @capgo/capacitor-app-attest를 사용하여 @capgo/capacitor-app-attest의 네이티브 기능 @capgo/capacitor-app-attest를 사용하여 @capgo/capacitor-app-attest의 구현 세부 정보 암호화 암호화 구현 세부 정보 규정 준수 규정 준수 구현 세부 정보 Capgo 보안 스캐너 Capgo 보안 스캐너의 제품 워크플로우에서 Capgo 보안 Capgo 보안의 제품 워크플로우에서