access

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllowAuthenticated

func AllowAuthenticated(state state.State, r *http.Request) (bool, response.Response)

AllowAuthenticated checks if the request is trusted by extracting access.TrustedRequest from the request context. This handler is used as an access handler by default if AllowUntrusted is false on a rest.EndpointAction.

func Authenticate

func Authenticate(state state.State, r *http.Request, hostAddress string, trustedCerts map[string]x509.Certificate) (bool, error)

Authenticate ensures the request certificates are trusted against the given set of trusted certificates. - Requests over the unix socket are always allowed. - HTTP requests require the TLS Peer certificate to match an entry in the supplied map of certificates.

Types

type ErrInvalidHost

type ErrInvalidHost struct {
	// contains filtered or unexported fields
}

ErrInvalidHost is used to indicate that a request host is invalid.

func (ErrInvalidHost) Unwrap

func (e ErrInvalidHost) Unwrap() error

Unwrap implements xerrors.Unwrap for ErrInvalidHost.

Jump to

Keyboard shortcuts

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