Documentation
¶
Overview ¶
Package verifiers holds the registry of VSA issuers the verifier can bind to their signing identity: for each known verifier.id, who must have signed the VSA for the id to count as proven rather than merely claimed. It is the counterpart of the builder registry for the verifier named in a Verification Summary Attestation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry is an ordered set of verifiers. Exact-id entries take precedence over prefix entries in lookups.
func LoadEmbedded ¶
LoadEmbedded loads the verifiers compiled into the binary: the official SLSA source workflow under its current and legacy ids.
func New ¶
New returns a registry holding the given verifiers, validated. A later entry with the same id and idMatch replaces an earlier one.
func (*Registry) Add ¶
Add validates v and adds it to the registry, replacing an entry with the same id and idMatch.
func (*Registry) Lookup ¶
Lookup returns the verifier that verifierID names, or nil when the registry does not know it.
type Verifier ¶
type Verifier struct {
// ID is the verifier id as VSAs record it in verifier.id.
ID string `yaml:"id"`
// IDMatch is how ID is compared with verifier.id; exact by default.
IDMatch builders.IDMatch `yaml:"idMatch,omitempty"`
// Title names the verifier for people.
Title string `yaml:"title,omitempty"`
// Description explains what the verifier is and how it is bound.
Description string `yaml:"description,omitempty"`
// Issuer is the OIDC issuer of the verifier's signing certificate.
// With Signer unset, the signer identity is derived from it and
// ID: a sigstore identity from Issuer whose subject starts with
// ID followed by a slash — any workflow of the repository the id
// names, for verifiers whose id is their repository URL.
Issuer string `yaml:"issuer,omitempty"`
// Signer is the identity spec (see sapi.NewIdentityFromSpec) the
// VSA must be signed by, when it cannot be derived from Issuer and
// ID. Naming the exact workflow is the stronger binding.
Signer string `yaml:"signer,omitempty"`
// Ref constrains the ref carried by the signer identity; any by
// default.
Ref builders.RefPolicy `yaml:"ref,omitempty"`
// contains filtered or unexported fields
}
Verifier describes a VSA issuer and the identity that signs the VSAs it issues.
func (*Verifier) AllowsSigner ¶
AllowsSigner reports whether signer is this verifier's signer at a ref its policy allows.
func (*Verifier) MatchesSigner ¶
MatchesSigner reports whether signer, an identity recorded on a verified signature, is this verifier's signer.
func (*Verifier) SignerSpec ¶
SignerSpec returns the identity spec the verifier's VSAs must be signed by: Signer when set, else one derived from Issuer and ID.