This is an automated email from the ASF dual-hosted git repository.

clebertsuconic pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/artemis.git


The following commit(s) were added to refs/heads/main by this push:
     new 72489b2f8b ARTEMIS-6055 refactor CLI default password handling
72489b2f8b is described below

commit 72489b2f8bc4f180522311c4e60bc05b1e85205f
Author: Justin Bertram <[email protected]>
AuthorDate: Tue May 12 08:37:01 2026 -0500

    ARTEMIS-6055 refactor CLI default password handling
---
 .../activemq/artemis/cli/commands/Create.java      |  11 ++-
 .../artemis/cli/commands/InputAbstract.java        |   4 +-
 .../cli/commands/messages/ConnectionAbstract.java  |   8 +-
 .../messages/ConnectionConfigurationAbtract.java   |   4 +-
 .../artemis/cli/commands/messages/Transfer.java    |  22 +++--
 .../artemis/cli/commands/user/PasswordAction.java  |   2 +-
 .../activemq/artemis/cli/commands/CreateTest.java  |   2 +
 .../org/apache/activemq/cli/test/ArtemisTest.java  | 100 ++++++++++++---------
 .../org/apache/activemq/cli/test/CliTestBase.java  |   2 +-
 .../src/test/scripts/validate-instalation.sh       |   2 +-
 .../apache/activemq/cli/test/WebServerCLITest.java |   2 +-
 docs/user-manual/versions.adoc                     |   8 +-
 tests/db-tests/pom.xml                             |   2 +
 .../MirrorInfiniteRetryReplicaTest.java            |   4 +-
 .../artemis/tests/smoke/checkTest/CheckTest.java   |   4 +-
 .../OpenWireSharedStoreFailoverSmokeTest.java      |   4 +-
 .../mirror/ClusteredMirrorSoakTest.java            |   2 +-
 .../mirror/ReplicatedBothNodesMirrorTest.java      |   4 +-
 .../mirror/ReplicatedMirrorTargetTest.java         |   4 +-
 .../ClusterNotificationsContinuityTest.java        |   2 +-
 .../ClusteredLargeMessageInterruptTest.java        |   4 +-
 .../interruptlm/LargeMessageInterruptTest.java     |   2 +-
 22 files changed, 115 insertions(+), 84 deletions(-)

diff --git 
a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
 
