Skip to content

Commit

Permalink
Merge pull request #508 from Kuadrant/cel-expression-descriptions
Browse files Browse the repository at this point in the history
Descriptions for the CEL fields of the API
  • Loading branch information
guicassolato authored Nov 18, 2024
2 parents 25c9702 + ae8448d commit ca4e46e
Show file tree
Hide file tree
Showing 3 changed files with 326 additions and 0 deletions.
8 changes: 8 additions & 0 deletions api/v1beta3/auth_config_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ type PatternExpression struct {
type CelExpression string

type CelPredicate struct {
// A Common Expression Language (CEL) expression that evaluates to a boolean.
// String expressions are supported (https://pkg.go.dev/github.com/google/cel-go/ext#Strings).
Predicate string `json:"predicate,omitempty"`
}

Expand Down Expand Up @@ -206,6 +208,8 @@ type ValueOrSelector struct {
// 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"`

// A Common Expression Language (CEL) expression that evaluates to a value.
// String expressions are supported (https://pkg.go.dev/github.com/google/cel-go/ext#Strings).
Expression CelExpression `json:"expression,omitempty"`
}

Expand Down Expand Up @@ -411,6 +415,8 @@ type PlainIdentitySpec struct {
// 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"`

// A Common Expression Language (CEL) expression that evaluates to a value that represents an identity.
// String expressions are supported (https://pkg.go.dev/github.com/google/cel-go/ext#Strings).
Expression CelExpression `json:"expression,omitempty"`
}

Expand Down Expand Up @@ -449,6 +455,8 @@ type HttpEndpointSpec struct {
// E.g. https://ext-auth-server.io/metadata?p={request.path}
Url string `json:"url,omitempty"`

// A Common Expression Language (CEL) expression that evaluates to a string endpoint URL of the HTTP service to call.
// String expressions are supported (https://pkg.go.dev/github.com/google/cel-go/ext#Strings).
UrlExpression CelExpression `json:"urlExpression,omitempty"`

// HTTP verb used in the request to the service. Accepted values: GET (default), POST.
Expand Down
Loading

0 comments on commit ca4e46e

Please sign in to comment.