-
Notifications
You must be signed in to change notification settings - Fork 270
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
Unable to retrive the requested URL in external auth-server while using auth-url annotation #926
Comments
Hi Guys, Also let me know if anything is the issue is not clear |
Hi, thanks for the detailed report and sorry about the long delay. Yes it's pretty clear and your request makes sense. I'm not sure you can dynamically configure it, anyway a new tag should be issued shortly adding some new headers. |
Hi @jcmoraisjr , I used config-backend ingress annotation to add the requested URL in the request headers.
This configuration works fine, in the endpoint I am able to see X-Auth-Request-Redirect headers set with requested URL. But when I include auth-server in configuration (refer below yaml file for configuration)
Is there any way I can inject config snippet which will be applied to request being send to auth-server |
Hi @rohan-97 this issue was in the backlog longer than it should. After digging a bit more into a way to implement that, I just realized that you can use the headers config key to configure additional headers: haproxy-ingress.github.io/headers: |
X-Original-Host %[var(req.host)]
X-Original-Method %[capture.req.method]
X-Auth-Request-Redirect %[capture.req.uri] The only drawback is that it is backend scoped, which means that you cannot add these headers only for some hosts/paths that target a backend, all other hosts/paths targeting the same backend will see these same headers. Planning to add a specific auth-external config which is path scoped, as well as a few more doc about this tip, because of that I'll leave this opened. |
Description of the problem
Hello, I am trying to integrate an external authentication server using ha-proxy ingress using the auth-url annotation.
the authentication server(Flask server) expects following information to be present in the headers.
Expected behavior
It is expected that when ha-proxy ingress controller creates a request to auth-server, it adds all the headers from the client request and also adds above 3 values in headers.
However when I set up the auth-url, I am able to fetch the basic auth headers and client IP but unable to identify the url which was requested in headers.
Following are the headers received at auth-server by ha-proxy ingress controller
requested url : http://localhost/endpoint
I tried same thing with nginx-ingress controller and I get following headers in same auth-server from nginx-controller
refer X-Auth-Request-Redirect or X-Original-Url header in nginx headers,
we get the requested URL in the headers, however this information is not present in headers added by haproxy ingress.
It is very important to identify which URL was requested so that auth-server can perform custom authentication based on accessed URL.
Steps to reproduce the problem
CURL syntax:
Environment information
HAProxy Ingress version:
v0.13
Ingress objects:
Ingress yaml file
haproxy-ingress-values.yaml
The text was updated successfully, but these errors were encountered: