Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultExpires(role string) time.Time
- func GcsRemoteStore(ctx context.Context, bucket string, opts *GcsRemoteOptions, ...) (client.RemoteStore, error)
- func Initialize(ctx context.Context, mirror string, root []byte) error
- func NewSigstoreTufRepo(t *testing.T, root TestSigstoreRoot) (tuf.LocalStore, *tuf.Repo)
- type FulcioKeyVal
- type GcsRemoteOptions
- type Key
- type MetadataStatus
- type Role
- type Root
- type RootStatus
- type Signature
- type Signed
- type StatusKind
- type TUF
- type TargetFile
- type TestSigstoreRoot
- type UsageKind
Constants ¶
View Source
const ( DefaultRemoteRoot = "sigstore-tuf-root" TufRootEnv = "TUF_ROOT" SigstoreNoCache = "SIGSTORE_NO_CACHE" )
View Source
const ( KeyTypeFulcio = "sigstore-oidc" KeySchemeFulcio = "https://fulcio.sigstore.dev" )
Variables ¶
View Source
var (
KeyAlgorithms = []string{"sha256", "sha512"}
)
Functions ¶
func DefaultExpires ¶ added in v1.3.0
func GcsRemoteStore ¶
func GcsRemoteStore(ctx context.Context, bucket string, opts *GcsRemoteOptions, client *storage.Client) (client.RemoteStore, error)
A remote store for TUF metadata on GCS.
func Initialize ¶ added in v1.5.0
func NewSigstoreTufRepo ¶ added in v1.8.0
func NewSigstoreTufRepo(t *testing.T, root TestSigstoreRoot) (tuf.LocalStore, *tuf.Repo)
This creates a new sigstore TUF repo whose signers can be used to create dynamic signed Rekor entries.
Types ¶
type FulcioKeyVal ¶ added in v1.3.0
type FulcioKeyVal struct { Identity string `json:"identity"` Issuer string `json:"issuer,omitempty"` }
func GetFulcioKeyVal ¶ added in v1.3.1
func GetFulcioKeyVal(key *Key) (*FulcioKeyVal, error)
type GcsRemoteOptions ¶
type Key ¶ added in v1.3.0
type Key struct { Type string `json:"keytype"` Scheme string `json:"scheme"` Algorithms []string `json:"keyid_hash_algorithms,omitempty"` Value json.RawMessage `json:"keyval"` // contains filtered or unexported fields }
func FulcioVerificationKey ¶ added in v1.3.0
func (*Key) ContainsID ¶ added in v1.3.0
type MetadataStatus ¶ added in v1.8.0
type Root ¶ added in v1.3.0
type Root struct { Type string `json:"_type"` SpecVersion string `json:"spec_version"` Version int `json:"version"` Expires time.Time `json:"expires"` Keys map[string]*Key `json:"keys"` Roles map[string]*Role `json:"roles"` Namespace string `json:"namespace"` ConsistentSnapshot bool `json:"consistent_snapshot"` }
type RootStatus ¶ added in v1.6.0
type RootStatus struct { Local string `json:"local"` Remote string `json:"remote"` Metadata map[string]MetadataStatus `json:"metadata"` Targets []string `json:"targets"` }
JSON output representing the configured root status
func GetRootStatus ¶ added in v1.6.0
func GetRootStatus(ctx context.Context) (*RootStatus, error)
GetRootStatus gets the current root status for info logging
type Signed ¶ added in v1.3.0
type Signed struct { Signed json.RawMessage `json:"signed"` Signatures []Signature `json:"signatures"` }
func (*Signed) AddOrUpdateSignature ¶ added in v1.3.0
type StatusKind ¶ added in v1.6.0
type StatusKind int
const ( UnknownStatus StatusKind = iota Active Expired )
func (StatusKind) MarshalText ¶ added in v1.6.0
func (s StatusKind) MarshalText() ([]byte, error)
func (StatusKind) String ¶ added in v1.6.0
func (s StatusKind) String() string
func (*StatusKind) UnmarshalText ¶ added in v1.6.0
func (s *StatusKind) UnmarshalText(text []byte) error
type TUF ¶ added in v1.5.0
type TUF struct {
// contains filtered or unexported fields
}
func (*TUF) Close ¶ added in v1.5.0
Close closes the local TUF store. Should only be called once per client.
func (*TUF) GetTargetsByMeta ¶ added in v1.6.0
func (t *TUF) GetTargetsByMeta(usage UsageKind, fallbacks []string) ([]TargetFile, error)
Get target files by a custom usage metadata tag. If there are no files found, use the fallback target names to fetch the targets by name.
type TargetFile ¶ added in v1.6.0
type TargetFile struct { Target []byte Status StatusKind }
type TestSigstoreRoot ¶ added in v1.8.0
type TestSigstoreRoot struct { Rekor signature.Verifier FulcioCertificate *x509.Certificate }
type UsageKind ¶ added in v1.6.0
type UsageKind int
func (UsageKind) MarshalText ¶ added in v1.6.0
func (*UsageKind) UnmarshalText ¶ added in v1.6.0
Click to show internal directories.
Click to hide internal directories.