clientauthorizer

package
v0.0.0-...-1bc1da6 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 15 Imported by: 8

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