[
https://issues.apache.org/activemq/browse/CAMEL-2987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61685#action_61685
]
Claus Ibsen commented on CAMEL-2987:
------------------------------------
Its now integrated with Spring XML so you can do
{code:xml}
<!-- START SNIPPET: e1 -->
<!-- define the jasypt properties parser with the given password to be used
-->
<bean id="jasypt"
class="org.apache.camel.component.jasypt.JasyptPropertiesParser">
<!-- password is mandatory, you can prefix it with sysenv: or sys: to
indicate it should use
an OS environment or JVM system property value, so you dont have
the master password defined here -->
<property name="password" value="secret"/>
</bean>
<camelContext xmlns="http://camel.apache.org/schema/spring">
<!-- define the camel properties placeholder, and let it leverage
jasypt -->
<propertyPlaceholder id="properties"
location="classpath:org/apache/camel/component/jasypt/myproperties.properties"
propertiesParserRef="jasypt"/>
<route>
<from uri="direct:start"/>
<to uri="{{cool.result}}"/>
</route>
</camelContext>
<!-- END SNIPPET: e1 -->
{code}
Now imagine the to uri was a ftp endpoint, then you could have used a
placeholder for the password value in the endpoint uri, and have that password
stored in the properties file:
{code}
ftp.username=scott
ftp.password=ENC(bsW9uV37gQ0QHFu7KO03Ww==)
{code}
And you dont have to restrict to password, as we can have any value encrypted.
> Allow encrypted passwords to be used in properties files
> --------------------------------------------------------
>
> Key: CAMEL-2987
> URL: https://issues.apache.org/activemq/browse/CAMEL-2987
> Project: Apache Camel
> Issue Type: New Feature
> Components: camel-core
> Reporter: Claus Ibsen
> Assignee: Ashwin Karpe
> Fix For: 2.5.0
>
>
> We should add a feature to the properties component and simple language so it
> can resolve encrypted usernames/passwords etc.
> We can use Jasypt as the library
> http://www.jasypt.org/
> And then add a prefix to the components component
> {code}
> foo.properties
> username=#ENC#4fg48dgh58747f744#ENC#
> {code}
> Just figuring our what the prefix/suffix tokens should be. Most likely
> something better than {{#ENC#}}
> The simple language could have a built in function for this as well.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.