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


##########
hadoop-hdds/framework/src/test/java/org/apache/hadoop/hdds/security/x509/certificate/authority/TestDefaultCAServer.java:
##########
@@ -203,6 +205,78 @@ public void testRequestCertificate() throws Exception {
 
   }
 
+  /**
+   * Tests that a CSR whose subject is longer than the RFC 5280 ub-common-name 
(64), like user@FQDN of a
+   * Kubernetes pod, is signed and the CN is kept.
+   */
+  @Test
+  public void testRequestCertificateWithLongSubject() throws Exception {

Review Comment:
   Added testCAWithLongSubjectSignsCertificate. It sets up a root CA whose CN 
is 79 characters, like a root CA from before Bouncy Castle 1.85 on Kubernetes, 
and has it sign a CSR. It asserts that the issued certificate's issuer equals 
the CA subject, and that PKIX path validation of the certificate against the CA 
as trust anchor passes. As you expected, DefaultApprover copies the issuer from 
the CA's encoded subject, so this works without changes.
   



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