Support reading a specific HTTP request header (ex. X-WEBAUTH-USER) to authenticate a logged in user.
I have a reverse proxy sitting at my network edge that routes traffic to the proper frontends. In addition this proxy handles authentication and passes information about the logged-in user via headers to the frontend. This is nice since is absolves applications from need to do anything authentication work other than blindly trusting the header provided to them.
This FR is very similar to what Grafana supports, however, it can be simplified quite a bit since The Lounge really just needs the username of the logged-in user -- nothing else.
I poked around the code a little bit to see how feasible this. My notes are:
With the second point resolved this should be pretty trivial to implement since we basically just need configuration to tell us what header to read and then The Lounge should just read it and blindly trust it.
Should this be implemented we should document best practices here, in particular that this should only be use if your app is only accessible via a reverse proxy and that the proxy strips the header from user requests.
This is mostly a duplicate of #1981, as what you're asking for wouldn't be supported in core.
Unfortunately the current authentication code assumes that user interaction will take place
We don't use cookies for auth, so the auth data is not available in the request and is sent over the WS connection.
Would this also help with pomerium support? I'm using pomerium at my network edge and would like to handle auth that way.
I would love to see this feature too! I'm running a proxy that authenticates users and would love to be able to have users already be logged in to a thelounge instance when they visit the website.
Most helpful comment
I would love to see this feature too! I'm running a proxy that authenticates users and would love to be able to have users already be logged in to a thelounge instance when they visit the website.