security

package
v0.0.0-...-7a1c591 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	XFCCHeader = "X-Forwarded-Client-Cert"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AnnotationMissingError

type AnnotationMissingError struct {
	KymaCR     string
	Annotation string
}

func (AnnotationMissingError) Error

func (e AnnotationMissingError) Error() string

type RequestVerifier

type RequestVerifier struct {
	Client client.Client
	Log    logr.Logger
}

func NewRequestVerifier

func NewRequestVerifier(client client.Client) *RequestVerifier

func (*RequestVerifier) Verify

func (v *RequestVerifier) Verify(request *http.Request, watcherEvtObject *types.WatchEvent) error

Verify verifies the given request by fetching the KymaCR given in the request payload and comparing the SAN(subject alternative name) of the certificate with the SKR-domain of the KymaCR. If the request can be verified 'nil' will be returned.

func (*RequestVerifier) VerifySAN

func (v *RequestVerifier) VerifySAN(certificate *x509.Certificate, kymaDomain string) (bool, error)

VerifySAN checks if given domain exists in the SAN information of the given certificate.

Jump to

Keyboard shortcuts

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