title: Basic authentication via nginx ingress controller
body: <p>I am using nginx ingress controller (<a href="https://kubernetes.github.io/ingress-nginx/deploy/" rel="noreferrer">https://kubernetes.github.io/ingress-nginx/deploy/</a>) on AWS. The backend service (kibana from ECK: <a href="https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-operator-config.html" rel="noreferrer">https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-operator-config.html</a>) uses HTTP basic auth mechanics. </p>
  
  <p>Is there a way to tune nginx so that it appends Authorization: Basic header to every request forwarded to my service so that users won't have to type the password?</p>
  
  <p>This solution did not work for me:</p>
  
  <pre><code>nginx.ingress.kubernetes.io/configuration-snippet: |
        more_set_headers "Authorization: Basic encoded_credentals";
  </code></pre>
  
  <p>as I am still being prompted for a password.   </p>