How to use encrypted password in camel cxf ws-security properties file

Solution Verified - Updated -

Issue

We have ws-security policy defined in our WSDL using AsymmetricBinding Assertion and our camel cxf consumer endpoint is configured as:

 <cxf:cxfEndpoint id="personEndpoint"
                   address="http://localhost:8092/PersonService/"
                   serviceClass="org.apache.servicemix.samples.wsdl_first.Person"
                   wsdlURL="wsdl/person.wsdl">
        <cxf:inInterceptors>
            <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
        </cxf:inInterceptors>
        <cxf:outInterceptors>
            <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
        </cxf:outInterceptors>
        <cxf:properties>
            <entry key="dataFormat" value="POJO"/>
            <entry key="ws-security.callback-handler">
                <ref component-id="serviceKeystorePasswordCallback"/>
            </entry>
            <entry key="ws-security.signature.properties" value="etc/jboss_keystore.properties"/>
            <entry key="ws-security.encryption.properties" value="etc/jboss_truststore.properties"/>
        </cxf:properties>
      </cxf:cxfEndpoint>

One of the properties files, for instance "etc/jboss_keystore.properties", looks like:

org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
org.apache.ws.security.crypto.merlin.keystore.type=jks
org.apache.ws.security.crypto.merlin.keystore.password=secret
org.apache.ws.security.crypto.merlin.keystore.alias=jboss
org.apache.ws.security.crypto.merlin.keystore.file=keys/jboss.keystore.jks

However, the property "org.apache.ws.security.crypto.merlin.keystore.password" here is a clear text.

Is there a way to use encrypted password for the "org.apache.ws.security.crypto.merlin.keystore.password" property in those properties file?

Environment

  • JBoss Fuse
    • 6.2.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.