<p>I would like to be able to disable external authorization for a specific path of my App. </p>

<p>Similiar to this SO: <a href="https://stackoverflow.com/questions/54454622/kubernetes-nginx-ingress-disable-basic-auth-for-specific-path">Kubernetes NGINX Ingress: Disable Basic Auth for specific path</a></p>

<p>Only difference is using an external Auth provider (OAuth via Microsoft Azure) and there is a </p>

<p><strong>This is the path that should be reachable by the public</strong></p>

<p><code>/MyPublicPath</code></p>

<p>My ingress.yaml:</p>

<pre><code>apiVersion: extensions/v1beta1 
kind: Ingress
metadata:
  name: myIngressName
  annotations:
    nginx.ingress.kubernetes.io/auth-signin: https://externalprovider/oauth2/sign_in
    nginx.ingress.kubernetes.io/auth-url: https://externalprovider/oauth2/auth
    nginx.ingress.kubernetes.io/auth-request-redirect: https://myapp/context_root/
    nginx.ingress.kubernetes.io/auth-response-headers: X-Auth-Request-User, X-Auth-Request-Email, X-Auth-Request-Access-Token, Set-Cookie, Authorization
spec:
  rules:
  - host: myHostName
    http:
      paths:
      - backend: 
          serviceName: myServiceName
          servicePort: 9080
        path: /
</code></pre>

<p>Can I have it not hit the <a href="https://externalprovider/oauth2/auth" rel="noreferrer">https://externalprovider/oauth2/auth</a> url for just that path? </p>

<p>I've tried using ingress.kubernetes.io/configuration-snippet to set auth_basic to value "off" but that appears to be tied to the basic auth directives not the external ones.</p>

E. Sloss
<p>I had the same problem and I added below snippet code in my ingress.yaml file and its working.</p>
<pre><code>nginx.ingress.kubernetes.io/auth-snippet: | 
    if ( $request_uri = &quot;/nonmember&quot; ) {
        return 200;
    }
</code></pre>
