Monday, June 17, 2019

Jamf JSS, JSS Importer, and Spruce

I recently found out about Spruce (Spruce).  Spruce can help clean up a JSS server.
From the author's GitHub page: " Spruce looks for objects on your JSS which have no current usage, are out of date, or are otherwise crufty"

My JSS server uses a self-signed certificate.  I have JSSImporter already configured and working.  When I went to use Spruce I would get this error:
requests.exceptions.SSLError: HTTPSConnectionPool(host='ndh-jss-01.corp.contoso.com', port=8443): Max retries exceeded with url: /JSSResource/distributionpoints (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_read_bytes', 'sslv3 alert handshake failure')],)",),))
I had installed python-jss using 'sudo pip install python-jss'

Event though Spruce reads the JSSImporter preferences file for connection information, it would not successfully connect to my JSS.

I found a resolution.  In my case I needed to edit this file:
 /Library/Python/2.7/site-packages/jss/tlsadapter.py

Near the bottom of the file I changed:
ssl_version=ssl.PROTOCOL_TLSv1) 
to this:
ssl_version=ssl.PROTOCOL_TLSv1_2) 

After this change my sslv3 error went away and Spruce was able to connect to the JSS server.

New beginner's guide to PowerShell on my GitHub page

 I created a beginner's guide to PowerShell here: https://github.com/aamjohns/Powershell_Guide/blob/main/README.md I hope it helps someo...