cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1532815 - in /cxf/trunk: rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/ rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/ systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/...
Date Wed, 16 Oct 2013 16:54:26 GMT
Author: coheigea
Date: Wed Oct 16 16:54:26 2013
New Revision: 1532815

URL: http://svn.apache.org/r1532815
Log:
Enabled streaming SAML InitiatorToken tests

Modified:
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxInInterceptor.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxOutInterceptor.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractStaxBindingHandler.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxAsymmetricBindingHandler.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxSymmetricBindingHandler.java
    cxf/trunk/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/saml/SamlTokenTest.java
    cxf/trunk/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/saml/StaxSamlTokenTest.java

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxInInterceptor.java?rev=1532815&r1=1532814&r2=1532815&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxInInterceptor.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxInInterceptor.java
Wed Oct 16 16:54:26 2013
@@ -469,6 +469,7 @@ public class WSS4JStaxInInterceptor exte
                     SecurityToken tok = store.getToken(id);
                     if (tok != null) {
                         pc.setKey(tok.getSecret());
+                        pc.setKey(tok.getKey());
                         pc.setCustomToken(tok.getToken());
                         return;
                     }

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxOutInterceptor.java?rev=1532815&r1=1532814&r2=1532815&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxOutInterceptor.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxOutInterceptor.java
Wed Oct 16 16:54:26 2013
@@ -47,9 +47,12 @@ import org.apache.wss4j.stax.Configurati
 import org.apache.wss4j.stax.WSSec;
 import org.apache.wss4j.stax.ext.OutboundWSSec;
 import org.apache.wss4j.stax.ext.WSSSecurityProperties;
+import org.apache.wss4j.stax.securityEvent.WSSecurityEventConstants;
+import org.apache.xml.security.exceptions.XMLSecurityException;
 import org.apache.xml.security.stax.impl.OutboundSecurityContextImpl;
 import org.apache.xml.security.stax.securityEvent.SecurityEvent;
 import org.apache.xml.security.stax.securityEvent.SecurityEventListener;
+import org.apache.xml.security.stax.securityEvent.TokenSecurityEvent;
 import org.apache.xml.security.stax.securityToken.OutboundSecurityToken;
 import org.apache.xml.security.stax.securityToken.SecurityTokenProvider;
 
