verifier

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: Apache-2.0 Imports: 45 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithCacheEnabled added in v0.6.14

func WithCacheEnabled(useCache bool) verifierOptsFunc

func WithEnableDebug

func WithEnableDebug(debug bool) verifierOptsFunc

func WithImagePullSecrets

func WithImagePullSecrets(secrets string) verifierOptsFunc

func WithInsecureRegistry

func WithInsecureRegistry(insecureRegistry bool) verifierOptsFunc

func WithMaxCacheSize added in v0.6.14

func WithMaxCacheSize(maxCacheSize int64) verifierOptsFunc

func WithMaxCacheTTL added in v0.6.14

func WithMaxCacheTTL(maxCacheTTL time.Duration) verifierOptsFunc

func WithMaxSignatureAttempts

func WithMaxSignatureAttempts(maxSignatureAttempts int) verifierOptsFunc

func WithPluginConfig

func WithPluginConfig(pluginConfigMap string) verifierOptsFunc

func WithProviderAuthConfigResolver added in v0.2.1

func WithProviderAuthConfigResolver(providerAuthConfigResolver func(context.Context, registry.Reference) (*authn.AuthConfig, error)) verifierOptsFunc

func WithTokenReviewEnabled added in v0.8.5

func WithTokenReviewEnabled(enableTokenReview bool) verifierOptsFunc

Types

type ImageVerifierMetatdata added in v0.8.7

type ImageVerifierMetatdata interface {
	Add(image string, value bool)
	GetAnnotation() map[string]bool
	IsVerified(image string) bool
	GetJSONPatchOperation() string
	GetAnnotationKeyForJSONPatch() string
}

func NewImageVerifierMetatdata added in v0.8.7

func NewImageVerifierMetatdata(annotation map[string]bool) ImageVerifierMetatdata

type Response added in v0.6.6

type Response interface {
	GetResponse() types.ResponseData
	GetImageList() map[string]types.AttestationList
	AddImage(imageRef string, img *types.ImageInfo)
	BuildAttestationList(Attestations []types.AttestationsInfo) error
	VerificationFailed(msg string) (types.ResponseData, error)
	VerificationSucceeded(msg string) (types.ResponseData, error)
}

func NewResponse added in v0.6.6

func NewResponse(log *zap.SugaredLogger, ivm ImageVerifierMetatdata) Response

type Verifier

type Verifier interface {
	// HandleCheckImages is a handler function that takes Kyverno images variable in body and returns JSONPatch compatible object in response
	HandleCheckImages(w http.ResponseWriter, r *http.Request)

	UpdateNotationVerfier() error
	// Shuts down all the factories before exiting
	Stop()
}

func NewVerifier

func NewVerifier(logger *zap.SugaredLogger, opts ...verifierOptsFunc) Verifier

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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