constraints

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Constraints

type Constraints struct{}

Constraints is a base approver-policy Approver that is responsible for ensuring incoming requests satisfy the Constraints defined on CertificateRequestPolicies. It is expected that constraints must _always_ be registered for all approver-policy builds.

func (Constraints) Evaluate

Evaluate evaluates whether the given CertificateRequest satisfies the constraints which have been defined in the CertificateRequestPolicy. The request _must_ satisfy _all_ constraints defined in the policy to be permitted by the passed policy. If the request is denied by the constraints an explanation is returned. An error signals that the policy couldn't be evaluated to completion.

func (Constraints) Name

func (c Constraints) Name() string

Name of Approver is "constraints"

func (Constraints) Prepare

func (c Constraints) Prepare(_ context.Context, _ manager.Manager) error

Prepare is a no-op, constraints doesn't need to prepare anything.

func (Constraints) Ready

Ready always returns ready, constraints doesn't have any dependencies to block readiness.

func (Constraints) RegisterFlags

func (c Constraints) RegisterFlags(_ *pflag.FlagSet)

RegisterFlags is a no-op, constraints doesn't need any flags.

func (Constraints) Validate

Validate validates that the processed CertificateRequestPolicy has valid constraint fields defined and there are no parsing errors in the values.

Jump to

Keyboard shortcuts

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