Closed JoshVanL closed 4 years ago
@JoshVanL: GitHub didn't allow me to request PR reviews from the following users: amit-handda.
Note that only jetstack members and repo collaborators can review this PR, and authors cannot review their own PRs.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: JoshVanL
The full list of commands accepted by this bot can be found here.
The pull request process is described here
Thank you very much @JoshVanL
LGTM
/unassign /assign @JoshVanL
Thanks for the review @simonswine, I have updated those and will create an issue now.
/unassign /assign @simonswine
Thanks @JoshVanL
/lgtm
@JoshVanL thanks for the work into this. I just reviewed the extra-user-headers code more thoroughly. I dont have a particular need for following scenario, currently. just wanted to raise it, for closure.
I thought through --extra-user-headers
param we could specify req-header=extra-impersonation-header
and oidc-proxy
will map the incoming request header req-header:value1
to Impersonate-Extra-extra-impersonation-header: value1
. does it seem useful ?
Thanks again.
No problem @amit-handda.
What would the use case for this be? I guess to dynamically add user information based on each request? All the headers get passed through as is so I would like to see a compelling use case for it first.
This PR adds the flags:
--extra-user-headers
which takes a list of key value pairs, separated by a comma, where keys may have multiple values. These are then appended to the impersonation extra user info, which are passed as headers to proxied requests.--extra-user-header-client-ip
which is will enable the proxy to append the source client address that made the request as an extra impersonation user info header.This PR also included e2e tests to encapsulate these flags by using a "fake apiserver". This is just a simple echo server that will respond with the identical body and headers so that we can test what is getting proxied.
I am quite happy with how this is working generally however am not certain with some of the naming of flags and would like some feedback.
/assign @simonswine /cc @amit-handda
fixes #125