transportv1

package
v0.0.0-...-5c79d48 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2024 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

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

GetClusterDetails returns the cluster details as seen by this service to the client.

func (*Service) ProxyCluster

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL