Skip to content

Handle environments/:id/terminal.ws, providing access to terminal websockets

Nick Thomas requested to merge (removed):nick-kube-proxy into master

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)

Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/22864

Merge request reports