rh-messaging / cli-java

cli-java is a collection of commandline messaging clients suitable for interacting with Message Oriented Middleware such as ActiveMQ Artemis broker or Qpid Dispatch router.
Apache License 2.0
8 stars 7 forks source link

Client options --conn-ssl-* do not work and -Djavax.net.ssl.* counterparts must be supplied #139

Open rvais opened 4 years ago

rvais commented 4 years ago

While testing SSL/TLS secured routes for broker on openshift, I have found out that when using cli-qpid-jms client, following ssl options do not work.

 --conn-ssl-keystore-location
 --conn-ssl-keystore-password
 --conn-ssl-truststore-location
 --conn-ssl-truststore-password

To make it work their JVM counterparts with the same values must be supplied.

 -Djavax.net.ssl.keyStore
 -Djavax.net.ssl.trustStore
 -Djavax.net.ssl.keyStorePassword
 -Djavax.net.ssl.trustStorePassword

This issue might be impacting other clients as well. Haven't verified that yet.

jiridanek commented 4 years ago

cc @rkubis @michalxo stuchlik!, fyi

rkubis commented 4 years ago

OK 👓

michalxo commented 1 year ago
2023-01-19T11:56:47.893Z INFO  [Executor:52] [tls-tests] systemtests-clients-59ccb5b786-cfs8l Running command: [/bin/bash -c java -jar /main/cli-qpid.jar sender --broker-uri amqps://artemis-broker-my-amqp-0-svc-rte-tls-tests.apps.domain.com:443 --address myAddress0::myQueue0 --log-msgs json --conn-ssl-verify-host true --conn-ssl-keystore-location client.ks --conn-ssl-keystore-password clientPass --conn-ssl-truststore-location client.ts --conn-ssl-truststore-password clientPass --count 10]
2023-01-19T11:56:51.020Z DEBUG [MessagingClient:73] Failed to connect to remote at: amqps://artemis-broker-my-amqp-0-svc-rte-tls-tests.apps.mtoth-412m.amq-broker-qe.psi.redhat.com:443
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
jakarta.jms.JMSException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target