You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2010/08/09 21:36:26 UTC
svn commit: r983791 - in /cxf/branches/2.2.x-fixes: ./
rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
Author: dkulp
Date: Mon Aug 9 19:36:26 2010
New Revision: 983791
URL: http://svn.apache.org/viewvc?rev=983791&view=rev
Log:
Merged revisions 980623 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r980623 | gmazza | 2010-07-29 20:59:44 -0400 (Thu, 29 Jul 2010) | 1 line
Switch to use KeyIdentifier instead of Reference for SAML tokens within the SOAP request body EncryptedData element (see CXF-2894). This change will have no effect until WSS4J's WSSecEncrypt is similarly updated (patch forthcoming).
........
Modified:
cxf/branches/2.2.x-fixes/ (props changed)
cxf/branches/2.2.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: cxf/branches/2.2.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java?rev=983791&r1=983790&r2=983791&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java (original)
+++ cxf/branches/2.2.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java Mon Aug 9 19:36:26 2010
@@ -430,7 +430,6 @@ public class SymmetricBindingHandler ext
if (id.startsWith("#")) {
id = id.substring(1);
}
-
dkEncr.setExternalKey(encrTok.getSecret(), id);
} else {
dkEncr.setExternalKey(encrTok.getSecret(), encrTok.getId());
@@ -498,9 +497,14 @@ public class SymmetricBindingHandler ext
encr.setUseKeyIdentifier(true);
encr.setKeyIdentifierType(WSConstants.EMBED_SECURITY_TOKEN_REF);
}
+ } else {
+ if (encrToken instanceof IssuedToken) {
+ encr.setUseKeyIdentifier(true);
+ encr.setCustomReferenceValue(SecurityTokenReference.SAML_ID_URI);
+ encr.setKeyIdentifierType(WSConstants.CUSTOM_KEY_IDENTIFIER);
+ }
}
-
encr.prepare(saaj.getSOAPPart(),
crypto);