sigstore

package
v1.8.11 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BundleBody

type BundleBody struct {
	APIVersion string     `json:"apiVersion"`
	Kind       string     `json:"kind"`
	Spec       BundleSpec `json:"spec"`
}

type BundleSignature

type BundleSignature struct {
	Content   string            `json:"content"`
	Format    string            `json:"format"`
	PublicKey map[string]string `json:"publicKey"`
}

The following structs are used to go through the payload json objects

type BundleSpec

type BundleSpec struct {
	Data      map[string]map[string]string `json:"data"`
	Signature BundleSignature              `json:"signature"`
}

type Cache

type Cache interface {
	GetSignature(key string) *Item
	PutSignature(Item)
}

Cache defines the behaviors of our cache

func NewCache

func NewCache(maximumAmountCache int) Cache

NewCache creates and returns a new cache

type Item

type Item struct {
	Key   string
	Value []SelectorsFromSignatures
}

Item represents a key-value pair

type MapItem

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

Map for signatures is created

type SelectorsFromSignatures

type SelectorsFromSignatures struct {
	Subject        string
	Content        string
	LogID          string
	IntegratedTime string
}

Data extracted from signature

type Sigstore

type Sigstore interface {
	AttestContainerSignatures(ctx context.Context, status *corev1.ContainerStatus) ([]string, error)
	FetchImageSignatures(ctx context.Context, imageName string) ([]oci.Signature, error)
	SelectorValuesFromSignature(oci.Signature) (*SelectorsFromSignatures, error)
	ExtractSelectorsFromSignatures(signatures []oci.Signature, containerID string) []SelectorsFromSignatures
	ShouldSkipImage(imageID string) (bool, error)
	AddSkippedImages(imageID []string)
	ClearSkipList()
	AddAllowedSubject(issuer string, subject string)
	ClearAllowedSubjects()
	SetRekorURL(rekorURL string) error
	SetLogger(logger hclog.Logger)
	SetEnforceSCT(enforceSCT bool)
}

func New

func New(cache Cache, logger hclog.Logger) Sigstore

Jump to

Keyboard shortcuts

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