You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Gary Tully (Jira)" <ji...@apache.org> on 2021/09/03 14:51:00 UTC

[jira] [Closed] (QPIDJMS-370) Consider treating tls keystore and trust store property strings as urls or file paths

     [ https://issues.apache.org/jira/browse/QPIDJMS-370?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Tully closed QPIDJMS-370.
------------------------------
    Resolution: Won't Fix

the safest approach is to keep the path value as a path so there is no chance of picking a store from some arbitrary location. we reserve the right to get wiser :-)

> Consider treating tls keystore and trust store property strings as urls or file paths
> -------------------------------------------------------------------------------------
>
>                 Key: QPIDJMS-370
>                 URL: https://issues.apache.org/jira/browse/QPIDJMS-370
>             Project: Qpid JMS
>          Issue Type: Improvement
>          Components: qpid-jms-client
>    Affects Versions: 0.30.0
>            Reporter: Gary Tully
>            Priority: Minor
>
> For testing and for general usability - supporting a url or file path seems sensible. I was caught by an Artemis integration test - where Artemis treats the property as a url or string but qpid jms does not.
> eg: a command line test failed due to a cross module resource dependency. The cross module dependency is not ideal but it can make sense.
> error:
> {code}Test
> testConnection(org.apache.activemq.artemis.tests.integration.amqp.JMSSaslExternalTest) Time elapsed: 0.773 sec <<< ERROR!
> javax.jms.JMSException: file:/home/timothy/.m2/repository/org/apache/activemq/tests/unit-tests/2.6.0-SNAPSHOT/unit-tests-2.6.0-SNAPSHOT-tests.jar!/client-side-keystore.jks (No such file or directory)
> at org.apache.qpid.jms.exceptions.JmsExceptionSupport.create(JmsExceptionSupport.java:86)
> at org.apache.qpid.jms.exceptions.JmsExceptionSupport.create(JmsExceptionSupport.java:108)
> at org.apache.qpid.jms.JmsConnection.connect(JmsConnection.java:168)
> at org.apache.qpid.jms.JmsConnectionFactory.createConnection(JmsConnectionFactory.java:203)
> at org.apache.activemq.artemis.tests.integration.amqp.JMSSaslExternalTest.testConnection(JMSSaslExternalTest.java:116)
> Caused by: java.io.FileNotFoundException: file:/home/timothy/.m2/repository/org/apache/activemq/tests/unit-tests/2.6.0-SNAPSHOT/unit-tests-2.6.0-SNAPSHOT-tests.jar!/client-side-keystore.jks (No such file or directory)
> at java.io.FileInputStream.open0(Native Method)
> at java.io.FileInputStream.open(FileInputStream.java:195)
> at java.io.FileInputStream.(FileInputStream.java:138)
> at org.apache.qpid.jms.transports.TransportSupport.loadStore(TransportSupport.java:287)
> at org.apache.qpid.jms.transports.TransportSupport.loadKeyManagers(TransportSupport.java:250)
> at org.apache.qpid.jms.transports.TransportSupport.createSslContext(TransportSupport.java:99)
> at org.apache.qpid.jms.transports.TransportSupport.createSslHandler(TransportSupport.java:74)
> at org.apache.qpid.jms.transports.netty.NettyTcpTransport.connect(NettyTcpTransport.java:136)
> at org.apache.qpid.jms.provider.amqp.AmqpProvider$1.run(AmqpProvider.java:203)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748){code}
> For reference, the relevant code in artemis to handle keystore paths is at:
> https://github.com/apache/activemq-artemis/blob/9c40a514f26c28b591516fa89f761740f1bc29dd/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/SSLSupport.java#L209



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org