
• Short message
–Payload <= 256 bytes
• Sent in JSON format
• Addressed by the DeviceToken
• Signed by originator and sent to Apple
0 320 (binary data) 0 34 {"aps":{"alert":"You have mail"}}
Cmd
Token
Length
Device Token
Payload
Length
Payload (JSON encoded)
• Does not have the “aps{}” field
• Instead, single string “mdm”
• Value is another token, “PushMagic”
• PushMagic, DeviceToken, and Certificate ID
–Together authenticate MDM push message
0 320 (binary data) 0 47
{"mdm":"040ac7bf-391a-4a36-
a8ab-47bd380afd33"}
Cmd
Token
Length
Device Token
Payload
Length
Payload (JSON encoded)
Once the provider has the Device Token, they can send push
notifications to the device. The payload is JSON formatted, and total
length (including JSON structure) limited to 256 bytes. The Device
Token and some framing information are prepended to the payload, and
the whole bit is wrapped and signed by the Push Notification certificate
obtained from Apple.
Once received by Apple, the notification is sent to whichever device
corresponds to the Device Token (presuming it’s got an active APNS
session), and thus, the notification is delivered.
MDM notifications are pretty similar, but instead of the top-level “aps{}”
dictionary, the payload contains only a top-level string named “mdm”.
The contents of that string are another token provided by the device
during enrollment, the “Push Magic” token.
So the device needs to have match three items in order for a push
notification to trigger an MDM response: The Device Token (without
which the notification will never reach the device), and the Push Magic
token (without which the MDM client will just discard the notification).
Finally, the “Subject Name / User ID” field in the push notification
certificate used to sign the notification must match the “Topic” field in the
MDM profile.
These three items, especially the User ID on the certificate signed by
Apple, together make it fairly difficult (if not impossible) to forge a push
notification to the MDM client on the device.
Comentarios a estos manuales