Using AutoPkg to get the latest Jamf Protect installer and uninstaller from your Jamf Protect tenant
2022-2-18 06:24:17 Author: derflounder.wordpress.com(查看原文) 阅读量:31 收藏

Home > AutoPkg, Jamf Protect > Using AutoPkg to get the latest Jamf Protect installer and uninstaller from your Jamf Protect tenant

Using AutoPkg to get the latest Jamf Protect installer and uninstaller from your Jamf Protect tenant

Jamf has enabled a new feature on Jamf Protect tenants, where you can generate a download URL for the latest Jamf Protect client installer and uninstaller. These download URLs do not require authentication, but a security identifier unique to the Jamf Protect tenant needs to be included as part of the download URL:

Screen Shot 2022 02 17 at 4 47 20 PM

Once generated, the download links are formatted similar to this:

Installer:


Screen Shot 2022 02 17 at 4 49 33 PM

Uninstaller:


Screen Shot 2022 02 17 at 4 51 30 PM

For example, if the Jamf Protect tenant and security identifier were as shown below, the curl commands would look like this:

  • Jamf Protect tenant: companyname.protect.jamfcloud.com
  • Security token: c1f0d1cb-8ddc-4f36-9578-58a7388053d5

Installer:


Uninstaller:


Since the Jamf Protect installer and uninstaller can be downloaded from your Jamf Protect tenant, this means that it’s now possible to use AutoPkg to get the latest Jamf Protect client installer and uninstaller as soon as they are available from your Jamf Protect tenant. For more details, please see below the jump.

To help facilitate this, I’ve written a set of Jamf Protect AutoPkg recipes.


[email protected] ~ % autopkg search JamfProtect | grep rtrouton-recipes
JamfProtect.uninstaller.pkg.recipe rtrouton-recipes JamfProtect/JamfProtect.uninstaller.pkg.recipe
JamfProtect.installer.pkg.recipe rtrouton-recipes JamfProtect/JamfProtect.installer.pkg.recipe
JamfProtect.uninstaller.download.recipe rtrouton-recipes JamfProtect/JamfProtect.uninstaller.download.recipe
JamfProtect.installer.download.recipe rtrouton-recipes JamfProtect/JamfProtect.installer.download.recipe
JamfProtectUninstaller.jamf.recipe rtrouton-recipes Jamf_Upload/JamfProtectUninstaller.jamf.recipe
JamfProtectInstaller.jamf.recipe rtrouton-recipes Jamf_Upload/JamfProtectInstaller.jamf.recipe
JamfProtectUninstaller.jss.recipe rtrouton-recipes JSS/JamfProtectUninstaller.jss.recipe
JamfProtectInstaller.jss.recipe rtrouton-recipes JSS/JamfProtectInstaller.jss.recipe
[email protected] ~ %

These download URLs are tenant-specific and not public, so you will need to create a recipe override and enter the URL and security identifier Jamf provides into the DOWNLOAD_URL and DOWNLOAD_UUID values of the override.


<?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"&gt;
<plist version="1.0">
<dict>
<key>Identifier</key>
<string>local.download.uninstaller.JamfProtect</string>
<key>Input</key>
<dict>
<key>DOWNLOAD_FILENAME</key>
<string>Jamf_Protect_Uninstaller.pkg</string>
<key>DOWNLOAD_URL</key>
<string>Put_Jamf_Protect_Uninstaller_download_URL_into_AutoPkg_recipe_override</string>
<key>DOWNLOAD_UUID</key>
<string>Put_Jamf_Protect_Uninstaller_download_UUID_into_AutoPkg_recipe_override</string>
<key>NAME</key>
<string>Jamf Protect</string>
</dict>
<key>ParentRecipe</key>
<string>com.github.rtrouton.download.uninstaller.jamfprotect</string>
<key>ParentRecipeTrustInfo</key>
<dict>
<key>non_core_processors</key>
<dict/>
<key>parent_recipes</key>
<dict>
<key>com.github.rtrouton.download.uninstaller.jamfprotect</key>
<dict>
<key>git_hash</key>
<string>8bd26bbb1e8f6ca4df6de22a4b3e73787d646ce6</string>
<key>path</key>
<string>~/Library/AutoPkg/RecipeRepos/com.github.rtrouton.autopkg_recipes/JamfProtect/JamfProtect.uninstaller.download.recipe</string>
<key>sha256_hash</key>
<string>9906e603feb50b6d249811bad668dbf358aff7baa93f4e33e2e475048a0c7eb5</string>
</dict>
</dict>
</dict>
</dict>
</plist>

For example, if the Jamf Protect tenant and security identifier were as shown below, the override would look like this:

  • Jamf Protect tenant: companyname.protect.jamfcloud.com
  • Security token: c1f0d1cb-8ddc-4f36-9578-58a7388053d5


<?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"&gt;
<plist version="1.0">
<dict>
<key>Identifier</key>
<string>local.download.uninstaller.JamfProtect</string>
<key>Input</key>
<dict>
<key>DOWNLOAD_FILENAME</key>
<string>Jamf_Protect_Uninstaller.pkg</string>
<key>DOWNLOAD_URL</key>
<string>https://companyname.protect.jamfcloud.com/installer.pkg</string>
<key>DOWNLOAD_UUID</key>
<string>c1f0d1cb-8ddc-4f36-9578-58a7388053d5</string>
<key>NAME</key>
<string>Jamf Protect</string>
</dict>
<key>ParentRecipe</key>
<string>com.github.rtrouton.download.uninstaller.jamfprotect</string>
<key>ParentRecipeTrustInfo</key>
<dict>
<key>non_core_processors</key>
<dict/>
<key>parent_recipes</key>
<dict>
<key>com.github.rtrouton.download.uninstaller.jamfprotect</key>
<dict>
<key>git_hash</key>
<string>8bd26bbb1e8f6ca4df6de22a4b3e73787d646ce6</string>
<key>path</key>
<string>~/Library/AutoPkg/RecipeRepos/com.github.rtrouton.autopkg_recipes/JamfProtect/JamfProtect.uninstaller.download.recipe</string>
<key>sha256_hash</key>
<string>9906e603feb50b6d249811bad668dbf358aff7baa93f4e33e2e475048a0c7eb5</string>
</dict>
</dict>
</dict>
</dict>
</plist>

文章来源: https://derflounder.wordpress.com/2022/02/17/using-autopkg-to-get-the-latest-jamf-protect-installer-and-uninstaller-from-your-jamf-protect-tenant/
如有侵权请联系:admin#unsafe.sh