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

Ext_Authz: Allow extension to append or modify original query string params #3266

Closed
gsagula opened this issue May 1, 2018 · 4 comments · Fixed by #18009
Closed

Ext_Authz: Allow extension to append or modify original query string params #3266

gsagula opened this issue May 1, 2018 · 4 comments · Fixed by #18009
Assignees
Labels
area/ext_authz enhancement Feature requests. Not bugs or questions. help wanted Needs help!

Comments

@gsagula
Copy link
Member

gsagula commented May 1, 2018

Description:
Recently I started exploring the idea of introducing Envoy proxy to one of our Hootsuite projects which depends on the ext_authz filter and enhancements being done by myself on behalf of Datawire. One of the goals of the wip enhancements, is to ensure that headers metadata sent from an external authorization service are injected in the original client's request before it gets sent to the upstream service.

Unfortunately, for all our use cases, the ability to manipulate only header's metadata is not sufficient. In some situations, we will also need to append query string params to the original URI before dispatching it to the upstream service. For example,

  1. Downstream client calls https://domain.api.org/foo.
  2. The request reaches the filter and then the HTTP context gets sent to the authorization service.
  3. If the authorization service responds with OK, a map with query string params is sent along with the response. E.g., [(bar, 123)]
  4. The extension modifies the original URI and sends it as following https://domain.api.org/foo?bar=123 to the upstream service.

Thanks,
Gabriel.

@mattklein123 mattklein123 added enhancement Feature requests. Not bugs or questions. help wanted Needs help! labels May 2, 2018
@josheinhorn
Copy link

Have you tried returning a modified :path pseudo-header in the ext_authz response (e.g. :path: /foo?bar=123)? I haven't tried this myself, just an idea.

@esmet
Copy link
Contributor

esmet commented Jan 27, 2021

/assign @esmet

@esmet
Copy link
Contributor

esmet commented Jan 27, 2021

I'll give this a try

@derekargueta
Copy link
Member

FYI I'm working on #2098 which will refactory query params a bit with its own class, so this might be easier after that issue is done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ext_authz enhancement Feature requests. Not bugs or questions. help wanted Needs help!
Projects
None yet
6 participants