You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by sarfaraj <sa...@gmail.com> on 2012/08/28 12:45:57 UTC
Camel SSH Issue - Password in plain text.
I used Camel SSH component in my application, but the password is in plain
text.
I wanted to know, how can we avoid plain text password in a best way?
I think camel-jasypt will use to hide sensitive information. I would like to
know the best way to avoid plain text password in camel application.
Any examples/links ?
/Sarfaraj
--
View this message in context: http://camel.465427.n5.nabble.com/Camel-SSH-Issue-Password-in-plain-text-tp5718183.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel SSH Issue - Password in plain text.
Posted by sarfaraj <sa...@gmail.com>.
Thanks, I will try this
--
View this message in context: http://camel.465427.n5.nabble.com/Camel-SSH-Issue-Password-in-plain-text-tp5718183p5718205.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel SSH Issue - Password in plain text.
Posted by londonukm <gr...@outlook.com>.
Hi
so instead of this Java DSL version:
SshComponent sshComponent = new SshComponent();
sshComponent.setHost("localhost");
sshComponent.setPort(port);
sshComponent.setUsername("smx");
sshComponent.setKeyPairProvider(new FileKeyPairProvider(new
String[]{"src/test/resources/hostkey.pem"}));
sshComponent.setKeyType(KeyPairProvider.SSH_RSA);
getContext().addComponent("ssh-rsa", sshComponent);
from("direct:ssh-rsa")
.to("ssh-rsa:test")
.to("mock:rsa");
you would need to do something like this Spring DSL version, by setting the
KeyPairProvider value you are telling the SSH component to use the key.pem
file instead of a password. I have tried to re-use the camel example code
where I can:
<beans xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd">
<camelContext id="camel-example-ssh">
<route id="camel-example-ssh-consumer">
<from
uri="ssh://karaf@localhost:8101?useFixedDelay=true&keyType=ssh-rsa&keyPairProvider=src/test/resources/hostkey.pem&delay=5000&pollCommand=features:list%0A"/>
<to uri="log:ExampleRouter?showAll=true"/>
</route>
<route id="camel-example-ssh-producer">
<from uri="direct:exampleSshProducer"/>
<setBody>
<constant>features:list</constant>
</setBody>
<to
uri="ssh://karaf:@localhost:8101?keyType=ssh-rsa&keyPairProvider=src/test/resources/hostkey.pem"/>
<to uri="log:ExampleRouter?showAll=true"/>
</route>
</camelContext>
</beans>
thanks
Graham
--
View this message in context: http://camel.465427.n5.nabble.com/Camel-SSH-Issue-Password-in-plain-text-tp5718183p5718194.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel SSH Issue - Password in plain text.
Posted by sarfaraj <sa...@gmail.com>.
how can above code translate/convert in camel context (XML format)
I used ssh within camel context
like *<to
uri="ssh://{{server.userName}}:{{server.password}}@{{server.host}}:22" />*
/Sarfaraj
--
View this message in context: http://camel.465427.n5.nabble.com/Camel-SSH-Issue-Password-in-plain-text-tp5718183p5718192.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel SSH Issue - Password in plain text.
Posted by londonukm <gr...@outlook.com>.
Hi,
Instead of using the password option which i think does use the password in
plain text can you not use the KeyPairProvider option with something a
little like this:
SshComponent sshComponent = new SshComponent();
sshComponent.setHost("localhost");
sshComponent.setPort(port);
sshComponent.setUsername("smx");
sshComponent.setKeyPairProvider(new FileKeyPairProvider(new
String[]{"src/test/resources/hostkey.pem"}));
sshComponent.setKeyType(KeyPairProvider.SSH_RSA);
getContext().addComponent("ssh-rsa", sshComponent);
from("direct:ssh-rsa")
.to("ssh-rsa:test")
.to("mock:rsa");
Thanks
Graham
--
View this message in context: http://camel.465427.n5.nabble.com/Camel-SSH-Issue-Password-in-plain-text-tp5718183p5718186.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel SSH Issue - Password in plain text.
Posted by sarfaraj <sa...@gmail.com>.
one more point my password is in config file which is reside at
${karaf.home}/etc
--
View this message in context: http://camel.465427.n5.nabble.com/Camel-SSH-Issue-Password-in-plain-text-tp5718183p5718184.html
Sent from the Camel - Users mailing list archive at Nabble.com.