Spring Cloud Stream - Solace JMS Client Passwords configuration
Hi All,
Let me share steps we use for us,
1. We have autoconfiguration for queues and topics, (using solace binders(Sink, Source, StreamBinders))
2. We have solace auto configurations
3. Solace clients( random generated clients) connects to queues
4. I have to decrypt the password and inject the same password in runtime by using another service, but I am not able to understand which object/factory I should create, (Don't forget I am not creating any factory, JCSMPSession ), so do let me know if any suggestions on this,
5. at same time I also have to configure truststore password, so any suggestions guys,
Thank you
Comments
-
Hi @dam_player,
I think I follow. So essentially you are using the Solace Spring Cloud Stream Binder and you want to encrypt the passwords for both the client-username, but also for your truststore/keystore?If I'm correct, then I would go ahead and take a look at using JASYPT for property encryption with Spring Boot: https://www.baeldung.com/spring-boot-jasypt
Hope that helps!
0 -
Thanks @marc, I already have lib to encrypt and decrypt, but only problem is I am not able to pass the same password to Solace Java configuration for usage, Any class bean which can be used to pass this decrypted password? Like SpringJcsmpFactory, JCSMPProperties which I can configure? Because I tried these options but not able to solve this issue...
0 -
Hey @dam_player,
You should be able to configure the password directly in your Spring configuration, take a look at our Spring Boot starter docs here: https://github.com/SolaceProducts/solace-spring-boot/tree/master/solace-spring-boot-starters/solace-java-spring-boot-starter#updating-your-application-propertiesI believe the
solace.java.clientPassword
andsolace.java.apiProperties.ssl_trust_store_password
are the properties that you'd want to encrypt.0 -
Hi @marc ,
if i use an encrypted pwd for the property solace.java.clientPassword
How spring cloud framework would dynamically use the custom library to decrypt and inject the decrypted password to connect to solace? i couldn't find enough documentation around to it.
Any advise?
1 -
Hi @nbommidi,
It looks like the recommended way to do this with Spring Boot is still using jasypt. I think these two resources should give you the info that you need to try it out:
- https://www.north-47.com/knowledge-base/spring-boot-password-encryption-with-jasypt/
- https://www.baeldung.com/spring-boot-jasypt
And looks like the project's github is here to find the code/docs: https://github.com/ulisesbocchio/jasypt-spring-boot
Hope that helps!
0