You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by gi...@git.apache.org on 2017/09/27 20:44:12 UTC

[GitHub] jmark99 commented on a change in pull request #301: ACCUMULO-2907 Invalidate "this may not be applicable for your security setup" warning from initialize

jmark99 commented on a change in pull request #301: ACCUMULO-2907 Invalidate "this may not be applicable for your security setup" warning from initialize
URL: https://github.com/apache/accumulo/pull/301#discussion_r141462552
 
 

 ##########
 File path: server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
 ##########
 @@ -644,6 +644,25 @@ private String getRootUserName(Opts opts) throws IOException {
     return rootpass.getBytes(UTF_8);
   }
 
+  /**
+   * Create warning message related to initial password, if appropriate.
+   *
+   * ACCUMULO-2907 Remove unnecessary security warning from console message unless its actually appropriate.
+   * The warning message should only be displayed when the value of <code>instance.security.authenticator</code>
+   * differs between the SiteConfiguration and the DefaultConfiguration values.
+   *
+   * @return String containing warning portion of console message.
+   */
+  private String getInitialPasswordWarning() {
+    StringBuilder optionalWarning = new StringBuilder();
+    Property authenticatorProperty = Property.INSTANCE_SECURITY_AUTHENTICATOR;
+    if (SiteConfiguration.getInstance().get(authenticatorProperty).equals(authenticatorProperty.getDefaultValue()))
+      optionalWarning.append(": ");
+    else
+      optionalWarning.append(" (this may not be applicable for your security setup): ");
+    return optionalWarning.toString();
 
 Review comment:
   ACCUMULO-2907: Updated to replace StringBuilder usage with String.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services