Skip to content
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

TLS Client-Side authentication #2287

Closed
Drupi opened this issue Apr 3, 2018 · 10 comments
Closed

TLS Client-Side authentication #2287

Drupi opened this issue Apr 3, 2018 · 10 comments

Comments

@Drupi
Copy link

Drupi commented Apr 3, 2018

Is this a request for help? (If yes, you should use our troubleshooting guide and community support channels, see https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/.):

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.):


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

BUG

NGINX Ingress controller version:
0.12.0

Kubernetes version (use kubectl version):
1.10

Environment:

  • Cloud provider or hardware configuration: Azure
  • OS (e.g. from /etc/os-release): Debian
  • Kernel (e.g. uname -a):
  • Install tools: acs-engine
  • Others:

What happened:
even after I provide the tls certificate and annotations in ingress
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/auth-tls-secret: "default/caingress"
nginx.ingress.kubernetes.io/auth-tls-verify-client: "on"
nginx.ingress.kubernetes.io/auth-tls-verify-depth: "3"
ingress.kubernetes.io/force-ssl-redirect: "true"

the client-side auth is not working -it's allow access through browser
What you expected to happen:
When I do curl --insecure https://URL I should get:

<title>400 No required SSL certificate was sent</title>

400 Bad Request

No required SSL certificate was sent
nginx/1.11.12

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

Anything else we need to know:
It's working on this version of nginx:
quay.io/aledbf/nginx-ingress-controller:0.89

@aledbf
Copy link
Member

aledbf commented Apr 3, 2018

@Drupi I think your issue is related to the annotations prefix. Make sure this are the annotations are

nginx.ingress.kubernetes.io/auth-tls-secret: "default/caingress"
nginx.ingress.kubernetes.io/auth-tls-verify-client: "on"
nginx.ingress.kubernetes.io/auth-tls-verify-depth: "3"
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"

and you are using the latest version of the ingress controller.

@Drupi
Copy link
Author

Drupi commented Apr 3, 2018

Ok, I done it but still I'm able to reach the probe with curl --insecure.

@Drupi
Copy link
Author

Drupi commented Apr 4, 2018

So, currently is not working on official image, at least i'm not so strong in the force to configure it. I used the image from. Quay.io/aledbf and it is working perfect.

@Drupi Drupi closed this as completed Apr 4, 2018
@Drupi Drupi reopened this Apr 4, 2018
@lszymik
Copy link

lszymik commented Apr 5, 2018

I am also affected by that issue. Yesterday, I was able to get it running with use of this image:
image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.11.0
Do you know if a next release will have it fixed?

@aledbf
Copy link
Member

aledbf commented Apr 5, 2018

@Drupi @lszymik this is currently fixed in master #2270
Next release is scheduled for next week.

@lszymik
Copy link

lszymik commented Apr 5, 2018

@aledbf Thank you very much. It is a really great news. Cheers

@aledbf aledbf closed this as completed Apr 10, 2018
@ChiZhangCZ
Copy link

Hi, I know this had been closed for a while but I have the same issue running kubernetes on AWS with NGINX Ingress controller version: 0.21.0. Exec'ing into the controller pod shows all the configurations have been applied but I still don't get a 400 error when navigation to the host without a certificate

@joeherm
Copy link

joeherm commented Apr 22, 2019

@ChiZhangCZ Did you ever figure this out?

@nimish
Copy link

nimish commented Nov 28, 2019

This is happening to me, as of the very latest nginx-ingress controller. I'm able to somehow bypass the cert check.

@ChiZhangCZ
Copy link

Just an update on this, my issue was that my load balancer was not configured for TCP passthrough, meaning the certificate resolution was happening at the loadbalancer level, and not actually being handled by the ingress controller. Apologies for the late response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants