ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1162727 - in /webservices/wss4j/trunk/src/main/java/org/apache/ws/security: message/WSSecDerivedKeyBase.java str/DerivedKeyTokenSTRParser.java
Date Mon, 29 Aug 2011 10:57:34 GMT
Author: coheigea
Date: Mon Aug 29 10:57:33 2011
New Revision: 1162727

URL: http://svn.apache.org/viewvc?rev=1162727&view=rev
Log:
Adding support for derived keys with Kerberos

Modified:
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/WSSecDerivedKeyBase.java
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/str/DerivedKeyTokenSTRParser.java

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/WSSecDerivedKeyBase.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/WSSecDerivedKeyBase.java?rev=1162727&r1=1162726&r2=1162727&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/WSSecDerivedKeyBase.java
(original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/WSSecDerivedKeyBase.java
Mon Aug 29 10:57:33 2011
@@ -27,6 +27,7 @@ import org.apache.ws.security.conversati
 import org.apache.ws.security.conversation.dkalgo.AlgoFactory;
 import org.apache.ws.security.conversation.dkalgo.DerivationAlgorithm;
 import org.apache.ws.security.message.token.DerivedKeyToken;
+import org.apache.ws.security.message.token.KerberosSecurity;
 import org.apache.ws.security.message.token.Reference;
 import org.apache.ws.security.message.token.SecurityTokenReference;
 import org.apache.ws.security.util.Base64;
@@ -256,9 +257,12 @@ public abstract class WSSecDerivedKeyBas
                 } else if (WSConstants.WSS_ENC_KEY_VALUE_TYPE.equals(customValueType)) {
                     secRef.addTokenType(WSConstants.WSS_ENC_KEY_VALUE_TYPE);
                     ref.setValueType(customValueType);
+                } else if (KerberosSecurity.isKerberosToken(customValueType)) {
+                    secRef.addTokenType(customValueType);
+                    ref.setValueType(customValueType);
                 } else if (!WSConstants.WSS_USERNAME_TOKEN_VALUE_TYPE.equals(customValueType))
{
                     secRef.addTokenType(WSConstants.WSS_ENC_KEY_VALUE_TYPE);
-                }
+                } 
 
                 secRef.setReference(ref);
             }

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/str/DerivedKeyTokenSTRParser.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/str/DerivedKeyTokenSTRParser.java?rev=1162727&r1=1162726&r2=1162727&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/str/DerivedKeyTokenSTRParser.java
(original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/str/DerivedKeyTokenSTRParser.java
Mon Aug 29 10:57:33 2011
@@ -215,7 +215,7 @@ public class DerivedKeyTokenSTRParser im
                 BSPEnforcer.checkEncryptedKeyBSPCompliance(secRef);
             }
             secretKey = (byte[])result.get(WSSecurityEngineResult.TAG_SECRET);
-        } else if (WSConstants.SCT == action) {
+        } else if (WSConstants.SCT == action || WSConstants.BST == action) {
             secretKey = (byte[])result.get(WSSecurityEngineResult.TAG_SECRET);
         } else if (WSConstants.ST_UNSIGNED == action || WSConstants.ST_SIGNED == action)
{
             AssertionWrapper assertion = 



Mime
View raw message