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