cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1149360 - in /cxf/branches/2.4.x-fixes/systests/ws-security/src/test: java/org/apache/cxf/systest/ws/kerberos/KerberosTokenTest.java resources/org/apache/cxf/systest/ws/kerberos/server/server.xml
Date Thu, 21 Jul 2011 20:56:41 GMT
Author: coheigea
Date: Thu Jul 21 20:56:40 2011
New Revision: 1149360

URL: http://svn.apache.org/viewvc?rev=1149360&view=rev
Log:
[CXF-3674] - Support the Kerberos Token Profile
 - Fixing some incorrect test config

Modified:
    cxf/branches/2.4.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/kerberos/KerberosTokenTest.java
    cxf/branches/2.4.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/kerberos/server/server.xml

Modified: cxf/branches/2.4.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/kerberos/KerberosTokenTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/kerberos/KerberosTokenTest.java?rev=1149360&r1=1149359&r2=1149360&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/kerberos/KerberosTokenTest.java
(original)
+++ cxf/branches/2.4.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/kerberos/KerberosTokenTest.java
Thu Jul 21 20:56:40 2011
@@ -172,6 +172,18 @@ public class KerberosTokenTest extends A
             assertTrue(ex.getMessage().contains("No BST CallbackHandler available"));
         }
         
+        try {
+            KerberosCallbackHandler handler = new KerberosCallbackHandler();
+            handler.setToken("123456566");
+            ((BindingProvider)kerberosPort).getRequestContext().put(
+                "ws-security.bst-callback-handler", handler
+            );
+            kerberosPort.doubleIt(BigInteger.valueOf(25));
+            fail("Expected failure on an invocation with the wrong Kerberos Token");
+        } catch (javax.xml.ws.soap.SOAPFaultException ex) {
+            // expected
+        }
+        
         ((BindingProvider)kerberosPort).getRequestContext().put(
             "ws-security.bst-callback-handler", new KerberosCallbackHandler()
         );

Modified: cxf/branches/2.4.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/kerberos/server/server.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/kerberos/server/server.xml?rev=1149360&r1=1149359&r2=1149360&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/kerberos/server/server.xml
(original)
+++ cxf/branches/2.4.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/kerberos/server/server.xml
Thu Jul 21 20:56:40 2011
@@ -120,7 +120,7 @@
                   value="org.apache.cxf.systest.ws.wssec10.client.KeystorePasswordCallback"/>
            <entry key="ws-security.signature.properties" 
                   value="org/apache/cxf/systest/ws/wssec10/client/bob.properties"/> 
-           <entry key="ws-security.saml2.validator" 
+           <entry key="ws-security.bst.validator" 
                   value="org.apache.cxf.systest.ws.kerberos.server.KerberosTokenValidator"/>
        </jaxws:properties> 
      
@@ -144,7 +144,7 @@
            <entry key="ws-security.encryption.properties" 
                   value="org/apache/cxf/systest/ws/wssec10/client/alice.properties"/>

            <entry key="ws-security.encryption.username" value="alice"/>
-           <entry key="ws-security.saml2.validator" 
+           <entry key="ws-security.bst.validator" 
                   value="org.apache.cxf.systest.ws.kerberos.server.KerberosTokenValidator"/>
        </jaxws:properties> 
      



Mime
View raw message