Help us shape the future of Go! Take the 2026 Go Developer Survey

verifier

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Overview

Package verifier implements the /checkimages endpoint called by Kyverno.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*verifier)

Option configures the verifier.

func WithAllowedUsers

func WithAllowedUsers(users []string) Option

func WithCacheEnabled

func WithCacheEnabled(useCache bool) Option

func WithEnableDebug

func WithEnableDebug(debug bool) Option

func WithImagePullSecrets

func WithImagePullSecrets(secrets string) Option

func WithInsecureRegistry

func WithInsecureRegistry(insecureRegistry bool) Option

func WithMaxCacheSize

func WithMaxCacheSize(maxCacheSize int64) Option

func WithMaxCacheTTL

func WithMaxCacheTTL(maxCacheTTL time.Duration) Option

func WithMaxSignatureAttempts

func WithMaxSignatureAttempts(maxSignatureAttempts int) Option

func WithPluginConfig

func WithPluginConfig(pluginConfigMap string) Option

func WithProviderKeychain

func WithProviderKeychain(keychain authn.Keychain) Option

WithProviderKeychain sets the keychain used for registries without an image pull secret (e.g. the ECR credential helper). Resolved credentials are cached per registry, see newCachingKeychain.

func WithTokenReviewAudiences

func WithTokenReviewAudiences(audiences []string) Option

WithTokenReviewAudiences sets TokenReview.Spec.Audiences. Empty means the API server's default audience.

func WithTokenReviewEnabled

func WithTokenReviewEnabled(enableTokenReview bool) Option

type Response

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

func NewResponse(log *zap.SugaredLogger) 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)

	// UpdateNotationVerifier reloads trust policies and trust stores and clears the cache.
	UpdateNotationVerifier() error

	// Stop shuts down the informers and the cache.
	Stop()
}

func NewVerifier

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

Jump to

Keyboard shortcuts

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