-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
CN missmatch in Securing nginx example #33169
Comments
I confirmed that this is reproducible and your suggestion LGTM. I searched for "nginxsvc" in kubernetes/website repo, but found nothing. So it seems that we have to replace all the "nginxsvc" strings with "my-nginx" in kubernetes/examples repo. 😊 |
Thanks @jihoon-seo , will send a PR to examples repo. |
Maybe we should leave the examples repo as is, and update the website repo? |
Duplicated by #35697 |
Duplicated by #34322 |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
This issue has not been updated in over 1 year, and should be re-triaged. You can:
For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/ /remove-triage accepted |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
This is still valuable IMO. For people who will take up the issue - please note that you need to be making changes to the k/website repo and NOT the examples repo. /help |
@divya-mohan0209: 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-sigs/prow repository. |
I'd like to help with this. However, I noticed there's no mention of "nginxsvc" in the Hence, I'm a bit confused about what changes to do in the website repo. Can you guide me more on what kind of help you're looking for? @sftim Should I replace the occurrence of (Just for context, https://kubernetes.io/docs/tutorials/services/connect-applications-service/ links to https://github.com/kubernetes/examples/tree/master/staging/https-nginx/) |
Hi @ArvindParekh, thank you for volunteering! The changes to be made to the k/website repo would be to replace my-nginx with nginxsvc. Also, the 54 replacements that you mention on the page include file names. Therefore, the fix for this issue will not be through a simple find-and-replace operation. You will need to ensure that the replacement is for the relevant entries only. Our aim is to ensure that once you make the relevant fixes to the YAML files on this page, you should be able to run |
I understand. Thank you for helping out, Divya. I'll start working on it. |
In the page - https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/#securing-the-service
there are two methods provided, to create certificate for setting up nginx with SSL:
In method 1, the subj used is CN=nginxsvc/O=nginxsvc and in method 2 its /CN=my-nginx/O=my-nginx
Further down the document, to access the site without SSL error following command is provided:
kubectl exec curl-deployment-1515033274-1410r -- curl https://my-nginx --cacert /etc/nginx/ssl/tls.crt
This command works fine if the certificate is generated using method 2. However it will give following error if method 1 is used:
kubectl exec curl-deployment-948555475-7mnx9 -- curl https://my-nginx --cacert /etc/nginx/ssl/tls.crt
curl: (51) SSL: certificate subject name 'nginxsvc' does not match target host name 'my-nginx'
command terminated with exit code 51
The subj can be changed in https://github.com/kubernetes/examples/blob/master/staging/https-nginx/Makefile to match my-nginx, however I am not sure if it would impact other examples.
Any suggestions/comments?
The text was updated successfully, but these errors were encountered: