yandrey321 commented on code in PR #12114:
URL: https://github.com/apache/ozone/pull/12114#discussion_r4675291425


##########
hadoop-hdds/framework/src/test/java/org/apache/hadoop/hdds/security/x509/certificate/client/TestDnCertificateClientInit.java:
##########
@@ -145,6 +148,23 @@ public void testInitDatanode(boolean pvtKeyPresent, 
boolean pubKeyPresent,
     }
   }
 
+  /** A user@FQDN longer than 64 characters, as on Kubernetes, is replaced by 
dn@UUID in the CSR. */
+  @Test
+  public void testCsrCommonNameForLongHostName() throws Exception {

Review Comment:
   Added a long-host-name test for each remaining certificate type:
   - OM: TestOmCertificateClientInit#testCsrCommonNameForLongHostName, giving 
om@<OM UUID>.
   - Recon: new TestReconCertificateClient#testCsrCommonNameForLongHostName, 
giving recon@<Recon ID>.
   - SCM sub-CA CSR: new TestSCMCertificateClient#testSubCaCsrCommonName, 
giving scm-sub@<SCM ID>.
   - SCM root CA at init: TestSCMCertificateClient#testRootCaCommonName, giving 
scm@<SCM ID>.
   - SCM root CA at rotation: TestHASecurityUtils#testRootCaCommonName, giving 
scm@<SCM ID>.
   
   The SCM tests also check that a short host name keeps the usual CN.
   
   The OM and Recon tests read the CN through a small CsrTestUtil in the 
hdds-server-framework test-jar. Neither module declares Bouncy Castle PKIX, and 
the dependency analyzer fails the build if their tests use it directly.
   



-- 
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]

Reply via email to