URI Format - 6.3

Talend ESB Mediation Developer Guide

EnrichVersion
6.3
EnrichProdName
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
task
Design and Development
EnrichPlatform
Talend ESB

As mentioned Camel provides a pair of crypto endpoints to create and verify signatures:

crypto:sign:name[?options]
crypto:verify:name[?options]
  • crypto:sign creates the signature and stores it in the Header keyed by the constant Exchange.SIGNATURE, i.e. "CamelDigitalSignature".

  • crypto:sign creates the signature and stores it in the Header keyed by the constant Exchange.SIGNATURE, i.e. "CamelDigitalSignature".

In order to correctly function, the sign and verify process needs a pair of keys to be shared, signing requiring a PrivateKey and verifying a PublicKey (or a Certificate containing one). Using the JCE it is very simple to generate these key pairs but it is usually most secure to use a KeyStore to house and share your keys. The DSL is very flexible about how keys are supplied and provides a number of mechanisms.

The most basic way to way to sign an verify an exchange is with a KeyPair as follows:

from("direct:keypair").to("crypto:sign://basic?privateKey=#myPrivateKey", 
   "crypto:verify://basic?publicKey=#myPublicKey", "mock:result");

The same can be achieved with the Spring XML Extensions using references to keys:

<route>
   <from uri="direct:keypair"/>
   <to uri="crypto:sign://basic?privateKey=#myPrivateKey"/>
   <to uri="crypto:verify://basic?publicKey=#myPublicKey"/>
   <to uri="mock:result"/>
</route>

See the Camel Website for the most up-to-date examples of more advanced usages of this component.