Class DecoupledDestinationApprovalInterceptor
java.lang.Object
org.apache.cxf.phase.AbstractPhaseInterceptor<Message>
org.openehealth.ipf.commons.ihe.ws.cxf.DecoupledDestinationApprovalInterceptor
- All Implemented Interfaces:
Interceptor<Message>, PhaseInterceptor<Message>
Since CXF 4.1.8, WS-Addressing decoupled destinations (i.e. non-anonymous
wsa:ReplyTo and wsa:FaultTo endpoint references) are rejected
by default in order to prevent SSRF attacks: without an explicit opt-in, CXF
answers such requests with a wsa:DestinationUnreachable SOAP fault
instead of dispatching the response to the given URI.
Asynchronous responses over WS-Addressing are a regular part of several IHE
transactions (XCPD, XCA, XDR, ...), so IPF pre-approves them per exchange for
those endpoints whose transaction configuration declares
WsTransactionConfiguration.isAllowAsynchrony().
This spares the deployment from having to set the JVM-wide system property
org.apache.cxf.ws.addressing.decoupled.enabled, which would enable
decoupled destinations for all endpoints in the JVM.
The URI scheme allowlist (system property org.apache.cxf.ws.addressing.decoupled.allowedSchemes, by default http://, https:// and a few others) remains in force — this interceptor cannot be used to reach e.g. file:// destinations.
- Author:
- Christian Ohr
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class AbstractPhaseInterceptor
addAfter, addAfter, addBefore, addBefore, getAdditionalInterceptors, getAfter, getBefore, getId, getPhase, handleFault, isGET, isRequestor, setAfter, setBefore
-
Constructor Details
-
DecoupledDestinationApprovalInterceptor
public DecoupledDestinationApprovalInterceptor()
-
-
Method Details
-
handleMessage
-