Hi Thai, this is more a question for ArtemisCloud.io[1] than the Apache ActiveMQ Artemis project. To disable the GuestLoginModule you need to set spec.requireLogin property to true, for further details related to the ArtemisCloud.io[1] operator feel free to ask your question at https://github.com/artemiscloud/activemq-artemis-operator/discussions
[1] https://artemiscloud.io/ Regards, Domenico On Thu, 16 Mar 2023 at 21:10, Thai Le <lnthai2...@gmail.com> wrote: > Hello, > I am trying to configure an credential for a cluster of artemis broker > deployed by operator. Here is my helm chart: > > apiVersion: broker.amq.io/v1beta1 > kind: ActiveMQArtemis > metadata: > name: activemq-artemis-broker > spec: > console: > expose: true > sslEnabled: false > deploymentPlan: > size: 2 > image: placeholder > adminUser: admin > adminPassword: admin > ingressDomain: 'my-laptop.com' > > the adminUser and adminPassword are found in the CRD > https://artemiscloud.io/docs/help/custom-resources/ > The chart deployed fine, however when I use java client to talk to the > broker, it does seem to ignore the credential. I basically can use any > username/password. Here is my client code: > > public List<String> getAddresses() throws Exception { > try (ServerLocator locator = > ActiveMQClient.createServerLocator(broker.getUrl()); > ClientSessionFactory factory = locator.createSessionFactory(); > ClientSession session = factory.createSession("randomUser", > "anyPassword", false, true, true, > true, 10);) { > > try (ClientRequestor requestor = new ClientRequestor(session, > "activemq.management");) { > ClientMessage message = session.createMessage(false); > ManagementHelper.putOperationInvocation(message, > ResourceNames.BROKER, "listAddresses", ", "); > > session.start(); > > ClientMessage reply = requestor.request(message); > Object result = ManagementHelper.getResult(reply); > if (ManagementHelper.hasOperationSucceeded(reply)) { > return Arrays.asList(((String) result).split(", ")); > } else { > throw new RuntimeException("Unexpected reply from > message broker:" + (String) result); > } > } > } > } > > Is there an option that i have to put in the chart to force credential > check? > > Regards > Thai Le >