ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1202618 - in /webservices/wss4j/trunk/src/main/java/org/apache/ws/security: WSConstants.java saml/SAMLUtil.java
Date Wed, 16 Nov 2011 10:24:04 GMT
Author: coheigea
Date: Wed Nov 16 10:24:04 2011
New Revision: 1202618

URL: http://svn.apache.org/viewvc?rev=1202618&view=rev
Log:
[WSS-323] - WS-Trust 1.3 namespace not supported when looking for a BinarySecret in a SAML
KeyInfo

Modified:
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/WSConstants.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/SAMLUtil.java

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/WSConstants.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/WSConstants.java?rev=1202618&r1=1202617&r2=1202618&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/WSConstants.java (original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/WSConstants.java Wed Nov
16 10:24:04 2011
@@ -119,6 +119,15 @@ public class WSConstants {
         "http://www.w3.org/2001/04/xmldsig-more#hmac-md5";
     
     public static final String WST_NS = "http://schemas.xmlsoap.org/ws/2005/02/trust";
+    /**
+     * WS-Trust 1.3 namespace
+     */
+    public static final String WST_NS_05_12 = "http://docs.oasis-open.org/ws-sx/ws-trust/200512";
+    /**
+     * WS-Trust 1.4 namespace
+     */
+    public static final String WST_NS_08_02 = "http://docs.oasis-open.org/ws-sx/ws-trust/200802";
+    
     public final static String WSC_SCT = "http://schemas.xmlsoap.org/ws/2005/02/sc/sct";
 
     //

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/SAMLUtil.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/SAMLUtil.java?rev=1202618&r1=1202617&r2=1202618&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/SAMLUtil.java (original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/saml/SAMLUtil.java Wed Nov
16 10:24:04 2011
@@ -58,6 +58,11 @@ import java.util.List;
  * Utility methods for SAML stuff
  */
 public class SAMLUtil {
+    
+    private static final QName BINARY_SECRET = 
+        new QName(WSConstants.WST_NS, "BinarySecret");
+    private static final QName BINARY_SECRET_05_12 = 
+        new QName(WSConstants.WST_NS_05_12, "BinarySecret");
 
     /**
      * Get an AssertionWrapper object from parsing a SecurityTokenReference that uses
@@ -298,7 +303,7 @@ public class SAMLUtil {
                             WSSecurityEngineResult.TAG_SECRET
                         );
                     return new SAMLKeyInfo(secret);
-                } else if (el.equals(new QName(WSConstants.WST_NS, "BinarySecret"))) {
+                } else if (el.equals(BINARY_SECRET) || el.equals(BINARY_SECRET_05_12)) {
                     Text txt = (Text)node.getFirstChild();
                     return new SAMLKeyInfo(Base64.decode(txt.getData()));
                 }



Mime
View raw message