proxy - WSO2 SECURITY USERNAMETOKEN ESB AND DSS -
proxyi'm trying build web service using esb wso2. service use dataservice data database need connect esb dss. when proxy , dataservice aren't securice work ok, when securice follow error
<soapenv:fault xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <faultcode>wsse:invalidsecurity</faultcode> <faultstring>nonce value : 8/bkmsfns2gtj58fxyv43q==, seen before user name : usuarioprueba1. possibly replay attack.</faultstring> <detail/> </soapenv:fault>
securizing dataservice not proxy work ok. send usernametoken , password created in user , roles esb , dss
one possible scenario error is, if using header mediator send custom soap security header.
for example, created proxy in [1], , may notice have put following element in soap message security header.
<wsse:nonce encodingtype="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#base64binary">95euudnp5wt7nt3bads9tw==</wsse:nonce>
since i'm sending same nonce everytime backened, detected possible replay attack backend.
to rid of error, remove above 'nonce' element. backend stopped giving error
"nonce value : 95euudnp5wt7nt3bads9tw==, seen before user name : admin. possibly replay attack."
anymore.
only if send 'nonce' element in soap security header, backend check possible replay attacks. removing element 1 way of getting rid of error.
this means that, solution if don't want backend evaluate nonce value detecting replay attacks.
i know question 1 year-old; thought add answer reference.
[1]
<?xml version="1.0" encoding="utf-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="insuranceserviceproxy2" transports="https,http" statistics="disable" trace="disable" startonload="true"> <target> <insequence> <header scope="default"> <wsse:security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" soapenv:mustunderstand="1"> <wsu:timestamp wsu:id="ts-23"> <wsu:created>2015-06-13t03:07:55z</wsu:created> </wsu:timestamp> <wsse:usernametoken wsu:id="usernametoken-22"> <wsse:username>admin</wsse:username> <wsse:password type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#passwordtext">admin</wsse:password> <wsse:nonce encodingtype="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#base64binary">95euudnp5wt7nt3bads9tw==</wsse:nonce> <wsu:created>2015-06-13t03:07:55.091z</wsu:created> </wsse:usernametoken> </wsse:security> </header> <property name="authorization" value="basic ywrtaw46ywrtaw4=" scope="transport" type="string"/> </insequence> <outsequence> <send/> </outsequence> <endpoint> <address uri="https://localhost:8243/services/insuranceservicebeproxy2"/> </endpoint> </target> <description/> </proxy>
Comments
Post a Comment