-
Notifications
You must be signed in to change notification settings - Fork 10k
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
etcd does not resolve TLS DNSname when checking SAN for client transport security certificate #19691
Comments
Hi @xadips, thanks for opening the issue. Can you confirm that you still have this issue using the latest patch version (v3.5.21) from the v3.5 minor? v3.5.9 is almost two years old, and some backports may have fixed the issue. Confirming that it exists in the latest version can help with the triage. Thanks again. |
3.5.9
does not resolve TLS DNSname when checking SAN for client transport security certificate3.5.21
does not resolve TLS DNSname when checking SAN for client transport security certificate
Still present on |
3.5.21
does not resolve TLS DNSname when checking SAN for client transport security certificate
Mentioning etcd version implies that it was regression that happened on it. |
I found this while switching from cfssl generated certificates to vault pki ones, thought there might be issue with new certificates, but I just tested again to confirm. Manually generated a certificate with cfssl for a single member without IP in SAN and encountered the same problem: cfssl gencert -profile=kubernetes -ca=ca.pem
-ca-key=ca_key.pem -config=ca-config.json
-hostname=<hostname>
etcd/etcd-csr.json | cfssljson -bare etcd etcdctl warns about it when trying to access the said member |
It seems not an etcd specific issue, instead it's a generic certificate issue https://serverfault.com/questions/611120/failed-tls-handshake-does-not-contain-any-ip-sans What's the values for the following options,
Does the peer communicate using dns, while client-server communication using IP address? |
Bug report criteria
What happened?
I was trying to migrate etcd cluster member certificates without downtime from from old root CA generated certificates, to ones generated from new root CA. I've combined both CA's into a single trusted bundle that is used in both
peer-transport-security
andclient-transport-security
fortrusted-ca-file
do a rolling restart to make the nodes trust certificates issued from both CA's then start switching member certificates to new ones one member at a time.I use the same certificate for client and peer communication
The old certificates had both DNS and IP SAN of the member
The new certificates had only the DNS SAN of the member
The new certificate did work for peer transport security(when in use with the old certificate for client transport security), but did not work for client transport security throwing warnings:
What did you expect to happen?
Based on documentation since etcd 3.2.0 server resolves TLS DNSNames when checking SAN so I expected the DNS resolution to work for both peer and client certificates but it only worked for peer communication is this expected.
How can we reproduce it (as minimally and precisely as possible)?
Use certificates with only DNS:hostname in SAN field for both peer and client transport security
Anything else we need to know?
Is this behaviour expected for client transport security? If yes, the documentation might be unclear on when the DNS resolution works.
Etcd version (please run commands below)
Etcd configuration (command line flags or environment variables)
The text was updated successfully, but these errors were encountered: