Documentation
¶
Index ¶
- Variables
- type CaCertMatcher
- type Instance
- func (i *Instance) FulcioURL() string
- func (i *Instance) OidcIssuerURL() string
- func (i *Instance) RekorURL() string
- func (i *Instance) ValidateOIDC() error
- func (i *Instance) ValidateSigner() error
- func (i *Instance) ValidateSigningConfig() error
- func (i *Instance) ValidateTimestamps() error
- func (i *Instance) ValidateVerifier() error
- type InstanceConfig
- type OIDCConfig
- type SigstoreRoots
- type VerifierConfig
Constants ¶
This section is empty.
Variables ¶
var DefaultRoots []byte
Functions ¶
This section is empty.
Types ¶
type CaCertMatcher ¶
type CaCertMatcher func()
type Instance ¶ added in v0.3.2
type Instance struct {
// Embed the tuf options struct
tuf.TufOptions
// SigningConfig holds the official sigstore signing configuration
// (application/vnd.dev.sigstore.signingconfig.v0.2+json).
SigningConfig *root.SigningConfig `json:"-"`
Timestamp bool
// AppendToRekor controls if the signing operation is recorded into the
// transparency log.
AppendToRekor bool `json:"rekor-append"`
DisableSTS bool
// Hide the OIDC options in the CLI --help
HideOIDCOptions bool
// FlagPrefix adds a prefix to the CLI strings, these help grouping them
FlagPrefix string
// OIDCConfig holds the client-side OIDC configuration.
OIDCConfig OIDCConfig `json:"oidc-config"`
// VerifierConfig holds the verification policy options.
VerifierConfig VerifierConfig `json:"verifier-config"`
}
Instance captures the configuration required to talk to a sigstore instance.
func (*Instance) FulcioURL ¶ added in v0.3.2
FulcioURL returns the Fulcio CA URL from the signing config.
func (*Instance) OidcIssuerURL ¶ added in v0.4.0
OidcIssuerURL returns the OIDC issuer URL from the signing config.
func (*Instance) RekorURL ¶ added in v0.3.2
RekorURL returns the Rekor transparency log URL from the signing config.
func (*Instance) ValidateOIDC ¶ added in v0.3.2
ValidateOIDC checks that the OIDC properties are correct
func (*Instance) ValidateSigner ¶ added in v0.3.2
func (*Instance) ValidateSigningConfig ¶ added in v0.4.0
ValidateSigningConfig checks that the instance has a valid signing config.
func (*Instance) ValidateTimestamps ¶ added in v0.3.2
ValidateTimestamps checks that at least one timestamp verification method is set.
func (*Instance) ValidateVerifier ¶ added in v0.3.2
type InstanceConfig ¶
type InstanceConfig struct {
ID string `json:"id"`
IssuerOrg string `json:"issuer-org"`
SigningConfigRaw json.RawMessage `json:"signing-config"`
Instance
}
type OIDCConfig ¶ added in v0.4.0
type OIDCConfig struct {
// RedirectURL defines the URL that the browser will redirect to.
// If the port is set to 0, it will be randomized to a high number
// port before starting the OIDC flow.
RedirectURL string `json:"redirect-url"`
// ClientID is the OIDC client ID to stamp on the tokens.
ClientID string `json:"client-id"`
// ClientSecret is the OIDC client secret.
ClientSecret string `json:"client-secret"`
}
OIDCConfig captures the client-side OIDC configuration for a sigstore instance.
func (*OIDCConfig) Validate ¶ added in v0.4.0
func (oc *OIDCConfig) Validate() error
Validate checks that the required OIDC client fields are set.
type SigstoreRoots ¶
type SigstoreRoots struct {
Roots []InstanceConfig `json:"roots"`
}
func ParseRoots ¶
func ParseRoots(data []byte) (*SigstoreRoots, error)
ParseRoots parses a roots file
func ParseRootsFile ¶
func ParseRootsFile(path string) (*SigstoreRoots, error)
ParseRootsFile parses a sigstore roots file
type VerifierConfig ¶ added in v0.4.0
type VerifierConfig struct {
// Look for a signed timestamp in the cert and verify with the CTLog Auth
RequireCTlog bool `json:"require-ct-log"`
// Verify the cert validity in the transparency log
RequireTlog bool `json:"require-tlog"`
// Verify the certificate validity time with a signed timestamp
RequireSignedTimestamps bool `json:"require-signed-timestamps"`
// Require an observer timestamp for verification
RequireObserverTimestamp bool `json:"require-observer-timestamp"`
}
VerifierConfig captures the verification policy for a sigstore instance.
func (*VerifierConfig) Validate ¶ added in v0.4.0
func (vc *VerifierConfig) Validate() error
Validate checks that at least one timestamp verification method is set.