Jamf Pro Policy Cheat Sheet

Following are quick outlines of how to setup Jamf Pro Policies and Profiles for specific tasks.  These should be used as a guideline only!  As always TEST policies on a small group of devices before deploying them to an entire Group or Site.

Quick Index

Endpoint Protection Standard

AntiMalware/Antivirus
Application Control
Authentication
Encrypted Network Communication
File Integrity Monitoring
Full Disk Encryption (with key escrow)
Host-based Firewall
Least Privilege Access
Sensitive Information Identification and Remediation
Software Inventory
Web Reputation Filtering
macOS Patching

 

 

Other Interesting Software and Tips

Updating Profile UUID’s to be Unique

NoMAD and NoLoAD

Printer Setup

InCommon Certificate for Cisco Jabber

Create a Launch or Install Policy for Self Service

Setting the Date, Time, and Time Zone

 


Endpoint Protection –AntiMalware/Antivirus

Use a Jamf Policy to install DetectX as a supplement to Apple’s XProtect.
Two policies are needed  to ensure proper install and scanning.
Full documentation is on the DetectX Setup for Jamf Pro page.

Endpoint Protection – Sensitive Data

Create a Jamf Pro policy to install the latest version of Spirion Identity Finder available from the Jamf Pro packages distribution.  This should be triggered as desired but only run once per computer as in Figure 1.

Image showing Policy to install Spirion Sensitive Data scanning software
Figure1: Jamf Pro Policy for Sensitive Data Software install

Endpoint Protection – Authentication

Use a Apple Configuration Profile in Jamf Pro to ensure that the Login Window option has setting for:

1)  Window tab is set to show Name and Password Fields for the Login Prompt as in Figure 2.

2) Options tab is set to Disable Automatic Login as in Figure 3.

 

Image showing the Login Window Options tab is set to show Name and Password Fields for the Login Prompt.
Figure 2: Jamf Pro Apple Configuration Profile for Log In Window

 

Image showing Login Window Options tab in Jamf Pro Configuration Profile set to not allow automatic login
Figure 3: Login Window Options Tab settings

 

Endpoint Protection – File Integrity Monitoring

This control is met by patching macOS and not disabling the built-in System Integrity Monitoring, Xprotect, MRT, and Gateway process.

Endpoint Protection – Host-based Firewall

Use a custom Apple Configuration Profile that enables the Firewall and enables Stealth Mode.  In Jamf Pro upload into the Configuration Profiles tab the custom profile that manages just the firewall preferences in the com.apple.security.firewall preference domain from

go.ncsu.edu/macfirewall

While Jamf Pro does have a Security & Privacy Option payload, setting just the Firewall in this option locks out the management of other important settings from user control.  The by uploading the custom profile only the needed settings are locked.

Endpoint Protection – Least Privilege Access

Meeting this control is simply setup methodology where accounts are not created with full administrative access to the device.  In macOS Apple allows creation of Administrator, Standard, and Sharing Only accounts.  Creating new users with the account type Standard will meet the control.  Commonly you will hear complaints from end users that this does not allow them to install software.  The intent of this control is to protect the data stored on the device NOT to keep software from being installed!  In today’s world software can be run from external storage like key drives or even directly downloading to the home directory and running from there where no extra permissions are required.  Best practice for software installation is the direct clients to use Jamf Self Service.app as no elevation of permissions are needed.  If software installation permissions are needed these can be granted using the authorization database without giving full administrative access.
To allow installation of software only create a Jamf policy which configures the Files and Processes Option to have an Execute Command of:

security authorizationdb read system.install.software > /tmp/authrul;plutil -replace group -string staff /tmp/foo;security authorizationdb write system.install.software < /tmp/authrul

This uses the  security  command line tool to read the system.install.software rule in the authorization database replace the value of the group setting with the group wheel and write it back again.  All users are in the wheel group and this will not interrupt the builtin Apple install mechanisms nor those used by configuration management.