b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
index 1dc72c3b19..f84e18647d 100644
--- 
a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
+++ 
b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
@@ -440,7 +440,7 @@ public class Create extends InstallAbstract {
 
    private String getClusterUser() {
       if (clusterUser == null) {
-         clusterUser = input("--cluster-user", "What is the cluster user?", 
"cluster-admin");
+         clusterUser = input("--cluster-user", "What is the cluster user?", 
ActiveMQDefaultConfiguration.getDefaultClusterUser());
       }
       return clusterUser;
    }
@@ -451,7 +451,7 @@ public class Create extends InstallAbstract {
 
    protected String getClusterPassword() {
       if (clusterPassword == null) {
-         clusterPassword = inputPassword("--cluster-password", "What is the 
cluster password?", "password-admin");
+         clusterPassword = inputPassword("--cluster-password", "What is the 
cluster password?");
       }
       if (!PasswordMaskingUtil.isEncMasked(clusterPassword)) {
          try {
@@ -468,7 +468,7 @@ public class Create extends InstallAbstract {
 
    private String getSslKeyPassword() {
       if (sslKeyPassword == null) {
-         sslKeyPassword = inputPassword("--ssl-key-password", "What is the 
keystore password?", "password");
+         sslKeyPassword = inputPassword("--ssl-key-password", "What is the 
keystore password?");
       }
       return sslKeyPassword;
    }
@@ -482,7 +482,7 @@ public class Create extends InstallAbstract {
 
    private String getSslTrustPassword() {
       if (sslTrustPassword == null) {
-         sslTrustPassword = inputPassword("--ssl-key-password", "What is the 
keystore password?", "password");
+         sslTrustPassword = inputPassword("--ssl-key-password", "What is the 
keystore password?");
       }
       return sslTrustPassword;
    }
@@ -499,9 +499,8 @@ public class Create extends InstallAbstract {
    }
 
    public String getPassword() {
-
       if (password == null) {
-         password = inputPassword("--password", "What is the default 
password?", "admin");
+         password = inputPassword("--password", "What is the default 
password?");
       }
 
       if (!PasswordMaskingUtil.isEncMasked(password)) {
diff --git 
a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/InputAbstract.java
 
b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/InputAbstract.java
index c320be6f22..71881ff6b1 100644
--- 
a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/InputAbstract.java
+++ 
b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/InputAbstract.java
@@ -108,9 +108,9 @@ public class InputAbstract extends ActionAbstract {
       return inputStr.trim();
    }
 
-   protected String inputPassword(String propertyName, String prompt, String 
silentDefault) {
+   protected String inputPassword(String propertyName, String prompt) {
       if (isSilentInput()) {
-         return silentDefault;
+         throw new IllegalArgumentException("Must specify " + propertyName + " 
when using --silent option");
       }
 
       String inputStr = "";
diff --git 
a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConnectionAbstract.java
 
b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConnectionAbstract.java
index b13fc6dbb8..d646d0e033 100644
--- 
a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConnectionAbstract.java
+++ 
b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConnectionAbstract.java
@@ -150,7 +150,9 @@ public class ConnectionAbstract extends 
ConnectionConfigurationAbtract {
             getActionContext().err.println("Connection failed::" + 
e.getMessage());
          }
          user = inputUser(user);
-         password = inputPassword(password);
+         if (!isSilentInput()) {
+            password = inputPassword(password);
+         }
          cf = new ActiveMQConnectionFactory(brokerURL, user, password);
          if (clientID != null) {
             cf.setClientID(clientID);
@@ -167,7 +169,9 @@ public class ConnectionAbstract extends 
ConnectionConfigurationAbtract {
          }
          brokerURL = inputBrokerURL(brokerURL);
          user = inputUser(user);
-         password = inputPassword(password);
+         if (!isSilentInput()) {
+            password = inputPassword(password);
+         }
          cf = new ActiveMQConnectionFactory(brokerURL, user, password);
          if (clientID != null) {
             cf.setClientID(clientID);
diff --git 
a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConnectionConfigurationAbtract.java
 
b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConnectionConfigurationAbtract.java
index bac1caa1f5..3439278c81 100644
--- 
a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConnectionConfigurationAbtract.java
+++ 
b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConnectionConfigurationAbtract.java
@@ -16,8 +16,6 @@
  */
 package org.apache.activemq.artemis.cli.commands.messages;
 
-import static 
org.apache.activemq.artemis.cli.commands.ActionAbstract.DEFAULT_BROKER_URL;
-
 import org.apache.activemq.artemis.cli.Shell;
 import org.apache.activemq.artemis.cli.commands.ActionContext;
 import org.apache.activemq.artemis.cli.commands.InputAbstract;
@@ -163,7 +161,7 @@ public class ConnectionConfigurationAbtract extends 
InputAbstract {
 
    protected String inputPassword(String password) {
       if (password == null) {
-         this.password = inputPassword("--password", "Type the password for a 
retry", null);
+         this.password = inputPassword("--password", "Type the password for a 
retry");
          return this.password;
       }
       return password;
diff --git 
a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/Transfer.java
 
b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/Transfer.java
index efdcaeecf9..b654182381 100644
--- 
a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/Transfer.java
+++ 
b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/Transfer.java
@@ -503,8 +503,8 @@ public class Transfer extends InputAbstract {
       } catch (JMSSecurityException e) {
          // if a security exception will get the user and password through an 
input
          getActionContext().err.println("Connection failed::" + 
e.getMessage());
-         userPassword(brokerURL);
-         cf = new JmsConnectionFactory(user, password, brokerURL);
+         Pair<String, String> userPair = userPassword(brokerURL, user, 
password);
+         cf = new JmsConnectionFactory(userPair.getA(), userPair.getB(), 
brokerURL);
          if (clientID != null) {
             cf.setClientID(clientID);
          }
@@ -513,8 +513,8 @@ public class Transfer extends InputAbstract {
          // if a connection exception will ask for the URL, user and password
          getActionContext().err.println("Connection failed::" + 
e.getMessage());
          brokerURL = input("--url", "Type in the broker URL for a retry (e.g. 
tcp://localhost:61616)", brokerURL);
-         userPassword(brokerURL);
-         cf = new JmsConnectionFactory(user, password, brokerURL);
+         Pair<String, String> userPair = userPassword(brokerURL, user, 
password);
+         cf = new JmsConnectionFactory(userPair.getA(), userPair.getB(), 
brokerURL);
          if (clientID != null) {
             cf.setClientID(clientID);
          }
@@ -540,7 +540,7 @@ public class Transfer extends InputAbstract {
          cf.close();
          // if a security exception will get the user and password through an 
input
          getActionContext().err.println("Connection failed::" + 
e.getMessage());
-         Pair<String, String> userPair = userPassword(brokerURL);
+         Pair<String, String> userPair = userPassword(brokerURL, user, 
password);
          cf = new ActiveMQConnectionFactory(brokerURL, userPair.getA(), 
userPair.getB());
          if (clientID != null) {
             cf.setClientID(clientID);
@@ -551,7 +551,7 @@ public class Transfer extends InputAbstract {
          // if a connection exception will ask for the URL, user and password
          getActionContext().err.println("Connection failed::" + 
e.getMessage());
          brokerURL = input("--url", "Type in the broker URL for a retry (e.g. 
tcp://localhost:61616)", brokerURL);
-         Pair<String, String> userPair = userPassword(brokerURL);
+         Pair<String, String> userPair = userPassword(brokerURL, user, 
password);
          cf = new ActiveMQConnectionFactory(brokerURL, userPair.getA(), 
userPair.getB());
          if (clientID != null) {
             cf.setClientID(clientID);
@@ -560,11 +560,15 @@ public class Transfer extends InputAbstract {
       }
    }
 
-   Pair<String, String> userPassword(String uri) {
+   Pair<String, String> userPassword(String uri, String currentUser, String 
currentPassword) {
       getActionContext().out.println("Type in user/password towards " + uri);
       String user, password;
-      user = input("--user", "Type the username for a retry", null);
-      password = inputPassword("--password", "Type the password for a retry", 
null);
+      user = input("--user", "Type the username for a retry", currentUser);
+      if (isSilentInput()) {
+         password = currentPassword;
+      } else {
+         password = inputPassword("--password", "Type the password for a 
retry");
+      }
       return new Pair<>(user, password);
    }
 
diff --git 
a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/user/PasswordAction.java
 
b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/user/PasswordAction.java
index 7e0a74448f..3e3e6dd77f 100644
--- 
a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/user/PasswordAction.java
+++ 
b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/user/PasswordAction.java
@@ -25,7 +25,7 @@ public class PasswordAction extends UserAction {
 
    void checkInputPassword() {
       if (userCommandPassword == null) {
-         userCommandPassword = inputPassword("--user-command-password", "What 
is the password to use for the chosen user command?", null);
+         userCommandPassword = inputPassword("--user-command-password", "What 
is the password to use for the chosen user command?");
       }
    }
 
diff --git 
a/artemis-cli/src/test/java/org/apache/activemq/artemis/cli/commands/CreateTest.java
 
b/artemis-cli/src/test/java/org/apache/activemq/artemis/cli/commands/CreateTest.java
index 1732034236..2f65aaeedb 100644
--- 
a/artemis-cli/src/test/java/org/apache/activemq/artemis/cli/commands/CreateTest.java
+++ 
b/artemis-cli/src/test/java/org/apache/activemq/artemis/cli/commands/CreateTest.java
@@ -27,6 +27,7 @@ import java.util.Collection;
 
 import 
org.apache.activemq.artemis.tests.extensions.parameterized.ParameterizedTestExtension;
 import org.apache.activemq.artemis.tests.extensions.parameterized.Parameters;
+import org.apache.activemq.artemis.utils.RandomUtil;
 import org.apache.activemq.artemis.utils.XmlProvider;
 import org.apache.activemq.cli.test.CliTestBase;
 import org.apache.activemq.cli.test.TestActionContext;
@@ -73,6 +74,7 @@ public class CreateTest extends CliTestBase {
       c.setInstance(testInstance);
       c.setHttpHost(httpHost);
       c.setRelaxJolokia(relaxJolokia);
+      c.setPassword(RandomUtil.randomUUIDString());
       c.execute(context);
 
       assertTrue(isXmlValid(new File(testInstance, "etc/" + 
Create.ETC_JOLOKIA_ACCESS_XML)));
diff --git 
a/artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java 
b/artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java
index fe755e5249..ae943f685e 100644
--- a/artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java
+++ b/artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java
@@ -194,7 +194,29 @@ public class ArtemisTest extends CliTestBase {
    public void testSimpleCreate() throws Exception {
       //instance1: default using http
       File instance1 = new File(temporaryFolder, "instance1");
-      Artemis.main("create", instance1.getAbsolutePath(), "--silent", 
"--no-fsync", "--no-autotune");
+      Artemis.main(getCreateParameters(instance1.getAbsolutePath()));
+   }
+
+   private String[] getCreateParameters(String path, String... extraParams) {
+      List<String> parameters = new ArrayList<>();
+      parameters.add("create");
+      parameters.add(path);
+      parameters.add("--silent");
+      parameters.add("--no-fsync");
+      parameters.add("--no-autotune");
+      parameters.add("--no-web");
+      parameters.add("--no-amqp-acceptor");
+      parameters.add("--no-stomp-acceptor");
+      parameters.add("--no-mqtt-acceptor");
+      parameters.add("--no-hornetq-acceptor");
+      parameters.add("--user");
+      parameters.add("admin");
+      parameters.add("--password");
+      parameters.add("admin");
+      for (String extraParam : extraParams) {
+         parameters.add(extraParam);
+      }
+      return parameters.toArray(new String[0]);
    }
 
    @Test
@@ -210,7 +232,7 @@ public class ArtemisTest extends CliTestBase {
    }
 
    private void testMaxHops(int maxHops) throws Exception {
-      List<String> args = new ArrayList<>(List.of("--silent", "--no-autotune", 
"--clustered"));
+      List<String> args = new ArrayList<>(List.of("--silent", "--no-autotune", 
"--clustered", "--user", "admin", "--password", "admin", "--cluster-user", 
"admin", "--cluster-password", "admin"));
       if (maxHops != Create.DEFAULT_MAX_HOPS) {
          args.add("--max-hops");
          args.add(String.valueOf(maxHops));
@@ -223,7 +245,7 @@ public class ArtemisTest extends CliTestBase {
    @Timeout(60)
    public void testCreateDB() throws Exception {
       File instance1 = new File(temporaryFolder, "instance1");
-      Artemis.internalExecute("create", instance1.getAbsolutePath(), 
"--silent", "--jdbc");
+      Artemis.internalExecute(getCreateParameters(instance1.getAbsolutePath(), 
"--jdbc"));
    }
 
 
@@ -233,7 +255,7 @@ public class ArtemisTest extends CliTestBase {
       try {
          //instance1: default using http
          File instance1 = new File(temporaryFolder, "instance1");
-         Artemis.main("create", instance1.getAbsolutePath(), "--silent", 
"--mapped", "--no-autotune");
+         Artemis.main(getCreateParameters(instance1.getAbsolutePath(), 
"--mapped"));
       } catch (Throwable e) {
          e.printStackTrace();
          throw e;
@@ -244,7 +266,7 @@ public class ArtemisTest extends CliTestBase {
    @Timeout(60)
    public void testOpenwireSupportAdvisoryDisabledByDefault() throws Exception 
{
       FileConfiguration configuration = 
createFileConfiguration("supportAdvisory",
-                                                                "--force", 
"--silent", "--no-web", "--no-autotune");
+                                                                "--force", 
"--silent", "--no-web", "--no-autotune", "--user", "admin", "--password", 
"admin");
       Map<String, Object> params = configuration.getAcceptorConfigurations()
          .stream().filter(tc -> 
tc.getName().equals("artemis")).findFirst().get().getExtraParams();
       
assertFalse(Boolean.parseBoolean(params.get("supportAdvisory").toString()));
@@ -256,14 +278,14 @@ public class ArtemisTest extends CliTestBase {
    public void testOpenwireEnabledSupportAdvisory() throws Exception {
       FileConfiguration configuration = 
createFileConfiguration("supportAdvisory",
                                                                 "--force", 
"--silent", "--no-web", "--no-autotune",
-                                                                
"--support-advisory", "--suppress-internal-management-objects");
+                                                                
"--support-advisory", "--suppress-internal-management-objects",
+                                                                "--user", 
"admin", "--password", "admin");
       Map<String, Object> params = configuration.getAcceptorConfigurations()
          .stream().filter(tc -> 
tc.getName().equals("artemis")).findFirst().get().getExtraParams();
       
assertTrue(Boolean.parseBoolean(params.get("supportAdvisory").toString()));
       
assertTrue(Boolean.parseBoolean(params.get("suppressInternalManagementObjects").toString()));
    }
 
-
    private FileConfiguration createFileConfiguration(String folder, String... 
createAdditionalArg) throws Exception {
       File instanceFolder = newFolder(temporaryFolder, folder);
 
@@ -294,7 +316,7 @@ public class ArtemisTest extends CliTestBase {
       Run.setEmbedded(true);
       //instance1: default using http
       File instance1 = new File(temporaryFolder, "instance1");
-      Artemis.main("create", instance1.getAbsolutePath(), "--silent", 
"--no-fsync", "--no-autotune");
+      Artemis.main("create", instance1.getAbsolutePath(), "--silent", 
"--no-fsync", "--no-autotune", "--user", "admin", "--password", "admin");
       File bootstrapFile = new File(new File(instance1, "etc"), 
"bootstrap.xml");
       assertTrue(bootstrapFile.exists());
       Document config = parseXml(bootstrapFile);
@@ -314,7 +336,7 @@ public class ArtemisTest extends CliTestBase {
 
       //instance2: https
       File instance2 = new File(temporaryFolder, "instance2");
-      Artemis.main("create", instance2.getAbsolutePath(), "--silent", 
"--ssl-key", "etc/keystore", "--ssl-key-password", "password1", "--no-fsync", 
"--no-autotune");
+      Artemis.main("create", instance2.getAbsolutePath(), "--silent", 
"--ssl-key", "etc/keystore", "--ssl-key-password", "password1", "--no-fsync", 
"--no-autotune", "--user", "admin", "--password", "admin");
       bootstrapFile = new File(new File(instance2, "etc"), "bootstrap.xml");
       assertTrue(bootstrapFile.exists());
       config = parseXml(bootstrapFile);
@@ -336,7 +358,7 @@ public class ArtemisTest extends CliTestBase {
 
       //instance3: https with clientAuth
       File instance3 = new File(temporaryFolder, "instance3");
-      Artemis.main("create", instance3.getAbsolutePath(), "--silent", 
"--ssl-key", "etc/keystore", "--ssl-key-password", "password1", 
"--use-client-auth", "--ssl-trust", "etc/truststore", "--ssl-trust-password", 
"password2", "--no-fsync", "--no-autotune");
+      Artemis.main("create", instance3.getAbsolutePath(), "--silent", 
"--ssl-key", "etc/keystore", "--ssl-key-password", "password1", 
"--use-client-auth", "--ssl-trust", "etc/truststore", "--ssl-trust-password", 
"password2", "--no-fsync", "--no-autotune", "--user", "admin", "--password", 
"admin");
       bootstrapFile = new File(new File(instance3, "etc"), "bootstrap.xml");
       assertTrue(bootstrapFile.exists());
 
@@ -371,7 +393,7 @@ public class ArtemisTest extends CliTestBase {
       setupAuth();
       Run.setEmbedded(true);
       File instance1 = new File(temporaryFolder, "instance1");
-      Artemis.main("create", instance1.getAbsolutePath(), "--silent", 
"--no-fsync", "--no-autotune", "--no-web", "--no-stomp-acceptor", 
"--no-amqp-acceptor", "--no-mqtt-acceptor", "--no-hornetq-acceptor");
+      Artemis.main(getCreateParameters(instance1.getAbsolutePath()));
       File originalBootstrapFile = new File(new File(instance1, "etc"), 
"bootstrap.xml");
       assertTrue(originalBootstrapFile.exists());
 
@@ -449,7 +471,7 @@ public class ArtemisTest extends CliTestBase {
       Run.setEmbedded(true);
       File instance1 = new File(temporaryFolder, "instance_user");
       System.setProperty("java.security.auth.login.config", 
instance1.getAbsolutePath() + "/etc/login.config");
-      Artemis.main("create", instance1.getAbsolutePath(), "--silent", 
"--no-autotune", "--no-web", "--no-amqp-acceptor", "--no-mqtt-acceptor", 
"--no-stomp-acceptor", "--no-hornetq-acceptor");
+      Artemis.main(getCreateParameters(instance1.getAbsolutePath()));
       System.setProperty("artemis.instance", instance1.getAbsolutePath());
       Object result = Artemis.internalExecute("run");
       ManagementContext managementContext = ((Pair<ManagementContext, 
ActiveMQServer>)result).getA();
@@ -475,7 +497,7 @@ public class ArtemisTest extends CliTestBase {
       Run.setEmbedded(true);
       File instance1 = new File(temporaryFolder, "instance_user");
       System.setProperty("java.security.auth.login.config", 
instance1.getAbsolutePath() + "/etc/login.config");
-      Artemis.main("create", instance1.getAbsolutePath(), "--silent", 
"--no-autotune", "--no-web", "--require-login", "--security-manager", basic ? 
"basic" : "jaas");
+      Artemis.main(getCreateParameters(instance1.getAbsolutePath(), 
"--require-login", "--security-manager", basic ? "basic" : "jaas"));
       System.setProperty("artemis.instance", instance1.getAbsolutePath());
       Object runResult = Artemis.internalExecute("run");
       server = ((Pair<ManagementContext, ActiveMQServer>)runResult).getB();
@@ -663,7 +685,7 @@ public class ArtemisTest extends CliTestBase {
       Run.setEmbedded(true);
       File instance1 = new File(temporaryFolder, "instance_user");
       System.setProperty("java.security.auth.login.config", 
instance1.getAbsolutePath() + "/etc/login.config");
-      Artemis.main("create", instance1.getAbsolutePath(), "--silent", 
"--no-autotune", "--no-web", "--no-amqp-acceptor", "--no-mqtt-acceptor", 
"--no-stomp-acceptor", "--no-hornetq-acceptor", "--security-manager", basic ? 
"basic" : "jaas");
+      Artemis.main(getCreateParameters(instance1.getAbsolutePath(), 
"--security-manager", basic ? "basic" : "jaas"));
       System.setProperty("artemis.instance", instance1.getAbsolutePath());
       Object result = Artemis.internalExecute("run");
       server = ((Pair<ManagementContext, ActiveMQServer>)result).getB();
@@ -767,7 +789,7 @@ public class ArtemisTest extends CliTestBase {
          Run.setEmbedded(true);
          File instance1 = new File(temporaryFolder, "instance_user");
          System.setProperty("java.security.auth.login.config", 
instance1.getAbsolutePath() + "/etc/login.config");
-         Artemis.main("create", instance1.getAbsolutePath(), "--silent", 
"--no-autotune", "--no-web", "--no-amqp-acceptor", "--no-mqtt-acceptor", 
"--no-stomp-acceptor", "--no-hornetq-acceptor", "--security-manager", "jaas");
+         Artemis.main(getCreateParameters(instance1.getAbsolutePath(), 
"--security-manager", "jaas"));
          System.setProperty("artemis.instance", instance1.getAbsolutePath());
          Object result = Artemis.internalExecute("run");
          server = ((Pair<ManagementContext, ActiveMQServer>) result).getB();
@@ -817,7 +839,7 @@ public class ArtemisTest extends CliTestBase {
       Run.setEmbedded(true);
       File instance1 = new File(temporaryFolder, "instance_user");
       System.setProperty("java.security.auth.login.config", 
instance1.getAbsolutePath() + "/etc/login.config");
-      Artemis.main("create", instance1.getAbsolutePath(), "--silent", 
"--no-autotune", "--no-web", "--no-amqp-acceptor", "--no-mqtt-acceptor", 
"--no-stomp-acceptor", "--no-hornetq-acceptor", "--require-login", 
"--security-manager", basic ? "basic" : "jaas");
+      Artemis.main(getCreateParameters(instance1.getAbsolutePath(), 
"--require-login", "--security-manager", basic ? "basic" : "jaas"));
       System.setProperty("artemis.instance", instance1.getAbsolutePath());
       Object result = Artemis.internalExecute("run");
       ActiveMQServer activeMQServer = ((Pair<ManagementContext, 
ActiveMQServer>)result).getB();
@@ -858,7 +880,7 @@ public class ArtemisTest extends CliTestBase {
       Run.setEmbedded(true);
       File instance1 = new File(temporaryFolder, "instance_user");
       System.setProperty("java.security.auth.login.config", 
instance1.getAbsolutePath() + "/etc/login.config");
-      Artemis.main("create", instance1.getAbsolutePath(), "--silent", 
"--no-autotune", "--no-web", "--no-amqp-acceptor", "--no-mqtt-acceptor", 
"--no-stomp-acceptor", "--no-hornetq-acceptor");
+      Artemis.main(getCreateParameters(instance1.getAbsolutePath()));
       System.setProperty("artemis.instance", instance1.getAbsolutePath());
       Object result = Artemis.internalExecute("run");
       ActiveMQServer activeMQServer = ((Pair<ManagementContext, 
ActiveMQServer>)result).getB();
@@ -882,7 +904,7 @@ public class ArtemisTest extends CliTestBase {
       Run.setEmbedded(true);
       File instance1 = new File(temporaryFolder, "instance_user");
       System.setProperty("java.security.auth.login.config", 
instance1.getAbsolutePath() + "/etc/login.config");
-      Artemis.main("create", instance1.getAbsolutePath(), "--silent", 
"--no-autotune", "--no-web", "--no-amqp-acceptor", "--no-mqtt-acceptor", 
"--no-stomp-acceptor", "--no-hornetq-acceptor");
+      Artemis.main(getCreateParameters(instance1.getAbsolutePath()));
       System.setProperty("artemis.instance", instance1.getAbsolutePath());
       Object result = Artemis.internalExecute("run");
       ActiveMQServer activeMQServer = ((Pair<ManagementContext, 
ActiveMQServer>)result).getB();
@@ -916,7 +938,7 @@ public class ArtemisTest extends CliTestBase {
       Run.setEmbedded(true);
       File instance1 = new File(temporaryFolder, "instance_user");
       System.setProperty("java.security.auth.login.config", 
instance1.getAbsolutePath() + "/etc/login.config");
-      Artemis.main("create", instance1.getAbsolutePath(), "--silent", 
"--no-autotune", "--no-web", "--require-login", "--security-manager", basic ? 
"basic" : "jaas");
+      Artemis.main(getCreateParameters(instance1.getAbsolutePath(), 
"--require-login", "--security-manager", basic ? "basic" : "jaas"));
       System.setProperty("artemis.instance", instance1.getAbsolutePath());
       Object runResult = Artemis.internalExecute("run");
       server = ((Pair<ManagementContext, ActiveMQServer>)runResult).getB();
@@ -1049,7 +1071,7 @@ public class ArtemisTest extends CliTestBase {
       Run.setEmbedded(true);
       File instance1 = new File(temporaryFolder, "instance_user");
       System.setProperty("java.security.auth.login.config", 
instance1.getAbsolutePath() + "/etc/login.config");
-      Artemis.main("create", instance1.getAbsolutePath(), "--silent", 
"--no-autotune", "--no-web", "--require-login", "--security-manager", basic ? 
"basic" : "jaas");
+      Artemis.main(getCreateParameters(instance1.getAbsolutePath(), 
"--require-login", "--security-manager", basic ? "basic" : "jaas"));
       System.setProperty("artemis.instance", instance1.getAbsolutePath());
       Artemis.internalExecute("run");
 
@@ -1154,7 +1176,7 @@ public class ArtemisTest extends CliTestBase {
       Run.setEmbedded(true);
       File instanceRole = new File(temporaryFolder, "instance_role");
       System.setProperty("java.security.auth.login.config", 
instanceRole.getAbsolutePath() + "/etc/login.config");
-      Artemis.main("create", instanceRole.getAbsolutePath(), "--silent", 
"--no-autotune", "--no-web", "--require-login", "--role", roleWithSpaces);
+      Artemis.main(getCreateParameters(instanceRole.getAbsolutePath(), 
"--require-login", "--role", roleWithSpaces));
       System.setProperty("artemis.instance", instanceRole.getAbsolutePath());
       Artemis.internalExecute("run");
 
@@ -1194,7 +1216,7 @@ public class ArtemisTest extends CliTestBase {
       Run.setEmbedded(true);
       File instance1 = new File(temporaryFolder, "instance_user");
       System.setProperty("java.security.auth.login.config", 
instance1.getAbsolutePath() + "/etc/login.config");
-      Artemis.main("create", instance1.getAbsolutePath(), "--silent", 
"--no-autotune", "--no-web", "--no-amqp-acceptor", "--no-mqtt-acceptor", 
"--no-stomp-acceptor", "--no-hornetq-acceptor");
+      Artemis.main(getCreateParameters(instance1.getAbsolutePath()));
       System.setProperty("artemis.instance", instance1.getAbsolutePath());
       Object result = Artemis.internalExecute("run");
       ActiveMQServer activeMQServer = ((Pair<ManagementContext, 
ActiveMQServer>)result).getB();
@@ -1338,7 +1360,7 @@ public class ArtemisTest extends CliTestBase {
       File instanceFolder = newFolder(temporaryFolder, "server");
       setupAuth(instanceFolder);
       Run.setEmbedded(true);
-      Artemis.main("create", instanceFolder.getAbsolutePath(), "--verbose", 
"--force", "--disable-persistence", "--silent", "--no-web", "--queues", "q1", 
"--no-autotune", "--require-login", "--default-port", "61616");
+      Artemis.main(getCreateParameters(instanceFolder.getAbsolutePath(), 
"--verbose", "--force", "--disable-persistence", "--queues", "q1", 
"--require-login", "--default-port", "61616"));
       System.setProperty("artemis.instance", instanceFolder.getAbsolutePath());
 
       try {
@@ -1389,14 +1411,12 @@ public class ArtemisTest extends CliTestBase {
       setupAuth(instanceFolder);
 
       Run.setEmbedded(true);
-      Artemis.main("create", instanceFolder.getAbsolutePath(), "--force", 
"--silent", "--no-web", "--no-autotune", "--require-login");
+      Artemis.main(getCreateParameters(instanceFolder.getAbsolutePath(), 
"--force", "--require-login"));
       System.setProperty("artemis.instance", instanceFolder.getAbsolutePath());
 
       Artemis.main("perf-journal", "--journal-type", "NIO", "--writes", "5", 
"--tries", "1");
-
    }
 
-
    public void testSimpleRun(String folderName) throws Exception {
       testSimpleRun(folderName, 61616);
    }
@@ -1411,10 +1431,9 @@ public class ArtemisTest extends CliTestBase {
 
       // This is usually set when run from the command line via artemis.profile
       Run.setEmbedded(true);
-      Artemis.main("create", instanceFolder.getAbsolutePath(), "--force", 
"--silent", "--no-web", "--queues", queues, "--addresses", addresses, 
"--no-autotune", "--require-login", "--default-port", 
Integer.toString(acceptorPort));
+      Artemis.main(getCreateParameters(instanceFolder.getAbsolutePath(), 
"--force", "--queues", queues, "--addresses", addresses, "--require-login", 
"--default-port", Integer.toString(acceptorPort)));
       System.setProperty("artemis.instance", instanceFolder.getAbsolutePath());
 
-
       try {
          // Some exceptions may happen on the initialization, but they should 
be ok on start the basic core protocol
          Artemis.internalExecute("run");
@@ -1531,13 +1550,12 @@ public class ArtemisTest extends CliTestBase {
       // This is usually set when run from the command line via artemis.profile
       Run.setEmbedded(true);
       if (autoDelete) {
-         Artemis.main("create", instanceFolder.getAbsolutePath(), "--force", 
"--silent", "--no-web", "--no-autotune", "--require-login", "--autodelete");
+         Artemis.main(getCreateParameters(instanceFolder.getAbsolutePath(), 
"--force", "--require-login", "--autodelete"));
       } else {
-         Artemis.main("create", instanceFolder.getAbsolutePath(), "--force", 
"--silent", "--no-web", "--require-login", "--no-autotune");
+         Artemis.main(getCreateParameters(instanceFolder.getAbsolutePath(), 
"--force", "--require-login"));
       }
       System.setProperty("artemis.instance", instanceFolder.getAbsolutePath());
 
-
       try {
          // Some exceptions may happen on the initialization, but they should 
be ok on start the basic core protocol
          Pair<ManagementContext, ActiveMQServer> run = 
(Pair<ManagementContext, ActiveMQServer>) Artemis.internalExecute("run");
@@ -1581,7 +1599,7 @@ public class ArtemisTest extends CliTestBase {
 
       // This is usually set when run from the command line via artemis.profile
       Run.setEmbedded(true);
-      Artemis.main("create", instanceFolder.getAbsolutePath(), "--force", 
"--silent", "--no-web", "--queues", queues, "--addresses", topics, 
"--require-login", "--ping", "127.0.0.1", "--no-autotune");
+      Artemis.main(getCreateParameters(instanceFolder.getAbsolutePath(), 
"--force", "--queues", queues, "--addresses", topics, "--require-login", 
"--ping", "127.0.0.1"));
       System.setProperty("artemis.instance", instanceFolder.getAbsolutePath());
 
       FileConfiguration fc = new FileConfiguration();
@@ -1602,7 +1620,7 @@ public class ArtemisTest extends CliTestBase {
 
       // This is usually set when run from the command line via artemis.profile
       Run.setEmbedded(true);
-      Artemis.main("create", instanceFolder.getAbsolutePath(), "--force", 
"--silent", "--no-web", "--require-login");
+      Artemis.main(getCreateParameters(instanceFolder.getAbsolutePath(), 
"--force", "--require-login"));
       System.setProperty("artemis.instance", instanceFolder.getAbsolutePath());
 
       FileConfiguration fc = new FileConfiguration();
@@ -1622,7 +1640,7 @@ public class ArtemisTest extends CliTestBase {
       File instanceQstat = new File(temporaryFolder, "instanceQStat");
       setupAuth(instanceQstat);
       Run.setEmbedded(true);
-      Artemis.main("create", instanceQstat.getAbsolutePath(), "--silent", 
"--no-fsync", "--no-autotune", "--no-web", "--require-login");
+      Artemis.main(getCreateParameters(instanceQstat.getAbsolutePath(), 
"--require-login"));
       System.setProperty("artemis.instance", instanceQstat.getAbsolutePath());
       Artemis.internalExecute("run");
 
@@ -1893,7 +1911,7 @@ public class ArtemisTest extends CliTestBase {
       File instanceQstat = new File(temporaryFolder, "instanceQStat");
       setupAuth(instanceQstat);
       Run.setEmbedded(true);
-      Artemis.main("create", instanceQstat.getAbsolutePath(), "--silent", 
"--no-fsync", "--no-autotune", "--no-web", "--require-login");
+      Artemis.main(getCreateParameters(instanceQstat.getAbsolutePath(), 
"--require-login"));
       System.setProperty("artemis.instance", instanceQstat.getAbsolutePath());
       Object result = Artemis.internalExecute("run");
       ActiveMQServer activeMQServer = ((Pair<ManagementContext, 
ActiveMQServer>)result).getB();
@@ -1921,7 +1939,7 @@ public class ArtemisTest extends CliTestBase {
       File instanceQstat = new File(temporaryFolder, "instanceQStat");
       setupAuth(instanceQstat);
       Run.setEmbedded(true);
-      Artemis.main("create", instanceQstat.getAbsolutePath(), "--silent", 
"--no-fsync", "--no-autotune", "--no-web", "--require-login");
+      Artemis.main(getCreateParameters(instanceQstat.getAbsolutePath(), 
"--require-login"));
       System.setProperty("artemis.instance", instanceQstat.getAbsolutePath());
       Artemis.internalExecute("run");
 
@@ -1994,7 +2012,7 @@ public class ArtemisTest extends CliTestBase {
       File instanceQstat = new File(temporaryFolder, "instanceQStatErrors");
       setupAuth(instanceQstat);
       Run.setEmbedded(true);
-      Artemis.main("create", instanceQstat.getAbsolutePath(), "--silent", 
"--no-fsync", "--no-autotune", "--no-web", "--require-login");
+      Artemis.main(getCreateParameters(instanceQstat.getAbsolutePath(), 
"--require-login"));
       System.setProperty("artemis.instance", instanceQstat.getAbsolutePath());
       Artemis.internalExecute("run");
       try {
@@ -2098,7 +2116,7 @@ public class ArtemisTest extends CliTestBase {
       File instanceQstat = new File(temporaryFolder, "instanceQStat");
       setupAuth(instanceQstat);
       Run.setEmbedded(true);
-      Artemis.main("create", instanceQstat.getAbsolutePath(), "--silent", 
"--no-fsync", "--no-autotune", "--no-web", "--require-login");
+      Artemis.main(getCreateParameters(instanceQstat.getAbsolutePath(), 
"--require-login"));
       System.setProperty("artemis.instance", instanceQstat.getAbsolutePath());
       Artemis.internalExecute("run");
 
@@ -2180,7 +2198,7 @@ public class ArtemisTest extends CliTestBase {
       File instanceFile = new File(temporaryFolder, 
"testRunPropertiesArgumentSetsAcceptorPort");
       setupAuth(instanceFile);
       Run.setEmbedded(true);
-      Artemis.main("create", instanceFile.getAbsolutePath(), "--silent", 
"--no-fsync", "--no-autotune", "--no-web", "--require-login");
+      Artemis.main(getCreateParameters(instanceFile.getAbsolutePath(), 
"--require-login"));
       System.setProperty("artemis.instance", instanceFile.getAbsolutePath());
 
       // configure
@@ -2202,7 +2220,7 @@ public class ArtemisTest extends CliTestBase {
       File instanceFile = new File(temporaryFolder, 
"testRunPropertiesDudArgument");
       setupAuth(instanceFile);
       Run.setEmbedded(true);
-      Artemis.main("create", instanceFile.getAbsolutePath(), "--silent", 
"--no-fsync", "--no-autotune", "--no-web", "--require-login");
+      Artemis.main(getCreateParameters(instanceFile.getAbsolutePath(), 
"--require-login"));
       System.setProperty("artemis.instance", instanceFile.getAbsolutePath());
 
       // verify error
@@ -2387,7 +2405,7 @@ public class ArtemisTest extends CliTestBase {
    @Timeout(60)
    public void testDefaultSecuritySettings() throws Exception {
       FileConfiguration configuration = 
createFileConfiguration(getTestMethodName(),
-                                                                "--silent", 
"--no-web", "--no-autotune");
+                                                                "--silent", 
"--no-web", "--no-autotune", "--user", "admin", "--password", "admin");
 
       Map<String, Set<Role>> securityRoles = configuration.getSecurityRoles();
 
diff --git 
a/artemis-cli/src/test/java/org/apache/activemq/cli/test/CliTestBase.java 
b/artemis-cli/src/test/java/org/apache/activemq/cli/test/CliTestBase.java
index d3b6e22e6e..3216c6b03e 100644
--- a/artemis-cli/src/test/java/org/apache/activemq/cli/test/CliTestBase.java
+++ b/artemis-cli/src/test/java/org/apache/activemq/cli/test/CliTestBase.java
@@ -82,7 +82,7 @@ public class CliTestBase extends ArtemisTestCase {
       File rootDirectory = new File(temporaryFolder, "broker");
       setupAuth(rootDirectory);
       Run.setEmbedded(true);
-      Artemis.main("create", rootDirectory.getAbsolutePath(), "--silent", 
"--no-fsync", "--no-autotune", "--no-web", "--require-login", 
"--disable-persistence");
+      Artemis.main("create", rootDirectory.getAbsolutePath(), "--silent", 
"--no-fsync", "--no-autotune", "--no-web", "--require-login", 
"--disable-persistence", "--user", "admin", "--password", "admin");
       System.setProperty("artemis.instance", rootDirectory.getAbsolutePath());
       return Artemis.internalExecute("run");
    }
diff --git a/artemis-distribution/src/test/scripts/validate-instalation.sh 
b/artemis-distribution/src/test/scripts/validate-instalation.sh
index 95465e7d96..d8f399c6ca 100755
--- a/artemis-distribution/src/test/scripts/validate-instalation.sh
+++ b/artemis-distribution/src/test/scripts/validate-instalation.sh
@@ -47,7 +47,7 @@ echo artemis instance is $ARTEMIS_HOME
 
 
 cd "$ARTEMIS_HOME/bin"
-./artemis create --silent --force --role "$ARTEMIS_ROLE" "$ARTEMIS_INSTANCE"
+./artemis create --silent --force --role "$ARTEMIS_ROLE" "$ARTEMIS_INSTANCE" 
--user admin --password admin
 
 cd "$ARTEMIS_INSTANCE/bin"
 pwd
diff --git 
a/artemis-web/src/test/java/org/apache/activemq/cli/test/WebServerCLITest.java 
b/artemis-web/src/test/java/org/apache/activemq/cli/test/WebServerCLITest.java
index 00bfc5d838..217e348f9d 100644
--- 
a/artemis-web/src/test/java/org/apache/activemq/cli/test/WebServerCLITest.java
+++ 
b/artemis-web/src/test/java/org/apache/activemq/cli/test/WebServerCLITest.java
@@ -78,7 +78,7 @@ public class WebServerCLITest extends ArtemisTestCase {
       Run.setEmbedded(true);
       File instance1 = new File(temporaryFolder, "instance_user");
       System.setProperty("java.security.auth.login.config", 
instance1.getAbsolutePath() + "/etc/login.config");
-      Artemis.main("create", instance1.getAbsolutePath(), "--silent", 
"--no-autotune", "--no-amqp-acceptor", "--no-mqtt-acceptor", 
"--no-stomp-acceptor", "--no-hornetq-acceptor");
+      Artemis.main("create", instance1.getAbsolutePath(), "--silent", 
"--no-autotune", "--no-amqp-acceptor", "--no-mqtt-acceptor", 
"--no-stomp-acceptor", "--no-hornetq-acceptor", "--user", "admin", 
"--password", "admin");
       System.setProperty("artemis.instance", instance1.getAbsolutePath());
       Object result = Artemis.internalExecute("run");
       ActiveMQServer activeMQServer = ((Pair<ManagementContext, 
ActiveMQServer>) result).getB();
diff --git a/docs/user-manual/versions.adoc b/docs/user-manual/versions.adoc
index 9543c33283..da99528b1f 100644
--- a/docs/user-manual/versions.adoc
+++ b/docs/user-manual/versions.adoc
@@ -33,14 +33,18 @@ See the 
https://issues.apache.org/jira/projects/ARTEMIS/versions/12356761[releas
 
 === Upgrading from 2.53.0
 
-* To improve security we've hardened the code dealing with cluster credentials.
-In short, *any connection using the default values of `cluster-user` and 
`cluster-password` will be rejected*.
+* To improve security we've hardened the broker in a few areas:
+** First, *any connection using the default values of `cluster-user` and 
`cluster-password` will be rejected*.
 +
 Therefore, any broker using the default `cluster-user` and `cluster-password` 
will no longer cluster properly.
 To restore functionality, use a non-default value for `cluster-user` and 
`cluster-password`.
 +
 This change similarly impacts any Core bridge connecting to a secured broker 
using the default `user` and `password` because those defaults are based on the 
default  `cluster-user` and `cluster-password` respectively.
 To restore functionality, we recommend specifying `user` and `password` values 
on the `bridge` that correspond to a valid user account on the target broker. 
The corresponding role on the target broker should have the 
xref:security.adoc#role-based-security-for-addresses[`send` permission] for the 
bridge's `forwarding-address`.
+** When creating a broker via the xref:using-cli.adoc[CLI] (i.e., using the 
`create` command) we've always prompted users for default credentials.
+However, there was a `--silent` option that would skip all prompts and use 
default values.
+This has been changed so that that no passwords will have default values, even 
when using the `--silent` option.
+**When using `--silent` you will need to explicitly define password values** 
(e.g., via `--password`, `--cluster-password`, etc.) or creation will fail.
 * Due to https://issues.apache.org/jira/browse/ARTEMIS-5949[ARTEMIS-5949], the 
`security-settings` in the default `broker.xml` have changed so that 
permissions are explicitly set on the management address.
 There is no semantic change.
 This is simply to clarify permissions so that security is easier to understand.
diff --git a/tests/db-tests/pom.xml b/tests/db-tests/pom.xml
index 3e4d7c6539..b37125502a 100644
--- a/tests/db-tests/pom.xml
+++ b/tests/db-tests/pom.xml
@@ -222,6 +222,8 @@
                         <arg>tcp://noexist</arg>
                         <arg>--jdbc-driver-class-name</arg>
                         <arg>badDriver</arg>
+                        <arg>--cluster-password</arg>
+                        <arg>admin</arg>
                      </args>
                   </configuration>
                </execution>
diff --git 
a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/brokerConnection/MirrorInfiniteRetryReplicaTest.java
 
b/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/brokerConnection/MirrorInfiniteRetryReplicaTest.java
index fd3a3b8558..df69799a2c 100644
--- 
a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/brokerConnection/MirrorInfiniteRetryReplicaTest.java
+++ 
b/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/brokerConnection/MirrorInfiniteRetryReplicaTest.java
@@ -115,7 +115,7 @@ public class MirrorInfiniteRetryReplicaTest extends 
SmokeTestBase {
       HelperCreate cliCreateServer = helperCreate();
       
cliCreateServer.setAllowAnonymous(true).setArtemisInstance(serverLocation);
       cliCreateServer.setNoWeb(true);
-      cliCreateServer.setArgs("--no-stomp-acceptor", "--no-hornetq-acceptor", 
"--no-mqtt-acceptor", "--no-amqp-acceptor", "--max-hops", "1", "--name", 
DC1_NODE);
+      cliCreateServer.setArgs("--no-stomp-acceptor", "--no-hornetq-acceptor", 
"--no-mqtt-acceptor", "--no-amqp-acceptor", "--max-hops", "1", "--name", 
DC1_NODE, "--cluster-user", "my-cluster-user", "--cluster-password", 
"my-cluster-password");
       cliCreateServer.addArgs("--queues", QUEUE_NAME);
       cliCreateServer.setPortOffset(portOffset);
       if (replicated) {
@@ -178,7 +178,7 @@ public class MirrorInfiniteRetryReplicaTest extends 
SmokeTestBase {
       HelperCreate cliCreateServer = helperCreate();
       
cliCreateServer.setAllowAnonymous(true).setArtemisInstance(serverLocation);
       cliCreateServer.setMessageLoadBalancing("ON_DEMAND");
-      cliCreateServer.setArgs("--no-stomp-acceptor", "--no-hornetq-acceptor", 
"--no-mqtt-acceptor", "--no-amqp-acceptor", "--max-hops", "1", "--name", 
DC1_NODE);
+      cliCreateServer.setArgs("--no-stomp-acceptor", "--no-hornetq-acceptor", 
"--no-mqtt-acceptor", "--no-amqp-acceptor", "--max-hops", "1", "--name", 
DC1_NODE, "--cluster-user", "my-cluster-user", "--cluster-password", 
"my-cluster-password");
       cliCreateServer.setPortOffset(portOffset);
       cliCreateServer.setClustered(true);
       cliCreateServer.setReplicated(true);
diff --git 
a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/checkTest/CheckTest.java
 
b/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/checkTest/CheckTest.java
index ed81e4f16f..2a11e5a3f6 100644
--- 
a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/checkTest/CheckTest.java
+++ 
b/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/checkTest/CheckTest.java
@@ -73,13 +73,13 @@ public class CheckTest extends SmokeTestBase {
 
       {
          HelperCreate cliCreateServer = helperCreate();
-         
cliCreateServer.setSharedStore(true).setBackup(false).setSharedStore(true).setDataFolder("./target/check-test/data").setFailoverOnShutdown(true).setStaticCluster("tcp://localhost:61716").setArtemisInstance(server0Location);
+         
cliCreateServer.setSharedStore(true).setBackup(false).setSharedStore(true).setDataFolder("./target/check-test/data").setFailoverOnShutdown(true).setStaticCluster("tcp://localhost:61716").setArtemisInstance(server0Location).setArgs("--cluster-user",
 "my-cluster-user", "--cluster-password", "my-cluster-password");
          cliCreateServer.createServer();
       }
 
       {
          HelperCreate cliCreateServer = helperCreate();
-         
cliCreateServer.setSharedStore(true).setBackup(true).setSharedStore(true).setDataFolder("./target/check-test/data").setFailoverOnShutdown(true).setStaticCluster("tcp://localhost:61616").setPortOffset(100).setArtemisInstance(server1Location);
+         
cliCreateServer.setSharedStore(true).setBackup(true).setSharedStore(true).setDataFolder("./target/check-test/data").setFailoverOnShutdown(true).setStaticCluster("tcp://localhost:61616").setPortOffset(100).setArtemisInstance(server1Location).setArgs("--cluster-user",
 "my-cluster-user", "--cluster-password", "my-cluster-password");
          cliCreateServer.createServer();
       }
    }
diff --git 
a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/failover/OpenWireSharedStoreFailoverSmokeTest.java
 
b/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/failover/OpenWireSharedStoreFailoverSmokeTest.java
index 44669d31b3..79d202c8b7 100644
--- 
a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/failover/OpenWireSharedStoreFailoverSmokeTest.java
+++ 
b/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/failover/OpenWireSharedStoreFailoverSmokeTest.java
@@ -81,7 +81,7 @@ public class OpenWireSharedStoreFailoverSmokeTest extends 
SmokeTestBase {
       deleteDirectory(serverLocation);
 
       HelperCreate cliCreateServer = helperCreate();
-      
cliCreateServer.setUseAIO(false).setAllowAnonymous(true).setNoWeb(true).setArtemisInstance(serverLocation).setSharedStore(true).setClustered(true).setStaticCluster("tcp://localhost:61617").setDataFolder(sharedDataPath).setFailoverOnShutdown(true).setMessageLoadBalancing("OFF");
+      
cliCreateServer.setUseAIO(false).setAllowAnonymous(true).setNoWeb(true).setArtemisInstance(serverLocation).setSharedStore(true).setClustered(true).setStaticCluster("tcp://localhost:61617").setDataFolder(sharedDataPath).setFailoverOnShutdown(true).setMessageLoadBalancing("OFF").setArgs("--cluster-user",
 "my-cluster-user", "--cluster-password", "my-cluster-password");
 
       cliCreateServer.createServer();
    }
@@ -91,7 +91,7 @@ public class OpenWireSharedStoreFailoverSmokeTest extends 
SmokeTestBase {
       deleteDirectory(serverLocation);
 
       HelperCreate cliCreateServer = helperCreate();
-      
cliCreateServer.setUseAIO(false).setAllowAnonymous(true).setNoWeb(true).setArtemisInstance(serverLocation).setSharedStore(true).setBackup(true).setClustered(true).setStaticCluster("tcp://localhost:61616").setPortOffset(1).setDataFolder(sharedDataPath).setMessageLoadBalancing("OFF");
+      
cliCreateServer.setUseAIO(false).setAllowAnonymous(true).setNoWeb(true).setArtemisInstance(serverLocation).setSharedStore(true).setBackup(true).setClustered(true).setStaticCluster("tcp://localhost:61616").setPortOffset(1).setDataFolder(sharedDataPath).setMessageLoadBalancing("OFF").setArgs("--cluster-user",
 "my-cluster-user", "--cluster-password", "my-cluster-password");
       cliCreateServer.createServer();
    }
 
diff --git 
a/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/brokerConnection/mirror/ClusteredMirrorSoakTest.java
 
b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/brokerConnection/mirror/ClusteredMirrorSoakTest.java
index a16acbf328..3cdaef8b31 100644
--- 
a/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/brokerConnection/mirror/ClusteredMirrorSoakTest.java
+++ 
b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/brokerConnection/mirror/ClusteredMirrorSoakTest.java
@@ -104,7 +104,7 @@ public class ClusteredMirrorSoakTest extends SoakTestBase {
       cliCreateServer.setClustered(true);
       cliCreateServer.setNoWeb(true);
       cliCreateServer.setStaticCluster(clusterURI);
-      cliCreateServer.setArgs("--no-stomp-acceptor", "--no-hornetq-acceptor", 
"--no-mqtt-acceptor", "--no-amqp-acceptor", "--max-hops", "1", "--name", 
DC1_NODE_A);
+      cliCreateServer.setArgs("--no-stomp-acceptor", "--no-hornetq-acceptor", 
"--no-mqtt-acceptor", "--no-amqp-acceptor", "--max-hops", "1", "--name", 
DC1_NODE_A, "--cluster-user", "my-cluster-user", "--cluster-password", 
"my-cluster-password");
       cliCreateServer.addArgs("--addresses", "order");
       cliCreateServer.addArgs("--queues", "myQueue");
       cliCreateServer.setPortOffset(portOffset);
diff --git 
a/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/brokerConnection/mirror/ReplicatedBothNodesMirrorTest.java
 
b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/brokerConnection/mirror/ReplicatedBothNodesMirrorTest.java
index 949f84340d..20c653a9f7 100644
--- 
a/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/brokerConnection/mirror/ReplicatedBothNodesMirrorTest.java
+++ 
b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/brokerConnection/mirror/ReplicatedBothNodesMirrorTest.java
@@ -165,7 +165,7 @@ public class ReplicatedBothNodesMirrorTest extends 
SoakTestBase {
 
       HelperCreate cliCreateServer = helperCreate();
       
cliCreateServer.setAllowAnonymous(true).setArtemisInstance(serverLocation);
-      cliCreateServer.setArgs("--no-stomp-acceptor", "--no-hornetq-acceptor", 
"--no-mqtt-acceptor", "--no-amqp-acceptor", "--max-hops", "1", "--name", 
DC1_NODE);
+      cliCreateServer.setArgs("--no-stomp-acceptor", "--no-hornetq-acceptor", 
"--no-mqtt-acceptor", "--no-amqp-acceptor", "--max-hops", "1", "--name", 
DC1_NODE, "--cluster-user", "my-cluster-user", "--cluster-password", 
"my-cluster-password");
       cliCreateServer.addArgs("--queues", QUEUE_NAME);
       cliCreateServer.setPortOffset(portOffset);
       if (replicated) {
@@ -234,7 +234,7 @@ public class ReplicatedBothNodesMirrorTest extends 
SoakTestBase {
       HelperCreate cliCreateServer = helperCreate();
       
cliCreateServer.setAllowAnonymous(true).setArtemisInstance(serverLocation);
       cliCreateServer.setMessageLoadBalancing("ON_DEMAND");
-      cliCreateServer.setArgs("--no-stomp-acceptor", "--no-hornetq-acceptor", 
"--no-mqtt-acceptor", "--no-amqp-acceptor", "--max-hops", "1", "--name", 
DC1_NODE);
+      cliCreateServer.setArgs("--no-stomp-acceptor", "--no-hornetq-acceptor", 
"--no-mqtt-acceptor", "--no-amqp-acceptor", "--max-hops", "1", "--name", 
DC1_NODE, "--cluster-user", "my-cluster-user", "--cluster-password", 
"my-cluster-password");
       cliCreateServer.setPortOffset(portOffset);
       cliCreateServer.setClustered(true);
       cliCreateServer.setReplicated(true);
diff --git 
a/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/brokerConnection/mirror/ReplicatedMirrorTargetTest.java
 
b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/brokerConnection/mirror/ReplicatedMirrorTargetTest.java
index 687a489d4d..7c845e59d7 100644
--- 
a/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/brokerConnection/mirror/ReplicatedMirrorTargetTest.java
+++ 
b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/brokerConnection/mirror/ReplicatedMirrorTargetTest.java
@@ -143,7 +143,7 @@ public class ReplicatedMirrorTargetTest extends 
SoakTestBase {
       HelperCreate cliCreateServer = helperCreate();
       
cliCreateServer.setAllowAnonymous(true).setArtemisInstance(serverLocation);
       cliCreateServer.setNoWeb(false);
-      cliCreateServer.setArgs("--no-stomp-acceptor", "--no-hornetq-acceptor", 
"--no-mqtt-acceptor", "--no-amqp-acceptor", "--max-hops", "1", "--name", 
DC1_NODE);
+      cliCreateServer.setArgs("--no-stomp-acceptor", "--no-hornetq-acceptor", 
"--no-mqtt-acceptor", "--no-amqp-acceptor", "--max-hops", "1", "--name", 
DC1_NODE, "--cluster-user", "my-cluster-user", "--cluster-password", 
"my-cluster-password");
       cliCreateServer.addArgs("--addresses", TOPIC_NAME);
       cliCreateServer.setPortOffset(portOffset);
       if (replicated) {
@@ -204,7 +204,7 @@ public class ReplicatedMirrorTargetTest extends 
SoakTestBase {
       
cliCreateServer.setAllowAnonymous(true).setArtemisInstance(serverLocation);
       cliCreateServer.setMessageLoadBalancing("ON_DEMAND");
       cliCreateServer.setNoWeb(false);
-      cliCreateServer.setArgs("--no-stomp-acceptor", "--no-hornetq-acceptor", 
"--no-mqtt-acceptor", "--no-amqp-acceptor", "--max-hops", "1", "--name", 
DC1_NODE);
+      cliCreateServer.setArgs("--no-stomp-acceptor", "--no-hornetq-acceptor", 
"--no-mqtt-acceptor", "--no-amqp-acceptor", "--max-hops", "1", "--name", 
DC1_NODE, "--cluster-user", "my-cluster-user", "--cluster-password", 
"my-cluster-password");
       cliCreateServer.addArgs("--addresses", TOPIC_NAME);
       cliCreateServer.setPortOffset(portOffset);
       cliCreateServer.setClustered(true);
diff --git 
a/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/clusterNotificationsContinuity/ClusterNotificationsContinuityTest.java
 
b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/clusterNotificationsContinuity/ClusterNotificationsContinuityTest.java
index f3afa9e59c..8e35b56e90 100644
--- 
a/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/clusterNotificationsContinuity/ClusterNotificationsContinuityTest.java
+++ 
b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/clusterNotificationsContinuity/ClusterNotificationsContinuityTest.java
@@ -114,7 +114,7 @@ public class ClusterNotificationsContinuityTest extends 
SoakTestBase {
 
          cliCreateServer.setMessageLoadBalancing("OFF_WITH_REDISTRIBUTION");
          cliCreateServer.setStaticCluster(staticClusterURI);
-         cliCreateServer.setArgs("--no-stomp-acceptor", 
"--no-hornetq-acceptor", "--no-mqtt-acceptor", "--no-amqp-acceptor", 
"--max-hops", "1");
+         cliCreateServer.setArgs("--no-stomp-acceptor", 
"--no-hornetq-acceptor", "--no-mqtt-acceptor", "--no-amqp-acceptor", 
"--max-hops", "1", "--cluster-user", "my-cluster-user", "--cluster-password", 
"my-cluster-password");
 
          cliCreateServer.createServer();
 
diff --git 
a/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/interruptlm/ClusteredLargeMessageInterruptTest.java
 
b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/interruptlm/ClusteredLargeMessageInterruptTest.java
index 72ffd6cf93..150d080b72 100644
--- 
a/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/interruptlm/ClusteredLargeMessageInterruptTest.java
+++ 
b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/interruptlm/ClusteredLargeMessageInterruptTest.java
@@ -69,7 +69,7 @@ public class ClusteredLargeMessageInterruptTest extends 
SoakTestBase {
          HelperCreate cliCreateServer = helperCreate();
          
cliCreateServer.setRole("amq").setUser("artemis").setPassword("artemis").setAllowAnonymous(true).setArtemisInstance(serverLocation).
             setConfiguration("./src/main/resources/servers/lmbroker1");
-         cliCreateServer.setArgs("--java-options", 
"-Djava.rmi.server.hostname=localhost", "--clustered", "--static-cluster", 
"tcp://localhost:61716", "--queues", "ClusteredLargeMessageInterruptTest", 
"--name", "lmbroker1");
+         cliCreateServer.setArgs("--java-options", 
"-Djava.rmi.server.hostname=localhost", "--clustered", "--static-cluster", 
"tcp://localhost:61716", "--queues", "ClusteredLargeMessageInterruptTest", 
"--name", "lmbroker1", "--cluster-user", "my-cluster-user", 
"--cluster-password", "my-cluster-password");
          cliCreateServer.createServer();
       }
 
@@ -80,7 +80,7 @@ public class ClusteredLargeMessageInterruptTest extends 
SoakTestBase {
          HelperCreate cliCreateServer = helperCreate();
          
cliCreateServer.setRole("amq").setUser("artemis").setPassword("artemis").setAllowAnonymous(true).setNoWeb(false).setArtemisInstance(serverLocation).
             
setConfiguration("./src/main/resources/servers/lmbroker2").setPortOffset(100);
-         cliCreateServer.setArgs("--java-options", 
"-Djava.rmi.server.hostname=localhost", "--clustered", "--static-cluster", 
"tcp://localhost:61616", "--queues", "ClusteredLargeMessageInterruptTest", 
"--name", "lmbroker2");
+         cliCreateServer.setArgs("--java-options", 
"-Djava.rmi.server.hostname=localhost", "--clustered", "--static-cluster", 
"tcp://localhost:61616", "--queues", "ClusteredLargeMessageInterruptTest", 
"--name", "lmbroker2", "--cluster-user", "my-cluster-user", 
"--cluster-password", "my-cluster-password");
          cliCreateServer.createServer();
       }
    }
diff --git 
a/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/interruptlm/LargeMessageInterruptTest.java
 
b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/interruptlm/LargeMessageInterruptTest.java
index c6f98e1e88..63ec63e63e 100644
--- 
a/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/interruptlm/LargeMessageInterruptTest.java
+++ 
b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/interruptlm/LargeMessageInterruptTest.java
@@ -66,7 +66,7 @@ public class LargeMessageInterruptTest extends SoakTestBase {
          HelperCreate cliCreateServer = helperCreate();
          
cliCreateServer.setRole("amq").setUser("artemis").setPassword("artemis").setAllowAnonymous(true).setArtemisInstance(serverLocation).
             setConfiguration("./src/main/resources/servers/interruptlm");
-         cliCreateServer.setArgs("--java-options", 
"-Djava.rmi.server.hostname=localhost", "--clustered", "--static-cluster", 
"tcp://localhost:61716", "--queues", "ClusteredLargeMessageInterruptTest", 
"--name", "lmbroker1");
+         cliCreateServer.setArgs("--java-options", 
"-Djava.rmi.server.hostname=localhost", "--clustered", "--static-cluster", 
"tcp://localhost:61716", "--queues", "ClusteredLargeMessageInterruptTest", 
"--name", "lmbroker1", "--cluster-user", "my-cluster-user", 
"--cluster-password", "my-cluster-password");
          cliCreateServer.createServer();
       }
    }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to