How to configure TimeToLive parameters in ws-security in CXF ?
Issue
- We can't configure
TimeToLiveparameters:ws-security.timestamp.timeToLive,ws-security.timestamp.futureTimeToLive. -
They always have a default value:
ws-security.timestamp.timeToLive = 300,ws-security.timestamp.futureTimeToLive = 60. -
For example spring beans.xml
<import resource="classpath:META-INF/cxf/cxf.xml" ></import>
<cxf:cxfEndpoint id="MyEndpoint" address="/MyService"
wsdlURL="classpath:META-INF/wsdl/MyService.wsdl"
serviceName="ws:MyService" endpointName="ws:MyServiceSOAP"
xmlns:ws="http://redhat.com/MyService">;
<cxf:properties>
<entry key="dataFormat" value="PAYLOAD" ></entry>
<entry key="schema-validation-enabled" value="true" ></entry>
<entry key="faultStackTraceEnabled" value="false" ></entry>
<entry key="exceptionMessageCauseEnabled" value="true" ></entry>
<entry key="loggingFeatureEnabled" value="true" ></entry>
<entry key="ws-security.callback-handler" value-ref="serverPasswordCallbackImport" ></entry>
<entry key="ws-security.validate.token" value="true" ></entry>
<entry key="ws-security.enable.nonce.cache" value="true" ></entry>
<entry key="ws-security.enable.timestamp.cache" value="true" ></entry>
<entry key="ws-security.timestamp.timeToLive" value="600" ></entry>
<entry key="ws-security.timestamp.futureTimeToLive" value="180" ></entry>
</cxf:properties>
<cxf:outFaultInterceptors>
<ref bean="outFaultInterceptorWSSecurityImport"></ref>
</cxf:outFaultInterceptors>
</cxf:cxfEndpoint>
<osgi:reference id="serverPasswordCallbackImport" interface="interplat4.sys.security.wss.ServerPasswordCallback"
bean-name="serverPasswordCallback" cardinality="1..1" ></osgi:reference>
Environment
- Red Hat JBoss Fuse
- 6.x
- Red Hat JBoss A-MQ
- 6.x
- Apache CXF
- Spring
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.
