I'm working on rolling back my own MDM service, and I'm trying to combine the useful SCEP and MDM data, as Apple's MDM protocol document suggests. I created my own SCEP web service in C # .Net, and I know that the device can get a valid certificate when I just send the SCEP payload. However, when I also enable the MDM payload, which points to the SCEP payload UUID using the IdentityCertificateUUID key, I get the following error: “ The registration server did not provide a valid identity certificate. ” This configuration is which is sent after the user decides to set the initial registration configuration (step 1 of phase 2 in this diagram).
The device does not seem to even try to connect to my server, and thanks to server-side registration, I know that it never reaches my SCEP web service page. This seems to indicate that something is wrong with the certificate that I use to sign the payload. I separately tried to sign it with my SSL certificate (from a trusted root center), my MDM client push certificate (chained from our vendor certificate) and my self-signed certificate authority certificate (created through makecert.exe), which the SCEP service uses to issue new certificates (i.e. device identification certificates).
I looked at the output of iPCU (iPhone Configuration Utility) when I create a profile with MDM and SCEP payloads, and this is not a valid profile (I even tried to copy it to almost wholesale), however, when I install the profile through iPCU, an error does not occur, and she begins the SCEP registration process without problems.
Note - Using an existing MDM provider is not an option.
Below is the profile that I use:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>PayloadContent</key>
<dict>
<key>Challenge</key>
<string>this is a challenge</string>
<key>Key Type</key>
<string>RSA</string>
<key>Key Usage</key>
<integer>5</integer>
<key>Keysize</key>
<integer>1024</integer>
<key>Name</key>
<string>mycompany</string>
<key>Retries</key>
<integer>3</integer>
<key>RetryDelay</key>
<integer>0</integer>
<key>Subject</key>
<array><array><array>
<string>CN</string>
<string>mycompany</string>
</array></array></array>
<key>URL</key>
<string>https://mysite.com/scep.aspx</string>
</dict>
<key>PayloadDescription</key>
<string>Configures SCEP</string>
<key>PayloadDisplayName</key>
<string>SCEP (mycompany)</string>
<key>PayloadIdentifier</key>
<string>com.mycompany.mdm.scep1</string>
<key>PayloadOrganization</key>
<string></string>
<key>PayloadType</key>
<string>com.apple.security.scep</string>
<key>PayloadUUID</key>
<string>57225d3d-0758-4d23-8093-e4d8c9bbd47c</string>
<key>PayloadVersion</key>
<integer>1</integer>
</dict>
<dict>
<key>AccessRights</key>
<integer>3</integer>
<key>CheckInURL</key>
<string>mysite.com/checkin.aspx</string>
<key>CheckOutWhenRemoved</key>
<false/>
<key>IdentityCertificateUUID</key>
<string>57225d3d-0758-4d23-8093-e4d8c9bbd47c</string>
<key>PayloadDescription</key>
<string>Configures MobileDeviceManagement.</string>
<key>PayloadIdentifier</key>
<string>com.mycompany.mdm.mdm2</string>
<key>PayloadOrganization</key>
<string></string>
<key>PayloadType</key>
<string>com.apple.mdm</string>
<key>PayloadUUID</key>
<string>ed0ae41d-1aa7-4721-9fe9-139c1072132c</string>
<key>PayloadVersion</key>
<integer>1</integer>
<key>ServerURL</key>
<string>https://mysite.com/checkin.aspx</string>
<key>SignMessage</key>
<false/>
<key>Topic</key>
<string>com.apple.mgmt.mypushsubject</string>
<key>UseDevelopmentAPNS</key>
<true/>
</dict>
</array>
<key>PayloadDescription</key>
<string>Profile description.</string>
<key>PayloadDisplayName</key>
<string>Test Profile</string>
<key>PayloadIdentifier</key>
<string>com.mycompany.mdm</string>
<key>PayloadOrganization</key>
<string>mycompany</string>
<key>PayloadRemovalDisallowed</key>
<false/>
<key>PayloadType</key>
<string>Configuration</string>
<key>PayloadUUID</key>
<string>13321058-4037-478c-9b1e-ef6f810065cb</string>
<key>PayloadVersion</key>
<integer>1</integer>
</dict>
</plist>
source
share