OAuth2 with Nginx Ingress Controller

Hi all.
Don’t really know if I’m in the right place, I’ve never used an external Auth provider before.
I have a small k8s cluster that have a few ingress croutes configured.
None of them have authentication, but I wanted to protect these routes.
Instead of programming everything myself, I would like to add Auth0 to work with Nginx Ingress Controller. I’ve seen in the documentation that Nginx requires two annotations:

nginx.ingress.kubernetes.io/auth-url: "https://$host/oauth2/auth"
nginx.ingress.kubernetes.io/auth-signin: "https://$host/oauth2/start?rd=$escaped_request_uri"

But I don’t understand where can I get these addresses from Auth0 to make it work like a provider.
I understand this is very broad, so any pointers to the right direction are more than welcome.

Thanks a lot.

2 Likes

Hi @crafthouse
I am facing a similar problem, maybe it is the same one.

I want to authorize the user when interacts with the backend. I was able to authenticate in the frontend, but when I try to authorize in the backend I get the following error (this happens in the k8s cluster, on my local auth0 is working). Maybe it is not needed have auth0 configuration in the ingress-nginx controller, but I am not able to authorize the user in the backend because I get the following error.

TypeError [ERR_INVALID_ARG_TYPE]: The “url” argument must be of type string. Received undefined

Sorry, it is not an answer, but I think we are facing the same problem.