How to encrypt passwords and use encrypted values in blueprint or spring xml files ?

Solution Verified - Updated -

Issue

  • User is using fabric environment.
  • Following way properties are fetched using source CLI command.
Karaf>source C:/fabricProfileProperties/custom_profile_env.properties
fabric:profile-edit --pid com.xxx.yyy/oracleAQ.url=${ORACLEAQ_URL} IMRProfile
fabric:profile-edit --pid com.xxx.yyy/oracleAQ.username=${ORACLEAQ_USERNAME} IMRProfile
fabric:profile-edit --pid com.xxx.yyy/oracleAQ.password=${ORACLEAQ_PASSWORD} IMRProfile
  • User need to put encrypted password in the properties files.
  • And then user need to use the password after decryption in blue print.
<bean id="oracleQueueCredentials"
        class="org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter">
        <property name="targetConnectionFactory" ref="connectionFactoryOracleAQQueue" />
        <property name="username" value="${oracleAQ.username}" />
        <property name="password" value="${oracleAQ.password}" />
    </bean> 
  • Are there any example of encrypting the password from karaf console and insert them in property file.
  • And how one can decrypt the same in the bean config.

Environment

  • Red Hat JBoss Fuse
    • 6.1.0

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