diff --git a/gen/proto/go/teleport/lib/teleterm/v1/cluster.pb.go b/gen/proto/go/teleport/lib/teleterm/v1/cluster.pb.go index 812f4d8e7b803..481a5b9309e87 100644 --- a/gen/proto/go/teleport/lib/teleterm/v1/cluster.pb.go +++ b/gen/proto/go/teleport/lib/teleterm/v1/cluster.pb.go @@ -111,6 +111,9 @@ type Cluster struct { // during the first auth server startup. // Only present when detailed information is queried from the auth server. AuthClusterId string `protobuf:"bytes,9,opt,name=auth_cluster_id,json=authClusterId,proto3" json:"auth_cluster_id,omitempty"` + // ProxyVersion is the cluster proxy's service version. + // Only present when detailed information is queried from the proxy server. + ProxyVersion string `protobuf:"bytes,10,opt,name=proxy_version,json=proxyVersion,proto3" json:"proxy_version,omitempty"` } func (x *Cluster) Reset() { @@ -201,6 +204,13 @@ func (x *Cluster) GetAuthClusterId() string { return "" } +func (x *Cluster) GetProxyVersion() string { + if x != nil { + return x.ProxyVersion + } + return "" +} + // LoggedInUser describes a logged-in user type LoggedInUser struct { state protoimpl.MessageState @@ -630,7 +640,7 @@ var file_teleport_lib_teleterm_v1_cluster_proto_rawDesc = []byte{ 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x6c, 0x69, 0x62, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x2e, - 0x76, 0x31, 0x22, 0xb6, 0x02, 0x0a, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x10, + 0x76, 0x31, 0x22, 0xdb, 0x02, 0x0a, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x68, 0x6f, @@ -649,118 +659,120 @@ var file_teleport_lib_teleterm_v1_cluster_proto_rawDesc = []byte{ 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x75, - 0x74, 0x68, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0xac, 0x03, 0x0a, 0x0c, - 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x64, 0x49, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x73, 0x68, 0x5f, 0x6c, 0x6f, - 0x67, 0x69, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x73, 0x73, 0x68, 0x4c, - 0x6f, 0x67, 0x69, 0x6e, 0x73, 0x12, 0x2f, 0x0a, 0x03, 0x61, 0x63, 0x6c, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x6c, 0x69, - 0x62, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x43, - 0x4c, 0x52, 0x03, 0x61, 0x63, 0x6c, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, - 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x0e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, - 0x2f, 0x0a, 0x13, 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x76, - 0x69, 0x65, 0x77, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x73, 0x75, - 0x67, 0x67, 0x65, 0x73, 0x74, 0x65, 0x64, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x65, 0x72, 0x73, - 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, - 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x4c, 0x0a, - 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x2f, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x6c, 0x69, 0x62, 0x2e, - 0x74, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x67, - 0x65, 0x64, 0x49, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x22, 0x4d, 0x0a, 0x08, 0x55, - 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x55, 0x53, 0x45, 0x52, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x53, 0x45, 0x52, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x53, 0x4f, 0x10, 0x02, 0x22, 0xc8, 0x07, 0x0a, 0x03, 0x41, - 0x43, 0x4c, 0x12, 0x51, 0x0a, 0x0f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x74, 0x65, - 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x6c, 0x69, 0x62, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x3e, 0x0a, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, - 0x6c, 0x69, 0x62, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x05, - 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x04, + 0x74, 0x68, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x22, 0xac, 0x03, 0x0a, 0x0c, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x64, 0x49, 0x6e, 0x55, 0x73, 0x65, + 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x73, + 0x73, 0x68, 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x09, 0x73, 0x73, 0x68, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x73, 0x12, 0x2f, 0x0a, 0x03, 0x61, 0x63, + 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x2e, 0x6c, 0x69, 0x62, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x2e, + 0x76, 0x31, 0x2e, 0x41, 0x43, 0x4c, 0x52, 0x03, 0x61, 0x63, 0x6c, 0x12, 0x27, 0x0a, 0x0f, 0x61, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x73, 0x12, 0x2f, 0x0a, 0x13, 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x65, + 0x64, 0x5f, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x12, 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x65, 0x64, 0x52, 0x65, 0x76, 0x69, + 0x65, 0x77, 0x65, 0x72, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x6c, + 0x65, 0x73, 0x12, 0x4c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x2e, 0x6c, 0x69, 0x62, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x64, 0x49, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, + 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, + 0x22, 0x4d, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x15, + 0x55, 0x53, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x53, 0x45, 0x52, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, + 0x55, 0x53, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x53, 0x4f, 0x10, 0x02, 0x22, + 0xc8, 0x07, 0x0a, 0x03, 0x41, 0x43, 0x4c, 0x12, 0x51, 0x0a, 0x0f, 0x61, 0x75, 0x74, 0x68, 0x5f, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x28, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x6c, 0x69, 0x62, 0x2e, + 0x74, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x0e, 0x61, 0x75, 0x74, 0x68, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x3e, 0x0a, 0x05, 0x72, 0x6f, + 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x74, 0x65, 0x6c, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x6c, 0x69, 0x62, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x05, 0x75, 0x73, + 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x74, 0x65, 0x6c, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x6c, 0x69, 0x62, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x53, 0x0a, 0x10, 0x74, 0x72, + 0x75, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x6c, 0x69, 0x62, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x05, - 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x53, 0x0a, 0x10, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, - 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x0f, + 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, + 0x40, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x6c, 0x69, 0x62, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x0f, 0x74, 0x72, 0x75, 0x73, 0x74, - 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x40, 0x0a, 0x06, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x74, 0x65, 0x6c, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x6c, 0x69, 0x62, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x40, 0x0a, 0x06, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x74, - 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x6c, 0x69, 0x62, 0x2e, 0x74, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x06, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x42, - 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x28, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x6c, 0x69, 0x62, 0x2e, 0x74, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x73, 0x12, 0x3c, 0x0a, 0x04, 0x61, 0x70, 0x70, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x28, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x6c, 0x69, 0x62, 0x2e, - 0x74, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x04, 0x61, 0x70, 0x70, 0x73, - 0x12, 0x3a, 0x0a, 0x03, 0x64, 0x62, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, - 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x6c, 0x69, 0x62, 0x2e, 0x74, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x03, 0x64, 0x62, 0x73, 0x12, 0x4a, 0x0a, 0x0b, - 0x6b, 0x75, 0x62, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x72, 0x63, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x12, 0x40, 0x0a, 0x06, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x6c, 0x69, 0x62, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x0b, 0x6b, 0x75, 0x62, - 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x12, 0x51, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x28, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x6c, 0x69, 0x62, - 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x0e, 0x61, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x55, 0x0a, 0x11, 0x72, - 0x65, 0x63, 0x6f, 0x72, 0x64, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x06, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x73, 0x12, 0x42, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, + 0x6c, 0x69, 0x62, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x07, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x12, 0x3c, 0x0a, 0x04, 0x61, 0x70, 0x70, 0x73, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x2e, 0x6c, 0x69, 0x62, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, + 0x04, 0x61, 0x70, 0x70, 0x73, 0x12, 0x3a, 0x0a, 0x03, 0x64, 0x62, 0x73, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x6c, 0x69, + 0x62, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x03, 0x64, 0x62, + 0x73, 0x12, 0x4a, 0x0a, 0x0b, 0x6b, 0x75, 0x62, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x2e, 0x6c, 0x69, 0x62, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x52, 0x0b, 0x6b, 0x75, 0x62, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x12, 0x51, 0x0a, + 0x0f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x6c, 0x69, 0x62, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x52, 0x10, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x65, 0x64, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x51, 0x0a, 0x0f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x74, 0x65, + 0x52, 0x0e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, + 0x12, 0x55, 0x0a, 0x11, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x6c, 0x69, 0x62, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x0e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x53, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x52, 0x08, 0x73, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x8e, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, - 0x72, 0x65, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x72, 0x65, 0x61, 0x64, - 0x12, 0x12, 0x0a, 0x04, 0x65, 0x64, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, - 0x65, 0x64, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x64, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x03, 0x75, 0x73, 0x65, 0x22, 0x7b, 0x0a, 0x08, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x5f, 0x61, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x41, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x12, 0x33, - 0x0a, 0x16, 0x69, 0x73, 0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x64, - 0x5f, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, - 0x69, 0x73, 0x55, 0x73, 0x61, 0x67, 0x65, 0x42, 0x61, 0x73, 0x65, 0x64, 0x42, 0x69, 0x6c, 0x6c, - 0x69, 0x6e, 0x67, 0x42, 0x54, 0x5a, 0x52, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x67, 0x72, 0x61, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2f, - 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x6c, - 0x69, 0x62, 0x2f, 0x74, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x3b, 0x74, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x10, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x65, 0x64, 0x53, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x51, 0x0a, 0x0f, 0x61, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x28, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x6c, 0x69, 0x62, 0x2e, + 0x74, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x0e, 0x61, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, + 0x52, 0x08, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x8e, 0x01, 0x0a, 0x0e, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, + 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x6c, 0x69, 0x73, + 0x74, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x65, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x04, 0x72, 0x65, 0x61, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x64, 0x69, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x04, 0x65, 0x64, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x73, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x75, 0x73, 0x65, 0x22, 0x7b, 0x0a, 0x08, 0x46, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x61, 0x64, 0x76, 0x61, 0x6e, + 0x63, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x61, 0x64, 0x76, 0x61, + 0x6e, 0x63, 0x65, 0x64, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x73, 0x12, 0x33, 0x0a, 0x16, 0x69, 0x73, 0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x5f, + 0x62, 0x61, 0x73, 0x65, 0x64, 0x5f, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x13, 0x69, 0x73, 0x55, 0x73, 0x61, 0x67, 0x65, 0x42, 0x61, 0x73, 0x65, + 0x64, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x42, 0x54, 0x5a, 0x52, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x61, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x67, 0x65, + 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x74, 0x65, 0x6c, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x2f, 0x6c, 0x69, 0x62, 0x2f, 0x74, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x6d, + 0x2f, 0x76, 0x31, 0x3b, 0x74, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x76, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/gen/proto/js/teleport/lib/teleterm/v1/cluster_pb.d.ts b/gen/proto/js/teleport/lib/teleterm/v1/cluster_pb.d.ts index 8cda7d8ad44f7..c6915e1b025e3 100644 --- a/gen/proto/js/teleport/lib/teleterm/v1/cluster_pb.d.ts +++ b/gen/proto/js/teleport/lib/teleterm/v1/cluster_pb.d.ts @@ -37,6 +37,9 @@ export class Cluster extends jspb.Message { getAuthClusterId(): string; setAuthClusterId(value: string): Cluster; + getProxyVersion(): string; + setProxyVersion(value: string): Cluster; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Cluster.AsObject; @@ -58,6 +61,7 @@ export namespace Cluster { loggedInUser?: LoggedInUser.AsObject, features?: Features.AsObject, authClusterId: string, + proxyVersion: string, } } diff --git a/gen/proto/js/teleport/lib/teleterm/v1/cluster_pb.js b/gen/proto/js/teleport/lib/teleterm/v1/cluster_pb.js index 40669158cecfe..b060fb67e0b30 100644 --- a/gen/proto/js/teleport/lib/teleterm/v1/cluster_pb.js +++ b/gen/proto/js/teleport/lib/teleterm/v1/cluster_pb.js @@ -165,7 +165,8 @@ proto.teleport.lib.teleterm.v1.Cluster.toObject = function(includeInstance, msg) leaf: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), loggedInUser: (f = msg.getLoggedInUser()) && proto.teleport.lib.teleterm.v1.LoggedInUser.toObject(includeInstance, f), features: (f = msg.getFeatures()) && proto.teleport.lib.teleterm.v1.Features.toObject(includeInstance, f), - authClusterId: jspb.Message.getFieldWithDefault(msg, 9, "") + authClusterId: jspb.Message.getFieldWithDefault(msg, 9, ""), + proxyVersion: jspb.Message.getFieldWithDefault(msg, 10, "") }; if (includeInstance) { @@ -236,6 +237,10 @@ proto.teleport.lib.teleterm.v1.Cluster.deserializeBinaryFromReader = function(ms var value = /** @type {string} */ (reader.readString()); msg.setAuthClusterId(value); break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.setProxyVersion(value); + break; default: reader.skipField(); break; @@ -323,6 +328,13 @@ proto.teleport.lib.teleterm.v1.Cluster.serializeBinaryToWriter = function(messag f ); } + f = message.getProxyVersion(); + if (f.length > 0) { + writer.writeString( + 10, + f + ); + } }; @@ -508,6 +520,24 @@ proto.teleport.lib.teleterm.v1.Cluster.prototype.setAuthClusterId = function(val }; +/** + * optional string proxy_version = 10; + * @return {string} + */ +proto.teleport.lib.teleterm.v1.Cluster.prototype.getProxyVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * @param {string} value + * @return {!proto.teleport.lib.teleterm.v1.Cluster} returns this + */ +proto.teleport.lib.teleterm.v1.Cluster.prototype.setProxyVersion = function(value) { + return jspb.Message.setProto3StringField(this, 10, value); +}; + + /** * List of repeated fields within this message type. diff --git a/lib/teleterm/apiserver/handler/handler_clusters.go b/lib/teleterm/apiserver/handler/handler_clusters.go index acd48ad49f2a6..4923a31e6ed50 100644 --- a/lib/teleterm/apiserver/handler/handler_clusters.go +++ b/lib/teleterm/apiserver/handler/handler_clusters.go @@ -121,6 +121,7 @@ func newAPIRootClusterWithDetails(cluster *clusters.ClusterWithDetails) (*api.Cl return nil, trace.Wrap(err) } apiCluster.LoggedInUser.UserType = userType + apiCluster.ProxyVersion = cluster.ProxyVersion return apiCluster, nil } diff --git a/lib/teleterm/clusters/cluster.go b/lib/teleterm/clusters/cluster.go index de26f3f2e4f85..424d826dd879e 100644 --- a/lib/teleterm/clusters/cluster.go +++ b/lib/teleterm/clusters/cluster.go @@ -69,6 +69,8 @@ type ClusterWithDetails struct { ACL *api.ACL // UserType identifies whether the user is a local user or comes from an SSO provider. UserType types.UserType + // ProxyVersion is the cluster proxy's service version. + ProxyVersion string } // Connected indicates if connection to the cluster can be established @@ -81,14 +83,19 @@ func (c *Cluster) Connected() bool { // and enabled enterprise features. This method requires a valid cert. func (c *Cluster) GetWithDetails(ctx context.Context) (*ClusterWithDetails, error) { var ( - pingResponse proto.PingResponse - caps *types.AccessCapabilities - authClusterID string - acl *api.ACL - user types.User + authPingResponse proto.PingResponse + caps *types.AccessCapabilities + authClusterID string + acl *api.ACL + user types.User ) - err := AddMetadataToRetryableError(ctx, func() error { + clusterPingResponse, err := c.clusterClient.Ping(ctx) + if err != nil { + return nil, trace.Wrap(err) + } + + err = AddMetadataToRetryableError(ctx, func() error { proxyClient, err := c.clusterClient.ConnectToProxy(ctx) if err != nil { return trace.Wrap(err) @@ -101,7 +108,7 @@ func (c *Cluster) GetWithDetails(ctx context.Context) (*ClusterWithDetails, erro } defer authClient.Close() - pingResponse, err = authClient.Ping(ctx) + authPingResponse, err = authClient.Ping(ctx) if err != nil { return trace.Wrap(err) } @@ -131,7 +138,7 @@ func (c *Cluster) GetWithDetails(ctx context.Context) (*ClusterWithDetails, erro } roleSet := services.NewRoleSet(roles...) - userACL := services.NewUserACL(user, roleSet, *pingResponse.ServerFeatures, false) + userACL := services.NewUserACL(user, roleSet, *authPingResponse.ServerFeatures, false) acl = &api.ACL{ RecordedSessions: convertToAPIResourceAccess(userACL.RecordedSessions), @@ -158,10 +165,11 @@ func (c *Cluster) GetWithDetails(ctx context.Context) (*ClusterWithDetails, erro Cluster: c, SuggestedReviewers: caps.SuggestedReviewers, RequestableRoles: caps.RequestableRoles, - Features: pingResponse.ServerFeatures, + Features: authPingResponse.ServerFeatures, AuthClusterID: authClusterID, ACL: acl, UserType: user.GetUserType(), + ProxyVersion: clusterPingResponse.ServerVersion, } return withDetails, nil diff --git a/proto/teleport/lib/teleterm/v1/cluster.proto b/proto/teleport/lib/teleterm/v1/cluster.proto index 043dc2c6b04d6..2561bd76fdaee 100644 --- a/proto/teleport/lib/teleterm/v1/cluster.proto +++ b/proto/teleport/lib/teleterm/v1/cluster.proto @@ -40,6 +40,9 @@ message Cluster { // during the first auth server startup. // Only present when detailed information is queried from the auth server. string auth_cluster_id = 9; + // ProxyVersion is the cluster proxy's service version. + // Only present when detailed information is queried from the proxy server. + string proxy_version = 10; } // LoggedInUser describes a logged-in user diff --git a/web/packages/teleterm/src/services/tshd/testHelpers.ts b/web/packages/teleterm/src/services/tshd/testHelpers.ts index 4a5a1d8aa6f5e..ab4f989e6eb8b 100644 --- a/web/packages/teleterm/src/services/tshd/testHelpers.ts +++ b/web/packages/teleterm/src/services/tshd/testHelpers.ts @@ -63,6 +63,21 @@ export const makeRootCluster = ( proxyHost: 'teleport-local:3080', authClusterId: '73c4746b-d956-4f16-9848-4e3469f70762', loggedInUser: makeLoggedInUser(), + proxyVersion: '1.0.0', + ...props, +}); + +export const makeLeafCluster = ( + props: Partial = {} +): tsh.Cluster => ({ + uri: '/clusters/teleport-local/leaves/leaf', + name: 'teleport-local-leaf', + connected: true, + leaf: true, + proxyHost: '', + authClusterId: '', + loggedInUser: makeLoggedInUser(), + proxyVersion: '', ...props, }); diff --git a/web/packages/teleterm/src/ui/ConnectMyComputer/CompatibilityPromise.test.tsx b/web/packages/teleterm/src/ui/ConnectMyComputer/CompatibilityPromise.test.tsx new file mode 100644 index 0000000000000..56ac40a491e68 --- /dev/null +++ b/web/packages/teleterm/src/ui/ConnectMyComputer/CompatibilityPromise.test.tsx @@ -0,0 +1,125 @@ +/** + * Copyright 2023 Gravitational, Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import React from 'react'; +import { screen } from '@testing-library/react'; +import { render } from 'design/utils/testing'; + +import { makeRootCluster } from 'teleterm/services/tshd/testHelpers'; +import { makeRuntimeSettings } from 'teleterm/mainProcess/fixtures/mocks'; +import { MockAppContextProvider } from 'teleterm/ui/fixtures/MockAppContextProvider'; +import { MockWorkspaceContextProvider } from 'teleterm/ui/fixtures/MockWorkspaceContextProvider'; +import { MockAppContext } from 'teleterm/ui/fixtures/mocks'; + +import { isAgentCompatible, CompatibilityError } from './CompatibilityPromise'; + +describe('isAgentCompatible', () => { + const testCases = [ + { + agentVersion: '2.0.0', + proxyVersion: '2.0.0', + isCompatible: true, + }, + { + agentVersion: '2.1.0', + proxyVersion: '2.0.0', + isCompatible: true, + }, + { + agentVersion: '3.0.0', + proxyVersion: '2.0.0', + isCompatible: false, + }, + { + agentVersion: '2.0.0', + proxyVersion: '3.0.0', + isCompatible: true, + }, + { + agentVersion: '2.0.0', + proxyVersion: '4.0.0', + isCompatible: false, + }, + ]; + test.each(testCases)( + 'should agent $agentVersion and cluster $proxyVersion be compatible? $isCompatible', + ({ agentVersion, proxyVersion, isCompatible }) => { + expect( + isAgentCompatible( + proxyVersion, + makeRuntimeSettings({ appVersion: agentVersion }) + ) + ).toBe(isCompatible); + } + ); +}); + +test('compatibilityError shows app upgrade instructions', async () => { + const agentVersion = '1.0.0'; + const proxyVersion = '3.0.0'; + const appContext = new MockAppContext({ appVersion: agentVersion }); + const cluster = makeRootCluster({ proxyVersion }); + appContext.clustersService.setState(draftState => { + draftState.clusters.set(cluster.uri, cluster); + }); + + render( + + + + + + ); + + await expect( + screen.findByText( + /The cluster is on version 3.0.0 while Teleport Connect is on version 1.0.0./ + ) + ).resolves.toBeVisible(); + await expect( + screen.findByText(/upgrade the app to 3.x.x/) + ).resolves.toBeVisible(); +}); + +test('compatibilityError shows cluster upgrade (and app downgrade) instructions', async () => { + const agentVersion = '15.0.0'; + const proxyVersion = '14.0.0'; + const appContext = new MockAppContext({ appVersion: agentVersion }); + const cluster = makeRootCluster({ proxyVersion }); + appContext.clustersService.setState(draftState => { + draftState.clusters.set(cluster.uri, cluster); + }); + + render( + + + + + + ); + + await expect( + screen.findByText( + /The cluster is on version 14.0.0 while Teleport Connect is on version 15.0.0./ + ) + ).resolves.toBeVisible(); + await expect( + screen.findByText(/downgrade the app to version 14.1.0/) + ).resolves.toBeVisible(); + await expect( + screen.findByText(/upgrade the cluster to version 15.x.x/) + ).resolves.toBeVisible(); +}); diff --git a/web/packages/teleterm/src/ui/ConnectMyComputer/CompatibilityPromise.tsx b/web/packages/teleterm/src/ui/ConnectMyComputer/CompatibilityPromise.tsx new file mode 100644 index 0000000000000..1ef3222e03ec7 --- /dev/null +++ b/web/packages/teleterm/src/ui/ConnectMyComputer/CompatibilityPromise.tsx @@ -0,0 +1,131 @@ +/** + * Copyright 2023 Gravitational, Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import React from 'react'; +import { Text, ButtonPrimary, Alert } from 'design'; + +import Link from 'design/Link'; + +import { useAppContext } from 'teleterm/ui/appContextProvider'; +import { useWorkspaceContext } from 'teleterm/ui/Documents'; +import { RuntimeSettings } from 'teleterm/mainProcess/types'; + +const CONNECT_MY_COMPUTER_RELEASE_VERSION = '14.1.0'; +const CONNECT_MY_COMPUTER_RELEASE_MAJOR_VERSION = 14; + +export function isAgentCompatible( + proxyVersion: string, + runtimeSettings: Pick +): boolean { + if (proxyVersion === '') { + return false; + } + if (runtimeSettings.isLocalBuild) { + return true; + } + const majorAppVersion = getMajorVersion(runtimeSettings.appVersion); + const majorClusterVersion = getMajorVersion(proxyVersion); + return ( + majorAppVersion === majorClusterVersion || + majorAppVersion === majorClusterVersion - 1 // app one major version behind the cluster + ); +} + +export function CompatibilityError(): JSX.Element { + const { proxyVersion, appVersion } = useVersions(); + + const clusterMajorVersion = getMajorVersion(proxyVersion); + const appMajorVersion = getMajorVersion(appVersion); + + // offer a downgrade only to a release that has 'Connect My Computer' + // DELETE IN 17.0.0 (gzdunek): by the time 17.0 releases, 14.x will no longer be + // supported and then downgradeAppTo will simply become ${clusterMajorVersion}.x.x, + // and we will not have to check if downgrade is possible. + const isAppDowngradePossible = + clusterMajorVersion >= CONNECT_MY_COMPUTER_RELEASE_MAJOR_VERSION; + const downgradeAppTo = + clusterMajorVersion === CONNECT_MY_COMPUTER_RELEASE_MAJOR_VERSION + ? CONNECT_MY_COMPUTER_RELEASE_VERSION + : `${clusterMajorVersion}.x.x`; + + let $content: JSX.Element; + if (appMajorVersion > clusterMajorVersion) { + $content = ( + <> + , clusters don't support clients that are on a newer major version. To + use Connect My Computer,{' '} + {isAppDowngradePossible && ( + <>downgrade the app to version {downgradeAppTo} or + )} + upgrade the cluster to version {appMajorVersion}.x.x. + + ); + } + if (appMajorVersion < clusterMajorVersion) { + $content = ( + <> + , clusters don't support clients that are more than one major version + behind. To use Connect My Computer, upgrade the app to{' '} + {clusterMajorVersion}.x.x. + + ); + } + + return ( + <> + Detected an incompatible agent version. + + The cluster is on version {proxyVersion} while Teleport Connect is on + version {appVersion}. Per our{' '} + + compatibility promise + + {$content} + + + Visit the downloads page + + + ); +} + +export function useVersions() { + const ctx = useAppContext(); + const workspaceContext = useWorkspaceContext(); + const cluster = ctx.clustersService.findCluster( + workspaceContext.rootClusterUri + ); + const { proxyVersion } = cluster; + const { appVersion, isLocalBuild } = + ctx.mainProcessClient.getRuntimeSettings(); + + return { proxyVersion, appVersion, isLocalBuild }; +} + +function getMajorVersion(version: string): number { + return parseInt(version.split('.')[0]); +} diff --git a/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputerSetup/DocumentConnectMyComputerSetup.story.tsx b/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputerSetup/DocumentConnectMyComputerSetup.story.tsx index 761c38a87f139..ec084ec6725d1 100644 --- a/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputerSetup/DocumentConnectMyComputerSetup.story.tsx +++ b/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputerSetup/DocumentConnectMyComputerSetup.story.tsx @@ -32,7 +32,57 @@ export default { export function Default() { const cluster = makeRootCluster(); - const appContext = new MockAppContext(); + const appContext = new MockAppContext({ appVersion: cluster.proxyVersion }); + appContext.clustersService.state.clusters.set(cluster.uri, cluster); + appContext.workspacesService.setState(draftState => { + draftState.rootClusterUri = cluster.uri; + draftState.workspaces[cluster.uri] = { + localClusterUri: cluster.uri, + documents: [], + location: undefined, + accessRequests: undefined, + }; + }); + + return ( + + + + + + + + ); +} + +export function AgentVersionTooNew() { + const cluster = makeRootCluster({ proxyVersion: '16.3.0' }); + const appContext = new MockAppContext({ appVersion: '17.0.0' }); + appContext.clustersService.state.clusters.set(cluster.uri, cluster); + appContext.workspacesService.setState(draftState => { + draftState.rootClusterUri = cluster.uri; + draftState.workspaces[cluster.uri] = { + localClusterUri: cluster.uri, + documents: [], + location: undefined, + accessRequests: undefined, + }; + }); + + return ( + + + + + + + + ); +} + +export function AgentVersionTooOld() { + const cluster = makeRootCluster({ proxyVersion: '16.3.0' }); + const appContext = new MockAppContext({ appVersion: '14.1.0' }); appContext.clustersService.state.clusters.set(cluster.uri, cluster); appContext.workspacesService.setState(draftState => { draftState.rootClusterUri = cluster.uri; diff --git a/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputerSetup/DocumentConnectMyComputerSetup.test.tsx b/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputerSetup/DocumentConnectMyComputerSetup.test.tsx index f43b3023dbc76..5f620a6b6d273 100644 --- a/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputerSetup/DocumentConnectMyComputerSetup.test.tsx +++ b/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputerSetup/DocumentConnectMyComputerSetup.test.tsx @@ -83,7 +83,9 @@ describe('connectMyComputerSetup', () => { }, }), }); - const appContext = new MockAppContext({}); + const appContext = new MockAppContext({ + appVersion: cluster.proxyVersion, + }); appContext.clustersService.state.clusters.set(cluster.uri, cluster); appContext.workspacesService.setState(draftState => { draftState.rootClusterUri = cluster.uri; diff --git a/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputerSetup/DocumentConnectMyComputerSetup.tsx b/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputerSetup/DocumentConnectMyComputerSetup.tsx index 2a6609c02f6e0..f1d8e3cdf2ba3 100644 --- a/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputerSetup/DocumentConnectMyComputerSetup.tsx +++ b/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputerSetup/DocumentConnectMyComputerSetup.tsx @@ -15,6 +15,7 @@ limitations under the License. */ import React, { useCallback, useEffect, useRef, useState } from 'react'; +import styled from 'styled-components'; import { Box, ButtonPrimary, Flex, Text } from 'design'; import { makeEmptyAttempt, useAsync } from 'shared/hooks/useAsync'; import { wait } from 'shared/utils/wait'; @@ -36,6 +37,7 @@ import { isAccessDeniedError } from 'teleterm/services/tshd/errors'; import { useAgentProperties } from '../useAgentProperties'; import { Logs } from '../Logs'; +import { CompatibilityError } from '../CompatibilityPromise'; const logger = new Logger('DocumentConnectMyComputerSetup'); @@ -62,9 +64,16 @@ export function DocumentConnectMyComputerSetup() { function Information(props: { onSetUpAgentClick(): void }) { const { systemUsername, hostname, roleName, clusterName } = useAgentProperties(); + const { isAgentCompatible } = useConnectMyComputerContext(); return ( <> + {!isAgentCompatible && ( + <> + + + + )} The setup process will download and launch the Teleport agent, making your computer available in the {clusterName} cluster as{' '} @@ -86,6 +95,7 @@ function Information(props: { onSetUpAgentClick(): void }) { css={` display: block; `} + disabled={!isAgentCompatible} onClick={props.onSetUpAgentClick} > Connect @@ -395,3 +405,8 @@ function StandardError(props: { ); } + +const Separator = styled(Box)` + background: ${props => props.theme.colors.spotBackground[2]}; + height: 1px; +`; diff --git a/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputerStatus/DocumentConnectMyComputerStatus.story.tsx b/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputerStatus/DocumentConnectMyComputerStatus.story.tsx index dc05364a6cf3f..d86d3ffa67f03 100644 --- a/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputerStatus/DocumentConnectMyComputerStatus.story.tsx +++ b/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputerStatus/DocumentConnectMyComputerStatus.story.tsx @@ -25,6 +25,7 @@ import AppContext from 'teleterm/ui/appContext'; import { MockWorkspaceContextProvider } from 'teleterm/ui/fixtures/MockWorkspaceContextProvider'; import { MockAppContext } from 'teleterm/ui/fixtures/mocks'; import { AgentProcessState } from 'teleterm/mainProcess/types'; +import { makeRuntimeSettings } from 'teleterm/mainProcess/fixtures/mocks'; import { ConnectMyComputerContextProvider } from '../connectMyComputerContext'; @@ -94,13 +95,69 @@ export function FailedToReadAgentConfigFile() { ); } -const cluster = makeRootCluster(); +export function AgentVersionTooNew() { + const appContext = new MockAppContext({ appVersion: '17.0.0' }); + + return ( + + ); +} + +// Shows only cluster upgrade instructions. +// Downgrading the app would result in installing a version that doesn't support 'Connect My Computer'. +// DELETE IN 17.0.0 (gzdunek): by the time 17.0 releases, 14.x will no longer be +// supported, so downgrade will be always possible. +export function AgentVersionTooNewButOnlyClusterCanBeUpgraded() { + const appContext = new MockAppContext({ appVersion: '14.1.0' }); + + return ( + + ); +} + +export function AgentVersionTooOld() { + const appContext = new MockAppContext({ appVersion: '14.1.0' }); + + return ( + + ); +} + +export function UpgradeAgentSuggestion() { + const appContext = new MockAppContext({ appVersion: '15.2.0' }); + + return ( + + ); +} function ShowState(props: { agentProcessState: AgentProcessState; appContext?: AppContext; + proxyVersion?: string; }) { - const appContext = props.appContext || new MockAppContext(); + const cluster = makeRootCluster({ + proxyVersion: props.proxyVersion || makeRuntimeSettings().appVersion, + }); + const appContext = + props.appContext || + new MockAppContext({ appVersion: cluster.proxyVersion }); appContext.mainProcessClient.getAgentState = () => props.agentProcessState; appContext.mainProcessClient.subscribeToAgentUpdate = ( diff --git a/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputerStatus/DocumentConnectMyComputerStatus.tsx b/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputerStatus/DocumentConnectMyComputerStatus.tsx index e3e65eda22acb..c63b85bccb618 100644 --- a/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputerStatus/DocumentConnectMyComputerStatus.tsx +++ b/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputerStatus/DocumentConnectMyComputerStatus.tsx @@ -47,6 +47,11 @@ import { useAppContext } from 'teleterm/ui/appContextProvider'; import { useAgentProperties } from '../useAgentProperties'; import { Logs } from '../Logs'; +import { CompatibilityError, useVersions } from '../CompatibilityPromise'; +import { + shouldShowAgentUpgradeSuggestion, + UpgradeAgentSuggestion, +} from '../UpgradeAgentSuggestion'; import type * as tsh from 'teleterm/services/tshd/types'; import type { IconProps } from 'design/Icon/Icon'; @@ -68,8 +73,10 @@ export function DocumentConnectMyComputerStatus( isAgentConfiguredAttempt, markAgentAsNotConfigured, removeAgent, + isAgentCompatible, } = useConnectMyComputerContext(); const { roleName, systemUsername, hostname } = useAgentProperties(); + const { proxyVersion, appVersion, isLocalBuild } = useVersions(); const prettyCurrentAction = prettifyCurrentAction(currentAction); @@ -119,6 +126,15 @@ export function DocumentConnectMyComputerStatus( return ( + {shouldShowAgentUpgradeSuggestion(proxyVersion, { + appVersion, + isLocalBuild, + }) && ( + + )} {isAgentConfiguredAttempt.status === 'error' && ( )} {prettyCurrentAction.logs && } - - Connecting your computer will allow any cluster user with the role{' '} - {roleName} to access it as an SSH resource with the - user {systemUsername}. - - {showConnectAndStopAgentButtons ? ( - - Connect - + + {!isAgentCompatible ? ( + ) : ( - - Start Agent - + <> + + Connecting your computer will allow any cluster user with the role{' '} + {roleName} to access it as an SSH resource with the + user {systemUsername}. + + {showConnectAndStopAgentButtons ? ( + + Connect + + ) : ( + + Start Agent + + )} + )} ); diff --git a/web/packages/teleterm/src/ui/ConnectMyComputer/NavigationMenu.tsx b/web/packages/teleterm/src/ui/ConnectMyComputer/NavigationMenu.tsx index 823fe554e4803..321d8a9897fbd 100644 --- a/web/packages/teleterm/src/ui/ConnectMyComputer/NavigationMenu.tsx +++ b/web/packages/teleterm/src/ui/ConnectMyComputer/NavigationMenu.tsx @@ -39,11 +39,12 @@ export function NavigationMenu() { const iconRef = useRef(); const [isMenuOpened, setIsMenuOpened] = useState(false); const { documentsService, rootClusterUri } = useWorkspaceContext(); - const { isAgentConfiguredAttempt, currentAction, canUse } = + const { isAgentConfiguredAttempt, isAgentCompatible, currentAction, canUse } = useConnectMyComputerContext(); const indicatorStatus = getIndicatorStatus( currentAction, - isAgentConfiguredAttempt + isAgentConfiguredAttempt, + isAgentCompatible ); if (!canUse) { @@ -112,15 +113,28 @@ export function NavigationMenu() { function getIndicatorStatus( currentAction: CurrentAction, - isAgentConfiguredAttempt: Attempt + isAgentConfiguredAttempt: Attempt, + isAgentCompatible: boolean ): IndicatorStatus { if (isAgentConfiguredAttempt.status === 'error') { return 'error'; } + const isAgentConfigured = + isAgentConfiguredAttempt.status === 'success' && + isAgentConfiguredAttempt.data; + + if (!isAgentConfigured) { + return ''; + } + if (currentAction.kind === 'observe-process') { switch (currentAction.agentProcessState.status) { case 'not-started': { + if (!isAgentCompatible) { + return 'error'; + } + return ''; } case 'error': { diff --git a/web/packages/teleterm/src/ui/ConnectMyComputer/UpgradeAgentSuggestion.test.tsx b/web/packages/teleterm/src/ui/ConnectMyComputer/UpgradeAgentSuggestion.test.tsx new file mode 100644 index 0000000000000..9c01211f2c4ef --- /dev/null +++ b/web/packages/teleterm/src/ui/ConnectMyComputer/UpgradeAgentSuggestion.test.tsx @@ -0,0 +1,79 @@ +/** + * Copyright 2023 Gravitational, Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import React from 'react'; +import { render } from 'design/utils/testing'; +import { screen } from '@testing-library/react'; + +import { + UpgradeAgentSuggestion, + shouldShowAgentUpgradeSuggestion, +} from './UpgradeAgentSuggestion'; + +test('upgradeAgentSuggestion renders correct versions', async () => { + render(); + + await expect( + screen.findByText(/agent is running version 14.1.0 of Teleport/) + ).resolves.toBeVisible(); + await expect( + screen.findByText(/Consider upgrading it to version 15.0.0/) + ).resolves.toBeVisible(); +}); + +describe('shouldShowAgentUpgradeSuggestion returns', () => { + const testCases = [ + { + name: 'the agent is not compatible', + isLocalBuild: false, + appVersion: '15.0.0', + proxyVersion: '17.0.0', + expected: false, + }, + { + name: 'the agent is on a newer version', + isLocalBuild: false, + appVersion: '14.1.0', + proxyVersion: '14.0.0', + expected: false, + }, + { + name: 'is a dev build', + isLocalBuild: true, + appVersion: '1.0.0-dev', + proxyVersion: '14.0.0', + expected: false, + }, + { + name: 'the agent can be upgraded', + isLocalBuild: false, + appVersion: '14.1.0', + proxyVersion: '14.2.0', + expected: true, + }, + ]; + test.each(testCases)( + '$expected when $name', + async ({ isLocalBuild, appVersion, proxyVersion, expected }) => { + expect( + shouldShowAgentUpgradeSuggestion(proxyVersion, { + appVersion, + isLocalBuild, + }) + ).toBe(expected); + } + ); +}); diff --git a/web/packages/teleterm/src/ui/ConnectMyComputer/UpgradeAgentSuggestion.tsx b/web/packages/teleterm/src/ui/ConnectMyComputer/UpgradeAgentSuggestion.tsx new file mode 100644 index 0000000000000..bb224169f3663 --- /dev/null +++ b/web/packages/teleterm/src/ui/ConnectMyComputer/UpgradeAgentSuggestion.tsx @@ -0,0 +1,58 @@ +/** + * Copyright 2023 Gravitational, Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import React from 'react'; +import { Alert, Text } from 'design'; +import Link from 'design/Link'; + +import { compareSemVers } from 'shared/utils/semVer'; + +import { RuntimeSettings } from 'teleterm/mainProcess/types'; + +import { isAgentCompatible } from './CompatibilityPromise'; + +export function shouldShowAgentUpgradeSuggestion( + proxyVersion: string, + runtimeSettings: Pick +): boolean { + const { appVersion, isLocalBuild } = runtimeSettings; + const isClusterOnOlderVersion = + compareSemVers(proxyVersion, appVersion) === 1; + return ( + isAgentCompatible(proxyVersion, runtimeSettings) && + isClusterOnOlderVersion && + !isLocalBuild + ); +} + +export function UpgradeAgentSuggestion(props: { + proxyVersion: string; + appVersion: string; +}): JSX.Element { + return ( + + + The agent is running version {props.appVersion} of Teleport. Consider + upgrading it to version {props.proxyVersion} by updating Teleport + Connect. Visit{' '} + + the downloads page + + . + + + ); +} diff --git a/web/packages/teleterm/src/ui/ConnectMyComputer/connectMyComputerContext.test.tsx b/web/packages/teleterm/src/ui/ConnectMyComputer/connectMyComputerContext.test.tsx index 769f8938392d2..22915f2f64f50 100644 --- a/web/packages/teleterm/src/ui/ConnectMyComputer/connectMyComputerContext.test.tsx +++ b/web/packages/teleterm/src/ui/ConnectMyComputer/connectMyComputerContext.test.tsx @@ -56,7 +56,9 @@ function getMocksWithConnectMyComputerEnabled() { }, }), }); - const appContext = new MockAppContext({}); + const appContext = new MockAppContext({ + appVersion: rootCluster.proxyVersion, + }); appContext.clustersService.setState(draftState => { draftState.clusters.set(rootCluster.uri, rootCluster); diff --git a/web/packages/teleterm/src/ui/ConnectMyComputer/connectMyComputerContext.tsx b/web/packages/teleterm/src/ui/ConnectMyComputer/connectMyComputerContext.tsx index 0c6d8783866e2..6eba138b18ade 100644 --- a/web/packages/teleterm/src/ui/ConnectMyComputer/connectMyComputerContext.tsx +++ b/web/packages/teleterm/src/ui/ConnectMyComputer/connectMyComputerContext.tsx @@ -43,6 +43,8 @@ import { assertUnreachable, retryWithRelogin } from '../utils'; import { hasConnectMyComputerPermissions } from './permissions'; +import { isAgentCompatible as checkIfAgentIsComptabile } from './CompatibilityPromise'; + import type { AgentProcessState, MainProcessClient, @@ -86,6 +88,7 @@ export interface ConnectMyComputerContext { isAgentConfiguredAttempt: Attempt; markAgentAsConfigured(): void; markAgentAsNotConfigured(): void; + isAgentCompatible: boolean; } const ConnectMyComputerContext = createContext(null); @@ -132,6 +135,14 @@ export const ConnectMyComputerContextProvider: FC<{ // https://github.com/gravitational/teleport/blob/master/rfd/0133-connect-my-computer.md#access-to-ui-and-autostart return isFeatureFlagEnabled && (hasPermissions || isAgentConfigured); }, [configService, isAgentConfigured, mainProcessClient, rootCluster]); + const isAgentCompatible = useMemo( + () => + checkIfAgentIsComptabile( + rootCluster.proxyVersion, + mainProcessClient.getRuntimeSettings() + ), + [mainProcessClient, rootCluster] + ); const [currentActionKind, setCurrentActionKind] = useState('observe-process'); @@ -346,6 +357,7 @@ export const ConnectMyComputerContextProvider: FC<{ const shouldAutoStartAgent = isAgentConfigured && canUse && + isAgentCompatible && workspacesService.getConnectMyComputerAutoStart(rootClusterUri) && agentIsNotStarted; if (shouldAutoStartAgent) { @@ -358,6 +370,7 @@ export const ConnectMyComputerContextProvider: FC<{ isAgentConfigured, rootClusterUri, workspacesService, + isAgentCompatible, ]); return ( @@ -377,6 +390,7 @@ export const ConnectMyComputerContextProvider: FC<{ markAgentAsNotConfigured, isAgentConfiguredAttempt, removeAgent, + isAgentCompatible, }} children={children} /> diff --git a/web/packages/teleterm/src/ui/DocumentCluster/DocumentCluster.story.tsx b/web/packages/teleterm/src/ui/DocumentCluster/DocumentCluster.story.tsx index 504262f053b31..ed3e2af894bd2 100644 --- a/web/packages/teleterm/src/ui/DocumentCluster/DocumentCluster.story.tsx +++ b/web/packages/teleterm/src/ui/DocumentCluster/DocumentCluster.story.tsx @@ -24,6 +24,7 @@ import { ClustersServiceState, } from 'teleterm/ui/services/clusters'; import { routing } from 'teleterm/ui/uri'; +import { makeRootCluster } from 'teleterm/services/tshd/testHelpers'; import * as docTypes from '../services/workspacesService/documentsService/types'; @@ -49,42 +50,43 @@ const leafClusterDoc = { export const Online = () => { const state = createClusterServiceState(); - state.clusters.set(rootClusterDoc.clusterUri, { - uri: rootClusterDoc.clusterUri, - leaf: false, - name: 'localhost', - connected: true, - proxyHost: 'localhost:3080', - authClusterId: '73c4746b-d956-4f16-9848-4e3469f70762', - }); + state.clusters.set( + rootClusterDoc.clusterUri, + makeRootCluster({ + uri: rootClusterDoc.clusterUri, + name: 'localhost', + proxyHost: 'localhost:3080', + }) + ); return renderState(state, rootClusterDoc); }; export const Offline = () => { const state = createClusterServiceState(); - state.clusters.set(rootClusterDoc.clusterUri, { - uri: rootClusterDoc.clusterUri, - leaf: false, - name: 'localhost', - connected: false, - proxyHost: 'localhost:3080', - authClusterId: '73c4746b-d956-4f16-9848-4e3469f70762', - }); + state.clusters.set( + rootClusterDoc.clusterUri, + makeRootCluster({ + uri: rootClusterDoc.clusterUri, + name: 'localhost', + proxyHost: 'localhost:3080', + authClusterId: '73c4746b-d956-4f16-9848-4e3469f70762', + }) + ); return renderState(state, rootClusterDoc); }; export const Notfound = () => { const state = createClusterServiceState(); - state.clusters.set(rootClusterDoc.clusterUri, { - uri: rootClusterDoc.clusterUri, - leaf: false, - name: 'localhost', - connected: true, - proxyHost: 'localhost:3080', - authClusterId: '73c4746b-d956-4f16-9848-4e3469f70762', - }); + state.clusters.set( + rootClusterDoc.clusterUri, + makeRootCluster({ + uri: rootClusterDoc.clusterUri, + name: 'localhost', + proxyHost: 'localhost:3080', + }) + ); return renderState(state, leafClusterDoc); }; diff --git a/web/packages/teleterm/src/ui/DocumentTerminal/useDocumentTerminal.test.tsx b/web/packages/teleterm/src/ui/DocumentTerminal/useDocumentTerminal.test.tsx index 384a123abc552..7b0bec3ea2896 100644 --- a/web/packages/teleterm/src/ui/DocumentTerminal/useDocumentTerminal.test.tsx +++ b/web/packages/teleterm/src/ui/DocumentTerminal/useDocumentTerminal.test.tsx @@ -34,7 +34,10 @@ import { AmbiguousHostnameError, } from 'teleterm/ui/services/resources'; import { IPtyProcess } from 'teleterm/sharedProcess/ptyHost'; -import { makeLoggedInUser } from 'teleterm/services/tshd/testHelpers'; +import { + makeRootCluster, + makeLeafCluster, +} from 'teleterm/services/tshd/testHelpers'; import { WorkspaceContextProvider } from '../Documents'; @@ -576,24 +579,15 @@ const testSetup = ( doc: DocumentTerminal, localClusterUri: uri.ClusterUri = rootClusterUri ) => { - const cluster: tsh.Cluster = { + const cluster = makeRootCluster({ uri: rootClusterUri, name: 'Test', - connected: true, - leaf: false, proxyHost: 'localhost:3080', - authClusterId: '73c4746b-d956-4f16-9848-4e3469f70762', - loggedInUser: makeLoggedInUser(), - }; - const leafCluster: tsh.Cluster = { + }); + const leafCluster = makeLeafCluster({ uri: leafClusterUri, name: 'leaf', - connected: true, - leaf: true, - proxyHost: '', - authClusterId: '5408fc2f-a452-4bde-bda2-b3b918c635ad', - loggedInUser: makeLoggedInUser(), - }; + }); const appContext = new MockAppContext(); appContext.clustersService.setState(draftState => { draftState.clusters.set(rootClusterUri, cluster); diff --git a/web/packages/teleterm/src/ui/Search/pickers/results.story.tsx b/web/packages/teleterm/src/ui/Search/pickers/results.story.tsx index 3e47c02431858..89f68476eb4cc 100644 --- a/web/packages/teleterm/src/ui/Search/pickers/results.story.tsx +++ b/web/packages/teleterm/src/ui/Search/pickers/results.story.tsx @@ -25,6 +25,7 @@ import { makeKube, makeServer, makeLabelsList, + makeRootCluster, } from 'teleterm/services/tshd/testHelpers'; import { ResourceSearchError } from 'teleterm/ui/services/resources'; @@ -295,27 +296,21 @@ const SearchResultItems = () => { }, { kind: 'cluster-filter', - resource: { + resource: makeRootCluster({ name: 'teleport-local', uri: clusterUri, - authClusterId: '', - connected: true, - leaf: false, proxyHost: 'teleport-local.dev:3090', - }, + }), nameMatch: '', score: 0, }, { kind: 'cluster-filter', - resource: { + resource: makeRootCluster({ name: 'teleport-very-long-cluster-name-with-uuid-2f96e498-88ec-442f-a25b-569fa915041c', uri: longClusterUri, - authClusterId: '', - connected: true, - leaf: false, proxyHost: 'teleport-local.dev:3090', - }, + }), nameMatch: '', score: 0, }, diff --git a/web/packages/teleterm/src/ui/Search/useSearch.test.tsx b/web/packages/teleterm/src/ui/Search/useSearch.test.tsx index 16d8aa62e21ee..86a88064d6c02 100644 --- a/web/packages/teleterm/src/ui/Search/useSearch.test.tsx +++ b/web/packages/teleterm/src/ui/Search/useSearch.test.tsx @@ -32,8 +32,6 @@ import { MockAppContextProvider } from '../fixtures/MockAppContextProvider'; import { makeResourceResult } from './testHelpers'; import { rankResults, useFilterSearch, useResourceSearch } from './useSearch'; -import type * as tsh from 'teleterm/services/tshd/types'; - beforeEach(() => { jest.restoreAllMocks(); }); @@ -223,14 +221,8 @@ describe('useFiltersSearch', () => { it('does not return cluster filters if there is only one cluster', () => { const appContext = new MockAppContext(); appContext.clustersService.setState(draftState => { - draftState.clusters.set('/clusters/teleport-local', { - connected: true, - authClusterId: '73c4746b-d956-4f16-9848-4e3469f70762', - leaf: false, - name: 'teleport-local', - proxyHost: 'localhost:3080', - uri: '/clusters/teleport-local', - }); + const rootCluster = makeRootCluster(); + draftState.clusters.set(rootCluster.uri, rootCluster); }); const { result } = renderHook(() => useFilterSearch(), { @@ -248,22 +240,16 @@ describe('useFiltersSearch', () => { it('returns one cluster filter if the search term matches it', () => { const appContext = new MockAppContext(); - const clusterA: tsh.Cluster = { - connected: true, - authClusterId: '73c4746b-d956-4f16-9848-4e3469f70762', - leaf: false, + const clusterA = makeRootCluster({ name: 'teleport-a', proxyHost: 'localhost:3080', uri: '/clusters/teleport-a', - }; - const clusterB: tsh.Cluster = { - connected: true, - authClusterId: '73c4746b-d956-4f16-1848-4e3469f70762', - leaf: false, + }); + const clusterB = makeRootCluster({ name: 'teleport-b', proxyHost: 'localhost:3080', uri: '/clusters/teleport-b', - }; + }); appContext.clustersService.setState(draftState => { draftState.clusters.set(clusterA.uri, clusterA); draftState.clusters.set(clusterB.uri, clusterB); diff --git a/web/packages/teleterm/src/ui/TopBar/Identity/Identity.story.tsx b/web/packages/teleterm/src/ui/TopBar/Identity/Identity.story.tsx index d743e78ac27e9..f1d109afcb07a 100644 --- a/web/packages/teleterm/src/ui/TopBar/Identity/Identity.story.tsx +++ b/web/packages/teleterm/src/ui/TopBar/Identity/Identity.story.tsx @@ -17,8 +17,10 @@ import React, { useRef, useEffect } from 'react'; import Flex from 'design/Flex'; -import * as tshd from 'teleterm/services/tshd/types'; -import { makeLoggedInUser } from 'teleterm/services/tshd/testHelpers'; +import { + makeLoggedInUser, + makeRootCluster, +} from 'teleterm/services/tshd/testHelpers'; import { Identity, IdentityHandler, IdentityProps } from './Identity'; import { IdentityRootCluster } from './useIdentity'; @@ -87,19 +89,16 @@ export function OneClusterWithActiveCluster() { connected: true, }; - const cluster: tshd.Cluster = { + const cluster = makeRootCluster({ uri: '/clusters/localhost', name: 'teleport-localhost', proxyHost: 'localhost:3080', - connected: true, - leaf: false, - authClusterId: '73c4746b-d956-4f16-9848-4e3469f70762', loggedInUser: makeLoggedInUser({ name: 'alice', rolesList: ['access', 'editor'], sshLoginsList: ['root'], }), - }; + }); return ( { findCluster: jest.fn(), findGateway: jest.fn(), getRootClusters: () => [ - { + makeRootCluster({ uri: options.clusterUri, name: 'Test cluster', - connected: true, - leaf: false, proxyHost: 'test:3030', - authClusterId: '73c4746b-d956-4f16-9848-4e3469f70762', - loggedInUser: makeLoggedInUser(), - }, + }), ], };