mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-26 06:50:36 -05:00
Bumps [github.com/open-policy-agent/opa](https://github.com/open-policy-agent/opa) from 0.70.0 to 1.1.0. - [Release notes](https://github.com/open-policy-agent/opa/releases) - [Changelog](https://github.com/open-policy-agent/opa/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-policy-agent/opa/compare/v0.70.0...v1.1.0) --- updated-dependencies: - dependency-name: github.com/open-policy-agent/opa dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
37 lines
1.4 KiB
Go
37 lines
1.4 KiB
Go
// Copyright 2020 The OPA Authors. All rights reserved.
|
|
// Use of this source code is governed by an Apache2
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// Package bundle provide helpers that assist in the bundle signature verification process
|
|
package bundle
|
|
|
|
import (
|
|
v1 "github.com/open-policy-agent/opa/v1/bundle"
|
|
)
|
|
|
|
// Verifier is the interface expected for implementations that verify bundle signatures.
|
|
type Verifier v1.Verifier
|
|
|
|
// VerifyBundleSignature will retrieve the Verifier implementation based
|
|
// on the Plugin specified in SignaturesConfig, and call its implementation
|
|
// of VerifyBundleSignature. VerifyBundleSignature verifies the bundle signature
|
|
// using the given public keys or secret. If a signature is verified, it keeps
|
|
// track of the files specified in the JWT payload
|
|
func VerifyBundleSignature(sc SignaturesConfig, bvc *VerificationConfig) (map[string]FileInfo, error) {
|
|
return v1.VerifyBundleSignature(sc, bvc)
|
|
}
|
|
|
|
// DefaultVerifier is the default bundle verification implementation. It verifies bundles by checking
|
|
// the JWT signature using a locally-accessible public key.
|
|
type DefaultVerifier = v1.DefaultVerifier
|
|
|
|
// GetVerifier returns the Verifier registered under the given id
|
|
func GetVerifier(id string) (Verifier, error) {
|
|
return v1.GetVerifier(id)
|
|
}
|
|
|
|
// RegisterVerifier registers a Verifier under the given id
|
|
func RegisterVerifier(id string, v Verifier) error {
|
|
return v1.RegisterVerifier(id, v)
|
|
}
|