Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DatabaseProtocols = []Protocol{ ProtocolPostgres, ProtocolMySQL, ProtocolMongoDB, ProtocolRedisDB, ProtocolSQLServer, ProtocolSnowflake, ProtocolCassandra, ProtocolElasticsearch, }
DatabaseProtocols is the list of the database protocols supported.
var ProtocolsWithPingSupport = DatabaseProtocols
ProtocolsWithPingSupport is the list of protocols that Ping connection is supported. For now, only database protocols are supported.
var SupportedProtocols = append( ProtocolsWithPing(ProtocolsWithPingSupport...), append([]Protocol{ ProtocolHTTP, ProtocolHTTP2, ProtocolProxySSH, ProtocolReverseTunnel, ProtocolAuth, ProtocolTCP, }, DatabaseProtocols...)..., )
SupportedProtocols is the list of supported ALPN protocols.
Functions ¶
func HasPingSupport ¶
HasPingSupport checks if the provided protocol supports Ping protocol.
func IsDBTLSProtocol ¶
IsDBTLSProtocol returns if DB protocol has supported native TLS protocol. where connection can be TLS terminated on ALPN proxy side. For protocol like MySQL or Postgres where custom TLS implementation is used the incoming connection needs to be forwarded to proxy database service where custom TLS handler is invoked to terminated DB connection.
func IsPingProtocol ¶
IsPingProtocol checks if the provided protocol is suffixed with Ping.
func ProtocolsToString ¶
ProtocolsToString converts the list of Protocols to the list of strings.
Types ¶
type Protocol ¶
type Protocol string
Protocol is the TLS ALPN protocol type.
const ( // ProtocolPostgres is TLS ALPN protocol value used to indicate Postgres protocol. ProtocolPostgres Protocol = "teleport-postgres" // ProtocolMySQL is TLS ALPN protocol value used to indicate MySQL protocol. ProtocolMySQL Protocol = "teleport-mysql" // ProtocolMongoDB is TLS ALPN protocol value used to indicate Mongo protocol. ProtocolMongoDB Protocol = "teleport-mongodb" // ProtocolRedisDB is TLS ALPN protocol value used to indicate Redis protocol. ProtocolRedisDB Protocol = "teleport-redis" // ProtocolSQLServer is the TLS ALPN protocol value used to indicate SQL Server protocol. ProtocolSQLServer Protocol = "teleport-sqlserver" // ProtocolSnowflake is TLS ALPN protocol value used to indicate Snowflake protocol. ProtocolSnowflake Protocol = "teleport-snowflake" // ProtocolCassandra is the TLS ALPN protocol value used to indicate Cassandra protocol. ProtocolCassandra Protocol = "teleport-cassandra" // ProtocolElasticsearch is TLS ALPN protocol value used to indicate Elasticsearch protocol. ProtocolElasticsearch Protocol = "teleport-elasticsearch" // ProtocolProxySSH is TLS ALPN protocol value used to indicate Proxy SSH protocol. ProtocolProxySSH Protocol = "teleport-proxy-ssh" // ProtocolReverseTunnel is TLS ALPN protocol value used to indicate Proxy reversetunnel protocol. ProtocolReverseTunnel Protocol = "teleport-reversetunnel" // ProtocolReverseTunnelV2 is TLS ALPN protocol value used to indicate reversetunnel clients // that are aware of proxy peering. This is only used on the client side to allow intermediate // load balancers to make decisions based on the ALPN header. ProtocolReverseTunnel should still // be included in the list of ALPN header for the proxy server to handle the connection properly. ProtocolReverseTunnelV2 Protocol = "teleport-reversetunnelv2" // ProtocolHTTP is TLS ALPN protocol value used to indicate HTTP 1.1 protocol ProtocolHTTP Protocol = "http/1.1" // ProtocolHTTP2 is TLS ALPN protocol value used to indicate HTTP2 protocol. ProtocolHTTP2 Protocol = "h2" // ProtocolDefault is default TLS ALPN value. ProtocolDefault Protocol = "" // ProtocolAuth allows dialing local/remote auth service based on SNI cluster name value. ProtocolAuth Protocol = "teleport-auth@" // ProtocolProxyGRPC is TLS ALPN protocol value used to indicate gRPC // traffic intended for the Teleport proxy. ProtocolProxyGRPC Protocol = "teleport-proxy-grpc" // ProtocolMySQLWithVerPrefix is TLS ALPN prefix used by tsh to carry // MySQL server version. ProtocolMySQLWithVerPrefix = Protocol(string(ProtocolMySQL) + "-") // ProtocolTCP is TLS ALPN protocol value used to indicate plain TCP connection. ProtocolTCP Protocol = "teleport-tcp" // ProtocolPingSuffix is TLS ALPN suffix used to wrap connections with // Ping. ProtocolPingSuffix Protocol = "-ping" )
func ProtocolWithPing ¶
ProtocolWithPing receives a protocol and returns it with the Ping protocol suffix.
func ProtocolsWithPing ¶
ProtocolsWithPing receives a list a protocols and returns a list of them with the Ping protocol suffix.
func ToALPNProtocol ¶
ToALPNProtocol maps provided database protocol to ALPN protocol.