Add a configurable absolute upper limit on websocket session times
!83 (merged) introduced a websocket proxy to Workhorse. Both @briann and @northrup have suggested that we add an option to configure the maximum allowed session time for such a proxy, although for two different reasons.
@briann sees this as a means to reduce its usefulness to people who might try to use the proxy for nefarious purposes.
@northrup is concerned by the scalability implications of allowing a persistent connection to last for an unbounded length of time.
We don't know what values are sensible yet, but my first impression is that I'd expect them to be measured in hours rather than minutes.
Two options for this: we could add a command-line option to workhorse, or we could make it part of the gitlab application_settings (or even kubernetes_service settings) and pass it in to workhorse per-terminal in the preauthorize response.
The latter has the advantage of allowing us to present the countdown to the user without having to duplicate the value for both workhorse and gitlab configuration, so I expect I'd prefer that.