butlerx / wetty

Terminal in browser over http/https. (Ajaxterm/Anyterm alternative, but much better)
https://butlerx.github.io/wetty
MIT License
4.26k stars 670 forks source link

Pass HTTP headers to the command as env vars #483

Closed mont5piques closed 1 month ago

mont5piques commented 1 year ago

Is your feature request related to a problem? Please describe. I'm using Wetty behind a reverse proxy that performs user authentication using OIDC. It will be interesting if we could support user authentication for example.

Describe the solution you'd like The proxy can supply user related info as HTTP request Headers. It would be interesting to supply this information to the --command script. The script will then do stuff related to the user context.

Beside that, this could used for other use-cases (like domain based filtering using Host header, using basic auth to supply ssh username/password instead of URL paths ...)

Describe alternatives you've considered Using paths but not secure for authentication use cases.

Additional context None.

mont5piques commented 1 year ago

It could be configured in a curl-like syntax ; --header X-My-Super-Header:ENV_VAR_NAME. Let me know what you think of it, I may push a pull request for that.

github-actions[bot] commented 2 months ago

Stale issue message