MatchContext.RegexpCaptureGroups empty with glob Match strategy behavior ? #933
-
May be I missed something in my rule config but I need to retreive element of the request to forward it to KETO authorizer but... using here under rule with glob : - id: allow-test
upstream:
url: http://host.docker.internal:8080/
preserve_host: true
match:
url: http://localhost:4455/<{*,*/*}>
methods:
- GET
authenticators:
- handler: noop
authorizer:
handler: allow
mutators:
- handler: header
config:
headers:
X-Groups: "{{ printIndex .MatchContext.RegexpCaptureGroups 0 }}"
`
----- Request Start ----->
Method: GET
Path: /foo/bar
Headers:
X-Groups:
X-Header: map[Accept:[*/*] User-Agent:[curl/7.77.0]]
X-Method: GET
X-Url: http://localhost:4455/foo/bar
<----- Request End ----- |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Yes. You're right. Oathkeeper does not support using .MatchContext.RegexpCaptureGroups using glob matching strategy. oathkeeper/rule/engine_glob.go Line 35 in 69ad28f
Consider using regexp matching strategy |
Beta Was this translation helpful? Give feedback.
Yes. You're right. Oathkeeper does not support using .MatchContext.RegexpCaptureGroups using glob matching strategy.
oathkeeper/rule/engine_glob.go
Line 35 in 69ad28f
Consider using regexp matching strategy