Documentation
¶
Overview ¶
Package verification provides the utilities for handling verification related logic like Trust Stores and Trust Policies. Few utilities include loading, parsing, and validating trust policies and trust stores.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidatePolicyDocument ¶
func ValidatePolicyDocument(policyDoc *PolicyDocument) error
ValidatePolicyDocument validates a policy document according to it's version's rule set. if any rule is violated, returns an error
Types ¶
type PolicyDocument ¶
type PolicyDocument struct {
// Version of the policy document
Version string `json:"version"`
// TrustPolicies include each policy statement
TrustPolicies []TrustPolicy `json:"trustPolicies"`
}
PolicyDocument represents a trustPolicy.json document
type TrustPolicy ¶
type TrustPolicy struct {
// Name of the policy statement
Name string `json:"name"`
// RegistryScopes that this policy statement affects
RegistryScopes []string `json:"registryScopes"`
// SignatureVerification setting for this policy statement
SignatureVerification string `json:"signatureVerification"`
// TrustStore this policy statement uses
TrustStore string `json:"trustStore,omitempty"`
// TrustedIdentities this policy statement pins
TrustedIdentities []string `json:"trustedIdentities,omitempty"`
}
TrustPolicy represents a policy statement in the policy document
Click to show internal directories.
Click to hide internal directories.