Author: alessio.soldano(a)jboss.com
Date: 2011-06-07 12:17:21 -0400 (Tue, 07 Jun 2011)
New Revision: 14487
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsseDigest/UsernameDigestTestCase.java
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[JBWS-3257] Fixing UsernameDigestTestCase to use new security domain deploy option +
enabling tests
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsseDigest/UsernameDigestTestCase.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsseDigest/UsernameDigestTestCase.java 2011-06-07
16:01:48 UTC (rev 14486)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsseDigest/UsernameDigestTestCase.java 2011-06-07
16:17:21 UTC (rev 14487)
@@ -35,6 +35,7 @@
import org.apache.cxf.endpoint.Endpoint;
import org.apache.cxf.frontend.ClientProxy;
import org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor;
+import org.jboss.wsf.stack.cxf.security.authentication.callback.UsernameTokenCallback;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
import org.jboss.wsf.test.JBossWSTest;
@@ -52,7 +53,30 @@
public static Test suite()
{
- return new JBossWSCXFTestSetup(UsernameDigestTestCase.class,
"jaxws-samples-wsse-username-digest-service.sar
jaxws-samples-wsse-username-digest.war");
+ JBossWSCXFTestSetup testSetup;
+ if (!isTargetJBoss6())
+ {
+ testSetup = new JBossWSCXFTestSetup(UsernameDigestTestCase.class,
"jaxws-samples-wsse-username-digest.war");
+ Map<String, String> authenticationOptions = new HashMap<String,
String>();
+ authenticationOptions.put("usersProperties",
+
getResourceFile("jaxws/samples/wsse/username-digest/WEB-INF/jbossws-users.properties").getAbsolutePath());
+ authenticationOptions.put("rolesProperties",
+
getResourceFile("jaxws/samples/wsse/username-digest/WEB-INF/jbossws-roles.properties").getAbsolutePath());
+ authenticationOptions.put("hashAlgorithm", "SHA");
+ authenticationOptions.put("hashEncoding", "BASE64");
+ authenticationOptions.put("hashCharset", "UTF-8");
+ authenticationOptions.put("hashUserPassword", "false");
+ authenticationOptions.put("hashStorePassword", "true");
+ authenticationOptions.put("storeDigestCallback",
UsernameTokenCallback.class.getName());
+ authenticationOptions.put("unauthenticatedIdentity",
"anonymous");
+ testSetup.addSecurityDomainRequirement("JBossWSDigest",
authenticationOptions);
+ }
+ else
+ {
+ testSetup = new JBossWSCXFTestSetup(UsernameDigestTestCase.class,
+ "jaxws-samples-wsse-username-digest-service.sar
jaxws-samples-wsse-username-digest.war");
+ }
+ return testSetup;
}
public void testAuthorized() throws Exception
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2011-06-07 16:01:48 UTC (rev 14486)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2011-06-07 16:17:21 UTC (rev 14487)
@@ -1048,10 +1048,6 @@
<!-- # [JBAS-9188] Implement support for nested EJBs & WARs in
.sar archives -->
<exclude>org/jboss/test/ws/jaxws/jbws1854/**</exclude>
- <!-- # [JBWS-3257] No class available with name
'org.jboss.security.plugins.JaasSecurityDomain' -->
-
<exclude>org/jboss/test/ws/jaxws/samples/wsseDigest/UsernameDigestTestCase*</exclude>
-
<exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameAuthorizationDigestTestCase*</exclude>
-
<!-- # [JBWS-3227] handlers config file not found on classpath
-->
<exclude>org/jboss/test/ws/jaxws/jbws3034/**</exclude>
Show replies by date