0

Currently, I am setting up CA authentication for a java application using qpid jms.

I am happy to say I have gotten everything to work with the connection itself, and the passing of authorized messages between two applications.

Because of future application features, I need the userId to be present in every message that is sent over the connection. The problem is that because I am using certifications and keystores and such, the username field of the connection is never filled in, as the broker simply uses the certificate information to authorize the messages.

I am wondering if there is some way for me to specify keystore info in the broker connection url, without username:password, and have the username from the certificate added to each message sent across the connection. (The userId would populate if I set up the connection with a username, but because only a cert is used for verification, that field is null). For security reasons, I dont want to hardcode the cert's username as the connection username, but pull it from the cert and get it there. I have gotten code to work with manually loading the keystore and parsing the string for the username, but I am scared this solution might not work in the long run, as well as being relatively inefficient. (Looking for say a method in the connection class that will take the keystore info it used in the URL and give me back the username set in the cert in said keystore).

I am using:

Qpid JMS AMQP 0-x 6.4.0

broker: QPID c++ 1.39.0

BMH
  • 3
  • 3
  • 1
    Maybe I missed it, but I don't see where you say what broker you're using. In my experience it is the broker that would perform this operation on the message. – Justin Bertram Aug 10 '20 at 15:02
  • You are correct, I did not specify what broker I am using. I did not think it was a broker related thing, but now that you mention it, I will take a look into this. Thanks! – BMH Aug 10 '20 at 15:08
  • I have included the broker: QPID c++ 1.39.0. I am unable to find the necessary flags to set. – BMH Aug 10 '20 at 15:49
  • I'm not an expert on the Qpid C++ broker. It's certainly possible that it doesn't support the feature you want. I work on ActiveMQ Artemis which I believe *does* support the feature you want. However, it only supports AMQP 1.0 and you're using 0-x. As I understand it, most of the industry has moved away from 0-x so it may be hard to get new features added to brokers supporting it. – Justin Bertram Aug 10 '20 at 16:10

0 Answers0