Documentation
¶
Overview ¶
Package opa provides a supported-adapter Open Policy Agent policy engine.
Use New with Config when authorization.NewPolicyAuthorizer should delegate provider-neutral policy requests to an OPA endpoint. The adapter maps request input to JSON, reads the configured result key, treats malformed or non-2xx responses as failures, and keeps client-facing errors generic.
This contrib adapter remains outside the stable core API promise. Keep OPA query paths, timeouts, and policy documents application-owned.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client evaluates policies through OPA's REST API.
func (*Client) Evaluate ¶
func (c *Client) Evaluate(ctx context.Context, req ports.PolicyRequest) (ports.PolicyDecision, error)
Evaluate calls OPA with the given policy request.
Click to show internal directories.
Click to hide internal directories.