> 
> I think it would be really helpful to have this way of configuring the
> keystore properties on the CXF documentation page.  Can I go ahead and
> update the CXF WIKI?

If you submit an ICLA:

http://www.apache.org/licenses/icla.txt

to Apache and then create a confluence account, we can grant edit access to 
update the WIKI.   Need the ICLA first though.


Dan



On Wednesday, February 22, 2012 9:16:31 AM ychawla wrote:
> Hello All,
> I am working on making the keystore and password parameters configurable in
> my CXF/Camel Web Service.  There is documentation on the CXF web site shows
> how to create a passwordCallbackRef as a Spring Bean.  This is helpful
> because the user (or certificate alias) and password can be injected in and
> configured.
> 
> Most documentation that I have seen shows how to use a Properties file that
> is in the Classpath to configure the keystore properties.  For example:
> 
> <entry key="signaturePropFile" value="client.properties"/>
> 
> I didn't want to bake a properties file into a bundle or WAR and I found
> this way to do it with Spring Util Properties
> 
>    <bean id="wss4jOutInterceptor"
> class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor">
>      <constructor-arg>
>          <map>
>              <entry key="action" value="Signature"/>
>              <entry key="user" value="${alias}"/>
>              <entry key="passwordCallbackRef">
>               <ref bean="passwordCallbackBean"/>
>              </entry>
>              *<entry key="SignaturePropRefId" value="wsCryptoProperties"/>
>              <entry key="wsCryptoProperties" value-ref="wsCryptoProperties"
> />*
>          </map>
>      </constructor-arg>
>    </bean>
> 
> 
>   <util:properties id="wsCryptoProperties">
> 
>     <prop
> key="org.apache.ws.security.crypto.provider">org.apache.ws.security.componen
> ts.crypto.Merlin</prop>
> 
>     <prop
> key="org.apache.ws.security.crypto.merlin.keystore.type">jks</prop>
> 
>     <prop
> key="org.apache.ws.security.crypto.merlin.keystore.password">${KeystorePassw
> ord}</prop>
> 
>     <prop
> key="org.apache.ws.security.crypto.merlin.file">${KeystoreLocation}</prop>
>   </util:properties>
> 
>       <bean id="passwordCallbackBean"
> class="org.mypackage.ws.security.ClientCallback">
>               <property name="certificateAlias" value="${alias}"/>
>               <property name="privateKeyPassword" 
> value="${privateKeyPassword}"/>
>       </bean>
> 
> I think it would be really helpful to have this way of configuring the
> keystore properties on the CXF documentation page.  Can I go ahead and
> update the CXF WIKI?
> 
> H/T to David Valero for the the code.
> 
> Thanks,
> Yogesh
> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/WS-Security-Properties-Reference-tp5505704p
> 5505704.html Sent from the cxf-user mailing list archive at Nabble.com.
-- 
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to