메뉴로 바로가기

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+
  • 실제 인증 흐름을 위해 물리 장치가 권장됩니다.
  • App Attest 기능이 활성화된 Xcode 대상

Xcode 설정

Xcode 설정
  1. Xcode에서 iOS 앱 대상を開습니다.
  2. 가장 가까운 인증 및 기능.
  3. 클릭 + 기능App Attest 추가.

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.token 백엔드에 전송 assertion.token 앱에서 검증하지 마십시오.

iOS 백엔드 워크플로

iOS 백엔드 워크플로

등록 (createAttestation)

등록 (createAttestation)
  1. 백엔드가 일회용 인증서를 생성합니다. challenge.
  2. 앱이 백엔드에 요청합니다. createAttestation({ keyId, challenge }).
  3. 백엔드가 앱의 Apple App Attest 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 설정 및 백엔드 확인에서 계속하는 섹션

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