Handle environments/:id/terminal.ws, providing access to terminal websockets
A GitLab environment may expose a terminal connection for out-of-band access. Workhorse is responsible for providing a websocket connection to the terminal if present.
It authenticates the user and retrieves connection details from GitLab using the environments/:id/terminal.ws/authorize endpoint, and sets up a proxy to the terminal provider, converting from the remote's subprotocol to a common format.
Authentication is periodically re-done, and the connection will be broken if it fails, or if the connection details change in any way.
This MR includes support for the
channel.k8s.io websocket subprotocol, allowing connections to be made to Kubernetes / OpenShift containers.
Based on top of (some of) !72 (closed)