Quantcast

how to hide user and password in sftp in for statement

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

how to hide user and password in sftp in for statement

David Capwell
Hi, I am trying to use camel to get data out of an sftp end point.  At the
moment I have two issues. First, I want to hide the username and password.
 Second I would like to be able to reuse the uri and allow the sftp's
directory to be paramiterized.  Going over the docs online, I don't see a
clear way to do this.  I have found
http://camel.465427.n5.nabble.com/Using-dynamic-parameter-values-in-XML-DSL-Route-td4414073.htmltalk
about using header and recipientList to allows params, but that only
effects the to, is there another way to do this in from (can't use direct
since we won't know the routes till runtime)?

Below is my current XML for this (java code is not using spring):

<routes xmlns="http://camel.apache.org/schema/spring" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd">

  <route>
    <from
        uri="sftp://
[hidden email]/path/to/data?password=password&amp;initialDelay=200&amp;delay=200000&amp;binary=true&amp;idempotent=true&amp;noop=true
"/>
    <setHeader headerName="CamelAwsS3Key">
      <simple>inbox/${in.header.CamelFileName}</simple>
    </setHeader>
    <to
uri="aws-s3://mybucket?amazonS3Client=#amazonS3Client&amp;delay=5000&amp;maxMessagesPerPoll=5"/>

  </route>

</routes>

thanks for your time reading this email
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: how to hide user and password in sftp in for statement

Claus Ibsen-2
Hi

You can encrypt parameters of the endpoints using jasypt
http://camel.apache.org/jasypt.html



On Fri, Jul 6, 2012 at 10:16 PM, David Capwell <[hidden email]> wrote:

> Hi, I am trying to use camel to get data out of an sftp end point.  At the
> moment I have two issues. First, I want to hide the username and password.
>  Second I would like to be able to reuse the uri and allow the sftp's
> directory to be paramiterized.  Going over the docs online, I don't see a
> clear way to do this.  I have found
> http://camel.465427.n5.nabble.com/Using-dynamic-parameter-values-in-XML-DSL-Route-td4414073.htmltalk
> about using header and recipientList to allows params, but that only
> effects the to, is there another way to do this in from (can't use direct
> since we won't know the routes till runtime)?
>
> Below is my current XML for this (java code is not using spring):
>
> <routes xmlns="http://camel.apache.org/schema/spring" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"
>         xsi:schemaLocation="http://camel.apache.org/schema/spring
> http://camel.apache.org/schema/spring/camel-spring.xsd">
>
>   <route>
>     <from
>         uri="sftp://
> [hidden email]/path/to/data?password=password&amp;initialDelay=200&amp;delay=200000&amp;binary=true&amp;idempotent=true&amp;noop=true
> "/>
>     <setHeader headerName="CamelAwsS3Key">
>       <simple>inbox/${in.header.CamelFileName}</simple>
>     </setHeader>
>     <to
> uri="aws-s3://mybucket?amazonS3Client=#amazonS3Client&amp;delay=5000&amp;maxMessagesPerPoll=5"/>
>
>   </route>
>
> </routes>
>
> thanks for your time reading this email



--
Claus Ibsen
-----------------
FuseSource
Email: [hidden email]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: how to hide user and password in sftp in for statement

David Capwell
Ill try to setup jasypt to hide the password.

Is there a way to paramiterize the from URI?  I can see strings getting
longer and longer with only slight differences, so would be good to reuse.
 When I was doing some digging I saw a way in spring to have the from
reference a bean, but in a non spring context i haven't found something yet.

thanks for your time

On Sat, Jul 7, 2012 at 1:09 AM, Claus Ibsen <[hidden email]> wrote:

> Hi
>
> You can encrypt parameters of the endpoints using jasypt
> http://camel.apache.org/jasypt.html
>
>
>
> On Fri, Jul 6, 2012 at 10:16 PM, David Capwell <[hidden email]> wrote:
> > Hi, I am trying to use camel to get data out of an sftp end point.  At
> the
> > moment I have two issues. First, I want to hide the username and
> password.
> >  Second I would like to be able to reuse the uri and allow the sftp's
> > directory to be paramiterized.  Going over the docs online, I don't see a
> > clear way to do this.  I have found
> >
> http://camel.465427.n5.nabble.com/Using-dynamic-parameter-values-in-XML-DSL-Route-td4414073.htmltalk
> > about using header and recipientList to allows params, but that only
> > effects the to, is there another way to do this in from (can't use direct
> > since we won't know the routes till runtime)?
> >
> > Below is my current XML for this (java code is not using spring):
> >
> > <routes xmlns="http://camel.apache.org/schema/spring" xmlns:xsi="
> > http://www.w3.org/2001/XMLSchema-instance"
> >         xsi:schemaLocation="http://camel.apache.org/schema/spring
> > http://camel.apache.org/schema/spring/camel-spring.xsd">
> >
> >   <route>
> >     <from
> >         uri="sftp://
> >
> [hidden email]/path/to/data?password=password&amp;initialDelay=200&amp;delay=200000&amp;binary=true&amp;idempotent=true&amp;noop=true
> > "/>
> >     <setHeader headerName="CamelAwsS3Key">
> >       <simple>inbox/${in.header.CamelFileName}</simple>
> >     </setHeader>
> >     <to
> >
> uri="aws-s3://mybucket?amazonS3Client=#amazonS3Client&amp;delay=5000&amp;maxMessagesPerPoll=5"/>
> >
> >   </route>
> >
> > </routes>
> >
> > thanks for your time reading this email
>
>
>
> --
> Claus Ibsen
> -----------------
> FuseSource
> Email: [hidden email]
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: how to hide user and password in sftp in for statement

Claus Ibsen-2
On Tue, Jul 10, 2012 at 6:06 PM, David Capwell <[hidden email]> wrote:
> Ill try to setup jasypt to hide the password.
>
> Is there a way to paramiterize the from URI?  I can see strings getting
> longer and longer with only slight differences, so would be good to reuse.
>  When I was doing some digging I saw a way in spring to have the from
> reference a bean, but in a non spring context i haven't found something yet.
>

Yeah you can use property placeholders from Spring and/or Camel
http://camel.apache.org/how-do-i-use-spring-property-placeholder-with-camel-xml.html
http://camel.apache.org/using-propertyplaceholder.html
http://camel.apache.org/properties.html



> thanks for your time
>
> On Sat, Jul 7, 2012 at 1:09 AM, Claus Ibsen <[hidden email]> wrote:
>
>> Hi
>>
>> You can encrypt parameters of the endpoints using jasypt
>> http://camel.apache.org/jasypt.html
>>
>>
>>
>> On Fri, Jul 6, 2012 at 10:16 PM, David Capwell <[hidden email]> wrote:
>> > Hi, I am trying to use camel to get data out of an sftp end point.  At
>> the
>> > moment I have two issues. First, I want to hide the username and
>> password.
>> >  Second I would like to be able to reuse the uri and allow the sftp's
>> > directory to be paramiterized.  Going over the docs online, I don't see a
>> > clear way to do this.  I have found
>> >
>> http://camel.465427.n5.nabble.com/Using-dynamic-parameter-values-in-XML-DSL-Route-td4414073.htmltalk
>> > about using header and recipientList to allows params, but that only
>> > effects the to, is there another way to do this in from (can't use direct
>> > since we won't know the routes till runtime)?
>> >
>> > Below is my current XML for this (java code is not using spring):
>> >
>> > <routes xmlns="http://camel.apache.org/schema/spring" xmlns:xsi="
>> > http://www.w3.org/2001/XMLSchema-instance"
>> >         xsi:schemaLocation="http://camel.apache.org/schema/spring
>> > http://camel.apache.org/schema/spring/camel-spring.xsd">
>> >
>> >   <route>
>> >     <from
>> >         uri="sftp://
>> >
>> [hidden email]/path/to/data?password=password&amp;initialDelay=200&amp;delay=200000&amp;binary=true&amp;idempotent=true&amp;noop=true
>> > "/>
>> >     <setHeader headerName="CamelAwsS3Key">
>> >       <simple>inbox/${in.header.CamelFileName}</simple>
>> >     </setHeader>
>> >     <to
>> >
>> uri="aws-s3://mybucket?amazonS3Client=#amazonS3Client&amp;delay=5000&amp;maxMessagesPerPoll=5"/>
>> >
>> >   </route>
>> >
>> > </routes>
>> >
>> > thanks for your time reading this email
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> FuseSource
>> Email: [hidden email]
>> Web: http://fusesource.com
>> Twitter: davsclaus, fusenews
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>>



--
Claus Ibsen
-----------------
FuseSource
Email: [hidden email]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Loading...