cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r749523 - in /cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security: SecurityConstants.java trust/STSClient.java wss4j/policyhandlers/TransportBindingHandler.java
Date Tue, 03 Mar 2009 04:20:13 GMT
Author: dkulp
Date: Tue Mar  3 04:20:13 2009
New Revision: 749523

URL: http://svn.apache.org/viewvc?rev=749523&view=rev
Log:
another trust test working

Modified:
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/SecurityConstants.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/TransportBindingHandler.java

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/SecurityConstants.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/SecurityConstants.java?rev=749523&r1=749522&r2=749523&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/SecurityConstants.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/SecurityConstants.java
Tue Mar  3 04:20:13 2009
@@ -45,6 +45,15 @@
     public static final String TOKEN_ID = "ws-security.token.id";
     
     public static final String STS_CLIENT = "ws-security.sts.client";
+    
+    /**
+     * WCF's trust server sometimes will encrypt the token in the response IN ADDITION TO
+     * the full security on the message. These properties control the way the STS client
+     * will decrypt the EncryptedData elements in the response
+     */
+    public static final String STS_TOKEN_CRYPTO = "ws-security.sts.token.crypto";
+    public static final String STS_TOKEN_PROPERTIES = "ws-security.sts.token.properties";
+    
 
     public static final Set<String> ALL_PROPERTIES;
     
@@ -53,7 +62,7 @@
             USERNAME, PASSWORD, CALLBACK_HANDLER, 
             SIGNATURE_USERNAME, SIGNATURE_PROPERTIES, SIGNATURE_CRYPTO,
             ENCRYPT_USERNAME, ENCRYPT_PROPERTIES, ENCRYPT_CRYPTO,
-            TOKEN, TOKEN_ID, STS_CLIENT
+            TOKEN, TOKEN_ID, STS_CLIENT, STS_TOKEN_PROPERTIES, STS_TOKEN_CRYPTO
         }));
         ALL_PROPERTIES = Collections.unmodifiableSet(s);
     }

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java?rev=749523&r1=749522&r2=749523&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
Tue Mar  3 04:20:13 2009
@@ -461,7 +461,7 @@
             throw new TrustException(e1);
         }
         
-        String id = findID(rar, rur, rst);
+        String id = findID(rar, rur, rstDec);
         if (StringUtils.isEmpty(id)) {
             throw new TrustException(new Message("NO_ID", LOG));
         }
@@ -583,13 +583,13 @@
     }
     
     private Crypto createCrypto() throws IOException {
-        Crypto crypto = (Crypto)getProperty(SecurityConstants.ENCRYPT_CRYPTO);
+        Crypto crypto = (Crypto)getProperty(SecurityConstants.STS_TOKEN_CRYPTO);
         if (crypto != null) {
             return crypto;
         }
         
         
-        Object o = getProperty(SecurityConstants.ENCRYPT_PROPERTIES); 
+        Object o = getProperty(SecurityConstants.STS_TOKEN_PROPERTIES); 
         Properties properties = null;
         if (o instanceof Properties) {
             properties = (Properties)o;

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/TransportBindingHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/TransportBindingHandler.java?rev=749523&r1=749522&r2=749523&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/TransportBindingHandler.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/TransportBindingHandler.java
Tue Mar  3 04:20:13 2009
@@ -166,7 +166,7 @@
                             if (token instanceof IssuedToken
                                 || token instanceof SecureConversationToken) {
                                 signatureValues.add(doIssuedTokenSignature(token, 
-                                                                           sgndSuppTokens.getSignedParts(),

+                                                                           null, 
                                                                            sgndSuppTokens));
                             } else if (token instanceof X509Token) {
                                 signatureValues.add(doX509TokenSignature(token, 
@@ -305,12 +305,6 @@
             sigParts.add(new WSEncryptionPart(timestampEl.getId()));                    
     
         }
         
-        /*
-        if (tbinding.isTokenProtection() && tokenIncluded) {
-            sigParts.add(new WSEncryptionPart(secTok.getId()));
-        }
-        */
-        
         if (signdParts != null) {
             if (signdParts.isBody()) {
                 sigParts.add(new WSEncryptionPart(addWsuIdToElement(saaj.getSOAPBody())));



Mime
View raw message