auth

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2020 License: MIT Imports: 2 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEmptyTLSConfig added in v1.1.0

func NewEmptyTLSConfig() *tls.Config

func NewTLSConfigForServer added in v1.1.0

func NewTLSConfigForServer(serverName string) *tls.Config

func NewTLSConfigWithCertsAndCAs added in v1.1.0

func NewTLSConfigWithCertsAndCAs(certificates []tls.Certificate, rootCAs *x509.CertPool, serverName string) *tls.Config

func NewTLSConfigWithClientAuthAndCAs added in v1.1.0

func NewTLSConfigWithClientAuthAndCAs(clientAuth tls.ClientAuthType, certificates []tls.Certificate, clientCAs *x509.CertPool) *tls.Config

Types

type TLS

type TLS struct {
	Enabled bool `yaml:"enabled"`

	// CertPath and KeyPath are optional depending on server
	// config, but both fields must be omitted to avoid using a
	// client certificate
	CertFile string `yaml:"certFile"`
	KeyFile  string `yaml:"keyFile"`

	CaFile string `yaml:"caFile"` //optional depending on server config
	// If you want to verify the hostname and server cert (like a wildcard for cass cluster) then you should turn this on
	// This option is basically the inverse of InSecureSkipVerify
	// See InSecureSkipVerify in http://golang.org/pkg/crypto/tls/ for more info
	EnableHostVerification bool `yaml:"enableHostVerification"`

	ServerName string `yaml:"serverName"`

	// optional inline base64 encoded versions of the above files
	// Either BOTH CertData and KeyData must be supplied as base64 encoded values,
	// or NEITHER of them should be supplied as base64 encoded values.
	// (e.g. it is not supported to specify 'CertFile' and 'KeyData' or vice-versa)
	CertData string `yaml:"certData"`
	KeyData  string `yaml:"keyData"`
	CaData   string `yaml:"caData"`
}

TLS describe TLS configuration (for Kafka, Cassandra, SQL)

Jump to

Keyboard shortcuts

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