jamf / PPPC-Utility

Privacy Preferences Policy Control (PPPC) Utility
MIT License
748 stars 54 forks source link

Wrong PayloadType at top level #29

Closed MichalMMac closed 4 years ago

MichalMMac commented 5 years ago

I used PPPC utility to generate profile with payload of PayloadType : com.apple.TCC.configuration-profile-policy.

However top level profile PayloadType was also set to com.apple.TCC.configuration-profile-policy.

That's incorrect. Apple docs say:

PayloadType - String - The only supported value is Configuration.

I was not able to upload this profile to SimpleMDM until I fixed it.

esummers commented 4 years ago

I'm also seeing this in v1.1.2. PayloadType is set wrong. Additionally the "PayloadScope" field is case sensitive with incorrect case, so it tries to install as user scope instead of system scope.

<key>PayloadType</key>
<string>com.apple.TCC.configuration-profile-policy</string>
<key>payloadScope</key>
<string>system</string>

Should be:

<key>PayloadType</key>
<string>Configuration</string>
<key>PayloadScope</key>
<string>System</string>
pirkla commented 4 years ago

I ran a couple tests on this and the key PayloadType is case sensitive, but the value is not. Apple's docs do specify System and User as the only values for the PayloadScope key though, and the tests confirm they work in that format.

Setting the top level PayloadType to Configuration is the correct value and a test confirms it works.

These are all hardcoded in TCCProfile.swift

Updated docs for reference: https://developer.apple.com/documentation/devicemanagement/toplevel

pirkla commented 4 years ago

Created #36 to implement fixes.

MichalMMac commented 4 years ago

Cool. Thanks!