@@ -183,13 +186,20 @@ public class WSS4JStaxOutInterceptor ext
     }
     
     protected SecurityEventListener configureSecurityEventListener(
-        SoapMessage msg, WSSSecurityProperties securityProperties
+        final SoapMessage msg, WSSSecurityProperties securityProperties
     ) throws WSSPolicyException {
         final List<SecurityEvent> outgoingSecurityEventList = new LinkedList<SecurityEvent>();
         SecurityEventListener securityEventListener = new SecurityEventListener() {
             @Override
-            public void registerSecurityEvent(SecurityEvent securityEvent) throws WSSecurityException
{
-                outgoingSecurityEventList.add(securityEvent);
+            public void registerSecurityEvent(SecurityEvent securityEvent) throws XMLSecurityException
{
+                if (securityEvent.getSecurityEventType() == WSSecurityEventConstants.SamlToken
+                    && securityEvent instanceof TokenSecurityEvent) {
+                    // Store SAML keys in case we need them on the inbound side
+                    TokenSecurityEvent<?> tokenSecurityEvent = (TokenSecurityEvent<?>)securityEvent;
+                    WSS4JUtils.parseAndStoreStreamingSecurityToken(tokenSecurityEvent.getSecurityToken(),
msg);
+                } else {
+                    outgoingSecurityEventList.add(securityEvent);
+                }
             }
         };
         msg.getExchange().put(SecurityEvent.class.getName() + ".out", outgoingSecurityEventList);

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java?rev=1532815&r1=1532814&r2=1532815&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java
Wed Oct 16 16:54:26 2013
@@ -20,6 +20,10 @@ package org.apache.cxf.ws.security.wss4j
 
 import java.io.IOException;
 import java.net.URL;
+import java.security.Key;
+import java.util.Date;
+
+import javax.crypto.SecretKey;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.binding.soap.SoapMessage;
@@ -31,8 +35,14 @@ import org.apache.cxf.resource.ResourceM
 import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.ws.security.SecurityConstants;
 import org.apache.cxf.ws.security.cache.CXFEHCacheReplayCache;
+import org.apache.cxf.ws.security.tokenstore.SecurityToken;
+import org.apache.cxf.ws.security.tokenstore.TokenStore;
+import org.apache.cxf.ws.security.tokenstore.TokenStoreFactory;
 import org.apache.wss4j.common.cache.ReplayCache;
 import org.apache.wss4j.common.cache.ReplayCacheFactory;
+import org.apache.wss4j.stax.ext.WSSConstants;
+import org.apache.wss4j.stax.securityToken.WSSecurityTokenConstants;
+import org.apache.xml.security.exceptions.XMLSecurityException;
 
 /**
  * Some common functionality that can be shared between the WSS4JInInterceptor and the
@@ -128,5 +138,69 @@ public final class WSS4JUtils {
         }
         return null;
     }
+    
+    public static TokenStore getTokenStore(Message message) {
+        EndpointInfo info = message.getExchange().get(Endpoint.class).getEndpointInfo();
+        synchronized (info) {
+            TokenStore tokenStore = 
+                (TokenStore)message.getContextualProperty(SecurityConstants.TOKEN_STORE_CACHE_INSTANCE);
+            if (tokenStore == null) {
+                tokenStore = (TokenStore)info.getProperty(SecurityConstants.TOKEN_STORE_CACHE_INSTANCE);
+            }
+            if (tokenStore == null) {
+                TokenStoreFactory tokenStoreFactory = TokenStoreFactory.newInstance();
+                String cacheKey = SecurityConstants.TOKEN_STORE_CACHE_INSTANCE;
+                if (info.getName() != null) {
+                    cacheKey += "-" + info.getName().toString().hashCode();
+                }
+                tokenStore = tokenStoreFactory.newTokenStore(cacheKey, message);
+                info.setProperty(SecurityConstants.TOKEN_STORE_CACHE_INSTANCE, tokenStore);
+            }
+            return tokenStore;
+        }
+    }
+    
+    public static String parseAndStoreStreamingSecurityToken(
+        org.apache.xml.security.stax.securityToken.SecurityToken securityToken,
+        Message message
+    ) throws XMLSecurityException {
+        if (securityToken != null 
+            && getTokenStore(message).getToken(securityToken.getId()) == null) {
+            Date created = new Date();
+            Date expires = new Date();
+            expires.setTime(created.getTime() + 300000);
+
+            SecurityToken cachedTok = new SecurityToken(securityToken.getId(), created, expires);
+            cachedTok.setSHA1(securityToken.getSha1Identifier());
+
+            if (securityToken.getTokenType() != null) {
+                if (securityToken.getTokenType() == WSSecurityTokenConstants.EncryptedKeyToken)
{
+                    cachedTok.setTokenType(WSSConstants.NS_WSS_ENC_KEY_VALUE_TYPE);
+                } else if (securityToken.getTokenType() == WSSecurityTokenConstants.KerberosToken)
{
+                    cachedTok.setTokenType(WSSConstants.NS_GSS_Kerberos5_AP_REQ);
+                } else if (securityToken.getTokenType() == WSSecurityTokenConstants.Saml11Token)
{
+                    cachedTok.setTokenType(WSSConstants.NS_SAML11_TOKEN_PROFILE_TYPE);
+                } else if (securityToken.getTokenType() == WSSecurityTokenConstants.Saml20Token)
{
+                    cachedTok.setTokenType(WSSConstants.NS_SAML20_TOKEN_PROFILE_TYPE);
+                }
+            }
+
+            for (String key : securityToken.getSecretKey().keySet()) {
+                Key keyObject = securityToken.getSecretKey().get(key);
+                if (keyObject != null) {
+                    cachedTok.setKey(keyObject);
+                    if (keyObject instanceof SecretKey) {
+                        cachedTok.setSecret(keyObject.getEncoded());
+                    }
+                    break;
+                }
+            }
+            getTokenStore(message).add(cachedTok);
+
+            return cachedTok.getId();
+        }
+        return null;
+
+    }
 
 }

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractStaxBindingHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractStaxBindingHandler.java?rev=1532815&r1=1532814&r2=1532815&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractStaxBindingHandler.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractStaxBindingHandler.java
Wed Oct 16 16:54:26 2013
@@ -45,16 +45,14 @@ import org.apache.cxf.binding.soap.SoapM
 import org.apache.cxf.common.classloader.ClassLoaderUtils;
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
-import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.message.MessageUtils;
-import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.ws.policy.AssertionInfo;
 import org.apache.cxf.ws.policy.AssertionInfoMap;
 import org.apache.cxf.ws.policy.PolicyException;
 import org.apache.cxf.ws.security.SecurityConstants;
 import org.apache.cxf.ws.security.tokenstore.SecurityToken;
 import org.apache.cxf.ws.security.tokenstore.TokenStore;
-import org.apache.cxf.ws.security.tokenstore.TokenStoreFactory;
+import org.apache.cxf.ws.security.wss4j.WSS4JUtils;
 import org.apache.neethi.Assertion;
 import org.apache.wss4j.common.ConfigurationConstants;
 import org.apache.wss4j.common.ext.WSPasswordCallback;
@@ -665,27 +663,6 @@ public abstract class AbstractStaxBindin
 
     }
     
-    protected final TokenStore getTokenStore() {
-        EndpointInfo info = message.getExchange().get(Endpoint.class).getEndpointInfo();
-        synchronized (info) {
-            TokenStore tokenStore = 
-                (TokenStore)message.getContextualProperty(SecurityConstants.TOKEN_STORE_CACHE_INSTANCE);
-            if (tokenStore == null) {
-                tokenStore = (TokenStore)info.getProperty(SecurityConstants.TOKEN_STORE_CACHE_INSTANCE);
-            }
-            if (tokenStore == null) {
-                TokenStoreFactory tokenStoreFactory = TokenStoreFactory.newInstance();
-                String cacheKey = SecurityConstants.TOKEN_STORE_CACHE_INSTANCE;
-                if (info.getName() != null) {
-                    cacheKey += "-" + info.getName().toString().hashCode();
-                }
-                tokenStore = tokenStoreFactory.newTokenStore(cacheKey, message);
-                info.setProperty(SecurityConstants.TOKEN_STORE_CACHE_INSTANCE, tokenStore);
-            }
-            return tokenStore;
-        }
-    }
-    
     protected String getKeyIdentifierType(AbstractTokenWrapper wrapper, AbstractToken token)
{
 
         String identifier = null;
@@ -913,11 +890,11 @@ public abstract class AbstractStaxBindin
         if (st == null) {
             String id = (String)message.getContextualProperty(SecurityConstants.TOKEN_ID);
             if (id != null) {
-                st = getTokenStore().getToken(id);
+                st = WSS4JUtils.getTokenStore(message).getToken(id);
             }
         }
         if (st != null) {
-            getTokenStore().add(st);
+            WSS4JUtils.getTokenStore(message).add(st);
             return st;
         }
         return null;

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxAsymmetricBindingHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxAsymmetricBindingHandler.java?rev=1532815&r1=1532814&r2=1532815&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxAsymmetricBindingHandler.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxAsymmetricBindingHandler.java
Wed Oct 16 16:54:26 2013
@@ -35,6 +35,7 @@ import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.ws.policy.AssertionInfoMap;
 import org.apache.cxf.ws.security.SecurityConstants;
 import org.apache.cxf.ws.security.tokenstore.SecurityToken;
+import org.apache.cxf.ws.security.wss4j.WSS4JUtils;
 import org.apache.wss4j.common.ConfigurationConstants;
 import org.apache.wss4j.common.ext.WSSecurityException;
 import org.apache.wss4j.policy.SPConstants.IncludeTokenType;
@@ -116,7 +117,8 @@ public class StaxAsymmetricBindingHandle
                     Map<String, Object> config = getProperties();
                     TokenStoreCallbackHandler callbackHandler = 
                         new TokenStoreCallbackHandler(
-                            (CallbackHandler)config.get(ConfigurationConstants.PW_CALLBACK_REF),
getTokenStore()
+                            (CallbackHandler)config.get(ConfigurationConstants.PW_CALLBACK_REF),

+                            WSS4JUtils.getTokenStore(message)
                         );
                     config.put(ConfigurationConstants.PW_CALLBACK_REF, callbackHandler);
                 } else if (initiatorToken instanceof SamlToken) {
@@ -234,7 +236,8 @@ public class StaxAsymmetricBindingHandle
                     Map<String, Object> config = getProperties();
                     TokenStoreCallbackHandler callbackHandler = 
                         new TokenStoreCallbackHandler(
-                            (CallbackHandler)config.get(ConfigurationConstants.PW_CALLBACK_REF),
getTokenStore()
+                            (CallbackHandler)config.get(ConfigurationConstants.PW_CALLBACK_REF),

+                            WSS4JUtils.getTokenStore(message)
                         );
                     config.put(ConfigurationConstants.PW_CALLBACK_REF, callbackHandler);
                 } else if (initiatorToken instanceof SamlToken) {

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxSymmetricBindingHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxSymmetricBindingHandler.java?rev=1532815&r1=1532814&r2=1532815&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxSymmetricBindingHandler.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxSymmetricBindingHandler.java
Wed Oct 16 16:54:26 2013
@@ -38,6 +38,7 @@ import org.apache.cxf.message.MessageUti
 import org.apache.cxf.ws.policy.AssertionInfoMap;
 import org.apache.cxf.ws.security.SecurityConstants;
 import org.apache.cxf.ws.security.tokenstore.SecurityToken;
+import org.apache.cxf.ws.security.wss4j.WSS4JUtils;
 import org.apache.wss4j.common.ConfigurationConstants;
 import org.apache.wss4j.common.ext.WSSecurityException;
 import org.apache.wss4j.dom.WSConstants;
@@ -60,7 +61,6 @@ import org.apache.wss4j.policy.model.X50
 import org.apache.wss4j.stax.ext.WSSConstants;
 import org.apache.wss4j.stax.securityEvent.SamlTokenSecurityEvent;
 import org.apache.wss4j.stax.securityEvent.WSSecurityEventConstants;
-import org.apache.wss4j.stax.securityToken.WSSecurityTokenConstants;
 import org.apache.xml.security.algorithms.JCEMapper;
 import org.apache.xml.security.exceptions.XMLSecurityException;
 import org.apache.xml.security.stax.ext.SecurePart;
@@ -117,7 +117,8 @@ public class StaxSymmetricBindingHandler
         Map<String, Object> config = getProperties();
         TokenStoreCallbackHandler callbackHandler = 
             new TokenStoreCallbackHandler(
-                (CallbackHandler)config.get(ConfigurationConstants.PW_CALLBACK_REF), getTokenStore()
+                (CallbackHandler)config.get(ConfigurationConstants.PW_CALLBACK_REF), 
+                WSS4JUtils.getTokenStore(message)
             );
         config.put(ConfigurationConstants.PW_CALLBACK_REF, callbackHandler);
         
@@ -155,7 +156,7 @@ public class StaxSymmetricBindingHandler
                 if (tok == null && !isRequestor()) {
                     org.apache.xml.security.stax.securityToken.SecurityToken securityToken
= 
                         findIssuedToken();
-                    tokenId = parseStreamingSecurityToken(securityToken);
+                    tokenId = WSS4JUtils.parseAndStoreStreamingSecurityToken(securityToken,
message);
                 }
             } else if (encryptionToken instanceof SecureConversationToken
                 || encryptionToken instanceof SecurityContextToken
@@ -177,7 +178,7 @@ public class StaxSymmetricBindingHandler
                 } else {
                     org.apache.xml.security.stax.securityToken.SecurityToken securityToken
= 
                         findEncryptedKeyToken();
-                    tokenId = parseStreamingSecurityToken(securityToken);
+                    tokenId = WSS4JUtils.parseAndStoreStreamingSecurityToken(securityToken,
message);
                 }
             } else if (encryptionToken instanceof UsernameToken) {
                 policyNotAsserted(sbinding, "UsernameTokens not supported with Symmetric
binding");
@@ -189,7 +190,7 @@ public class StaxSymmetricBindingHandler
                 }
 
                 // Get hold of the token from the token storage
-                tok = getTokenStore().getToken(tokenId);
+                tok = WSS4JUtils.getTokenStore(message).getToken(tokenId);
             }
             
             // Store key
@@ -272,7 +273,7 @@ public class StaxSymmetricBindingHandler
                     if (sigTok == null && !isRequestor()) {
                         org.apache.xml.security.stax.securityToken.SecurityToken securityToken
= 
                             findIssuedToken();
-                        sigTokId = parseStreamingSecurityToken(securityToken);
+                        sigTokId = WSS4JUtils.parseAndStoreStreamingSecurityToken(securityToken,
message);
                     }
                 } else if (sigToken instanceof SecureConversationToken
                     || sigToken instanceof SecurityContextToken
@@ -294,7 +295,7 @@ public class StaxSymmetricBindingHandler
                     } else {
                         org.apache.xml.security.stax.securityToken.SecurityToken securityToken
= 
                             findEncryptedKeyToken();
-                        sigTokId = parseStreamingSecurityToken(securityToken);
+                        sigTokId = WSS4JUtils.parseAndStoreStreamingSecurityToken(securityToken,
message);
                     }
                 } else if (sigToken instanceof UsernameToken) {
                     policyNotAsserted(sbinding, "UsernameTokens not supported with Symmetric
binding");
@@ -310,7 +311,7 @@ public class StaxSymmetricBindingHandler
                 return;
             }
             if (sigTok == null) {
-                sigTok = getTokenStore().getToken(sigTokId);
+                sigTok = WSS4JUtils.getTokenStore(message).getToken(sigTokId);
             }
             
             // Store key
@@ -571,49 +572,11 @@ public class StaxSymmetricBindingHandler
         tempTok.setKey(symmetricKey);
         tempTok.setSecret(symmetricKey.getEncoded());
         
-        getTokenStore().add(tempTok);
+        WSS4JUtils.getTokenStore(message).add(tempTok);
         
         return tempTok.getId();
     }
     
-    private String parseStreamingSecurityToken(
-        org.apache.xml.security.stax.securityToken.SecurityToken securityToken
-    ) throws XMLSecurityException {
-        if (securityToken != null) {
-            Date created = new Date();
-            Date expires = new Date();
-            expires.setTime(created.getTime() + 300000);
-            
-            SecurityToken cachedTok = new SecurityToken(securityToken.getId(), created, expires);
-            cachedTok.setSHA1(securityToken.getSha1Identifier());
-            
-            if (securityToken.getTokenType() != null) {
-                if (securityToken.getTokenType() == WSSecurityTokenConstants.EncryptedKeyToken)
{
-                    cachedTok.setTokenType(WSSConstants.NS_WSS_ENC_KEY_VALUE_TYPE);
-                } else if (securityToken.getTokenType() == WSSecurityTokenConstants.KerberosToken)
{
-                    cachedTok.setTokenType(WSSConstants.NS_GSS_Kerberos5_AP_REQ);
-                } else if (securityToken.getTokenType() == WSSecurityTokenConstants.Saml11Token)
{
-                    cachedTok.setTokenType(WSSConstants.NS_SAML11_TOKEN_PROFILE_TYPE);
-                } else if (securityToken.getTokenType() == WSSecurityTokenConstants.Saml20Token)
{
-                    cachedTok.setTokenType(WSSConstants.NS_SAML20_TOKEN_PROFILE_TYPE);
-                }
-            }
-            
-            for (String key : securityToken.getSecretKey().keySet()) {
-                if (securityToken.getSecretKey().get(key) != null) {
-                    cachedTok.setKey(securityToken.getSecretKey().get(key));
-                    cachedTok.setSecret(securityToken.getSecretKey().get(key).getEncoded());
-                    break;
-                }
-            }
-            getTokenStore().add(cachedTok);
-
-            return cachedTok.getId();
-        }
-        return null;
-        
-    }
-    
     private org.apache.xml.security.stax.securityToken.SecurityToken 
     findEncryptedKeyToken() throws XMLSecurityException {
         @SuppressWarnings("unchecked")

Modified: cxf/trunk/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/saml/SamlTokenTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/saml/SamlTokenTest.java?rev=1532815&r1=1532814&r2=1532815&view=diff
==============================================================================
--- cxf/trunk/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/saml/SamlTokenTest.java
(original)
+++ cxf/trunk/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/saml/SamlTokenTest.java
Wed Oct 16 16:54:26 2013
@@ -220,6 +220,10 @@ public class SamlTokenTest extends Abstr
         // DOM
         samlPort.doubleIt(25);
         
+        // Streaming
+        SecurityTestUtil.enableStreaming(samlPort);
+        samlPort.doubleIt(25);
+        
         ((java.io.Closeable)samlPort).close();
         bus.shutdown(true);
     }

Modified: cxf/trunk/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/saml/StaxSamlTokenTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/saml/StaxSamlTokenTest.java?rev=1532815&r1=1532814&r2=1532815&view=diff
==============================================================================
--- cxf/trunk/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/saml/StaxSamlTokenTest.java
(original)
+++ cxf/trunk/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/saml/StaxSamlTokenTest.java
Wed Oct 16 16:54:26 2013
@@ -220,6 +220,10 @@ public class StaxSamlTokenTest extends A
         // DOM
         samlPort.doubleIt(25);
         
+        // Streaming
+        SecurityTestUtil.enableStreaming(samlPort);
+        samlPort.doubleIt(25);
+        
         ((java.io.Closeable)samlPort).close();
         bus.shutdown(true);
     }



Mime
View raw message