From c3fa020de2eb923b07b038b027aa02fafcaaf3f3 Mon Sep 17 00:00:00 2001 From: Alex Snaps Date: Mon, 14 Oct 2024 16:24:26 -0400 Subject: [PATCH] Adding the new seams Signed-off-by: Alex Snaps --- api/v1beta2/auth_config_types.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/api/v1beta2/auth_config_types.go b/api/v1beta2/auth_config_types.go index 098ceb05..d10268c7 100644 --- a/api/v1beta2/auth_config_types.go +++ b/api/v1beta2/auth_config_types.go @@ -164,13 +164,21 @@ type PatternExpression struct { Value string `json:"value,omitempty"` } +type CelExpression struct { + Expression string `json:"expression,omitempty"` +} + +type CelPredicate struct { + Predicate string `json:"predicate,omitempty"` +} + // +kubebuilder:validation:Enum:=eq;neq;incl;excl;matches type PatternExpressionOperator string type PatternExpressionOrRef struct { PatternExpression `json:",omitempty"` PatternRef `json:",omitempty"` - + CelPredicate `json:",omitempty"` // A list of pattern expressions to be evaluated as a logical AND. All []UnstructuredPatternExpressionOrRef `json:"all,omitempty"` // A list of pattern expressions to be evaluated as a logical OR. @@ -199,6 +207,8 @@ type ValueOrSelector struct { // Any pattern supported by https://pkg.go.dev/github.com/tidwall/gjson can be used. // The following Authorino custom modifiers are supported: @extract:{sep:" ",pos:0}, @replace{old:"",new:""}, @case:upper|lower, @base64:encode|decode and @strip. Selector string `json:"selector,omitempty"` + + Expression CelExpression `json:",omitempty"` } type CommonEvaluatorSpec struct {