You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2023/01/06 09:46:49 UTC

[GitHub] [ozone] ChenSammi commented on a diff in pull request #4149: HDDS-7708. No check for certificate duration config scenarios.

ChenSammi commented on code in PR #4149:
URL: https://github.com/apache/ozone/pull/4149#discussion_r1063284571


##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/security/x509/SecurityConfig.java:
##########
@@ -228,6 +223,44 @@ public SecurityConfig(ConfigurationSource configuration) {
         TimeUnit.MILLISECONDS);
   }
 
+  /**
+   * Check for certificate validity configuration.
+   */
+  private void validateCertificateValidityConfig() {
+    if (maxCertDuration.isNegative() || maxCertDuration.isZero()) {
+      LOG.error("Certificate maxDuration {} should not be zero or negative",

Review Comment:
   Please add the property name in the error message, like this 
   
   String msg = "Property " + HDDS_X509_MAX_DURATION + " should not be zero or negative"; 
   Log.error(msg);
   throw new IllegalArgumentException(msg); 
   



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org