How to migrate Jasypt encrypter in Fuse 7 to Camel 4 for SpringBoot runtime ?

Solution Verified - Updated -

Issue

  • The following Spring XML snippet in Fuse 7 works:

<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> <!-- define the jasypt properties parser with the given password to be used. This is used within camel context --> <bean id="jasyptParser" class="org.apache.camel.component.jasypt.JasyptPropertiesParser"> <property name="password" value="abcdef" /> <property name="algorithm" value="PBEWITHSHA256AND256BITAES-CBC-BC" /> <!--property name="algorithm" value="PBEWithHMACSHA512AndAES_256" /--> </bean> <!-- bridge to spring property placeholder --> <bean id="bridgePropertyPlaceholder" class="org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer" primary="true"> <property name="location" value="file:/path/to/application.properties"/> <property name="parser" ref="jasyptParser"/> </bean> </beans>
  • In application.properties, the encrypted password is kept like :
encrypted.prop=ENC(....)

Environment

Code migration

  • Old environment: Fuse 7
  • New environment Camel 4 runtime for SpringBoot runtime

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content