micro-integrator
micro-integrator copied to clipboard
Customize fault response when Rampart ws-security error occurred
Description: It would be useful to customize the error response returned by a proxy service configured with ws-security policy (with custom Rampart configuration). If at example the client send invalid certificate, the default fault envelope is:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> ... <soapenv:Body> <soapenv:Fault xmlns:axis2ns5="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <faultcode>axis2ns5:FailedCheck</faultcode> <faultstring>The signature or decryption was invalid (The provided certificate is invalid)</faultstring> <detail/> </soapenv:Fault> </soapenv:Body> </soapenv:Envelope>
Changes to the default fault sequence or asscociate custom fault sequence to proxy service have no effect.
Affected Product Version: WSO2 Micro Integrator 4.0.0
OS, DB, other environment details and versions:
Ubuntu 20.04, AlmaLinux release 8.4
Steps to reproduce:
- Create ws-policy for x509 mutual authentication
- Create a simple proxy service and enable ws-security by assign previous configuration
- Deploy and run composite project into embedded Micro Integrator (or deploy CAR file to external Micro Integrator installation)
- Test Proxy Service with bad WS-Security authentication (at example using an expired self signed certificate) --> check the returned fault response
- Update fault.xml sequence with desired response (at example using payload factory mediator) and restart the Micro Integrator instance
- Run again the previous test --> the returned fault response is the same