How to use springcryptoutils.com in Fuse ?
Issue
- We would like to load a key from a java jks keystore in my blueprint definition, so we may use it via
camel-cryptocomponent. -
What we would like to do this is here like the following,
https://github.com/CamelCookbook/camel-cookbook-examples/blob/master/camel-cookbook-security/src/main/resources/META-INF/spring/encryption-context.xml
but inside Fuse, using blueprint not Spring for my beans wiring. -
Is there any guide/ example for this? springcryptoutils seem to be non-osgi ready (manifest does not include imports/ exports etc).
-
Is there any alternative, to load in a declarative manner a key into the Registry, so I may refer it during marshalling (e.g. keyRef="secretKey")?
<crypt:keystore id="keyStore"
location="classpath:shared.jceks"
password="sharedKeystorePassword"
type="JCEKS"></crypt:keystore>
<crypt:secretKey id="secretKey"
keystore-ref="keyStore"
alias="shared"
password="sharedKeyPassword"></crypt:secretKey>
<camelContext xmlns="http://camel.apache.org/schema/spring">
<dataFormats>
<crypto id="sharedKeyCrypto" algorithm="DES" keyRef="secretKey"></crypto>
</dataFormats>
<route>
<from uri="direct:encrypt"></from>
<log message="Encrypting message"></log>
<marshal ref="sharedKeyCrypto"></marshal>
<log message="Message encrypted: ${body}"></log>
<to uri="direct:decrypt"></to>
</route>
Environment
- Red Hat JBoss Fuse
- 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
