You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I'm not entirely sure whether this would be an implementation that should be handled by error-pages or ingress-nginx, but allow me to explain.
Let's say you're using forward-auth with nginx (for instance with Authentik's forward-auth proxy provider); and you're using error-pages as your defaultBackend. I've discovered that when your authentication backend is unreachable (i.e.: The deployment is stuck and hasn't registered it's endpoint with the Kubernetes apiserver yet), nginx will 'think' of the request as something it has to pass on to it's default backend.
However, since the container responds with HTTP 200, no matter which page you load; nginx will assume this as an 'okay' to the authentication reqeuest, allowing traffic to flow to your backend application without any authentication.
I would like to use this issue to discuss whether it's desireable for the container to return status codes matching the situation; or whether this should be handled by ingress-nginx instead.
(Or in case my config contains something absolutely stupid I'd be happy to hear that as well :) )
Steps to reproduce
Deploy ingress-nginx with the configuration mentioned below; with error-pages as the defaultBackend.
Deploy a simple app with the auth-url annotations set.
Is there an existing issue for this?
Describe the bug
So I'm not entirely sure whether this would be an implementation that should be handled by error-pages or ingress-nginx, but allow me to explain.
Let's say you're using forward-auth with nginx (for instance with Authentik's forward-auth proxy provider); and you're using error-pages as your
defaultBackend
. I've discovered that when your authentication backend is unreachable (i.e.: The deployment is stuck and hasn't registered it's endpoint with the Kubernetes apiserver yet), nginx will 'think' of the request as something it has to pass on to it's default backend.However, since the container responds with HTTP 200, no matter which page you load; nginx will assume this as an 'okay' to the authentication reqeuest, allowing traffic to flow to your backend application without any authentication.
I would like to use this issue to discuss whether it's desireable for the container to return status codes matching the situation; or whether this should be handled by ingress-nginx instead.
(Or in case my config contains something absolutely stupid I'd be happy to hear that as well :) )
Steps to reproduce
error-pages
as the defaultBackend.Configuration files
Relevant log output
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: