简体   繁体   中英

How do I configure SSL, username and password for Spring Boot Artemis on application.properties?

I'm using Spring Boot 1.3.1 and I can auto-configure my JMS components through application.properties.

As I'm using Artemis as my message broker, I'm using spring-boot-starter-artemis, and as states the documentation in this link , all I have to do is replace the spring.hornetq.* properties and place spring.artemis.* instead.

The problem is that it doesn't show how to configure the username, password and SSL configuration for HornetQ/Artemis. I configured Artemis to use SSL and user/pass authentication like it's shown in here .

Does anyone know what properties can I state to add SSL and user/pass?

Thanks!

Spring Boot does not support such arrangement. Not everything should happen via properties if you ask me but in any case a good way to find out is asking your IDE to auto-complete the keys for that namespace (you'll quickly find out there is nothing related to SSL and security in there). If you don't use an IDE, this appendix should help

Okay, currently the Artemis Spring Boot starter is very basic, it really doesn't support clusters, SSL or client authentication.

Doing a quick look at the starter's source code in GitHub, in the ArtemisConnectionFactoryFactory.java file, at lines 127 and onwards, I will have to add the TransportConstants necessary to configure SSL, authentication, etc.

An example of a more complete connection configuration is in Artemis' test source code, in CoreClientOverTwoWaySSLTest.java , on lines 178 and onwards, there is a really complete connection setup, so to contribute, I have to change the Artemis auto-configuration properties to take the new property options, and add them all to ArtemisConnectionFactoryFactory.java following the example in CoreClientOverTwoWaySSLTest.java

I'll do a fork on the starter, make the modifications, and figure out what bureaucracy is needed to submit a pull request and get it accepted on spring-boot.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM