-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changing nginx.ingress.kubernetes.io/auth-tls-match-cn value is ignored #10915
Comments
|
/triage needs-information |
How to reproduceCreate minikube cluster
Install nginx ingress in minikube
As of this writing, minikube installs ingress-nginx 1.9.4. In my production cluster we are using 1.9.5. The behaviour is the same however. Install sample app and create ingress
|
There is no diff in nginx.conf before and after changing the value of
The logs before changing the value and after chaning the value including a request with curl are attached. Before changing the value: After changing the value: And here the resulting configuration (after changing the value, please not that the CN value is still testclient and not falseclient): |
@martinbfrey this is fantastic information /tiage accepted Since you posted that the changed CN is not reflected in the nginx.conf until a restart of the pod, I suspect that the same thing happens if vanilla non-kubernetes nginx reverseproxy was in place. However this means that a deep dive discussion has to occur with a nginx expert and a developer on this project or with your involvement. We have community meetings as schedule seen here https://github.com/kubernetes/community/tree/master/sig-network#meetings I request you join a meeting to make some progress on this. |
/triage accepted |
/help |
@longwuyuan: GuidelinesPlease ensure that the issue body includes answers to the following questions:
For more details on the requirements of such an issue, please see here and ensure that they are met. If this request no longer meets these requirements, the label can be removed In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/assign |
I think the Equal check of the authtls annotation is missing a comparison for MatchCN. |
/assign |
What happened:
We run an ingress with client certificate check.
Clients with a certifcate matching the CN can access the ingress, clients with another CN or no certificate can't access - as expected.
If we change the value of
nginx.ingress.kubernetes.io/auth-tls-match-cn
, the clients with the now not matching CN can still access. Clients with the new, matching CN don't have access. It looks like the Ingress is ignoring changes of thenginx.ingress.kubernetes.io/auth-tls-match-cn
value. After a controller restart, the ingress works as expected.The changed annotations look like:
What you expected to happen:
Changes of
nginx.ingress.kubernetes.io/auth-tls-match-cn
are used by the ingress without controller restart.NGINX Ingress controller version (exec into the pod and run nginx-ingress-controller --version.):
Kubernetes version (use
kubectl version
):Environment:
uname -a
):kubectl version
kubectl get nodes -o wide
helm ls -A | grep -i ingress
helm -n <ingresscontrollernamespace> get values <helmreleasename>
All ingresses have the same version and are installed with helm
kubectl describe ingressclasses
kubectl -n <appnamespace> get all,ing -o wide
kubectl -n <appnamespace> describe ing <ingressname>
If applicable, then, your complete and exact curl/grpcurl command (redacted if required) and the reponse to the curl/grpcurl command with the -v flag
Clients get a 403 HTTP code
Others:
When applying the change of the
nginx.ingress.kubernetes.io/auth-tls-match-cn
value, we observe the following controller log. The log covers a section where we changed the value from an invalid CN to the valid one. The clients still get a 403 response even after the reload. After restarting the controller, we see 200 responses onlyHow to reproduce this issue:
nginx.ingress.kubernetes.io/auth-tls-match-cn
to something different than the valid CNAnything else we need to know:
No.
The text was updated successfully, but these errors were encountered: