Quantcast
Channel: rtrouton – Der Flounder
Viewing all articles
Browse latest Browse all 764

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

$
0
0

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:


This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters


curl "https://jamf.protect.tenant.here/installer.pkg?security_token_goes_here" -o installer.pkg
view raw

gistfile1.txt

hosted with ❤ by GitHub

Screen Shot 2022 02 17 at 4 49 33 PM

 

Uninstaller:


This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters


curl "https://jamf.protect.tenant.here/uninstaller.pkg?security_token_goes_here" -o uninstaller.pkg
view raw

gistfile1.txt

hosted with ❤ by GitHub

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:


This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters


curl "https://companyname.protect.jamfcloud.com/installer.pkg?c1f0d1cb-8ddc-4f36-9578-58a7388053d5" -o installer.pkg
view raw

gistfile1.txt

hosted with ❤ by GitHub

Uninstaller:


This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters


curl "https://companyname.protect.jamfcloud.com/uninstaller.pkg?c1f0d1cb-8ddc-4f36-9578-58a7388053d5" -o uninstaller.pkg
view raw

gistfile1.txt

hosted with ❤ by GitHub

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.


This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters


username@computername ~ % 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
username@computername ~ %
view raw

gistfile1.txt

hosted with ❤ by GitHub

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.


This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters


<?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>
view raw

gistfile1.txt

hosted with ❤ by GitHub

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


This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters


<?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>

Viewing all articles
Browse latest Browse all 764

Trending Articles