Client passphrase - munkireport/munkireport-php GitHub Wiki
If you want to restrict access to your MunkiRepor server, you can add passphrases to CLIENT_PASSPHRASES. If you set these, MunkiReport will only accept client requests that send the correct passphrase.
If you set a passphrase on the server, make sure you set the passphrase on the clients as well.
Example
On the server, add the following string to .env:
CLIENT_PASSPHRASES="mysecretpassphrase, myotherpassphrase"
On each client you need to add the passphrase to MunkiReport.plist:
defaults write /Library/Preferences/MunkiReport Passphrase 'mysecretpassphrase'
You can alternatively set the Passphrase key of the MunkiReport domain using a mobile configuration profile with your MDM.
Now when you run sudo /usr/local/munki/munkireport-runner on the client, you should see that the MunkiReport server can be contacted normally.
Notes
MunkiReport will not set the passphrase on the client through the install script, it would be too easy for someone to get the passphrase that way. So you need to roll your own method of distributing the passphrase (via munki or MDM).
You can have only one passphrase per client.