yandrey321 commented on code in PR #12114:
URL: https://github.com/apache/ozone/pull/12114#discussion_r4675294501
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/security/OMCertificateClient.java:
##########
@@ -94,6 +94,8 @@ public CertificateSignRequest.Builder configureCSRBuilder()
// isn't a hostname either, so omit username.
subject = hostname;
}
+ subject = CertificateSignRequest.commonName(subject,
Review Comment:
Agreed, that's the one behavior change for OM, and I kept it on purpose. The
bare-host-name branch only runs when the CSR has no DNS SAN. Since HDDS-16034,
that means neither the local addresses nor the local host have a canonical name
that is a valid RFC 1123 DNS name. By-name TLS to that OM then has no valid
name to match, and clients connect by IP, which is in the IP SAN.
The CN fallback could only help a host name that is both invalid as a DNS
name and longer than 64 characters. Keeping it would mean issuing a CN over 64
characters, which this PR is meant to avoid.
TestOmCertificateClientInit#testCsrCommonNameForLongHostName now covers the
long-host-name case. I can add a short note on this in the OMCertificateClient
comment if you'd like.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]