oathkeeper
oathkeeper copied to clipboard
Support working with query string and JSON body
Preflight checklist
- [X] I could not find a solution in the existing issues, docs, nor discussions.
- [X] I agree to follow this project's Code of Conduct.
- [X] I have read and am following this repository's Contribution Guidelines.
- [ ] This issue affects my Ory Cloud project.
- [ ] I have joined the Ory Community Slack.
- [ ] I am signed up to the Ory Security Patch Newsletter.
Describe your problem
Support working with query string and JSON body
Describe your ideal solution
- Mutating and hydrating query string and JSON body (e.g. adding/replacing/removing a query string parameter or a JSON body path)
- Extracting data from query string and JSON body for keto_engine_acp_ory (e.g. data from a query string parameter or a JSON body path)
- Support autherizer rules for query string parameters and JSON body paths (e.g. allowing or disallowing specific values)
Workarounds or alternatives
Version
Additional Context
No response
Any updates on that? It seems like #843 is related to this. We are more interesting in query params right now, will a PR will be accepted here?
I found a workaround for query params:
{{ .MatchContext.URL.Query.Get \"a\" }}
No code change is requires in oathkeeper to support it, just the power of Go templates 💪
I found a workaround for query params:
{{ .MatchContext.URL.Query.Get \"a\" }}
No code change is requires in oathkeeper to support it, just the power of Go templates muscle
Like this idea: @omerlh Did you find any issues with this at scale?
Nope, this working pretty well for us
Have you had a chance to get the way how to extract some values from original request body?
If you use the remote
authorizer the full request body is sent to this service so you can use the request body for authZ. We built a small service that handle authZ so it also handles this part.