fapifta commented on code in PR #4032:
URL: https://github.com/apache/ozone/pull/4032#discussion_r1041719792


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/security/x509/certificate/client/DefaultCertificateClient.java:
##########
@@ -1060,4 +1065,37 @@ public long getLocalCrlId() {
   public void setLocalCrlId(long crlId) {
     this.localCrlId = crlId;
   }
+
+  @Override
+  public synchronized KeyStoresFactory getServerKeyStoresFactory()
+      throws CertificateException {
+    if (serverKeyStoresFactory == null) {
+      serverKeyStoresFactory = SecurityUtil.getServerKeyStoresFactory(
+          securityConfig, this, true);
+    }
+    return serverKeyStoresFactory;
+  }
+
+  @Override
+  public KeyStoresFactory getClientKeyStoresFactory(boolean mutualAuth)
+      throws CertificateException {
+    Preconditions.checkArgument(mutualAuth,

Review Comment:
   If this precondition we want to keep for now, I would suggest to move this 
check to the method in SecurityUtil, and also perform the check for the 
serverkeystorefactory getter, or just simply hardwire there mutual auth without 
giving the option to choose via parameter until we extend support for non-mtls 
cases.



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