How can I distribute zrok.exe in a safe way?
Ok, I don't know if I'll be able to be clear in what I'm trying to do, but I'll try.
I have a server application, a backend, that runs within my clients' local network, I have several clients that use this same application. But each has its own self-hosted instance. In cases where this application needs to be accessed via the internet, and to avoid NAT configurations on the router, use of VPN and things like that, I am testing with Zrok. My idea is to distribute zrok.exe along with my application, and make the execution of zrok commands automated. So to start the application I execute:
zrok enable XXXXXXX (if not already enabled)
zrok reserve public http://localhost:3000 (if not already reserved)
zrok share reserved
And everything works as expected.
But then I'm noticing some details that worry me.
I wouldn't want to have to create a new account for each customer I serve with this solution, so I would use the same zrok enable for everyone. I think this token could only be known by my application.
But I noticed that after running zrok enable on a computer, this token can be easily viewed using the zrok status --secrets command, or by accessing the environment.json file in the user's .zrok folder.
I also noticed that when running the zrok overview command, I am getting the environments and shares information for everything that belongs to my account, and not just the information regarding the machine I am running.
So here are some questions:
Is there any way to use the zrok share reserved command and pass the enable command token at the same time, so that this token is not accessible so easily?
Is there a command similar to the overview, or filter, that only returns information relating to the host that is executing the command
I hope I was clear!
And thanks again for your attention.