How to encrypt passwords and use encrypted values in blueprint or spring xml files ?
Issue
- User is using
fabricenvironment. - Following way properties are fetched using source
CLIcommand.
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
karafconsole 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 of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
