Documentation
¶
Index ¶
- Constants
- Variables
- func CosignCachedRoot() string
- func CosignCachedTargets() string
- func DefaultExpires(role string) time.Time
- func GcsRemoteStore(ctx context.Context, bucket string, opts *GcsRemoteOptions, ...) (client.RemoteStore, error)
- func GetEmbeddedRoot() ([]byte, error)
- func GetTarget(ctx context.Context, name string, out client.Destination) error
- func Init(ctx context.Context, altRootBytes []byte, remote client.RemoteStore) error
- func RootClient(ctx context.Context, remote client.RemoteStore, altRoot []byte) (*client.Client, error)
- type ByteDestination
- type FulcioKeyVal
- type GcsRemoteOptions
- type Key
- type Role
- type Root
- type Signature
- type Signed
Constants ¶
View Source
const ( TufRootEnv = "TUF_ROOT" SigstoreNoCache = "SIGSTORE_NO_CACHE" DefaultRemoteRoot = "sigstore-tuf-root" )
TODO(asraa): Configure an environment variable so users can set their own remote outside of an explicit `cosign init` (e.g. when no cache is enabled).
View Source
const ( KeyTypeFulcio = "sigstore-oidc" KeySchemeFulcio = "https://fulcio.sigstore.dev" )
Variables ¶
View Source
var (
KeyAlgorithms = []string{"sha256", "sha512"}
)
Functions ¶
func CosignCachedRoot ¶
func CosignCachedRoot() string
func CosignCachedTargets ¶
func CosignCachedTargets() string
func DefaultExpires ¶
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 GetEmbeddedRoot ¶
func Init ¶
Instantiates the global TUF client. Uses the embedded (by default trusted) root in cosign unless a custom root is provided. This will always perform a remote call to update.
func RootClient ¶
func RootClient(ctx context.Context, remote client.RemoteStore, altRoot []byte) (*client.Client, error)
Gets the global TUF client if the directory exists. This will not make a remote call unless fetch is true.
Types ¶
type ByteDestination ¶
func (*ByteDestination) Delete ¶
func (b *ByteDestination) Delete() error
type FulcioKeyVal ¶
type FulcioKeyVal struct { Identity string `json:"identity"` Issuer string `json:"issuer,omitempty"` }
func GetFulcioKeyVal ¶
func GetFulcioKeyVal(key *Key) (*FulcioKeyVal, error)
type GcsRemoteOptions ¶
type Key ¶
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 ¶
func (*Key) ContainsID ¶
type Root ¶
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 Signed ¶
type Signed struct { Signed json.RawMessage `json:"signed"` Signatures []Signature `json:"signatures"` }
func (*Signed) AddOrUpdateSignature ¶
Click to show internal directories.
Click to hide internal directories.