Allow Configurable Default for Connection Upgrade Method in tsh
#52397
Labels
bug
c-q7j
Internal Customer Reference
tls-routing
Issues related to TLS routing
tsh
tsh - Teleport's command line tool for logging into nodes running Teleport.
Expected Behavior
Cluster administrators should be able to configure the default connection upgrade method for
tsh
on a per-cluster basis. That, ortsh
should gracefully handle cases where the dual upgrade request fails and fallback to a single upgrade method like WebSocket, without requiring manual end-user configuration.Current Behavior
The
tsh
client sends bothUpgrade: websocket
andUpgrade: alpn-ping
headers for connection upgrades by default. This dual header approach can lead to failures in environments with strict network policies or non-supportive proxies. For example, a web application firewall or a strict layer 7 load balancer that rejects all non-WebSocket connection upgrade requests.Currently, end-users must manually set the
TELEPORT_TLS_ROUTING_CONN_UPGRADE_MODE
environment variable for their Teleport client to use WebSocket-only upgrades. This is too cumbersome to expect every Teleport user of this cluster to do. The cluster should have a way to advertise that websocket upgrades are preferred.Bug Details
Teleport Version
First reported by customer when using Teleport v15.4.19 (cluster) with
tsh
client v15.4.4.The latest versions of
tsh
have this same behavior (currenttsh
is 17.2.6 at time of writing)Recreation Steps
Upgrade: alpn-ping
or multiple Upgrade headers.)tsh
to establish a connection without setting theTELEPORT_TLS_ROUTING_CONN_UPGRADE_MODE
variable.tsh
to establish a connection when settingTELEPORT_TLS_ROUTING_CONN_UPGRADE_MODE=websocket
Upgrade: websocket
header is sent bytsh
.Debug Logs
The text was updated successfully, but these errors were encountered: