policy

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: BSD-3-Clause Imports: 15 Imported by: 8

Documentation

Overview

Package policy locates and parses a JSON policy file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load added in v0.15.0

func Load(policyLocation, pubkeyLocation, signatureLocation string) error

Load reads the specified policy file. If pubkey and signature files are also set, then load them as well. Note that the pubkey and signature files need to be set together (i.e., either they are both set or neither is set).

func Measure added in v0.10.0

func Measure() error

Measure measures the policy file.

func Verify added in v0.15.0

func Verify() error

Verify verifies the policy file using the public key and signature.

func VerifyPubkey added in v0.15.0

func VerifyPubkey(hashBytes []byte) error

VerifyPubkey verifies the public key file against the provided hash.

Types

type Policy

type Policy struct {
	Config     config.Config
	Collectors []measurement.Collector
	Launcher   launcher.Launcher
	EventLog   eventlog.EventLog
}

Policy describes the policy used to drive the security engine.

The policy is stored as a JSON file.

func Parse added in v0.15.0

func Parse() (*Policy, error)

Parse accepts a JSON file as input, parses it into a well defined Policy structure and returns a pointer to the Policy structure.

Jump to

Keyboard shortcuts

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