Authrequest with nginx-ingress annotations

sumanthjoel nginx-forum at
Wed Apr 17 11:17:02 UTC 2019


I am using nginx as the ingress controller in my cluster. My auth-request
setup looks like below:

CLIENT ---> nginx ---> auth_server ----(200)---> original request
auth_server ---- (401)---> login page

I am using nginx-ingress annotations to acheive this.

But, I have a special requirement:
when proxying the request to authentication server, nginx has to add a
custom header towards the auth_server, i.e, I must be able to read the
header inside the auth-server service.
When the authentication inside the auth_server fails, auth_server will add a
custom-header to the response back to nginx-ingress. I want to read this
header and set the value of the header as a parameter for request towards
login page.

Is this possible to acheive using nginx-ingress annotations?


Posted at Nginx Forum:,283824,283824#msg-283824

More information about the nginx mailing list