Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllowAuthenticated ¶
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.
Click to show internal directories.
Click to hide internal directories.