Uploaded image for project: 'Qpid JMS'
  1. Qpid JMS
  2. QPIDJMS-370

Consider treating tls keystore and trust store property strings as urls or file paths

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • 0.30.0
    • None
    • qpid-jms-client
    • None

    Description

      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:

      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)

      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            gtully Gary Tully
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: