Documentation
¶
Index ¶
- Constants
- Variables
- func CanonicalPackageSignaturePayload(sig pluginpkg.PackageSignature) ([]byte, error)
- func SignatureForPackage(pkg pluginpkg.Package, keyID string, publisherID string, pluginID string, ...) (pluginpkg.PackageSignature, error)
- type Ed25519Verifier
- func (v Ed25519Verifier) AssessExternalPackageSignature(ctx context.Context, req host.ExternalPackageSignatureAssessmentRequest) (registry.SignatureAssessment, error)
- func (v Ed25519Verifier) AssessExternalPackageSignatureFreshness(ctx context.Context, req host.ExternalPackageSignatureFreshnessRequest) (registry.SignatureAssessment, error)
- func (v Ed25519Verifier) VerifyPackageTrust(ctx context.Context, req host.PackageTrustVerificationRequest) (host.PackageTrustVerificationResult, error)
- type KeyLookupRequest
- type Keyring
- type SigningKey
- type StaticKeyring
Constants ¶
View Source
const AlgorithmEd25519 = pluginpkg.PackageSignatureAlgorithmEd25519
Variables ¶
View Source
var ( ErrKeyringRequired = errors.New("package signing keyring is required") ErrKeyNotFound = errors.New("package signing key not found") ErrKeyRevoked = errors.New("package signing key is revoked") ErrPublicKeyInvalid = errors.New("package signing public key is invalid") ErrSignatureRequired = errors.New("package signature is required") ErrUnsupportedAlgorithm = errors.New("package signature algorithm is unsupported") ErrSignatureInvalid = errors.New("package signature is invalid") )
Functions ¶
func CanonicalPackageSignaturePayload ¶
func CanonicalPackageSignaturePayload(sig pluginpkg.PackageSignature) ([]byte, error)
func SignatureForPackage ¶
Types ¶
type Ed25519Verifier ¶
func (Ed25519Verifier) AssessExternalPackageSignature ¶ added in v0.6.8
func (v Ed25519Verifier) AssessExternalPackageSignature(ctx context.Context, req host.ExternalPackageSignatureAssessmentRequest) (registry.SignatureAssessment, error)
AssessExternalPackageSignature classifies signature evidence without turning optional signature verification into an installation gate. Integrity failures are returned as explicit closed states; only dependency failures use the unavailable state.
func (Ed25519Verifier) AssessExternalPackageSignatureFreshness ¶ added in v0.6.8
func (v Ed25519Verifier) AssessExternalPackageSignatureFreshness(ctx context.Context, req host.ExternalPackageSignatureFreshnessRequest) (registry.SignatureAssessment, error)
func (Ed25519Verifier) VerifyPackageTrust ¶
func (v Ed25519Verifier) VerifyPackageTrust(ctx context.Context, req host.PackageTrustVerificationRequest) (host.PackageTrustVerificationResult, error)
type KeyLookupRequest ¶
type Keyring ¶
type Keyring interface {
LookupPackageSigningKey(ctx context.Context, req KeyLookupRequest) (SigningKey, error)
}
type SigningKey ¶
type SigningKey struct {
Algorithm string `json:"algorithm"`
KeyID string `json:"key_id"`
PublisherID string `json:"publisher_id,omitempty"`
PluginID string `json:"plugin_id,omitempty"`
PublicKey ed25519.PublicKey `json:"-"`
Revoked bool `json:"revoked,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
}
type StaticKeyring ¶
type StaticKeyring struct {
Keys []SigningKey
}
func (StaticKeyring) LookupPackageSigningKey ¶
func (k StaticKeyring) LookupPackageSigningKey(_ context.Context, req KeyLookupRequest) (SigningKey, error)
Click to show internal directories.
Click to hide internal directories.