Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Descriptions for the CEL fields of the API #508

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading