trust

package
v5.3.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPolicyEntries

func AddPolicyEntries(policyPath string, input AddPolicyEntriesInput) error

AddPolicyEntries adds one or more policy entries necessary to implement AddPolicyEntriesInput.

func DefaultPolicyPath

func DefaultPolicyPath(sys *types.SystemContext) string

DefaultPolicyPath returns a path to the default policy of the system.

func RegistriesDirPath

func RegistriesDirPath(sys *types.SystemContext) string

RegistriesDirPath returns a path to registries.d

Types

type AddPolicyEntriesInput

type AddPolicyEntriesInput struct {
	Scope       string // "default" or a docker/atomic scope name
	Type        string
	PubKeyFiles []string // For signature enforcement types, paths to public keys files (where the image needs to be signed by at least one key from _each_ of the files). File format depends on Type.
}

AddPolicyEntriesInput collects some parameters to AddPolicyEntries, primarily so that the callers use named values instead of just strings in a sequence.

type Policy

type Policy struct {
	Transport      string   `json:"transport"`
	Name           string   `json:"name,omitempty"`
	RepoName       string   `json:"repo_name,omitempty"`
	Keys           []string `json:"keys,omitempty"`
	SignatureStore string   `json:"sigstore,omitempty"`
	Type           string   `json:"type"`
	GPGId          string   `json:"gpg_id,omitempty"`
}

Policy describes a basic trust policy configuration

func PolicyDescription

func PolicyDescription(policyPath, registriesDirPath string) ([]*Policy, error)

PolicyDescription returns an user-focused description of the policy in policyPath and registries.d data from registriesDirPath.

Jump to

Keyboard shortcuts

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