Skip to content

Commit

Permalink
optional selector field
Browse files Browse the repository at this point in the history
Signed-off-by: Guilherme Cassolato <guicassolato@gmail.com>
  • Loading branch information
guicassolato committed Oct 30, 2024
1 parent 4324134 commit dae8683
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 18 deletions.
4 changes: 2 additions & 2 deletions api/v1beta3/auth_config_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ type PlainIdentitySpec struct {
// Simple path selector to fetch content from the authorization JSON (e.g. 'request.method') or a string template with variables that resolve to patterns (e.g. "Hello, {auth.identity.name}!").
// 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"`
Selector string `json:"selector,omitempty"`

Expression CelExpression `json:"expression,omitempty"`
}
Expand Down Expand Up @@ -447,7 +447,7 @@ type HttpEndpointSpec struct {
// The value can include variable placeholders in the format "{selector}", where "selector" is any pattern supported
// by https://pkg.go.dev/github.com/tidwall/gjson and selects value from the authorization JSON.
// E.g. https://ext-auth-server.io/metadata?p={request.path}
Url string `json:"url"`
Url string `json:"url,omitempty"`

UrlExpression CelExpression `json:"urlExpression,omitempty"`

Expand Down
8 changes: 0 additions & 8 deletions install/crd/authorino.kuadrant.io_authconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2620,8 +2620,6 @@ spec:
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.
type: string
required:
- selector
type: object
priority:
default: 0
Expand Down Expand Up @@ -3125,8 +3123,6 @@ spec:
type: string
urlExpression:
type: string
required:
- url
type: object
rego:
description: |-
Expand Down Expand Up @@ -3587,8 +3583,6 @@ spec:
type: string
urlExpression:
type: string
required:
- url
type: object
metrics:
default: false
Expand Down Expand Up @@ -3890,8 +3884,6 @@ spec:
type: string
urlExpression:
type: string
required:
- url
type: object
metrics:
default: false
Expand Down
8 changes: 0 additions & 8 deletions install/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2887,8 +2887,6 @@ spec:
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.
type: string
required:
- selector
type: object
priority:
default: 0
Expand Down Expand Up @@ -3433,8 +3431,6 @@ spec:
type: string
urlExpression:
type: string
required:
- url
type: object
rego:
description: |-
Expand Down Expand Up @@ -3943,8 +3939,6 @@ spec:
type: string
urlExpression:
type: string
required:
- url
type: object
metrics:
default: false
Expand Down Expand Up @@ -4259,8 +4253,6 @@ spec:
type: string
urlExpression:
type: string
required:
- url
type: object
metrics:
default: false
Expand Down

0 comments on commit dae8683

Please sign in to comment.