Documentation ¶
Index ¶
- func CreateSecret(ctx context.Context, k8sClient client.Client, attester *rodev1alpha1.Attester, ...) (secret *corev1.Secret, err error)
- func DeleteSecret(ctx context.Context, k8sClient client.Client, attester *rodev1alpha1.Attester) error
- func NewAttestWrapper(log logr.Logger, delegate occurrence.Creator, lister occurrence.Lister, ...) occurrence.Creator
- type AttestRequest
- type AttestResponse
- type Attester
- type Lister
- type Policy
- type Signer
- type VerifyRequest
- type Violation
- type ViolationError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateSecret ¶ added in v0.3.1
func CreateSecret(ctx context.Context, k8sClient client.Client, attester *rodev1alpha1.Attester, signer Signer) (secret *corev1.Secret, err error)
CreateSecret creates a Kubernetes secret for the attester using the OpenPGP keys from signer
func DeleteSecret ¶ added in v0.2.0
func DeleteSecret(ctx context.Context, k8sClient client.Client, attester *rodev1alpha1.Attester) error
DeleteSecret deletes the Kubernetes secret for an attester resource
func NewAttestWrapper ¶
func NewAttestWrapper(log logr.Logger, delegate occurrence.Creator, lister occurrence.Lister, attesterLister Lister, attEventManager attesteventmanager.AttestEventManager) occurrence.Creator
NewAttestWrapper creates an Creator that also performs attestation
Types ¶
type AttestRequest ¶
type AttestRequest struct { ResourceURI string Occurrences []*grafeas.Occurrence }
AttestRequest contains request for attester
type AttestResponse ¶
type AttestResponse struct {
Attestation *grafeas.Occurrence
}
AttestResponse contains response from attester
type Attester ¶
type Attester interface { Attest(ctx context.Context, req *AttestRequest) (*AttestResponse, error) Verify(ctx context.Context, req *VerifyRequest) error String() string }
Attester for performing attestation. returns `ok` if attestation created
type Policy ¶
type Policy interface { Evaluate(context.Context, interface{}) []*Violation Serialize(out io.Writer) error }
Policy is the interface for managing policy
type Signer ¶
type Signer interface { Sign(string) (string, error) Verify(string) (string, error) KeyID() string SerializeKeys() ([]byte, error) SerializePublicKey() ([]byte, error) String() string }
Signer is the interface for managing gpg signing
func NewSignerFromKeys ¶ added in v0.3.1
Construct Signer from existing OpenPGP keys
type VerifyRequest ¶
type VerifyRequest struct {
Occurrence *grafeas.Occurrence
}
VerifyRequest contains request for attester
type Violation ¶
Violation describes a violation
func NewViolation ¶
func NewViolation(raw interface{}) *Violation
NewViolation creates new violation from raw val
type ViolationError ¶ added in v0.2.0
type ViolationError struct {
Violations []*Violation
}
ViolationError is a slice of Violations
func (ViolationError) Error ¶ added in v0.2.0
func (ve ViolationError) Error() string