I recently started using BoringProxy; love it, but I have a security concern with the token authentication method to access the web UI. This might be an edge case, but would like to start discussion on this while the project is still in beta.
Currently all user/client authentication is done via the tokens generated via the Web UI. If I create a new User it generates a token for that user. This token can then be used to access the Web UI for that User as well as connect clients to the server. It is also possible to generate secondary tokens and from what I can see these tokens have the same access level as the original token, please correct me if I am wrong.
Lets say for instance, I set up a number of clients each using the same or different tokens, but linked to the same user. If any of these devices gets compromised, the token for the user is exposed and access can be gained to the Web UI for the user. From there, tunnels can be added and removed for all client instances connected to the user.
I think that secondary tokens should not give full access to the user’s account in the Web UI. Or alternatively there needs to be a separate password to authenticate users for the Web UI. The use of tokens makes the project easier, but having a single compromised token can put all clients connected to a user at risk.
It might be stated that client devices should not be compromised or that if this happens this is a larger issue than BoringProxy, but as a example: lets say I have a Pi(s) running boringproxy installed at a remote location(s). It’s connected to the same user as my other clients, but since this is connected to a external network, my Pi(s) can be compromised since the token is stored in plaintext on the Pi SDCard. If this happens, it can give an attacker the token needed to access my user account on the Web UI.
Creating separate user accounts for each device can work, but then you lose the ability to manage everything from a single user account. If the project expands and its used on large scale in commercial applications, you will run into the problem where creating multiple users is a headache.
For this reason I think a primary and secondary token method should be investigated. I am not a Go developer, therefore I don’t know the complexity of implementing something like this. Would love to hear feedback from the community.
If anything is unclear, please let me know and I will try to explain. If I missed something important that makes this irrelevant, please also let me know