For situations where full administrative access is actually the least privilege required, time limited privilege elevation can be granted using the Privileges.app from https://github.com/SAP/macOS-enterprise-privileges  The installer for Privileges.app is available in the camps configuration management system.  Read the documentation for setup as there are several options.

Endpoint Protection – Software Inventory

When an Apple devices is enrolled into the campus configuration management system (Jamf Pro) a software inventory is automatically collected and updated on a daily basis.  Some policies also update the device inventory after running.  To force the inventory to update use the jamf command line tool in Terminal.app to run:   /usr/local/bin/jamf recon

Endpoint Protection – Web Reputation Filtering

This control is met by installing and patching modern web browsers such as Safari or Google Chrome since these browser vendors have built in safeguards against known bad browsing sites.

Endpoint Protection – Application Control

Deny Application Execution

Use the Jamf Pro Restricted Software feature to set restrictions on applications that are not allowed to run by the process name.  Using the process name means that moving or renaming the app will not circumvent the control. In Jamf under the Computers tab, click on Restricted Software in the side bar and add a new restriction.  Here we will restrict the Chess.app game from running.

First we need to find the process name by viewing the contents of the application bundle. Right clicking on the Chess.app icon in the Applications folder and selecting “Show Package Contents” using the Finder will show the application’s bundle contents.  Look in the Contents folder inside the MacOS folder as shown:

 

Picture of folder structure of the Chess.app application bundle showing the folder tree /Contents/MacOS/Chess
Process name in the Application Bundle

Once we have the correct process name “Chess” we can complete the restriction as shown:

Fill out the Display name with something descriptive, put the exact, case sensitive process name in the Process Name field and check at least the Kill process box.  One may choose to have the application Deleted, and/or send email on violation.  A restriction must be made for each application process to be denied.  Be aware that some applications may have frameworks and libraries that are not removed by the Jamf Delete Application option and an uninstaller from the vendor or a custom script may be needed for complete uninstall.

Allow Application Execution

Use a macOS Configuration profile with the Parental Controls: Application Access (id: com.apple.applicationaccess.new) payload to create an allow list for applications that can run. Download the NCSU-Allow Applications-Template.mobileconfig file that can be modified with Profile Creator.app to add the desired apps.  When desired applications are added just use the Upload button in the Configuration Profiles side bar of the Computers tab in Jamf Pro to import and scope.

Other Considerations

Be aware that there are other methods that could be used to allow or deny application execution.
Apple requires all applications to get permission to use certain resources on a device.  These resources are called entitlements and they can be denied using various profiles mostly associated with the Security & Privacy System Preferences panel.  While none will deny applications running, they can deny access to entitlements like Full Disk Access, Files and Folders, etc in a way as to make the app unable to access data rendering it useless.
Here are some additional resources:

Apple Profile Documentation
https://developer.apple.com/documentation/devicemanagement/parentalcontrolsapplicationrestrictions

3rd Party workflow for Blocking Apps
https://derflounder.wordpress.com/2017/05/20/application-blacklisting-using-management-profiles

Using GateKeeper to create allow/deny lists
https://apple.stackexchange.com/questions/313373/block-specific-apps-on-macos

 

Endpoint Protection – Encrypted Network Communication

NOTE: This is pre-deployment documentation as of 07242020 and is subject to change where indicated.

