clientauthorizer

package
Version: v0.0.0-...-6544bcd Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2022 License: Apache-2.0 Imports: 15 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientAuthorizer

type ClientAuthorizer interface {
	IsAuthorized(*tls.ConnectionState) bool
	IsReady() bool
}

func NewAll

func NewAll() ClientAuthorizer

func NewOne

func NewOne(cert []byte) ClientAuthorizer

func NewSubjectNameAndIssuer

func NewSubjectNameAndIssuer(log *logrus.Entry, caBundlePath, clientCertCommonName string) (ClientAuthorizer, error)

NewSubjectNameAndIssuer creates a new instance of ClientAuthorizer which allows connections only if they contain a valid client certificate signed by a CA in `caBundlePath` and the client certificate's CommonName equals `clientCertCommonName`.

Jump to

Keyboard shortcuts

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