ingress-nginx: nginx basic auth some secret names doesn't work

Is this a request for help?: no What keywords did you search in NGINX Ingress controller issues before filing this one? (If you have found any duplicates, you should instead reply there.): basic auth, 503

Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT

If this is a BUG REPORT, please:

  • Fill in as much of the template below as you can. If you leave out information, we can’t help you as well.

NGINX Ingress controller version: nginx-ingress-controller:0.10.2-stable

Kubernetes version (use kubectl version): Client Version: version.Info{Major:“1”, Minor:“8”, GitVersion:“v1.8.5”, GitCommit:“cce11c6a185279d037023e02ac5249e14daa22bf”, GitTreeState:“clean”, BuildDate:“2017-12-07T16:16:03Z”, GoVersion:“go1.8.3”, Compiler:“gc”, Platform:“darwin/amd64”} Server Version: version.Info{Major:“1”, Minor:“8”, GitVersion:“v1.8.5”, GitCommit:“cce11c6a185279d037023e02ac5249e14daa22bf”, GitTreeState:“clean”, BuildDate:“2017-12-07T16:05:18Z”, GoVersion:“go1.8.3”, Compiler:“gc”, Platform:“linux/amd64”}

Environment:

  • Cloud provider or hardware configuration: AWS
  • OS (e.g. from /etc/os-release): Kops default images

What happened:

When I enable basic auth then it works well. but it doesn’t work for some secret names.

when I try site-auth-domaincfgtest02 as secret name it doesn’t work but when I try site-auth-domaincfgtest01 then it works.

it doesn’t work means you get 503 error and nginx template says:

            # Location denied. Reason: unexpected error reading secret bilal/site-auth-domaincfgtest02: secret bilal/site-auth-domaincfgtest02 was not found
            return 503;

What you expected to happen: it should work for all secret names.

How to reproduce it (as minimally and precisely as possible):

enable basic auth for an ingress and give site-auth-domaincfgtest01 as secret name and create that secret also

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 19 (10 by maintainers)

Commits related to this issue

Most upvoted comments

@bilalyasar please check 0.13.0