You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2013/06/05 15:22:58 UTC
svn commit: r1489851 - in /cxf/trunk:
rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/kerberos/
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/kerbe...
Author: coheigea
Date: Wed Jun 5 13:22:58 2013
New Revision: 1489851
URL: http://svn.apache.org/r1489851
Log:
Added streaming inbound support for Kerberos + some @Ignore'd tests
Added:
cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/kerberos/KerberosPasswordCallback.java
cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/kerberos/StaxKerberosTokenTest.java
cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/kerberos/server/StaxServer.java
cxf/trunk/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/kerberos/server/stax-server.xml
Modified:
cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/KerberosTokenInterceptorProvider.java
Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/KerberosTokenInterceptorProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/KerberosTokenInterceptorProvider.java?rev=1489851&r1=1489850&r2=1489851&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/KerberosTokenInterceptorProvider.java (original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/KerberosTokenInterceptorProvider.java Wed Jun 5 13:22:58 2013
@@ -19,15 +19,22 @@
package org.apache.cxf.ws.security.policy.interceptors;
+import java.security.Key;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
+import java.util.Map;
+import java.util.logging.Logger;
+import javax.crypto.SecretKey;
+
+import org.apache.cxf.common.logging.LogUtils;
import org.apache.cxf.endpoint.Endpoint;
import org.apache.cxf.helpers.CastUtils;
import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.message.Message;
+import org.apache.cxf.message.MessageUtils;
import org.apache.cxf.phase.AbstractPhaseInterceptor;
import org.apache.cxf.phase.Phase;
import org.apache.cxf.service.model.EndpointInfo;
@@ -42,6 +49,8 @@ import org.apache.cxf.ws.security.tokens
import org.apache.cxf.ws.security.tokenstore.TokenStoreFactory;
import org.apache.cxf.ws.security.wss4j.KerberosTokenInterceptor;
import org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JInInterceptor;
+import org.apache.cxf.ws.security.wss4j.PolicyStaxActionInInterceptor;
+import org.apache.cxf.ws.security.wss4j.StaxSecurityContextInInterceptor;
import org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor;
import org.apache.cxf.ws.security.wss4j.policyvalidators.KerberosTokenPolicyValidator;
import org.apache.wss4j.dom.WSConstants;
@@ -53,6 +62,11 @@ import org.apache.wss4j.dom.message.toke
import org.apache.wss4j.policy.SP11Constants;
import org.apache.wss4j.policy.SP12Constants;
import org.apache.wss4j.policy.SPConstants;
+import org.apache.wss4j.stax.securityEvent.KerberosTokenSecurityEvent;
+import org.apache.wss4j.stax.securityEvent.WSSecurityEventConstants;
+import org.apache.wss4j.stax.securityToken.KerberosServiceSecurityToken;
+import org.apache.xml.security.exceptions.XMLSecurityException;
+import org.apache.xml.security.stax.securityEvent.SecurityEvent;
/**
*
@@ -64,10 +78,13 @@ public class KerberosTokenInterceptorPro
public KerberosTokenInterceptorProvider() {
super(Arrays.asList(SP11Constants.KERBEROS_TOKEN, SP12Constants.KERBEROS_TOKEN));
- this.getOutInterceptors().add(new KerberosTokenOutInterceptor());
- this.getOutFaultInterceptors().add(new KerberosTokenOutInterceptor());
- this.getInInterceptors().add(new KerberosTokenInInterceptor());
- this.getInFaultInterceptors().add(new KerberosTokenInInterceptor());
+ this.getOutInterceptors().add(new KerberosTokenDOMOutInterceptor());
+ this.getOutFaultInterceptors().add(new KerberosTokenDOMOutInterceptor());
+ this.getInInterceptors().add(new KerberosTokenDOMInInterceptor());
+ this.getInFaultInterceptors().add(new KerberosTokenDOMInInterceptor());
+
+ this.getInInterceptors().add(new KerberosTokenStaxInInterceptor());
+ this.getInFaultInterceptors().add(new KerberosTokenStaxInInterceptor());
this.getOutInterceptors().add(new KerberosTokenInterceptor());
this.getInInterceptors().add(new KerberosTokenInterceptor());
@@ -95,14 +112,16 @@ public class KerberosTokenInterceptorPro
}
}
- static class KerberosTokenOutInterceptor extends AbstractPhaseInterceptor<Message> {
- public KerberosTokenOutInterceptor() {
+ static class KerberosTokenDOMOutInterceptor extends AbstractPhaseInterceptor<Message> {
+ public KerberosTokenDOMOutInterceptor() {
super(Phase.PREPARE_SEND);
}
public void handleMessage(Message message) throws Fault {
AssertionInfoMap aim = message.get(AssertionInfoMap.class);
// extract Assertion information
- if (aim != null) {
+ boolean enableStax =
+ MessageUtils.isTrue(message.getContextualProperty(SecurityConstants.ENABLE_STREAMING_SECURITY));
+ if (aim != null && !enableStax) {
Collection<AssertionInfo> ais =
NegotiationUtils.getAllAssertionsByLocalname(aim, SPConstants.KERBEROS_TOKEN);
if (ais.isEmpty()) {
@@ -144,8 +163,8 @@ public class KerberosTokenInterceptorPro
}
- static class KerberosTokenInInterceptor extends AbstractPhaseInterceptor<Message> {
- public KerberosTokenInInterceptor() {
+ static class KerberosTokenDOMInInterceptor extends AbstractPhaseInterceptor<Message> {
+ public KerberosTokenDOMInInterceptor() {
super(Phase.PRE_PROTOCOL);
addAfter(WSS4JInInterceptor.class.getName());
addAfter(PolicyBasedWSS4JInInterceptor.class.getName());
@@ -154,7 +173,10 @@ public class KerberosTokenInterceptorPro
public void handleMessage(Message message) throws Fault {
AssertionInfoMap aim = message.get(AssertionInfoMap.class);
// extract Assertion information
- if (aim != null) {
+
+ boolean enableStax =
+ MessageUtils.isTrue(message.getContextualProperty(SecurityConstants.ENABLE_STREAMING_SECURITY));
+ if (aim != null && !enableStax) {
Collection<AssertionInfo> ais =
NegotiationUtils.getAllAssertionsByLocalname(aim, SPConstants.KERBEROS_TOKEN);
if (ais.isEmpty()) {
@@ -218,6 +240,91 @@ public class KerberosTokenInterceptorPro
}
}
+ static class KerberosTokenStaxInInterceptor extends AbstractPhaseInterceptor<Message> {
+
+ private static final Logger LOG =
+ LogUtils.getL7dLogger(KerberosTokenStaxInInterceptor.class);
+
+ public KerberosTokenStaxInInterceptor() {
+ super(Phase.PRE_PROTOCOL);
+ addAfter(PolicyStaxActionInInterceptor.class.getName());
+ getBefore().add(StaxSecurityContextInInterceptor.class.getName());
+ }
+
+ public void handleMessage(Message message) throws Fault {
+ AssertionInfoMap aim = message.get(AssertionInfoMap.class);
+ // extract Assertion information
+
+ boolean enableStax =
+ MessageUtils.isTrue(message.getContextualProperty(SecurityConstants.ENABLE_STREAMING_SECURITY));
+ if (aim != null && enableStax) {
+ Collection<AssertionInfo> ais =
+ NegotiationUtils.getAllAssertionsByLocalname(aim, SPConstants.KERBEROS_TOKEN);
+ if (ais.isEmpty()) {
+ return;
+ }
+ if (!isRequestor(message)) {
+ SecurityEvent event = findKerberosEvent(message);
+ if (event != null) {
+ for (AssertionInfo ai : ais) {
+ ai.setAsserted(true);
+ }
+ KerberosServiceSecurityToken kerberosToken =
+ ((KerberosTokenSecurityEvent)event).getSecurityToken();
+ if (kerberosToken != null) {
+ SecurityToken token = new SecurityToken(kerberosToken.getId());
+ token.setTokenType(kerberosToken.getKerberosTokenValueType());
+
+ byte[] secret = getSecretKeyFromToken(kerberosToken);
+ token.setSecret(secret);
+ getTokenStore(message).add(token);
+ message.getExchange().put(SecurityConstants.TOKEN_ID, token.getId());
+ }
+ }
+ } else {
+ //client side should be checked on the way out
+ for (AssertionInfo ai : ais) {
+ ai.setAsserted(true);
+ }
+ }
+
+ NegotiationUtils.assertPolicy(aim, "WssKerberosV5ApReqToken11");
+ NegotiationUtils.assertPolicy(aim, "WssGssKerberosV5ApReqToken11");
+ }
+ }
+
+ private SecurityEvent findKerberosEvent(Message message) {
+ @SuppressWarnings("unchecked")
+ final List<SecurityEvent> incomingEventList =
+ (List<SecurityEvent>)message.get(SecurityEvent.class.getName() + ".in");
+ if (incomingEventList != null) {
+ for (SecurityEvent incomingEvent : incomingEventList) {
+ if (WSSecurityEventConstants.KerberosToken
+ == incomingEvent.getSecurityEventType()) {
+ return incomingEvent;
+ }
+ }
+ }
+ return null;
+ }
+
+ private byte[] getSecretKeyFromToken(KerberosServiceSecurityToken kerberosToken) {
+ try {
+ Map<String, Key> secretKeys = kerberosToken.getSecretKey();
+ if (secretKeys != null) {
+ for (String key : kerberosToken.getSecretKey().keySet()) {
+ if (secretKeys.get(key) instanceof SecretKey) {
+ return ((SecretKey)secretKeys.get(key)).getEncoded();
+ }
+ }
+ }
+ } catch (XMLSecurityException e) {
+ LOG.fine(e.getMessage());
+ }
+ return null;
+ }
+ }
+
private static SecurityToken createSecurityToken(KerberosSecurity binarySecurityToken) {
SecurityToken token = new SecurityToken(binarySecurityToken.getID());
token.setToken(binarySecurityToken.getElement());
Added: cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/kerberos/KerberosPasswordCallback.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/kerberos/KerberosPasswordCallback.java?rev=1489851&view=auto
==============================================================================
--- cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/kerberos/KerberosPasswordCallback.java (added)
+++ cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/kerberos/KerberosPasswordCallback.java Wed Jun 5 13:22:58 2013
@@ -0,0 +1,64 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.systest.ws.kerberos;
+
+import java.io.IOException;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import org.apache.wss4j.common.ext.WSPasswordCallback;
+import org.apache.wss4j.common.kerberos.KerberosContextAndServiceNameCallback;
+
+/**
+ */
+
+public class KerberosPasswordCallback implements CallbackHandler {
+
+ public KerberosPasswordCallback() {
+ }
+
+ /**
+ * It attempts to get the password from the private
+ * alias/passwords map.
+ */
+ public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
+ for (int i = 0; i < callbacks.length; i++) {
+ if (callbacks[i] instanceof WSPasswordCallback) {
+ WSPasswordCallback pc = (WSPasswordCallback)callbacks[i];
+ if ("alice".equals(pc.getIdentifier())) {
+ pc.setPassword("password");
+ } else if ("bob".equals(pc.getIdentifier())) {
+ pc.setPassword("password");
+ } else {
+ pc.setPassword("abcd!1234");
+ }
+ } else if (callbacks[i] instanceof KerberosContextAndServiceNameCallback) {
+ KerberosContextAndServiceNameCallback pc =
+ (KerberosContextAndServiceNameCallback)callbacks[i];
+ pc.setContextName("bob");
+ pc.setServiceName("bob@service.ws.apache.org");
+ }
+ }
+ }
+
+
+}
Added: cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/kerberos/StaxKerberosTokenTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/kerberos/StaxKerberosTokenTest.java?rev=1489851&view=auto
==============================================================================
--- cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/kerberos/StaxKerberosTokenTest.java (added)
+++ cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/kerberos/StaxKerberosTokenTest.java Wed Jun 5 13:22:58 2013
@@ -0,0 +1,439 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.systest.ws.kerberos;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.ws.common.SecurityTestUtil;
+import org.apache.cxf.systest.ws.kerberos.server.StaxServer;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.example.contract.doubleit.DoubleItPortType;
+import org.junit.BeforeClass;
+
+/**
+ * A set of tests for Kerberos Tokens. The tests are @Ignore'd, as they require a running KDC. To run the
+ * tests, set up a KDC of realm "WS.APACHE.ORG", with principal "alice" and service principal
+ * "bob/service.ws.apache.org". Create keytabs for both principals in "/etc/alice.keytab" and
+ * "/etc/bob.keytab" (this can all be edited in src/test/resource/kerberos.jaas". Then disable the
+ * @Ignore annotations and run the tests with:
+ *
+ * mvn test -Pnochecks -Dtest=KerberosTokenTest
+ * -Djava.security.auth.login.config=src/test/resources/kerberos.jaas
+ *
+ * See here for more information:
+ * http://coheigea.blogspot.com/2011/10/using-kerberos-with-web-services-part.html
+ *
+ * It tests both DOM + StAX clients against the StAX server
+ */
+@org.junit.Ignore
+public class StaxKerberosTokenTest extends AbstractBusClientServerTestBase {
+ static final String PORT = allocatePort(StaxServer.class);
+ static final String PORT2 = allocatePort(StaxServer.class, 2);
+
+ private static final String NAMESPACE = "http://www.example.org/contract/DoubleIt";
+ private static final QName SERVICE_QNAME = new QName(NAMESPACE, "DoubleItService");
+
+ private static boolean unrestrictedPoliciesInstalled =
+ SecurityTestUtil.checkUnrestrictedPoliciesInstalled();
+
+ @BeforeClass
+ public static void startServers() throws Exception {
+ assertTrue(
+ "Server failed to launch",
+ // run the server in the same process
+ // set this to false to fork
+ launchServer(StaxServer.class, true)
+ );
+ }
+
+ @org.junit.AfterClass
+ public static void cleanup() throws Exception {
+ SecurityTestUtil.cleanup();
+ stopAllServers();
+ }
+
+ @org.junit.Test
+ @org.junit.Ignore
+ public void testKerberosOverTransport() throws Exception {
+
+ SpringBusFactory bf = new SpringBusFactory();
+ URL busFile = StaxKerberosTokenTest.class.getResource("client/client.xml");
+
+ Bus bus = bf.createBus(busFile.toString());
+ SpringBusFactory.setDefaultBus(bus);
+ SpringBusFactory.setThreadDefaultBus(bus);
+
+ URL wsdl = StaxKerberosTokenTest.class.getResource("DoubleItKerberos.wsdl");
+ Service service = Service.create(wsdl, SERVICE_QNAME);
+ QName portQName = new QName(NAMESPACE, "DoubleItKerberosTransportPort");
+ DoubleItPortType kerberosPort =
+ service.getPort(portQName, DoubleItPortType.class);
+
+ updateAddressPort(kerberosPort, PORT2);
+
+ // DOM
+ kerberosPort.doubleIt(25);
+
+ // TODO Streaming
+ // SecurityTestUtil.enableStreaming(kerberosPort);
+ // kerberosPort.doubleIt(25);
+
+ ((java.io.Closeable)kerberosPort).close();
+ bus.shutdown(true);
+ }
+ /*
+ @org.junit.Test
+ public void testKerberosOverSymmetric() throws Exception {
+
+ if (!unrestrictedPoliciesInstalled) {
+ return;
+ }
+
+ SpringBusFactory bf = new SpringBusFactory();
+ URL busFile = StaxKerberosTokenTest.class.getResource("client/client.xml");
+
+ Bus bus = bf.createBus(busFile.toString());
+ SpringBusFactory.setDefaultBus(bus);
+ SpringBusFactory.setThreadDefaultBus(bus);
+
+ URL wsdl = StaxKerberosTokenTest.class.getResource("DoubleItKerberos.wsdl");
+ Service service = Service.create(wsdl, SERVICE_QNAME);
+ QName portQName = new QName(NAMESPACE, "DoubleItKerberosSymmetricPort");
+ DoubleItPortType kerberosPort =
+ service.getPort(portQName, DoubleItPortType.class);
+
+ updateAddressPort(kerberosPort, PORT);
+
+ int result = kerberosPort.doubleIt(25);
+ assertTrue(result == 50);
+
+ ((java.io.Closeable)kerberosPort).close();
+ bus.shutdown(true);
+ }
+
+ @org.junit.Test
+ public void testKerberosOverSymmetricSupporting() throws Exception {
+
+ if (!unrestrictedPoliciesInstalled) {
+ return;
+ }
+
+ SpringBusFactory bf = new SpringBusFactory();
+ URL busFile = StaxKerberosTokenTest.class.getResource("client/client.xml");
+
+ Bus bus = bf.createBus(busFile.toString());
+ SpringBusFactory.setDefaultBus(bus);
+ SpringBusFactory.setThreadDefaultBus(bus);
+
+ URL wsdl = StaxKerberosTokenTest.class.getResource("DoubleItKerberos.wsdl");
+ Service service = Service.create(wsdl, SERVICE_QNAME);
+ QName portQName = new QName(NAMESPACE, "DoubleItKerberosSymmetricSupportingPort");
+ DoubleItPortType kerberosPort =
+ service.getPort(portQName, DoubleItPortType.class);
+
+ updateAddressPort(kerberosPort, PORT);
+
+ int result = kerberosPort.doubleIt(25);
+ assertTrue(result == 50);
+
+ ((java.io.Closeable)kerberosPort).close();
+ bus.shutdown(true);
+ }
+ */
+
+ // TODO - See WSS-442
+ @org.junit.Test
+ @org.junit.Ignore
+ public void testKerberosOverAsymmetric() throws Exception {
+
+ if (!unrestrictedPoliciesInstalled) {
+ return;
+ }
+
+ SpringBusFactory bf = new SpringBusFactory();
+ URL busFile = StaxKerberosTokenTest.class.getResource("client/client.xml");
+
+ Bus bus = bf.createBus(busFile.toString());
+ SpringBusFactory.setDefaultBus(bus);
+ SpringBusFactory.setThreadDefaultBus(bus);
+
+ URL wsdl = StaxKerberosTokenTest.class.getResource("DoubleItKerberos.wsdl");
+ Service service = Service.create(wsdl, SERVICE_QNAME);
+ QName portQName = new QName(NAMESPACE, "DoubleItKerberosAsymmetricPort");
+ DoubleItPortType kerberosPort =
+ service.getPort(portQName, DoubleItPortType.class);
+
+ updateAddressPort(kerberosPort, PORT);
+
+ // DOM
+ kerberosPort.doubleIt(25);
+
+ // TODO Streaming
+ // SecurityTestUtil.enableStreaming(kerberosPort);
+ // kerberosPort.doubleIt(25);
+
+ ((java.io.Closeable)kerberosPort).close();
+ bus.shutdown(true);
+ }
+
+ @org.junit.Test
+ @org.junit.Ignore
+ public void testKerberosOverTransportEndorsing() throws Exception {
+
+ SpringBusFactory bf = new SpringBusFactory();
+ URL busFile = StaxKerberosTokenTest.class.getResource("client/client.xml");
+
+ Bus bus = bf.createBus(busFile.toString());
+ SpringBusFactory.setDefaultBus(bus);
+ SpringBusFactory.setThreadDefaultBus(bus);
+
+ URL wsdl = StaxKerberosTokenTest.class.getResource("DoubleItKerberos.wsdl");
+ Service service = Service.create(wsdl, SERVICE_QNAME);
+ QName portQName = new QName(NAMESPACE, "DoubleItKerberosTransportEndorsingPort");
+ DoubleItPortType kerberosPort =
+ service.getPort(portQName, DoubleItPortType.class);
+
+ updateAddressPort(kerberosPort, PORT2);
+
+ // DOM
+ kerberosPort.doubleIt(25);
+
+ // TODO Streaming
+ // SecurityTestUtil.enableStreaming(kerberosPort);
+ // kerberosPort.doubleIt(25);
+
+ ((java.io.Closeable)kerberosPort).close();
+ bus.shutdown(true);
+ }
+
+ // TODO - See WSS-442
+ @org.junit.Test
+ @org.junit.Ignore
+ public void testKerberosOverAsymmetricEndorsing() throws Exception {
+
+ SpringBusFactory bf = new SpringBusFactory();
+ URL busFile = StaxKerberosTokenTest.class.getResource("client/client.xml");
+
+ Bus bus = bf.createBus(busFile.toString());
+ SpringBusFactory.setDefaultBus(bus);
+ SpringBusFactory.setThreadDefaultBus(bus);
+
+ URL wsdl = StaxKerberosTokenTest.class.getResource("DoubleItKerberos.wsdl");
+ Service service = Service.create(wsdl, SERVICE_QNAME);
+ QName portQName = new QName(NAMESPACE, "DoubleItKerberosAsymmetricEndorsingPort");
+ DoubleItPortType kerberosPort =
+ service.getPort(portQName, DoubleItPortType.class);
+
+ updateAddressPort(kerberosPort, PORT);
+
+ // DOM
+ kerberosPort.doubleIt(25);
+
+ // TODO Streaming
+ // SecurityTestUtil.enableStreaming(kerberosPort);
+ // kerberosPort.doubleIt(25);
+
+ ((java.io.Closeable)kerberosPort).close();
+ bus.shutdown(true);
+ }
+ /*
+ @org.junit.Test
+ public void testKerberosOverSymmetricProtection() throws Exception {
+
+ SpringBusFactory bf = new SpringBusFactory();
+ URL busFile = StaxKerberosTokenTest.class.getResource("client/client.xml");
+
+ Bus bus = bf.createBus(busFile.toString());
+ SpringBusFactory.setDefaultBus(bus);
+ SpringBusFactory.setThreadDefaultBus(bus);
+
+ URL wsdl = StaxKerberosTokenTest.class.getResource("DoubleItKerberos.wsdl");
+ Service service = Service.create(wsdl, SERVICE_QNAME);
+ QName portQName = new QName(NAMESPACE, "DoubleItKerberosSymmetricProtectionPort");
+ DoubleItPortType kerberosPort =
+ service.getPort(portQName, DoubleItPortType.class);
+
+ updateAddressPort(kerberosPort, PORT);
+ int result = kerberosPort.doubleIt(25);
+ assertTrue(result == 50);
+
+ ((java.io.Closeable)kerberosPort).close();
+ bus.shutdown(true);
+ }
+
+ @org.junit.Test
+ public void testKerberosOverSymmetricDerivedProtection() throws Exception {
+
+ SpringBusFactory bf = new SpringBusFactory();
+ URL busFile = StaxKerberosTokenTest.class.getResource("client/client.xml");
+
+ Bus bus = bf.createBus(busFile.toString());
+ SpringBusFactory.setDefaultBus(bus);
+ SpringBusFactory.setThreadDefaultBus(bus);
+
+ URL wsdl = StaxKerberosTokenTest.class.getResource("DoubleItKerberos.wsdl");
+ Service service = Service.create(wsdl, SERVICE_QNAME);
+ QName portQName = new QName(NAMESPACE, "DoubleItKerberosSymmetricDerivedProtectionPort");
+ DoubleItPortType kerberosPort =
+ service.getPort(portQName, DoubleItPortType.class);
+
+ updateAddressPort(kerberosPort, PORT);
+ int result = kerberosPort.doubleIt(25);
+ assertTrue(result == 50);
+
+ ((java.io.Closeable)kerberosPort).close();
+ bus.shutdown(true);
+ }
+ */
+
+ // TODO - See WSS-442
+ @org.junit.Test
+ @org.junit.Ignore
+ public void testKerberosOverAsymmetricSignedEndorsing() throws Exception {
+
+ if (!unrestrictedPoliciesInstalled) {
+ return;
+ }
+
+ SpringBusFactory bf = new SpringBusFactory();
+ URL busFile = StaxKerberosTokenTest.class.getResource("client/client.xml");
+
+ Bus bus = bf.createBus(busFile.toString());
+ SpringBusFactory.setDefaultBus(bus);
+ SpringBusFactory.setThreadDefaultBus(bus);
+
+ URL wsdl = StaxKerberosTokenTest.class.getResource("DoubleItKerberos.wsdl");
+ Service service = Service.create(wsdl, SERVICE_QNAME);
+ QName portQName = new QName(NAMESPACE, "DoubleItKerberosAsymmetricSignedEndorsingPort");
+ DoubleItPortType kerberosPort =
+ service.getPort(portQName, DoubleItPortType.class);
+
+ updateAddressPort(kerberosPort, PORT);
+
+ // DOM
+ kerberosPort.doubleIt(25);
+
+ // TODO Streaming
+ // SecurityTestUtil.enableStreaming(kerberosPort);
+ // kerberosPort.doubleIt(25);
+
+ ((java.io.Closeable)kerberosPort).close();
+ bus.shutdown(true);
+ }
+
+ // TODO - See WSS-442
+ @org.junit.Test
+ @org.junit.Ignore
+ public void testKerberosOverAsymmetricSignedEncrypted() throws Exception {
+
+ if (!unrestrictedPoliciesInstalled) {
+ return;
+ }
+
+ SpringBusFactory bf = new SpringBusFactory();
+ URL busFile = StaxKerberosTokenTest.class.getResource("client/client.xml");
+
+ Bus bus = bf.createBus(busFile.toString());
+ SpringBusFactory.setDefaultBus(bus);
+ SpringBusFactory.setThreadDefaultBus(bus);
+
+ URL wsdl = StaxKerberosTokenTest.class.getResource("DoubleItKerberos.wsdl");
+ Service service = Service.create(wsdl, SERVICE_QNAME);
+ QName portQName = new QName(NAMESPACE, "DoubleItKerberosAsymmetricSignedEncryptedPort");
+ DoubleItPortType kerberosPort =
+ service.getPort(portQName, DoubleItPortType.class);
+
+ updateAddressPort(kerberosPort, PORT);
+
+ // DOM
+ kerberosPort.doubleIt(25);
+
+ // TODO Streaming
+ // SecurityTestUtil.enableStreaming(kerberosPort);
+ // kerberosPort.doubleIt(25);
+
+ ((java.io.Closeable)kerberosPort).close();
+ bus.shutdown(true);
+ }
+ /*
+ @org.junit.Test
+ public void testKerberosOverSymmetricEndorsingEncrypted() throws Exception {
+
+ if (!unrestrictedPoliciesInstalled) {
+ return;
+ }
+
+ SpringBusFactory bf = new SpringBusFactory();
+ URL busFile = StaxKerberosTokenTest.class.getResource("client/client.xml");
+
+ Bus bus = bf.createBus(busFile.toString());
+ SpringBusFactory.setDefaultBus(bus);
+ SpringBusFactory.setThreadDefaultBus(bus);
+
+ URL wsdl = StaxKerberosTokenTest.class.getResource("DoubleItKerberos.wsdl");
+ Service service = Service.create(wsdl, SERVICE_QNAME);
+ QName portQName = new QName(NAMESPACE, "DoubleItKerberosSymmetricEndorsingEncryptedPort");
+ DoubleItPortType kerberosPort =
+ service.getPort(portQName, DoubleItPortType.class);
+
+ updateAddressPort(kerberosPort, PORT);
+
+ int result = kerberosPort.doubleIt(25);
+ assertTrue(result == 50);
+
+ ((java.io.Closeable)kerberosPort).close();
+ bus.shutdown(true);
+ }
+
+ @org.junit.Test
+ public void testKerberosOverSymmetricSignedEndorsingEncrypted() throws Exception {
+
+ if (!unrestrictedPoliciesInstalled) {
+ return;
+ }
+
+ SpringBusFactory bf = new SpringBusFactory();
+ URL busFile = StaxKerberosTokenTest.class.getResource("client/client.xml");
+
+ Bus bus = bf.createBus(busFile.toString());
+ SpringBusFactory.setDefaultBus(bus);
+ SpringBusFactory.setThreadDefaultBus(bus);
+
+ URL wsdl = StaxKerberosTokenTest.class.getResource("DoubleItKerberos.wsdl");
+ Service service = Service.create(wsdl, SERVICE_QNAME);
+ QName portQName = new QName(NAMESPACE, "DoubleItKerberosSymmetricSignedEndorsingEncryptedPort");
+ DoubleItPortType kerberosPort =
+ service.getPort(portQName, DoubleItPortType.class);
+
+ updateAddressPort(kerberosPort, PORT);
+
+ int result = kerberosPort.doubleIt(25);
+ assertTrue(result == 50);
+
+ ((java.io.Closeable)kerberosPort).close();
+ bus.shutdown(true);
+ }
+ */
+}
Added: cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/kerberos/server/StaxServer.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/kerberos/server/StaxServer.java?rev=1489851&view=auto
==============================================================================
--- cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/kerberos/server/StaxServer.java (added)
+++ cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/kerberos/server/StaxServer.java Wed Jun 5 13:22:58 2013
@@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.systest.ws.kerberos.server;
+
+import java.net.URL;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+
+public class StaxServer extends AbstractBusTestServerBase {
+
+ public StaxServer() {
+
+ }
+
+ protected void run() {
+ URL busFile = StaxServer.class.getResource("stax-server.xml");
+ Bus busLocal = new SpringBusFactory().createBus(busFile);
+ BusFactory.setDefaultBus(busLocal);
+ setBus(busLocal);
+
+ try {
+ new StaxServer();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
Added: cxf/trunk/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/kerberos/server/stax-server.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/kerberos/server/stax-server.xml?rev=1489851&view=auto
==============================================================================
--- cxf/trunk/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/kerberos/server/stax-server.xml (added)
+++ cxf/trunk/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/kerberos/server/stax-server.xml Wed Jun 5 13:22:58 2013
@@ -0,0 +1,326 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:jaxws="http://cxf.apache.org/jaxws"
+ xmlns:http="http://cxf.apache.org/transports/http/configuration"
+ xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration"
+ xmlns:sec="http://cxf.apache.org/configuration/security"
+ xmlns:security="http://schemas.iona.com/soa/security-config"
+ xmlns:interop="http://WSSec/wssec10"
+ xmlns:cxf="http://cxf.apache.org/core"
+ xmlns:p="http://cxf.apache.org/policy"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
+ http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
+ http://cxf.apache.org/policy http://cxf.apache.org/schemas/policy.xsd
+ http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
+ http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/schemas/configuration/http-jetty.xsd
+ http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd
+ http://schemas.iona.com/soa/security-config http://schemas.iona.com/soa/security-config.xsd
+ ">
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
+ <cxf:bus>
+ <cxf:features>
+ <p:policies/>
+ <cxf:logging/>
+ </cxf:features>
+ </cxf:bus>
+
+ <!-- -->
+ <!-- Any services listening on port 9009 must use the following -->
+ <!-- Transport Layer Security (TLS) settings -->
+ <!-- -->
+ <httpj:engine-factory id="tls-settings">
+ <httpj:engine port="${testutil.ports.StaxServer.2}">
+ <httpj:tlsServerParameters>
+ <sec:keyManagers keyPassword="password">
+ <sec:keyStore type="jks" password="password" resource="org/apache/cxf/systest/ws/security/Bethal.jks"/>
+ </sec:keyManagers>
+ <sec:trustManagers>
+ <sec:keyStore type="jks" password="password" resource="org/apache/cxf/systest/ws/security/Truststore.jks"/>
+ </sec:trustManagers>
+ <sec:cipherSuitesFilter>
+ <sec:include>.*_EXPORT_.*</sec:include>
+ <sec:include>.*_EXPORT1024_.*</sec:include>
+ <sec:include>.*_WITH_DES_.*</sec:include>
+ <sec:include>.*_WITH_AES_.*</sec:include>
+ <sec:include>.*_WITH_NULL_.*</sec:include>
+ <sec:exclude>.*_DH_anon_.*</sec:exclude>
+ </sec:cipherSuitesFilter>
+ <sec:clientAuthentication want="true" required="true"/>
+ </httpj:tlsServerParameters>
+ </httpj:engine>
+ </httpj:engine-factory>
+
+ <!-- <bean id="kerberosTicketDecoderImpl"
+ class="org.apache.cxf.systest.ws.kerberos.server.KerberosTokenDecoderImpl"/>-->
+
+ <jaxws:endpoint
+ id="KerberosOverTransport"
+ address="https://localhost:${testutil.ports.StaxServer.2}/DoubleItKerberosTransport"
+ serviceName="s:DoubleItService"
+ endpointName="s:DoubleItKerberosTransportPort"
+ xmlns:s="http://www.example.org/contract/DoubleIt"
+ implementor="org.apache.cxf.systest.ws.common.DoubleItPortTypeImpl"
+ wsdlLocation="org/apache/cxf/systest/ws/kerberos/DoubleItKerberos.wsdl"
+ depends-on="tls-settings">
+
+ <jaxws:properties>
+ <entry key="ws-security.is-bsp-compliant" value="false"/>
+ <entry key="ws-security.enable.streaming" value="true"/>
+ </jaxws:properties>
+
+ </jaxws:endpoint>
+
+ <jaxws:endpoint
+ id="KerberosOverSymmetric"
+ address="http://localhost:${testutil.ports.StaxServer}/DoubleItKerberosSymmetric"
+ serviceName="s:DoubleItService"
+ endpointName="s:DoubleItKerberosSymmetricPort"
+ xmlns:s="http://www.example.org/contract/DoubleIt"
+ implementor="org.apache.cxf.systest.ws.common.DoubleItPortTypeImpl"
+ wsdlLocation="org/apache/cxf/systest/ws/kerberos/DoubleItKerberos.wsdl">
+
+ <jaxws:properties>
+ <entry key="ws-security.callback-handler"
+ value="org.apache.cxf.systest.ws.kerberos.KerberosPasswordCallback"/>
+ <entry key="ws-security.signature.properties"
+ value="org/apache/cxf/systest/ws/wssec10/client/bob.properties"/>
+ <entry key="ws-security.enable.streaming" value="true"/>
+ </jaxws:properties>
+
+ </jaxws:endpoint>
+
+ <jaxws:endpoint
+ id="KerberosOverSymmetricSupporting"
+ address="http://localhost:${testutil.ports.StaxServer}/DoubleItKerberosSymmetricSupporting"
+ serviceName="s:DoubleItService"
+ endpointName="s:DoubleItKerberosSymmetricSupportingPort"
+ xmlns:s="http://www.example.org/contract/DoubleIt"
+ implementor="org.apache.cxf.systest.ws.common.DoubleItPortTypeImpl"
+ wsdlLocation="org/apache/cxf/systest/ws/kerberos/DoubleItKerberos.wsdl">
+
+ <jaxws:properties>
+ <entry key="ws-security.callback-handler"
+ value="org.apache.cxf.systest.ws.kerberos.KerberosPasswordCallback"/>
+ <entry key="ws-security.signature.properties"
+ value="org/apache/cxf/systest/ws/wssec10/client/bob.properties"/>
+ <entry key="ws-security.enable.streaming" value="true"/>
+ </jaxws:properties>
+
+ </jaxws:endpoint>
+
+ <jaxws:endpoint
+ id="KerberosOverAsymmetric"
+ address="http://localhost:${testutil.ports.StaxServer}/DoubleItKerberosAsymmetric"
+ serviceName="s:DoubleItService"
+ endpointName="s:DoubleItKerberosAsymmetricPort"
+ xmlns:s="http://www.example.org/contract/DoubleIt"
+ implementor="org.apache.cxf.systest.ws.common.DoubleItPortTypeImpl"
+ wsdlLocation="org/apache/cxf/systest/ws/kerberos/DoubleItKerberos.wsdl">
+
+ <jaxws:properties>
+ <entry key="ws-security.username" value="bob"/>
+ <entry key="ws-security.callback-handler"
+ value="org.apache.cxf.systest.ws.kerberos.KerberosPasswordCallback"/>
+ <entry key="ws-security.signature.properties"
+ value="org/apache/cxf/systest/ws/wssec10/client/bob.properties"/>
+ <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.is-bsp-compliant" value="false"/>
+ <entry key="ws-security.enable.streaming" value="true"/>
+ </jaxws:properties>
+
+ </jaxws:endpoint>
+
+ <jaxws:endpoint
+ id="KerberosOverTransportEndorsing"
+ address="https://localhost:${testutil.ports.StaxServer.2}/DoubleItKerberosTransportEndorsing"
+ serviceName="s:DoubleItService"
+ endpointName="s:DoubleItKerberosTransportEndorsingPort"
+ xmlns:s="http://www.example.org/contract/DoubleIt"
+ implementor="org.apache.cxf.systest.ws.common.DoubleItPortTypeImpl"
+ wsdlLocation="org/apache/cxf/systest/ws/kerberos/DoubleItKerberos.wsdl"
+ depends-on="tls-settings">
+
+ <jaxws:properties>
+ <entry key="ws-security.is-bsp-compliant" value="false"/>
+ <entry key="ws-security.callback-handler"
+ value="org.apache.cxf.systest.ws.kerberos.KerberosPasswordCallback"/>
+ <entry key="ws-security.signature.properties"
+ value="org/apache/cxf/systest/ws/wssec10/client/bob.properties"/>
+ <entry key="ws-security.enable.streaming" value="true"/>
+ </jaxws:properties>
+
+ </jaxws:endpoint>
+
+ <jaxws:endpoint
+ id="KerberosOverAsymmetricEndorsing"
+ address="http://localhost:${testutil.ports.StaxServer}/DoubleItKerberosAsymmetricEndorsing"
+ serviceName="s:DoubleItService"
+ endpointName="s:DoubleItKerberosAsymmetricEndorsingPort"
+ xmlns:s="http://www.example.org/contract/DoubleIt"
+ implementor="org.apache.cxf.systest.ws.common.DoubleItPortTypeImpl"
+ wsdlLocation="org/apache/cxf/systest/ws/kerberos/DoubleItKerberos.wsdl">
+
+ <jaxws:properties>
+ <entry key="ws-security.username" value="bob"/>
+ <entry key="ws-security.callback-handler"
+ value="org.apache.cxf.systest.ws.kerberos.KerberosPasswordCallback"/>
+ <entry key="ws-security.signature.properties"
+ value="org/apache/cxf/systest/ws/wssec10/client/bob.properties"/>
+ <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.is-bsp-compliant" value="false"/>
+ <entry key="ws-security.enable.streaming" value="true"/>
+ </jaxws:properties>
+
+ </jaxws:endpoint>
+
+ <jaxws:endpoint
+ id="KerberosOverSymmetricProtection"
+ address="http://localhost:${testutil.ports.StaxServer}/DoubleItKerberosSymmetricProtection"
+ serviceName="s:DoubleItService"
+ endpointName="s:DoubleItKerberosSymmetricProtectionPort"
+ xmlns:s="http://www.example.org/contract/DoubleIt"
+ implementor="org.apache.cxf.systest.ws.common.DoubleItPortTypeImpl"
+ wsdlLocation="org/apache/cxf/systest/ws/kerberos/DoubleItKerberos.wsdl">
+
+ <jaxws:properties>
+ <entry key="ws-security.callback-handler"
+ value="org.apache.cxf.systest.ws.kerberos.KerberosPasswordCallback"/>
+ <entry key="ws-security.signature.properties"
+ value="org/apache/cxf/systest/ws/wssec10/client/bob.properties"/>
+ <entry key="ws-security.enable.streaming" value="true"/>
+ </jaxws:properties>
+
+ </jaxws:endpoint>
+
+ <jaxws:endpoint
+ id="KerberosOverSymmetricDerivedProtection"
+ address="http://localhost:${testutil.ports.StaxServer}/DoubleItKerberosSymmetricDerivedProtection"
+ serviceName="s:DoubleItService"
+ endpointName="s:DoubleItKerberosSymmetricDerivedProtectionPort"
+ xmlns:s="http://www.example.org/contract/DoubleIt"
+ implementor="org.apache.cxf.systest.ws.common.DoubleItPortTypeImpl"
+ wsdlLocation="org/apache/cxf/systest/ws/kerberos/DoubleItKerberos.wsdl">
+
+ <jaxws:properties>
+ <entry key="ws-security.callback-handler"
+ value="org.apache.cxf.systest.ws.kerberos.KerberosPasswordCallback"/>
+ <entry key="ws-security.signature.properties"
+ value="org/apache/cxf/systest/ws/wssec10/client/bob.properties"/>
+ <entry key="ws-security.enable.streaming" value="true"/>
+ </jaxws:properties>
+
+ </jaxws:endpoint>
+
+ <jaxws:endpoint
+ id="KerberosOverAsymmetricSignedEndorsing"
+ address="http://localhost:${testutil.ports.StaxServer}/DoubleItKerberosAsymmetricSignedEndorsing"
+ serviceName="s:DoubleItService"
+ endpointName="s:DoubleItKerberosAsymmetricSignedEndorsingPort"
+ xmlns:s="http://www.example.org/contract/DoubleIt"
+ implementor="org.apache.cxf.systest.ws.common.DoubleItPortTypeImpl"
+ wsdlLocation="org/apache/cxf/systest/ws/kerberos/DoubleItKerberos.wsdl">
+
+ <jaxws:properties>
+ <entry key="ws-security.username" value="bob"/>
+ <entry key="ws-security.callback-handler"
+ value="org.apache.cxf.systest.ws.kerberos.KerberosPasswordCallback"/>
+ <entry key="ws-security.signature.properties"
+ value="org/apache/cxf/systest/ws/wssec10/client/bob.properties"/>
+ <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.is-bsp-compliant" value="false"/>
+ <entry key="ws-security.enable.streaming" value="true"/>
+ </jaxws:properties>
+
+ </jaxws:endpoint>
+
+ <jaxws:endpoint
+ id="KerberosOverAsymmetricSignedEncrypted"
+ address="http://localhost:${testutil.ports.StaxServer}/DoubleItKerberosAsymmetricSignedEncrypted"
+ serviceName="s:DoubleItService"
+ endpointName="s:DoubleItKerberosAsymmetricSignedEncryptedPort"
+ xmlns:s="http://www.example.org/contract/DoubleIt"
+ implementor="org.apache.cxf.systest.ws.common.DoubleItPortTypeImpl"
+ wsdlLocation="org/apache/cxf/systest/ws/kerberos/DoubleItKerberos.wsdl">
+
+ <jaxws:properties>
+ <entry key="ws-security.username" value="bob"/>
+ <entry key="ws-security.callback-handler"
+ value="org.apache.cxf.systest.ws.kerberos.KerberosPasswordCallback"/>
+ <entry key="ws-security.signature.properties"
+ value="org/apache/cxf/systest/ws/wssec10/client/bob.properties"/>
+ <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.is-bsp-compliant" value="false"/>
+ <entry key="ws-security.enable.streaming" value="true"/>
+ </jaxws:properties>
+
+ </jaxws:endpoint>
+
+ <jaxws:endpoint
+ id="KerberosOverSymmetricEndorsingEncrypted"
+ address="http://localhost:${testutil.ports.StaxServer}/DoubleItKerberosSymmetricEndorsingEncrypted"
+ serviceName="s:DoubleItService"
+ endpointName="s:DoubleItKerberosSymmetricEndorsingEncryptedPort"
+ xmlns:s="http://www.example.org/contract/DoubleIt"
+ implementor="org.apache.cxf.systest.ws.common.DoubleItPortTypeImpl"
+ wsdlLocation="org/apache/cxf/systest/ws/kerberos/DoubleItKerberos.wsdl">
+
+ <jaxws:properties>
+ <entry key="ws-security.callback-handler"
+ value="org.apache.cxf.systest.ws.kerberos.KerberosPasswordCallback"/>
+ <entry key="ws-security.signature.properties"
+ value="org/apache/cxf/systest/ws/wssec10/client/bob.properties"/>
+ <entry key="ws-security.enable.streaming" value="true"/>
+ </jaxws:properties>
+
+ </jaxws:endpoint>
+
+ <jaxws:endpoint
+ id="KerberosOverSymmetricSignedEndorsingEncrypted"
+ address="http://localhost:${testutil.ports.StaxServer}/DoubleItKerberosSymmetricSignedEndorsingEncrypted"
+ serviceName="s:DoubleItService"
+ endpointName="s:DoubleItKerberosSymmetricSignedEndorsingEncryptedPort"
+ xmlns:s="http://www.example.org/contract/DoubleIt"
+ implementor="org.apache.cxf.systest.ws.common.DoubleItPortTypeImpl"
+ wsdlLocation="org/apache/cxf/systest/ws/kerberos/DoubleItKerberos.wsdl">
+
+ <jaxws:properties>
+ <entry key="ws-security.callback-handler"
+ value="org.apache.cxf.systest.ws.kerberos.KerberosPasswordCallback"/>
+ <entry key="ws-security.signature.properties"
+ value="org/apache/cxf/systest/ws/wssec10/client/bob.properties"/>
+ <entry key="ws-security.enable.streaming" value="true"/>
+ </jaxws:properties>
+
+ </jaxws:endpoint>
+
+</beans>