authclient

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: 12 Imported by: 0

Documentation

Overview

Package authclient contains common code for creating an auth server client which may use SSH tunneling through a proxy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(ctx context.Context, cfg *Config) (*auth.Client, error)

Connect creates a valid client connection to the auth service. It may connect directly to the auth server, or tunnel through the proxy.

Types

type Config

type Config struct {
	// TLS holds credentials for mTLS.
	TLS *tls.Config
	// SSH is client SSH config.
	SSH *ssh.ClientConfig
	// AuthServers is a list of possible auth or proxy server addresses.
	AuthServers []utils.NetAddr
	// Log sets the logger for the client to use.
	Log logrus.FieldLogger
	// CircuitBreakerConfig is the configuration for the auth client circuit breaker.
	CircuitBreakerConfig breaker.Config
	// DialTimeout determines how long to wait for dialing to succeed before aborting.
	DialTimeout time.Duration
	// DialOpts define options for dialing the client connection.
	DialOpts []grpc.DialOption
	// Insecure turns off TLS certificate verification when enabled.
	Insecure bool
	// Resolver is used to identify the reverse tunnel address when connecting via
	// the proxy.
	Resolver reversetunnelclient.Resolver
}

Config holds configuration parameters for connecting to the auth service.

Jump to

Keyboard shortcuts

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