verification

package
v0.9.0-alpha.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL