<p>I have some internal services (Logging, Monitoring, etc) exposed via nginx-ingress and protected via oauth2-proxy and some identity manager (Okta) behind. We use 2fa for additional security for our users. </p>

<p>This works great for user accounts. It does not work for other systems like external monitoring as we can not make a request with a token or basic auth credentials.</p>

<p>Is there any known solution to enable multiple authentication types in an ingress resource? </p>

<p>Everything I found so far is specific for one authentication process and trying to add basic auth as well did not work. </p>

<p>Current ingress</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    certmanager.k8s.io/cluster-issuer: cert-manager-extra-issuer
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/auth-signin: https://sso-proxy/oauth2/start?rd=https://$host$request_uri
    nginx.ingress.kubernetes.io/auth-url: https://sso-proxy/oauth2/auth

</code></pre>

stvnwrgs
<p>This is simply not an advisable solution. You cannot use multiple authentication types in a single Ingress resource. </p>

<p>The better way to deal with it would be to create separate Ingresses for different authentication types. </p>

<p>I hope it helps. </p>
