remote

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionInfo

type ConnectionInfo struct {
	HostPort string `yaml:"hostPort" flags:"server,host:port of kmgm server to connect to"`

	CACertificateFile string `yaml:"caCertificateFile" flags:"cacert,Path to a CA certificate to verify the kmgm server,,path"`
	PinnedPubKey      string `yaml:"pinnedPubKey" flags:"pinnedpubkey,SHA256 hash of the kmgm server publickey"`
	AllowInsecure     bool   `yaml:"allowInsecure,omitempty" flags:"insecure,skip kmgm server certificate verification (hidden),,hidden"`

	ClientCertificateFile string `yaml:"clientCertificateFile" flags:"client-cert,Path to a client certificate to present to the kmgm server,,path"`
	ClientPrivateKeyFile  string `yaml:"clientPrivateKeyFile" flags:"client-priv,Path to the private key corresponding to the client certificate,,path"`

	AccessToken string `yaml:"accessToken,omitempty" flags:"token,Token string to use for server authentication when bootstrapping"`
}

func (ConnectionInfo) Dial

func (cinfo ConnectionInfo) Dial(ctx context.Context, l *zap.Logger) (*grpc.ClientConn, error)

func (ConnectionInfo) DialPubKeys added in v0.3.0

func (cinfo ConnectionInfo) DialPubKeys(ctx context.Context, l *zap.Logger) (*grpc.ClientConn, map[string]struct{}, error)

func (ConnectionInfo) TransportCredentials

func (cinfo ConnectionInfo) TransportCredentials(l *zap.Logger) (*TransportCredentials, error)

type TransportCredentials

type TransportCredentials struct {
	PinnedPubKey string
	PeerPubKeys  map[string]struct{}
	// contains filtered or unexported fields
}

TransportCredentials is grpc.tlsCreds + pubkey pinning support.

func NewTransportCredentials

func NewTransportCredentials(c *tls.Config, pinnedpubkey string) *TransportCredentials

func (*TransportCredentials) ClientHandshake

func (c *TransportCredentials) ClientHandshake(ctx context.Context, authority string, rawConn net.Conn) (net.Conn, credentials.AuthInfo, error)

func (*TransportCredentials) Clone

func (*TransportCredentials) Info

func (*TransportCredentials) OverrideServerName

func (c *TransportCredentials) OverrideServerName(serverNameOverride string) error

func (*TransportCredentials) ServerHandshake

func (c *TransportCredentials) ServerHandshake(rawConn net.Conn) (net.Conn, credentials.AuthInfo, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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