Programming/WWDC

What's New in the Apple Push Notification Service 정리 - WWDC16

devssun 2020. 5. 11. 22:02
728x90
반응형

What's New in the Apple Push Notification Service

What's New in the Apple Push Notification Service - WWDC 2016 - Videos - Apple Developer

WWDC16에서 발표된 APNS의 새로운 기능에 대한 글이다.
결론부터 이야기하자면 '푸시 토큰'에 대한 이야기다.

15년 APNS 개선 사항 리뷰

  • HTTP/2 provider API
  • Instant Feedback
  • Lager payload (4KB 까지)
  • Simplified certificate handling

HTTP/2 Provider API - Sending Notifications

  1. 계정에서 Push notification을 등록한다
  2. Client App은 디바이스의 OS에 등록된다
  3. 디바이스에서는 App을 대신해 토큰을 요청하고 App에 return 된다 (디바이스 토큰은 해당 디바이스에서 유일하게 실행 됌)
  4. provider 서비스는 client 인증서를 사용해서 APNS와 연결하고 HTTP/2 request를 사용해 디바이스 토큰에 푸시를 전송한다
  5. HTTP/2 Provider API는 모든 것이 잘 됐을 때 성공을 나타내는 즉각적인 응답을 제공한다

Simplified Certificate Handling

  • Application push
  • VoiP push
  • Complication push
  • Development and production environment

Token Authentication

Notification을 전송할 때 client 인증서 대신 provider 토큰을 사용하는 방법

  • Simplified provider authentication when connecting to APNs
  • Secure
  • Easy to generate (프로그래밍 방식으로 생성하기 쉬움)
  • No more expired certificates!

Certificate Authentication - Connecting to APNs with client certificate

  1. 개발자 계정에서 client 인증서를 제공해라
  2. 상호 인증을 사용해서 APNS에 연결할 때 APNS는 신뢰할 수 있고 검증할 서버 인증서를 제공한다

Token Authentication - Connecting to APNs with Token Authentication

  1. 계정에서 token sign-in key를 선택한다
  2. provider는 client 인증서없이 TLS 연결을 구성하게 된다
  3. 이 연결 상에서 알림을 발송하기 전에 provider는 team ID를 포함한 인증 토큰을 구성할 것이다

토큰 예제

  • Header, Claims, Signature로 구성
  • Header - 알고리즘, 키 식별자
  • Claims - team ID, timestamp
  • Signature - The last part of the token is simply the signature in base 64 obtained by applying the signing algorithm to the header and the claims
  • 응답 예제 (provider token이 만료된 경우)

Token Authentication - Details

  • Signed tokens need to be generated periodically (서명된 토큰은 주기적으로 생성할 필요가 있음)
  • Signing key does not expire (키는 만료되지 않음)
  • Signing key can be revoked through your Account (키는 계정에서 해제할 수 있음)
  • APNs는 인증서 인증을 계속 지원할 것임

이번 내용은 APNs 토큰 인증에 대한 내용이었다. 이전 인증서 인증이 어떻게 동작되고 토큰은 어떻게 구성되는지 자세하게 살펴보는 내용이라 길이는 짧아도 쉬운 내용은 아니었다.
정리하면서 요약을 했는 데 더 알아보기 힘든 느낌이긴 하다. ㅠㅠ

반응형