atscomposer / JAMF_Scripts

Moved repository to GitLab @ https://gitlab.com/public-scripts/JAMF.git. Check it out there.
3 stars 1 forks source link

Remove Invite code and expire it from your JSS #1

Closed rderewianko closed 8 years ago

rderewianko commented 8 years ago

Hello!

Posting a computer invite code for your JSS is not a secure thing to do. It opens the doors for external users to access your JSS.

Your script: https://github.com/atscomposer/JAMF_Scripts/blob/master/JAMF_AutoReEnroll/enrollcheck.sh#L35shows an invite code.

What you'll want todo is expire this invite code, by going to the API.

Your JSS API link is here scroll down to computerinvitations. Do a GET on invites, and then match the ID to the ID of your invite code.

The invite code you're looking for is: ****

Then open terminal do a delete request in curl to remove that.

## Request
curl -X "DELETE" "https://irbt.jamfcloud.com:8443/JSSResource/computerinvitations/id/<idhere>" \
     -u adminuser:adminpass
rderewianko commented 8 years ago

You may also want to remove https://github.com/atscomposer/JAMF_Scripts/blob/master/JAMF_AutoReEnroll/enrollcheck.sh#L23

atscomposer commented 8 years ago

Thanks @rderewianko. I thought I had scrubbed all my code fully but I guess I missed a couple things. These have been removed. Thanks again.