Part of meeting the Encrypted Network Communication control of the Endpoint Protection Standard is to make it as easy as possible to use the eduroam encrypted network available on campus and at supporting institutions around the world.  To do this create a Jamf configuration profile that uses device certificates to automatically join our eduroam wireless network.

  • Use the side bar under the Computers tab to select Configuration Profiles and create a new profile using the +New button.
  • In the General option give the profile a descriptive name, description, and  leave Distribution Method set to “Install Automatically”.
  • Select the Certificate option and configure to add 3 certificates.
    • Name the first Certificate “NCSU-Device-Eduroam” or something appropriate
      Use the Select Certificate Option drop down to pick “North Carolina State University Root CA256-RSA”
      Set the Certificate Subject to “CN=$SERIALNUMBER@WOLFTECH.AD.NCSU.EDU” NOTE: this must be exact and case matters
      Set the Subject Alternative Name Type to  “DNS Name” from the drop down.
      Set the Subject Alternative Name Value to “$SERIALNUMBER@WOLFTECH.AD.NCSU.EDU” NOTE: again must be exact and case matters
      Set the Template Name to “NCSU-eduroam-JAMF” NOTE: yes again must be exact and case matters!
      Finally check the box for “Allow all apps access” but leave “Allow export from keychain”  unchecked
    • Use the + button to add a second certificate by uploading a copy of the InCommon RSA Server CA.cer from
      https://drive.google.com/file/d/1EcwQbNT_c4SiF_d2qUuWTa-dpbnmhBSq/view?usp=sharing  Note: login required to download.
    • Use the + button to add a 3rd and final certificate “North Carolina State University Root CA256-RSA” by uploading
      https://drive.google.com/file/d/1eljlWE3nngEqMQw4e2sbZkVD0BS7cM2D/view?usp=sharing Note: login required to download
  • Now the Certificate option is finished and a Network option in this same profile must be configured
  • Select the Network option from the side bar and configure the Network Interface to WiFi checking the Hidden Network and Auto Join options
  • Set the Service Set Identifier (SSID) to “machine-eduroam”   Note: may change to “eduroam” at production
  • The Proxy should remain as None
  • Set the Security Type to “WPA2 Enterprise” from the drop down menu.
  • Under the Protocols tab select TLS check box
  • Set the User Name to “$SERIALNUMBER@WOLFTECH.AD.NCSU.EDU” NOTE: must be exact and case matters
  • Now select the Identity certificate as “NCSU-Device-Eduroam” ( or the name you gave the first certificate created earlier).
  • Leave everything else default and select the Trust tab and make that the Username and Identity Certificate are the same as on the Protocols tab.
  • Next under Trusted Certificates check the boxes beside the other 2 certificates uploaded earlier: InCommon RSA Server CA and North Carolina State University Root CA256-RSA to have macOS automatically trust them for all users in the KeyChain.  This is so the client will not see a dialog asking for them to be approved when the profile installs.

Finally scope and save the profile as desired.
See these screen shots for example profile settings:


 

Endpoint Protection – Full Disk Encryption

The easiest way to meet this control is to edit the  template custom configuration profile for Apple’s FileVault2 encryption:
Template-NCSU-Campus-FileVault2.mobileconfig  from
https://drive.google.com/file/d/1Ev5S0ZHIjTUhGyCgHhO35u0ynVK7nD4s/view?usp=sharing

with Profile Creator, signing it, and uploading it to our configuration management system (Jamf Pro).  The template profile manages only the FileVault 2 settings and does not lock other setting in the Security & Privacy system preferences panel.  This profile has been tested on macOS versions 10.15.0 and newer and may not work on earlier OS versions.  Note: Most Apple devices use flash storage with APFS volumes and not spinning hardware disks.  This is important when off-boarding encrypted devices for surplus as they should be cryptographically erased for best data security.

Considerations -Please Read

Usernames who can decrypt the storage volumes on device startup is limited to a) usernames created with either the Setup Assistant or b) usernames created with the Users & Groups system preference panel. These usernames have what is called a Secure Token allowing them and only them to decrypt the disk. To be clear usernames that are network users (like most  <UNITY>.admin accounts), local accounts created with NoLoAD, sysadminctl, or Jamf policies will not be able to decrypt the disk without manual work. The template profile is setup to escrow the recovery key which can be used to decrypt the disk both for login and disk repair and will require a password change when used.  For devices managed using the configuration management system (JAMF Pro) and running macOS 10.15.3 or newer on devices with the T2 security chip, another encryption key is saved called the Boot Strap token. This Boot Strap token should be used by the configuration management system to grant usernames created using policies Secure Tokens allowing them to decrypt the data volumes.
For versions of macOS before 10.15.x, other methods maybe needed to escrow keys or grant secure tokens to usernames.  Best practice is to upgrade all devices to  macOS 10.15 or newer. Several of these posts provide great information and guides to working with FileVault2 on earlier versions of macOS: https://derflounder.wordpress.com/category/filevault-2/

Patch Standard – macOS Patching

1) Offering Apple software updates to the end user allowing them to defer updates.  This is the best way to entice your end users to patch with out disrupting anything critical (teaching, video conferencing, etc) they might be doing.  This is the preferred way of setting up patching.
Use a monthy Jamf Pro policy with a Software Updates option where Allow Deferral has been allowed in the User Interaction tab. Note that in Jamf Pro version10.21.0 and beyond deferral can be configured for a number of days or a specific date.  Best practice is to use day based deferral when possible.  It is also best practice to enable this policy for Self Service so clients can update as they please to get better compliance.

 

Screen shot showing the summary of a Jamf Pro Apple Software Update Policy
Jamf Pro Apple Software Update Policy Overview
Deferral settings for Software Update Policy
Deferral settings for Software Update Policy

 

Screen capture showing the deferral time options for Jamf Pro Apple software update policy.
Deferral dialog seen by clients on policy run.

2) Forcing an update regardless of what the user is doing.
This is not polite nor kind, will forcibly disrupt whatever the client is doing, and will cause data loss, interruption of presentations, teaching, video conferencing, etc.
Also note that Apple has indicated this may change in macOS beyond 10.15.x

Use a Jamf Pro policy with a Files and Process option to run Apple’s command line software update tool.  Use the install and all command line switches

/usr/sbin/softwareupdate --install --all

in the EXECUTE COMMAND field to install all macOS updates.  NOTE: with 10.14 and beyond this will not install updates to App Store apps as it did with earlier versions. See figure for example of Jamf Policy.

On macOS 10.13 and beyond Apple software updates can be forced even at the Login Window by using the SoftwareUpdateLauncher instead:

/System/Library/CoreServices/Software\ Update.app/Contents/Resources/SoftwareUpdateLauncher.app/Contents/MacOS/SoftwareUpdateLauncher" -RootInstallMode YES -SkipConfirm YES

Image showing a Jamf Pro policy with a Files and Process option to run Apple's command line software update tool on a monthly basis
Policy to patch macOS

 


 Alternative Authentication – NoMAD and NoLoAD

NoLoAD can be used without NoMAD by simply leaving the NoMAD package out of the policy.  If there is no need to retain kerberos tickets for services like DFS shares NoMAD is not needed.

Create a Jamf Pro policy to install the latest version of both NoLoAD and NoMAD (nomad.menu web site) available from the Jamf Pro packages distribution.  This should be triggered as desired but only run once per computer as in Figure 5.

 

Picture of Jamf Pro Policy for NoMAD installation in png format
Figure 5 Jamf Pro Policy for NoMAD installation

 


Create Admin Users instead of Standard Users

As provided, the value for CreateAdminUser setting is false and all users created will be Standard Users.  Folks with technicians assisting end users should consider setting the preference CreateAdminIfGroupMember in a Profile or using:

defaults write /Library/Preferences/menu.nomad.login.ad CreateAdminIfGroupMember -array 'Tech Support' 'Domain Admins' 'whatever'

If there is need for an end user to be and administrator on the device us a Profile or set with:

defaults write /Library/Preferences/menu.nomad.login.ad CreateAdmin 1

Display a Different Logo on NoLoAD Login Window

To change the graphic on the login window simply replace /Library/Application\ Support/NoLoAD/logo.png with a different PNG file of choice.

Require Terms Of Use Display and Acknowledgement

If there is need to require users to accept the University Terms of Use add a Files and Processes Option that sets the EULATitle and EULAText settings (or use a Profile to do the same) like:

defaults write /Library/Preferences/menu.nomad.login.ad EULATitle "Warning Notice";

defaults write /Library/Preferences/menu.nomad.login.ad EULAText "This is an NC State Information Technology resource that may only be accessed and used by authorized individuals. By using this system, all users acknowledge notice of and agree to comply with NC State’s Computer Use Regulation REG 08.00.02, available at
http://go.ncsu.edu/computeruse.

 Unauthorized access or use of this resource may subject violators to criminal, civil, and/or administrative disciplinary action. By using this computer system, users understand that they have no expectation of privacy with regard to any records/data stored on, archived on, or passing over NC State IT resources. NC State may examine the content of both personal and work-related electronic information stored on, archived on, or passing over NC State IT resources."

These commands should be separated by a “;” and the policy will look like Figure 6. Note this is not required if using a Configuration Profile.

 

Picture of Jamf Pro Policy to install NoMAD and NoLoAD with EULA as png
Figure 6 Full NoMAD policy with EULA

Printer Setup

Printers are either very trivial or overly complex to deploy on macOS depending on who made the printer and what features need to be supported. The most reliable method is not the default printer setup provided by Jamf Pro.
Jamf provides printer mapping not printer creation.

The two (2) methods that actually work are either a) use an “Air Print” Configuration Profile uploaded from the Profile Creator.app.(https://github.com/ProfileCreator/ProfileCreator) which will work for basic printing from the majority of modern printers or b) setup the printer using the lpadmin Unix command line tool that configures CUPS. Starting with macOS 10.15.x Apple has restricted network printing to the ipp or ipps protocol (direct attached USB should work ongoing and  smb based printing still seems to work but I would not expect it to be there in future versions of macOS.)

–Configuration Profiles – the easy way to setup most printers

Most modern printers do support ipp or ipps print protocols.   These should be setup up as “Air Print” printers by IP Address using Profile Creator.app. Note here that what Apple calls Air Print has 2 parts, one for self discovery of printers that uses DNS SD and one for actually printing to the printers which uses ipp/ipps protocols.  By using Configurations Profiles to setup these printers we get to skip the first, discovery part and direclty add the printer by IP address or DNS Name.
See example at
https://www.jamf.com/jamf-nation/feature-requests/6026/add-airprint-as-a-macos-configuration-profile-payload-option

Here are the configuration profiles for the WolfPrint FollowMe print queues.  Remember to change the uuid numbers to avoid conflicts in Jamf Pro.

Download Configuration Profile for Wolf Copy Black and White Printer

Download Configuration Profile for Wolf Copy Color Printer

–Printer Setup with lpadmin – when noting else works

When configuration profiles have been tried and they don’t work, then we need to know what type of printer protocol is used. For most of these “other” printers the most reliable setup is to create a Jamf Pro Policy that has a “EXECUTE COMMAND” set on the “Files and Processes” option to use the lpadmin command line tool. WARNING: Most printers that need lpadmin to deploy ALSO require additional software beyond the printer setup and may require multiple install packages installed in a specific order to make them work.

The general command is:
lpadmin -P SomePrinter -D “Some Printer” -E -v ipp://example.ncsu.edu/queuename -P /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/Resources/Generic.ppd

Best practice here is to set up the printer on a macOS device so you know it works. Make a list of any extra installer packages and configuration files that it takes for an actual print out to work.  After everything works, look at the file /etc/cups/printers.conf file.

The printers.conf file will have 1 or more entries wrapped in the xml tags <Printer somename> </Printer> like

<Printer WolfPrint_BlackAndWhite>
PrinterId 5
UUID urn:uuid:bc59184e-e6cf-30f1-6988-2c47b7df094b
AuthInfoRequired none
Info WolfPrint-BlackAndWhite
MakeModel Generic PostScript Printer
DeviceURI ipps://print.ncsu.edu/printers/WolfPrint-BlackAndWhite
State Idle
StateTime 1568986117
ConfigTime 1576252195
Type 8400988
Accepting Yes
Shared No
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy abort-job
</Printer>

We need 2 strings out of the printers.conf file: a) the name part from the first tag (in example here would be WolfPrint_BlackAndWhite) and b) DeviceURI (here ipps://print.ncsu.edu/printers/WolfPrint-BlackAndWhite).
The lpadmin command would look like:

lpadmin -P WolfPrint_BlackAndWhite -D “WolfPrint_BlackAndWhite” -E -v ipps://print.ncsu.edu/printers/WolfPrint-BlackAndWhite -P /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/Resources/Generic.ppd

Some good information is at:
https://www.jamf.com/jamf-nation/discussions/31099/adding-printer-to-mac-via-terminal-command-line-for-airprint

Again these are for printers that use ipp/ipps and have no special setup requirements (thus can use the Generic.ppd printer description file. These are color or black and white, postscript or PCL printers that are single or double sided printing on 8.5″x11″ paper with no more than 2 paper trays (manual feed usually works too).

For printers that use other network protocols like lpd, smb, etc the DeviceURI will be different so just copy/paste from printers.conf.
If the prinrters are multi-function, there will be additional setup packages required.

If you want to explore more complex printer setup have a look at:
https://oit.ncsu.edu/help-support/apple/cups-setup-for-wolfcopy-on-mac-os-x-10-5/

If you need to set some Pre-Sets for printers on macOS (preferences for Double Sided, etc) have a look at this link:

https://aporlebeke.wordpress.com/2020/07/17/building-deploying-mac-printer-presets/

 

Install InCommon Certificate for Cisco Jabber

The installation of the Cisco Jabber software for macOS here at NCSU requires an InCommon Certificate that is not included with macOS by default.  The certificate must be added to the user’s keychain.  To install the certificate for users in a Jamf Site the following macOS configuration profile can be used with slight modification to update the uuid number for the profile identifier. Here are the steps:

  1. Download the template configuration profile at:
    https://drive.google.com/open?id=1cvuS3lnjAtG5AEW2oNjaxPjLP1Tt7KJP
  2. Unzip the file by double clicking on it.
  3. Download and install Profile Creator.app from
    https://github.com/ProfileCreator/ProfileCreator/releases
  4. Run Profile Creator.app and Open the template configuration profile named NCSU-Campus-InCommon RSA Server CA for Cisco Jabber.mobileconfig.  In the General section look for the Identifier field.
    Screen shot of General Payload showing the Identifier field in macOS application Profile Creator.app
  5. The uuid number in the Identifier field of every configuration profile needs to be unique in all of JAMF.
    Generate a new uuid number by opening the Terminal. app and using the uuidgen command.
    The command will look something like this:
    $ uuidgen
    AA724EBA-DC4B-499E-88BC-FB66809C4CB7
  6. Now copy and paste the newly generated uuid number into the Identifier field in Profile Creator.app and save the profile by first Selecting Save from the File menu and then Selecting Export from the File Menu to create a new copy for uploading to Jamf Pro.

 

Create a Launch or Install Policy for Self Service

Here is a little trick for those interested in creating a jamf policy that either launches an app or runs a policy to install it.
There is an interesting way to use the Files and Processes option in a Jamf Policy and the || operator from the shell to make this happen.  If a command line tool fails then the || operator provides for another command to run. The general  idea is:

/usr/bin/open -a “some application” || /usr/local/bin/jamf -event someCustomTrigger

So we use the open tool with the -a switch to try and open a named application and bring it to the front most window.  If this fails then we run the jamf binary to execute the existing custom trigger policy.
Another example:

/usr/bin/open -a “TextEdit” || /usr/local/bin/jamf -event installTextEdit

Remember of course that the policy calls a custom trigger which would have to exist already (usually one of your existing policies but just add a custom trigger).The policy can be added to the Jamf category  -Launcher to make it easier to find.

The policy in Jamf Pro would look like this:

Shows the options fields to add command line tool sting that either opens an app or runs another policy to install it

Setting the Date, Time, and Time Zone

Use  the Template macOS Configuration Profile that sets the time zone to America/New_York and configures the Date and Time system preference panel to use time.ncsu.edu.  Remember to change the uuid number to avoid profile conflicts in Jamf Pro

Template Date and Time Configuration Profile