私の axis2+rampart クライアントは、いくつかの WS-Secured サーバーで動作しました。サーバーがアップグレードされた後、動作を停止しました (JBoss のアップグレード、WSDL のいくつかの変更、ただしテスト機能ではありません)。サーバーの所有者は、WS-Security 構成は変更されていないと主張していますが、私のクライアントは次のように報告しています。
org.apache.axis2.AxisFault: Must Understand check failed for header http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd : Security
「アイテム」の順序がaxis2.xml
良くない場合、以前にこの例外が発生しました。私がしなければならなかったのは、それらのアイテムを組み合わせるだけでした。それらは次のようになります。
<parameter name="InflowSecurity">
<action>
<items>Signature Encrypt Timestamp</items>
...
今、この問題が再発しました。返信に「タイムスタンプ」がないことがわかります。アイテムから削除しましたが、何も変わりませんでした。
返信は次のようになります。
<soap:Envelope xmlns:soap="..."
xmlns:xenc="...">
<soap:Header>
<wsse:Security
xmlns:wsse="..."
soap:mustUnderstand="1">
<xenc:EncryptedKey xmlns:xenc="..."
Id="EncKeyId-B8B3555394366F3F0112919826983351032">
<xenc:EncryptionMethod Algorithm="..." />
<ds:KeyInfo xmlns:ds="...">
<wsse:SecurityTokenReference
xmlns:wsse="...">
<wsse:KeyIdentifier
...
</wsse:KeyIdentifier>
</wsse:SecurityTokenReference>
</ds:KeyInfo>
<xenc:CipherData>
<xenc:CipherValue>
...
</xenc:CipherValue>
</xenc:CipherData>
<xenc:ReferenceList>
<xenc:DataReference URI="#EncDataId-624" />
</xenc:ReferenceList>
</xenc:EncryptedKey>
<ds:Signature xmlns:ds="..."
Id="Signature-622">
<ds:SignedInfo>
<ds:CanonicalizationMethod
Algorithm="..." />
<ds:SignatureMethod Algorithm="..." />
<ds:Reference URI="#id-623">
<ds:Transforms>
<ds:Transform Algorithm="..." />
</ds:Transforms>
<ds:DigestMethod Algorithm="..." />
<ds:DigestValue>
...
</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>
...
</ds:SignatureValue>
<ds:KeyInfo Id="KeyId-B8B3555394366F3F0112919826983181029">
<wsse:SecurityTokenReference
xmlns:wsse="..."
xmlns:wsu="..."
wsu:Id="STRId-B8B3555394366F3F0112919826983181030">
<wsse:KeyIdentifier
EncodingType="..."
ValueType="...">
...
</wsse:KeyIdentifier>
</wsse:SecurityTokenReference>
</ds:KeyInfo>
</ds:Signature>
</wsse:Security>
</soap:Header>
<soap:Body xmlns:ns1="..."
xmlns:wsu="..."
wsu:Id="id-623">
<xenc:EncryptedData xmlns:xenc="..."
Id="EncDataId-624" Type="...">
<xenc:EncryptionMethod Algorithm="..." />
<ds:KeyInfo xmlns:ds="...">
<wsse:SecurityTokenReference
xmlns:wsse="...">
<wsse:Reference
xmlns:wsse="..."
URI="#EncKeyId-B8B3555394366F3F0112919826983351032" />
</wsse:SecurityTokenReference>
</ds:KeyInfo>
<xenc:CipherData>
<xenc:CipherValue>
...
</xenc:CipherValue>
</xenc:CipherData>
</xenc:EncryptedData>
</soap:Body>
</soap:Envelope>
私の質問:
- セキュリティのどの部分が実際に失敗したかを知るにはどうすればよいですか? 順序が間違っているか、要素が不足しているか、要素が余分にあるか、または同様のエラーですか?
- 署名付きで暗号化された返信しかない場合、インフローセキュリティ構成の城壁にどの項目を追加すればよいか、どうすれば推測できますか? 使用するアイテムの順序を知る方法はありますか?