Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrGetEvaluator = errors.New("no Evaluator found in request context")
)
Functions ¶
Types ¶
type AuditEvaluatorOptions ¶ added in v1.14.2
type AuditLabels ¶ added in v1.14.0
type AuditOptions ¶ added in v1.14.0
type AuditOptions struct {
AggregationID string
}
type EvaluateOptions ¶ added in v1.10.0
type EvaluateOptions struct { Logger logging.Logger Audit AuditOptions }
func (EvaluateOptions) GetLogger ¶ added in v1.10.0
func (e EvaluateOptions) GetLogger() logging.Logger
type Evaluator ¶
type Evaluator interface { // retrieve the RondConfig used to generate the evaluator Config() core.RondConfig // EvaluateResponsePolicy evaluate request policy. In the response, it is specified if the // request is allowed and the request query (if filter generation is requested) EvaluateRequestPolicy(ctx context.Context, input core.Input, options *EvaluateOptions) (PolicyResult, error) // EvaluateResponsePolicy evaluate response policy. The response is the response // value returned by the policy. EvaluateResponsePolicy(ctx context.Context, input core.Input, options *EvaluateOptions) ([]byte, error) }
Warning: This interface is experimental, and it could change with breaking also in rond patches. Do not use outside this repository until it is ready.
func NewWithConfig ¶
func NewWithConfig(ctx context.Context, opaModuleConfig *core.OPAModuleConfig, rondConfig core.RondConfig, options *Options) (Evaluator, error)
type EvaluatorOptions ¶ added in v1.10.0
type EvaluatorOptions struct { MongoClient custom_builtins.IMongoClient EnablePrintStatements bool EnableAuditTracing bool AuditTracingOptions AuditEvaluatorOptions }
type OASEvaluatorFinder ¶
func NewFromOAS ¶
func NewFromOAS(ctx context.Context, opaModuleConfig *core.OPAModuleConfig, oas *openapi.OpenAPISpec, options *Options) (OASEvaluatorFinder, error)
type Options ¶
type Options struct { EvaluatorOptions *EvaluatorOptions Metrics *metrics.Metrics Logger logging.Logger AuditLabels AuditLabels }
type PolicyResult ¶
Click to show internal directories.
Click to hide internal directories.