[
https://issues.apache.org/jira/browse/CAMEL-27764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18152713#comment-18152713
]
Guillaume Nodet commented on CAMEL-27764:
-----------------------------------------
Both bugs are confirmed in the current code on main:
*1. Empty password:* IbmMQInfraService.password() returns "" (the interface
default), but IbmMQLocalContainerInfraService starts the container with
MQ_APP_PASSWORD=passw0rd (from IbmMQProperties.DEFAULT_APP_PASSWORD). The local
container service never overrides password(), so camel infra run ibmmq reports
an empty password. Fix: override password() in IbmMQLocalContainerInfraService
to return IbmMQProperties.DEFAULT_APP_PASSWORD.
*2. Wrong AMQP broker URL:* IbmMQInfraService.brokerUrl() returns
amqp://localhost:1414 but port 1414 is the native IBM MQ listener (MQ wire
protocol), not AMQP. IBM MQ exposes AMQP on port 5672 by default, not 1414.
Fix: return the correct AMQP URL using the AMQP port (5672) or remove/fix the
brokerUrl() default to reflect the right port.
This issue is being investigated by a coding agent (on behalf of gnodet).
_Note: This comment was generated by an AI coding agent and requires manual
verification._
> camel-test-infra-ibmmq - camel infra run ibmmq shows an empty password and a
> wrong amqp broker URL
> --------------------------------------------------------------------------------------------------
>
> Key: CAMEL-27764
> URL: https://issues.apache.org/jira/browse/CAMEL-27764
> Project: Camel
> Issue Type: Bug
> Components: camel-test-infra
> Reporter: Claus Ibsen
> Assignee: Guillaume Nodet
> Priority: Minor
> Fix For: 4.25.0
>
>
> {{camel infra run ibmmq}} prints connection details that do not work:
> {code:json}
> "brokerUrl" : "amqp://localhost:1414",
> "channel" : "DEV.APP.SVRCONN",
> "password" : "",
> "port" : 1414,
> "queueManager" : "QM1",
> "username" : "app"
> {code}
> * *password* is empty, but the container is started with {{MQ_APP_PASSWORD}}
> = {{passw0rd}} (IbmMQLocalContainerInfraService,
> IbmMQProperties.DEFAULT_APP_PASSWORD). IbmMQInfraService.password() has a
> default that returns "", and the container service does not override it.
> * *brokerUrl* is {{amqp://localhost:1414}}. Port 1414 is the IBM MQ listener
> (MQ client protocol), not AMQP, so the URL is wrong for any client.
> A user, or an AI agent, that takes these values gets an authentication error
> when a Camel route connects with the JMS component:
> {noformat}
> JMSWMQ2013: The security authentication was not valid that was supplied for
> queue manager 'QM1' with connection mode 'Client' and host name
> 'localhost(1414)'.
> MQRC_NOT_AUTHORIZED (2035)
> {noformat}
> With {{username=app&password=passw0rd}} on the JMS endpoint, sending and
> receiving works (checked on Camel 4.24.0-SNAPSHOT, com.ibm.mq.jakarta.client
> 9.4.3.0, on an arm64 Mac where Docker runs the amd64 image with Rosetta).
> h3. Fix
> * password() returns the password the container is started with
> (IbmMQProperties.DEFAULT_APP_PASSWORD).
> * brokerUrl() is removed, or gives a value that is true for IBM MQ (for
> example the host, port, queue manager and channel that a client needs).
> * The admin user for the web console (admin / passw0rd, see the comment in
> IbmMQLocalContainerInfraService) could be shown next to uiUrl.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)