3 ms·
The old APNs flow seemed overly complex, especially in comparison to GCM. This seems like a big improvement. Does anyone know why Apple uses certificates inste
by leesalminen 11y ago
The old APNs flow seemed overly complex, especially in comparison to GCM. This seems like a big improvement.
Does anyone know why Apple uses certificates instead of API keys (a la GCM) for authorization?
- drl42 11y agoMy guess is that they tie everything to the certificates used for signing up the App
- sbose78 11y agoIt helps the APNS server identify the sender server better since the certificate does have more details. Also, having the certificate helps in signing and encrypting the notification packets triggered from the server.
- alexbilbie 11y agoJust a guess but once you've completed the TLS negotiation the APNS server doesn't need to re-authenticate for the lifetime of the socket connection whereas with API keys the key would need to be verified with each notification (because a new connection would be created)?
- jamieb007 11y agoThere must be a worthwhile reason - the added complexity of certs is non-trivial [1]. Perhaps certs are deemed less easily transferable compared to API keys (simple strings)? [1] https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/AddingCapabilities/AddingCapabilities.html#//apple_ref/doc/uid/TP40012582-CH26-SW11 https://developer.apple.com/library/ios/documentation/IDEs/C...
- simscitizen 11y agoBecause it's fundamentally different and more secure. Apple's model uses a public/private key pair: the private key never leaves your server and Apple doesn't know it. Apple only knows the public key, in the form of a cert. Apple actually writes about the trust model in the docs: https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html#//apple_ref/doc/uid/TP40008194-CH100-SW11 https://developer.apple.com/library/ios/documentation/Networ.... Google's model uses a shared secret (the API key) that both the client and server know. Having worked with both systems, I prefer the ease of the shared secret model, but each system uses a fundamentally different security model.