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 ¶
- type RegoHandler
- func (h *RegoHandler) CheckBundleDir() error
- func (h *RegoHandler) Evaluate(input infoModel.AzInfo) (rego.ResultSet, error)
- func (h *RegoHandler) HealthCheck() bool
- func (h *RegoHandler) ProcessResults(results rego.ResultSet) *decisionsupportproviders.HexaOpaResult
- func (h *RegoHandler) ReloadRego() error
- func (h *RegoHandler) ValidateBundle() error
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) 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
Click to show internal directories.
Click to hide internal directories.