danb35 / deploy-freenas

Python script to automate deploying TLS certificates to FreeNAS servers
GNU General Public License v3.0
203 stars 56 forks source link

Consider using websocket API locally to avoid the need for API keys #72

Open 0xabu opened 9 months ago

0xabu commented 9 months ago

(Thank you for writing/maintaining this script. This is not an issue, just an FYI / feature suggestion. Feel free to close or ignore it.)

Assuming that the script is running from a privileged account on the NAS itself, you might be interested to know that it's possible to access the websocket API over a local Unix domain socket (/var/run/middleware/middlewared.sock) without the need for any configured credentials (API key etc.) that might leak to be used remotely. I've written a proof-of-concept script that does this. Unfortunately I'm not aware of an HTTP-equivalent counterpart, so it would be a pretty substantial change to your code.