Documentation ¶
Index ¶
- type ConnectionMonitor
- type Dialer
- type ServerConfig
- type Service
- func (s *Service) GetClusterDetails(context.Context, *transportv1pb.GetClusterDetailsRequest) (*transportv1pb.GetClusterDetailsResponse, error)
- func (s *Service) ProxyCluster(stream transportv1pb.TransportService_ProxyClusterServer) error
- func (s *Service) ProxySSH(stream transportv1pb.TransportService_ProxySSHServer) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionMonitor ¶
type ConnectionMonitor interface {
MonitorConn(ctx context.Context, authCtx *authz.Context, conn net.Conn) (context.Context, net.Conn, error)
}
ConnectionMonitor monitors authorized connections and terminates them when session controls dictate so.
type Dialer ¶
type Dialer interface { DialSite(ctx context.Context, cluster string, clientSrcAddr, clientDstAddr net.Addr) (net.Conn, error) DialHost(ctx context.Context, clientSrcAddr, clientDstAddr net.Addr, host, port, cluster string, checker services.AccessChecker, agentGetter teleagent.Getter, singer agentless.SignerCreator) (net.Conn, error) }
Dialer is the interface that groups basic dialing methods.
type ServerConfig ¶
type ServerConfig struct { // FIPS indicates whether the cluster if configured // to run in FIPS mode. FIPS bool // Logger provides a mechanism to log output. Logger logrus.FieldLogger // Dialer is used to establish remote connections. Dialer Dialer // SignerFn is used to create an [ssh.Signer] for an authenticated connection. SignerFn func(authzCtx *authz.Context, clusterName string) agentless.SignerCreator // ConnectionMonitor is used to monitor the connection for activity and terminate it // when conditions are met. ConnectionMonitor ConnectionMonitor // LocalAddr is the local address of the service. LocalAddr net.Addr // contains filtered or unexported fields }
ServerConfig holds creation parameters for Service.
func (*ServerConfig) CheckAndSetDefaults ¶
func (c *ServerConfig) CheckAndSetDefaults() error
CheckAndSetDefaults ensures required parameters are set and applies default values for missing optional parameters.
type Service ¶
type Service struct { transportv1pb.UnimplementedTransportServiceServer // contains filtered or unexported fields }
Service implements the teleport.transport.v1.TransportService RPC service.
func NewService ¶
func NewService(cfg ServerConfig) (*Service, error)
NewService constructs a new Service from the provided ServerConfig.
func (*Service) GetClusterDetails ¶
func (s *Service) GetClusterDetails(context.Context, *transportv1pb.GetClusterDetailsRequest) (*transportv1pb.GetClusterDetailsResponse, error)
GetClusterDetails returns the cluster details as seen by this service to the client.
func (*Service) ProxyCluster ¶
func (s *Service) ProxyCluster(stream transportv1pb.TransportService_ProxyClusterServer) error
ProxyCluster establishes a connection to a cluster and proxies the connection over the stream. The client must send the first request with the cluster name before the connection is established.
func (*Service) ProxySSH ¶
func (s *Service) ProxySSH(stream transportv1pb.TransportService_ProxySSHServer) (err error)
ProxySSH establishes a connection to a host and proxies both the SSH and SSH Agent protocol over the stream. The first request from the client must contain a valid dial target before the connection can be established.