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

nginx-ingress-controller doesn't respect x509/subjectAltName #884

Closed
roobert opened this issue Jun 20, 2017 · 3 comments
Closed

nginx-ingress-controller doesn't respect x509/subjectAltName #884

roobert opened this issue Jun 20, 2017 · 3 comments
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

Comments

@roobert
Copy link

roobert commented Jun 20, 2017

To reproduce, create an SSL certificate with alternate for the following:

  • host1.example.com
  • host2.example.com

Set the CN to host1.example.com.

Now try and use the certificate with one of the alternate names, e.g:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: test-ingress
  annotations:
    kubernetes.io/ingress.class: "nginx"
spec:
  tls:
    - secretName: certificate-with-altnames
      hosts:
        - host1.example.com
        - host2.example.com

  rules:
    # host1.example.com is value of CN, and one of the alternative names
    - host: host1.example.com
      http:
        paths:
        - path: /
          backend:
            serviceName: test-backend
            servicePort: 8080

    # host2.example.com is one of the subjectAltName's
    - host: host2.example.com
      http:
        paths:
        - path: /
          backend:
            serviceName: test-backend
            servicePort: 8080

In this scenario the controller does not recognise the certificate as valid for host2.example.com and instead prints out the following error:

[...] ssl certificate default/certificate-with-altnames does not contain a common name for host host2.example.com
@aledbf
Copy link
Member

aledbf commented Jun 20, 2017

@roobert right now we are not reading subjectAltName's, only CommonName

@aledbf aledbf added backend/generic help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Jun 20, 2017
@aledbf
Copy link
Member

aledbf commented Jun 20, 2017

Closing. Duplicate of #548

@aledbf aledbf closed this as completed Jun 20, 2017
@aledbf
Copy link
Member

aledbf commented Jun 21, 2017

@roobert please check if the image quay.io/aledbf/nginx-ingress-controller:0.147 solves the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
Projects
None yet
Development

No branches or pull requests

2 participants