Slide 1

Slide 1 text

No content

Slide 2

Slide 2 text

© JAMF Software, LLC Dan Hoffman Sr. Systems Engineer Pixar Animation Studios

Slide 3

Slide 3 text

© JAMF Software, LLC Flipping the Script Presentation agenda: • Using "reverse extension attributes" to cache data on Macs • "Host Info File" • Benefits • Patch management

Slide 4

Slide 4 text

© JAMF Software, LLC Some notes about the API • Jamf Pro API vs. Classic API • JSON vs. XML • ruby-jss
 https://github.com/PixarAnimationStudios/ruby-jss

Slide 5

Slide 5 text

© JAMF Software, LLC Jamf Pro Extension Attributes • Custom fields to collect almost any piece of attribute data from a computer • Data is gathered from computer
 and saved to Jamf Pro during recon

Slide 6

Slide 6 text

© JAMF Software, LLC Reverse Extension Attributes • Custom fields to collect almost any piece of attribute data from a computer • Data is gathered from Jamf Pro and saved
 to the computer during execution

Slide 7

Slide 7 text

© JAMF Software, LLC But wait, there's more! • Data does not necessarily have to come from Jamf • Any attribute can be gathered and
 stored locally

Slide 8

Slide 8 text

© JAMF Software, LLC Data types • Jamf Pro extension attributes:
 string, integer and date • Reverse extension attributes:
 string, integer, floating point,
 date, and boolean

Slide 9

Slide 9 text

© JAMF Software, LLC Host Info File • A simple plist with XML key/value pairs that can be saved anywhere on the filesystem • Readable and writable by defaults,
 PlistBuddy, etc.

Slide 10

Slide 10 text

© JAMF Software, LLC Host Info File - limitations • Purposefully simple • No dictionaries or array data types • Counter example: computer groups

Slide 11

Slide 11 text

© JAMF Software, LLC Max image dimensions LDAP LDAP Jamf Pro Jamf Pro Jamf Pro Jamf Pro Local Local Local

Slide 12

Slide 12 text

© JAMF Software, LLC Benefits Helpdesk can quickly see relevant data from the command line while troubleshooting

Slide 13

Slide 13 text

© JAMF Software, LLC Benefits • Reduce server and network load • Offline availability • Non-Jamf tasks can read and write
 data without Jamf • Simpler scripts

Slide 14

Slide 14 text

© JAMF Software, LLC Getting the Jamf Computer ID - API serialNumber=$(system_profiler SPHardwareDataType | \
 awk '/Serial Number/{print$4}') jamfID=$(curl -su username:password -H 'Content-type: application/xml' \
 https://pixar-jamf-pro-server:8443/JSSResource/computers/\
 serialnumber/$serialNumber | xmllint --xpath \
 '/computer/general/id/text()' -) curl -su username:password -H 'Content-type: application/xml' \
 https://pixar-jamf-pro-server:8443/JSSResource/computers/\
 id/$jamfID -d 'Monstropolis\
 ' -X PUT

Slide 15

Slide 15 text

© JAMF Software, LLC Reading from a Host Info File pathToHostInfoFile='/etc/com.pixar.hostinfo.plist'
 jamfID=$(defaults read $pathToHostInfoFile jamf_computer_id) curl -su username:password -H 'Content-type: application/xml' \
 https://pixar-jamf-pro-server:8443/JSSResource/computers/\
 id/$jamfID -d 'Monstropolis\
 ' -X PUT

Slide 16

Slide 16 text

© JAMF Software, LLC Writing to a Host Info File Example 1 - Jamf Pro user • Ongoing Jamf Pro policy • Once per day, recurring checkin • Payload is a script • Uses the api to query the server for the
 assigned Jamf username and writes it to the file

Slide 17

Slide 17 text

© JAMF Software, LLC Writing to a Host Info File Example 1 - Jamf Pro user pathToHostInfoFile='/etc/com.pixar.hostinfo.plist' serialNumber=$(system_profiler SPHardwareDataType | \
 awk '/Serial Number/{print$4}') jamfUser=$(curl -su username:password -H 'Content-type: \
 application/xml' https://pixar-jamf-pro-server:8443/\
 JSSResource/computers/serialnumber/$serialNumber | \
 xmllint --xpath '/computer/location/username/text()' -) defaults write $pathToHostInfoFile jamf_username \
 -string $jamfUser

Slide 18

Slide 18 text

© JAMF Software, LLC Writing to a Host Info File Example 2 - Pixarification timestamp pathToHostInfoFile='/etc/com.pixar.hostinfo.plist' defaults write $pathToHostInfoFile pixarified -date "$(date)"

Slide 19

Slide 19 text

© JAMF Software, LLC macOS Patch at Pixar Puppytime

Slide 20

Slide 20 text

© JAMF Software, LLC macOS Patch at Pixar - Nagging • First nag: Yo, once daily, for seven days • Followup nags: jamfHelper

Slide 21

Slide 21 text

© JAMF Software, LLC macOS Patch at Pixar - Postflight Luxify • Firstboot-lite • Jamf Pro policy • Runs at *every* startup • Executes based on
 reverse extension attribute

Slide 22

Slide 22 text

© JAMF Software, LLC One More Thing https://github.com/PixarAnimationStudios/depot3 PHI • Plist Host Info • Simple wrapper for PlistBuddy • Optionally part
 of D3

Slide 23

Slide 23 text

© JAMF Software, LLC Questions?

Slide 24

Slide 24 text

© JAMF Software, LL THANK YOU!