We do this also with the Spring DSL by using Springs expression language.
Sent from a mobile device
Am 01.03.2013 10:58 schrieb "Raul Kripalani" <[email protected]>:
> We support Jasypt [1] for encrypting/decrypting parameters out-of-the-box.
> Is that something you could use?
> Otherwise, if you absolutely have to stick with your custom library and
> utility class, could you build your route using Java DSL?
>
> In that case you could do something like:
>
> String decrypted =
>
> EncryptionUtil.decrypt(getContext().resolvePropertyPlaceholders("{{myproperty}}"));
> from("sftp://[email protected]//temp?password=" + decrypted +
> "&localWorkDirectory=/tmp")...
>
>
> Note that the value will still be visible in JMX instrumentation, Tracers,
> perhaps logs, etc. Not sure if camel-jasypt masks the encrypted values in
> those places.
>
> If you can't use Java DSL, you'll have to play some tricks with Spring,
> post construct, etc. Maybe you could investigate down the path of the ref:
> component [2].
>
> Regards,
>
> [1] http://camel.apache.org/jasypt.html
> [2] http://camel.apache.org/ref.html
>
> *Raúl Kripalani*
> Apache Camel Committer
> Enterprise Architect, Program Manager, Open Source Integration specialist
> http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani
> http://blog.raulkr.net | twitter: @raulvk <http://twitter.com/raulvk>
>
> On Fri, Mar 1, 2013 at 4:27 PM, sarfaraj <[email protected]> wrote:
>
> > Hi,
> >
> > I am using sftp component in "from" tag. In that, I want to pass
> decrypted
> > value using our custom utility(Java Code). (i.e.
> > EncryptionUtil.decrypt(password); )
> >
> > I am reading/getting password value from .cfg file, which is encrypted.
> >
> > <from
> > uri="sftp://
> >
> [email protected]//temp?password={{server.password}}&localWorkDirectory=/tmp
> > ">
> >
> > Could someone tell me how to do that ?
> >
> > /Sarfaraj
> >
> >
> >
> > --
> > View this message in context:
> >
> http://camel.465427.n5.nabble.com/How-to-pass-decrypted-value-in-from-tag-tp5728363.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
>