opaHandler

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package opaHandler is used by the hexaAuthZen server package to process OPA rego based decisions in an all-in-one demonstration deployment. When an AuthZen decision request is received, the request is parsed and transformed into an OPA decision request which this handler processes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RegoHandler

type RegoHandler struct {
	Tracer *topdown.BufferTracer
	// contains filtered or unexported fields
}

func NewRegoHandler

func NewRegoHandler(bundleDir string) (*RegoHandler, error)

NewRegoHandler instantiate a new OPA processor instance for making policy decisions.

Parameters: bundleDir is the path to a directory containing hexa policy to be evaluated along with hexaPolicy.rego

func NewRegoHandlerWithValidation added in v1.1.0

func NewRegoHandlerWithValidation(bundleDir string,
	policyModelFile string,
	defaultNamespace string,

) (*RegoHandler, error)

NewRegoHandlerWithValidation instantiates a new OPA processor instance for making policy decisions.

func (*RegoHandler) CheckBundleDir

func (h *RegoHandler) CheckBundleDir() error

func (*RegoHandler) Evaluate

func (h *RegoHandler) Evaluate(input infoModel.AzInfo) (rego.ResultSet, error)

func (*RegoHandler) HealthCheck

func (h *RegoHandler) HealthCheck() bool

func (*RegoHandler) ProcessResults

func (h *RegoHandler) ProcessResults(results rego.ResultSet) *decisionsupportproviders.HexaOpaResult

func (*RegoHandler) ReloadRego

func (h *RegoHandler) ReloadRego() error

func (*RegoHandler) ValidateBundle added in v0.69.0

func (h *RegoHandler) ValidateBundle() error

Jump to

Keyboard shortcuts

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