Disabling HTTP Basic auth for requests from specific ips in k8s ingress Currently I have a webpage which is freely accessible from certain networks an requires HTTP basic auth otherwise. This behaviour is set in the nginx config. It looks something like this:
geo $authentication {
    default &quot;Authentication required&quot;;
    SOME-IP &quot;off&quot;;
    SOME-NETWORK1 &quot;off&quot;;
    SOME-NETWORK2 &quot;off&quot;; 
}

...
auth_basic $authentication;
...

Now I want to move this webpage to a k8s cluster under ingress-nginx ingress controller. As I can see from the docs it has support for basic auth but provides no ways to allow access from specific ips/networks. Is there a way/another ingress controller/tool to configure said behaviour?
The thing I was looking for was external-auth in ingress-nginx. I created a simple service with nodejs which took over all the basic-auth logic. Then I used an external link to this service in k8s annotations for restricted resources.
annotation snippet:
  annotations:
    nginx.ingress.kubernetes.io/auth-url: http://service-name.default.svc.cluster.local:3000/auth