Open Marek-Madi opened 11 months ago
This issue is currently awaiting triage.
If Ingress contributors determines this is a relevant issue, they will accept it by applying the triage/accepted
label and provide further guidance.
The triage/accepted
label can be added by org members by writing /triage accepted
in a comment.
What happened: When specified annotation for auth-tls-verify-depth, the number doesn't corespond to actual depth of the client certificate validated
We have client certificate which is 3 levels deep in the CA Chain, meaning - clien_cert <- intermediate1 <- intermediate2 <- CA We expect that when annotation of verify-depth is set to
2
the validation would fail but for some reason it worksWhat you expected to happen: We expect that when annotation of verify-depth is set to
2
the validation would fail but for some reason it works, since the client certificate is in depth of 3I am not sure if this might be the case where in https://github.com/nginx/nginx-tests/blob/7a9e95fdd30729540ee9650be7f991c330367d5b/ssl_verify_depth.t#L145 it says with OpenSSL 1.1.0+ the verify depth behaves differently and checks one more certificate level than it is specified in the depth value
NGINX Ingress controller version (exec into the pod and run nginx-ingress-controller --version.):
Kubernetes version (use
kubectl version
): v1.27.5-gke.200Environment: Google Cloud
Cloud provider or hardware configuration: GCP
OS (e.g. from /etc/os-release):
Kernel (e.g.
uname -a
):How was the ingress-nginx-controller installed: We are using Anthos Config Management with following deployment yaml - https://github.com/kubernetes/ingress-nginx/blob/controller-v1.2.1/deploy/static/provider/cloud/1.21/deploy.yaml
How to reproduce this issue: Deploy ingress object with mTLS enabled with verify depth set to 2
And run curl request to the service using the client certificate which has 2 intermediate CAs in the CA Chain (clien_cert <- intermediate1 <- intermediate2 <- CA)
Anything else we need to know: