Skip to content

Commit

Permalink
Descriptions for the CEL fields of the API
Browse files Browse the repository at this point in the history
Signed-off-by: Guilherme Cassolato <[email protected]>
  • Loading branch information
guicassolato committed Nov 15, 2024
1 parent 25c9702 commit ae8448d
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 ae8448d

Please sign in to comment.