janhoy commented on code in PR #4534:
URL: https://github.com/apache/solr/pull/4534#discussion_r3426820774


##########
solr/core/src/java/org/apache/solr/cli/AuthTool.java:
##########
@@ -284,8 +295,20 @@ private void handleBasicAuth(CommandLine cli) throws 
Exception {
           updateIncludeFileEnableAuth(includeFile, basicAuthConfFile);
           final String successMessage =
               String.format(
-                  Locale.ROOT, "Successfully enabled basic auth with username 
[%s].", username);
+                  Locale.ROOT,
+                  "Successfully enabled basic auth with username [%s] assigned 
to all roles (superadmin, admin, index, search).",
+                  username);
           echo(successMessage);
+          if (!updateIncludeFileOnly) {
+            CLIO.out(
+                "\nIMPORTANT: The following template users have been created 
with NO password set"
+                    + " and cannot log in until passwords are assigned:");
+            CLIO.out("  - admin  (roles: admin, index, search)");
+            CLIO.out("  - index  (roles: index, search)");
+            CLIO.out("  - search (roles: search)");
+            CLIO.out(
+                "Set their passwords using the Admin UI Security page or the 
authentication API.");
+          }

Review Comment:
   I did not think about this corner case. Not unthinkable that someone would 
choose "admin" as username.



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