Search code examples
javasecurityrabbitmqtokensasl

Adding Security Token to Rabbit MQ Messages


I am new to Rabbit MQ. Please guide me how to add a security token generated by a security token service while sending a message to the queue in Rabbit MQ Server.

Description: We are mocking a Messaging Infrastructure with Rabbit MQ as the actual is not available right now for this partial delivery of the project. As the actual specification of the messaging infrastructure says that it has to be authenticated by using Security Tokens from STS ( Security token Service ), we have to atleast mock this feature with Rabbit MQ as the scope of the PD mandates this. Googling and Rabbit MQ site helped be a bit... i just know the term now.. SASL.. which could help me embed the token with the request. Currently we wrote a Java code with Rabbit MQ APIs to send a XML message to the Queue.

Need more info on how i can embed the security token while sending a message to Queue.

Note: the happy part is, the scope is not included for validating the token.. the token can be just in the logs or some ways the testing team can verify it.


Solution

  • There is no such feature in RabbitMQ. To add security tokens to individual messages, you can use existing frameworks or roll your own solution.

    RabbitMQ supports SASL authentication, but this is on connection level, not per individual message.