[英]WSO2 SECURITY USERNAMETOKEN ESB AND DSS
我正在嘗試使用WSO2中的ESB構建Web服務。 我的服務使用dataservice從數據庫獲取數據,因此我需要將esb與dss連接。 當代理和數據服務不是安全的時,它們可以正常工作,但是當它們是安全的時,會出現以下錯誤
<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==, already seen before for user name : UsuarioPrueba1. Possibly this could be a replay attack.</faultstring>
<detail/>
</soapenv:Fault>
確保數據服務安全,但不能代理其工作。 我發送從ESB和DSS在用戶和角色中創建的用戶名令牌和密碼
如果我們正在使用標頭調解器發送自定義SOAP安全標頭,則可能會出現此錯誤的一種情況是。
例如,我在[1]中創建了一個代理,您可能會注意到,我在肥皂消息安全性標頭中放置了以下元素。
<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">95euUDNp5wT7nT3BadS9Tw==</wsse:Nonce>
由於我每次都向受支持者發送相同的隨機數,因此后端會將其檢測為可能的重播攻擊。
為了消除此錯誤,我刪除了上面的“ Nonce”元素。 然后后端停止給出錯誤
“ Nonce值:95euUDNp5wT7nT3BadS9Tw ==,以前已經在用戶名:admin中看到過。可能是重放攻擊。”
了。
僅當我們在Soap安全標頭中發送“ Nonce”元素時,后端才會檢查可能的重播攻擊。 因此,刪除該元素是擺脫錯誤的一種方法。
這也意味着,僅當您不希望后端評估Nonce值以檢測重放攻擊時,這才是解決方案。
我知道這個問題已經一歲了; 但是想添加一個答案作為參考。
[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>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.