Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-7276

Unable to establish mutual authentication through HTTPS transport

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • 5.11.0, 5.15.9
    • None
    • None

    Description

      I am trying to establish mutual authentication over HTTPS transport but found that only the one way authentication is established.

      Below is my code snippet:

       

      Client Java Program:

      System.setProperty("javax.net.ssl.keyStore", "D://project//test//POC//client.ks");
      System.setProperty("javax.net.ssl.keyStorePassword", "password");
      System.setProperty("javax.net.ssl.trustStore", "D://project//test//POC//client.ts");
      System.setProperty("javax.net.ssl.trustStorePassword", "password");
      
      cf=new ActiveMQConnectionFactory("https://localhost:8443");
      con=cf.createConnection();
      Session s=con.createSession(false,Session.AUTO_ACKNOWLEDGE);
      Destination d;
      d=s.createQueue("TestQueue");
      MessageProducer mp;
      mp=s.createProducer(d);
      con.start();
      // prepare the message
      mp.send(message)

      Active MQ configuration

       

      <transportConnector name="https" uri="https://localhost:8443?transport.needClientAuth=true"/>
      
      <sslContext>
         <sslContext keyStore="file:D:/project/test/POC/broker.ks"
          keyStorePassword="password"
          trustStore="file:D:/project/test/POC/broker.ts"
          trustStorePassword="password"/>
      </sslContext>

       

      While running the program, the message is being sent successfully but I am not finding any difference in the logs if "needClientAuth" is set to false.

      If the transport connector is changed from https to ssl, I can view the detailed ssl handshake logs which implies that "Mutual Authentication" has been established

      Attachments

        Activity

          People

            Unassigned Unassigned
            diptesh2007 Diptesh Chakraborty
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: