Documentation
¶
Index ¶
- type Signer
- func (s *Signer) SignEnvelope(envelope *sdsse.Envelope, funcs ...options.SignOptFn) error
- func (s *Signer) SignMessage(data []byte, funcs ...options.SignOptFn) (*sbundle.Bundle, error)
- func (s *Signer) SignMessageToDSSE(message []byte, funcs ...options.SignOptFn) (*sdsse.Envelope, error)
- func (s *Signer) SignStatement(data []byte, funcs ...options.SignOptFn) (*sbundle.Bundle, error)
- func (s *Signer) SignStatementToDSSE(data []byte, funcs ...options.SignOptFn) (*sdsse.Envelope, error)
- func (s *Signer) WriteBundle(bndl *sbundle.Bundle, w io.Writer) error
- func (s *Signer) WriteDSSEEnvelope(env *sdsse.Envelope, w io.Writer) error
- type Verifier
- func (v *Verifier) VerifyBundle(bundlePath string, fnOpts ...options.VerificationOptFunc) (*verify.VerificationResult, error)
- func (v *Verifier) VerifyDSSE(path string, keys []key.PublicKeyProvider, ...) (*key.VerificationResult, error)
- func (v *Verifier) VerifyInlineBundle(bundleContents []byte, fnOpts ...options.VerificationOptFunc) (*verify.VerificationResult, error)
- func (v *Verifier) VerifyParsedBundle(bndl *sbundle.Bundle, fnOpts ...options.VerificationOptFunc) (*verify.VerificationResult, error)
- func (v *Verifier) VerifyParsedDSSE(env *sdsse.Envelope, keys []key.PublicKeyProvider, ...) (*key.VerificationResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Signer ¶
func NewSigner ¶
func NewSigner() *Signer
NewSigner creates a new signer and initializes it with the default sigstore roots embedded in the package.
func (*Signer) SignEnvelope ¶ added in v0.2.0
SignEnvelope signs an existing envelope with the specified keys
func (*Signer) SignMessage ¶
SignMessage signs a payload as a message digest and returns a sigstore bundle. When called multiple times on the same Signer, the keypair, OIDC token, and Fulcio certificate are reused across calls.
func (*Signer) SignMessageToDSSE ¶ added in v0.2.0
func (s *Signer) SignMessageToDSSE(message []byte, funcs ...options.SignOptFn) (*sdsse.Envelope, error)
SignMessageToDSSE wraps a payload in a dsse envelope and signs it.
func (*Signer) SignStatement ¶
SignStatement signs an in-toto attestation using the configured options and returns a sigstore bundle. The signing process will try to obtain the signer identity in this order:
- Try the configured ambient credentials providers (currently only the GitHub actions plugin is supported).
- If a terminal is detected, it will start the sigstore oidc flow in a browser.
- If no terminal is detected, it will start the sigstore device flow.
When called multiple times on the same Signer, the keypair, OIDC token, and Fulcio certificate are reused across calls.
func (*Signer) SignStatementToDSSE ¶ added in v0.2.0
func (s *Signer) SignStatementToDSSE(data []byte, funcs ...options.SignOptFn) (*sdsse.Envelope, error)
SignStatementToDSSE is a convenience method around SignMessageToDSSE that sets the in-toto payload type autmatically
func (*Signer) WriteBundle ¶
WriteBundle writes the bundle JSON to
type Verifier ¶
func NewVerifier ¶
func NewVerifier(fnOpts ...options.VerifierOptFunc) *Verifier
NewVerifier creates a new verifier with default options and verifiers
func (*Verifier) VerifyBundle ¶
func (v *Verifier) VerifyBundle(bundlePath string, fnOpts ...options.VerificationOptFunc) (*verify.VerificationResult, error)
VerifyBundle verifies a signed bundle containing a dsse envelope
func (*Verifier) VerifyDSSE ¶ added in v0.2.0
func (v *Verifier) VerifyDSSE(path string, keys []key.PublicKeyProvider, fnOpts ...options.VerificationOptFunc) (*key.VerificationResult, error)
VerifyDSSE parses a DSSE envelope from a file and returns it
func (*Verifier) VerifyInlineBundle ¶
func (v *Verifier) VerifyInlineBundle(bundleContents []byte, fnOpts ...options.VerificationOptFunc) (*verify.VerificationResult, error)
VerifyBundle verifies a signed bundle containing a dsse envelope
func (*Verifier) VerifyParsedBundle ¶
func (v *Verifier) VerifyParsedBundle(bndl *sbundle.Bundle, fnOpts ...options.VerificationOptFunc) (*verify.VerificationResult, error)
VerifyParsedBundle verifies a sigstore bundle with the provided options
func (*Verifier) VerifyParsedDSSE ¶ added in v0.2.0
func (v *Verifier) VerifyParsedDSSE(env *sdsse.Envelope, keys []key.PublicKeyProvider, fnOpts ...options.VerificationOptFunc) (*key.VerificationResult, error)
VerifyParsedDSSE verifies an already parsed DSSE envelope
Directories
¶
| Path | Synopsis |
|---|---|
|
_examples
|
|
|
attestation
command
|
|
|
dsse-sign
command
|
|
|
dsse-verify
command
|
|
|
message
command
|
|
|
api
|
|
|
bundlefakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
|
dssefakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
|
internal
|
|
|
providers/github
Package github implements a client to requesta short lived token from github actions.
|
Package github implements a client to requesta short lived token from github actions. |
|
providers/gitlab
Package gitlab implements a client to read OIDC tokens from GitLab CI using the SIGSTORE_ID_TOKEN environment variable.
|
Package gitlab implements a client to read OIDC tokens from GitLab CI using the SIGSTORE_ID_TOKEN environment variable. |