OCI Trust Policy Selector (oci/trust_policy.go)

doco-cd · internal/source/oci/trust_policy.go · go · Apache-2.0
infra, tag:oci, tag:trust, tag:policy

Utility that returns OCI trust policy overrides only when the deployment source is trusted, otherwise returns empty policy.

// Source: https://github.com/kimdre/doco-cd | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
package oci

import "github.com/kimdre/doco-cd/internal/config"

// SelectTrustPolicyOverride returns deployment-level OCI trust policy overrides
// only when the deployment configuration origin is trusted.
func SelectTrustPolicyOverride(override config.OciTrustPolicyOverride, trusted bool) config.OciTrustPolicyOverride {
	if trusted {
		return override
	}

	return config.OciTrustPolicyOverride{}
}

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key