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 2016/08/04 17:03:59 UTC
[1/3] cxf git commit: Splitting STSProperties into a separate file
Repository: cxf
Updated Branches:
refs/heads/master fdea67f0b -> 4d76ebba4
Splitting STSProperties into a separate file
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/4d76ebba
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/4d76ebba
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/4d76ebba
Branch: refs/heads/master
Commit: 4d76ebba427b0c7e1b3a014fd7c1cf7ff92c8138
Parents: a392864
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Thu Aug 4 16:11:39 2016 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Thu Aug 4 18:03:54 2016 +0100
----------------------------------------------------------------------
.../sts/token/validator/SAMLTokenValidator.java | 8 +++-
.../cxf/systest/sts/deployment/cxf-x509.xml | 2 +-
.../systest/sts/deployment/stax-cxf-x509.xml | 2 +-
.../cxf/systest/sts/deployment/sts/cxf-sts.xml | 46 +++-----------------
.../cxf/systest/sts/deployment/sts/realms.xml | 17 ++++++++
.../sts/deployment/sts/sts-properties.xml | 45 +++++++++++++++++++
6 files changed, 75 insertions(+), 45 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/4d76ebba/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/SAMLTokenValidator.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/SAMLTokenValidator.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/SAMLTokenValidator.java
index 7ac6650..59edca2 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/SAMLTokenValidator.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/SAMLTokenValidator.java
@@ -231,8 +231,12 @@ public class SAMLTokenValidator implements TokenValidator {
// Get the realm of the SAML token
String tokenRealm = null;
- if (samlRealmCodec != null) {
- tokenRealm = samlRealmCodec.getRealmFromToken(assertion);
+ SAMLRealmCodec codec = samlRealmCodec;
+ if (codec == null) {
+ codec = stsProperties.getSamlRealmCodec();
+ }
+ if (codec != null) {
+ tokenRealm = codec.getRealmFromToken(assertion);
// verify the realm against the cached token
if (secToken != null) {
Map<String, Object> props = secToken.getProperties();
http://git-wip-us.apache.org/repos/asf/cxf/blob/4d76ebba/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-x509.xml
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-x509.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-x509.xml
index bf00fdb..2790c80 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-x509.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-x509.xml
@@ -29,7 +29,7 @@
<!-- Override UsernameTokenValidator -->
<util:list id="tokenValidators">
- <ref bean="samlTokenValidator"/>
+ <bean class="org.apache.cxf.sts.token.validator.SAMLTokenValidator" />
<bean class="org.apache.cxf.systest.sts.username_onbehalfof.UsernameTokenValidator"/>
</util:list>
http://git-wip-us.apache.org/repos/asf/cxf/blob/4d76ebba/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-x509.xml
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-x509.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-x509.xml
index b38e515..26fe7a8 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-x509.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-x509.xml
@@ -29,7 +29,7 @@
<!-- Override UsernameTokenValidator -->
<util:list id="tokenValidators">
- <ref bean="samlTokenValidator"/>
+ <bean class="org.apache.cxf.sts.token.validator.SAMLTokenValidator" />
<bean class="org.apache.cxf.systest.sts.username_onbehalfof.UsernameTokenValidator"/>
</util:list>
http://git-wip-us.apache.org/repos/asf/cxf/blob/4d76ebba/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/cxf-sts.xml
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/cxf-sts.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/cxf-sts.xml
index 7c54d26..cb737f9 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/cxf-sts.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/cxf-sts.xml
@@ -26,13 +26,11 @@
</cxf:bus>
<import resource="realms.xml" />
-
- <bean id="hokDelegationHandler" class="org.apache.cxf.sts.token.delegation.HOKDelegationHandler"/>
- <bean id="utDelegationHandler" class="org.apache.cxf.sts.token.delegation.UsernameTokenDelegationHandler"/>
+ <import resource="sts-properties.xml" />
<util:list id="delegationHandlers">
- <ref bean="hokDelegationHandler"/>
- <ref bean="utDelegationHandler"/>
+ <bean class="org.apache.cxf.sts.token.delegation.HOKDelegationHandler" />
+ <bean class="org.apache.cxf.sts.token.delegation.UsernameTokenDelegationHandler" />
</util:list>
<bean id="issueDelegate" class="org.apache.cxf.sts.operation.TokenIssueOperation">
@@ -47,18 +45,13 @@
<property name="tokenValidators" ref="tokenValidators"/>
<property name="stsProperties" ref="stsProperties"/>
</bean>
- <bean id="utTokenValidator" class="org.apache.cxf.sts.token.validator.UsernameTokenValidator">
- </bean>
<util:list id="tokenValidators">
- <ref bean="samlTokenValidator"/>
- <ref bean="utTokenValidator"/>
+ <bean class="org.apache.cxf.sts.token.validator.SAMLTokenValidator" />
+ <bean class="org.apache.cxf.sts.token.validator.UsernameTokenValidator" />
</util:list>
<util:list id="tokenProviders">
<ref bean="samlTokenProvider"/>
</util:list>
- <bean id="samlTokenValidator" class="org.apache.cxf.sts.token.validator.SAMLTokenValidator">
- <property name="samlRealmCodec" ref="samlRealmCodec"/>
- </bean>
<bean id="samlTokenProvider" class="org.apache.cxf.sts.token.provider.SAMLTokenProvider">
<property name="realmMap" ref="realms"/>
</bean>
@@ -72,35 +65,6 @@
<util:list id="endpoints">
<value>http(s)?://localhost:(\d)*/doubleit/services/doubleit.*</value>
</util:list>
- <bean id="samlRealmCodec" class="org.apache.cxf.systest.sts.common.SAMLRealmCNCodec"/>
- <bean id="customRealmParser" class="org.apache.cxf.systest.sts.common.UriRealmParser"/>
- <bean id="identityMapper" class="org.apache.cxf.systest.sts.common.CustomIdentityMapper"/>
- <util:list id="relationships">
- <bean class="org.apache.cxf.sts.token.realm.Relationship">
- <property name="sourceRealm" value="a-issuer"/>
- <property name="targetRealm" value="b-issuer"/>
- <property name="identityMapper" ref="identityMapper"/>
- <property name="type" value="FederatedIdentity"/>
- </bean>
- </util:list>
-
- <bean id="encProperties" class="org.apache.cxf.sts.service.EncryptionProperties">
- <property name="encryptionAlgorithm" value="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
- <property name="keyWrapAlgorithm" value="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"/>
- </bean>
-
- <bean id="stsProperties" class="org.apache.cxf.sts.StaticSTSProperties">
- <property name="signaturePropertiesFile" value="stsKeystore.properties"/>
- <property name="signatureUsername" value="mystskey"/>
- <property name="callbackHandlerClass" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
- <property name="encryptionPropertiesFile" value="stsKeystore.properties"/>
- <property name="issuer" value="DoubleItSTSIssuer"/>
- <property name="encryptionUsername" value="myservicekey"/>
- <property name="encryptionProperties" ref="encProperties"/>
- <property name="realmParser" ref="customRealmParser"/>
- <property name="relationships" ref="relationships"/>
- <property name="samlRealmCodec" ref="samlRealmCodec"/>
- </bean>
<bean id="claimsManager" class="org.apache.cxf.sts.claims.ClaimsManager">
<property name="claimHandlers" ref="customClaimsHandler"/>
http://git-wip-us.apache.org/repos/asf/cxf/blob/4d76ebba/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/realms.xml
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/realms.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/realms.xml
index 4aee41d..9fb8462 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/realms.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/realms.xml
@@ -18,16 +18,33 @@
under the License.
-->
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:cxf="http://cxf.apache.org/core" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:sec="http://cxf.apache.org/configuration/security" xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration" xmlns:test="http://apache.org/hello_world_soap_http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation=" http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/sc
hemas/configuration/http-jetty.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd">
+
+ <!-- Realms -->
<bean id="realmA" class="org.apache.cxf.sts.token.realm.RealmProperties">
<property name="issuer" value="a-issuer"/>
<property name="name" value="a-issuer"/>
</bean>
+
<bean id="realmB" class="org.apache.cxf.sts.token.realm.RealmProperties">
<property name="issuer" value="b-issuer"/>
<property name="name" value="b-issuer"/>
</bean>
+
<util:map id="realms">
<entry key="#{realmA.getName()}" value-ref="realmA"/>
<entry key="#{realmB.getName()}" value-ref="realmB"/>
</util:map>
+
+ <!-- Relationships between realms -->
+ <bean id="identityMapper" class="org.apache.cxf.systest.sts.common.CustomIdentityMapper"/>
+
+ <util:list id="relationships">
+ <bean class="org.apache.cxf.sts.token.realm.Relationship">
+ <property name="sourceRealm" value="a-issuer"/>
+ <property name="targetRealm" value="b-issuer"/>
+ <property name="identityMapper" ref="identityMapper"/>
+ <property name="type" value="FederatedIdentity"/>
+ </bean>
+ </util:list>
+
</beans>
http://git-wip-us.apache.org/repos/asf/cxf/blob/4d76ebba/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/sts-properties.xml
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/sts-properties.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/sts-properties.xml
new file mode 100644
index 0000000..648446f
--- /dev/null
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/sts-properties.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<!--
+ 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:cxf="http://cxf.apache.org/core" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:sec="http://cxf.apache.org/configuration/security" xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration" xmlns:test="http://apache.org/hello_world_soap_http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation=" http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/sc
hemas/configuration/http-jetty.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd">
+
+ <import resource="realms.xml" />
+
+ <bean id="encProperties" class="org.apache.cxf.sts.service.EncryptionProperties">
+ <property name="encryptionAlgorithm" value="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
+ <property name="keyWrapAlgorithm" value="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"/>
+ </bean>
+
+ <bean id="samlRealmCodec" class="org.apache.cxf.systest.sts.common.SAMLRealmCNCodec"/>
+ <bean id="customRealmParser" class="org.apache.cxf.systest.sts.common.UriRealmParser"/>
+
+ <bean id="stsProperties" class="org.apache.cxf.sts.StaticSTSProperties">
+ <property name="signaturePropertiesFile" value="stsKeystore.properties"/>
+ <property name="signatureUsername" value="mystskey"/>
+ <property name="callbackHandlerClass" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+ <property name="encryptionPropertiesFile" value="stsKeystore.properties"/>
+ <property name="issuer" value="DoubleItSTSIssuer"/>
+ <property name="encryptionUsername" value="myservicekey"/>
+ <property name="encryptionProperties" ref="encProperties"/>
+ <property name="realmParser" ref="customRealmParser"/>
+ <property name="relationships" ref="relationships"/>
+ <property name="samlRealmCodec" ref="samlRealmCodec"/>
+ </bean>
+
+</beans>
[3/3] cxf git commit: Refactoring UT Encrypted STS tests
Posted by co...@apache.org.
Refactoring UT Encrypted STS tests
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/686dfd64
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/686dfd64
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/686dfd64
Branch: refs/heads/master
Commit: 686dfd647c2dca0e181163eb486c32d8ea84856b
Parents: fdea67f
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Thu Aug 4 13:56:47 2016 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Thu Aug 4 18:03:54 2016 +0100
----------------------------------------------------------------------
.../sts/asymmetric/AsymmetricBindingTest.java | 8 ++++
.../sts/symmetric/SymmetricBindingTest.java | 8 ++++
.../cxf/systest/sts/deployment/cxf-sts.xml | 7 +++
.../systest/sts/deployment/cxf-ut-encrypted.xml | 48 +++++++++++++++++++
.../cxf/systest/sts/deployment/cxf-ut.xml | 32 -------------
.../sts/deployment/stax-cxf-ut-encrypted.xml | 49 ++++++++++++++++++++
.../cxf/systest/sts/deployment/stax-cxf-ut.xml | 33 -------------
7 files changed, 120 insertions(+), 65 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/686dfd64/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/asymmetric/AsymmetricBindingTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/asymmetric/AsymmetricBindingTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/asymmetric/AsymmetricBindingTest.java
index f3082f1..47a68cc 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/asymmetric/AsymmetricBindingTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/asymmetric/AsymmetricBindingTest.java
@@ -88,9 +88,17 @@ public class AsymmetricBindingTest extends AbstractBusClientServerTestBase {
stsServer.setContext("cxf-ut.xml");
assertTrue(launchServer(stsServer));
+ stsServer = new STSServer();
+ stsServer.setContext("cxf-ut-encrypted.xml");
+ assertTrue(launchServer(stsServer));
+
StaxSTSServer staxStsServer = new StaxSTSServer();
staxStsServer.setContext("stax-cxf-ut.xml");
assertTrue(launchServer(staxStsServer));
+
+ staxStsServer = new StaxSTSServer();
+ staxStsServer.setContext("stax-cxf-ut-encrypted.xml");
+ assertTrue(launchServer(staxStsServer));
}
@Parameters(name = "{0}")
http://git-wip-us.apache.org/repos/asf/cxf/blob/686dfd64/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/SymmetricBindingTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/SymmetricBindingTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/SymmetricBindingTest.java
index bbeb002..05681fc 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/SymmetricBindingTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/SymmetricBindingTest.java
@@ -99,9 +99,17 @@ public class SymmetricBindingTest extends AbstractBusClientServerTestBase {
stsServer.setContext("cxf-ut.xml");
assertTrue(launchServer(stsServer));
+ stsServer = new STSServer();
+ stsServer.setContext("cxf-ut-encrypted.xml");
+ assertTrue(launchServer(stsServer));
+
StaxSTSServer staxStsServer = new StaxSTSServer();
staxStsServer.setContext("stax-cxf-ut.xml");
assertTrue(launchServer(staxStsServer));
+
+ staxStsServer = new StaxSTSServer();
+ staxStsServer.setContext("stax-cxf-ut-encrypted.xml");
+ assertTrue(launchServer(staxStsServer));
}
@Parameters(name = "{0}")
http://git-wip-us.apache.org/repos/asf/cxf/blob/686dfd64/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-sts.xml
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-sts.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-sts.xml
index 926dc01..7c54d26 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-sts.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-sts.xml
@@ -83,6 +83,12 @@
<property name="type" value="FederatedIdentity"/>
</bean>
</util:list>
+
+ <bean id="encProperties" class="org.apache.cxf.sts.service.EncryptionProperties">
+ <property name="encryptionAlgorithm" value="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
+ <property name="keyWrapAlgorithm" value="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"/>
+ </bean>
+
<bean id="stsProperties" class="org.apache.cxf.sts.StaticSTSProperties">
<property name="signaturePropertiesFile" value="stsKeystore.properties"/>
<property name="signatureUsername" value="mystskey"/>
@@ -90,6 +96,7 @@
<property name="encryptionPropertiesFile" value="stsKeystore.properties"/>
<property name="issuer" value="DoubleItSTSIssuer"/>
<property name="encryptionUsername" value="myservicekey"/>
+ <property name="encryptionProperties" ref="encProperties"/>
<property name="realmParser" ref="customRealmParser"/>
<property name="relationships" ref="relationships"/>
<property name="samlRealmCodec" ref="samlRealmCodec"/>
http://git-wip-us.apache.org/repos/asf/cxf/blob/686dfd64/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-ut-encrypted.xml
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-ut-encrypted.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-ut-encrypted.xml
new file mode 100644
index 0000000..d93a22b
--- /dev/null
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-ut-encrypted.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<!--
+ 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:cxf="http://cxf.apache.org/core" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:test="http://apache.org/hello_world_soap_http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation=" http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd">
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+ <cxf:bus>
+ <cxf:features>
+ <cxf:logging/>
+ </cxf:features>
+ </cxf:bus>
+
+ <import resource="cxf-sts.xml" />
+
+ <!-- Override org.apache.cxf.sts.operation.TokenIssueOperation -->
+ <bean id="issueDelegate" class="org.apache.cxf.sts.operation.TokenIssueOperation">
+ <property name="tokenProviders" ref="tokenProviders"/>
+ <property name="tokenValidators" ref="tokenValidators"/>
+ <property name="services" ref="service"/>
+ <property name="stsProperties" ref="stsProperties"/>
+ <property name="delegationHandlers" ref="delegationHandlers"/>
+ <property name="claimsManager" ref="claimsManager"/>
+ <property name="encryptIssuedToken" value="true"/>
+ </bean>
+
+ <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="EncryptedUTSTS" implementor="#stsProviderBean" address="http://localhost:${testutil.ports.STSServer.2}/SecurityTokenService/UTEncrypted" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:UTEncrypted_Port">
+ <jaxws:properties>
+ <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+ <entry key="security.signature.properties" value="stsKeystore.properties"/>
+ <entry key="security.signature.username" value="mystskey"/>
+ </jaxws:properties>
+ </jaxws:endpoint>
+</beans>
http://git-wip-us.apache.org/repos/asf/cxf/blob/686dfd64/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-ut.xml
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-ut.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-ut.xml
index 659b9a2..8237ad9 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-ut.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-ut.xml
@@ -34,36 +34,4 @@
</jaxws:properties>
</jaxws:endpoint>
- <bean id="encryptedUtSTSProviderBean" class="org.apache.cxf.sts.provider.DefaultSecurityTokenServiceProvider">
- <property name="services" ref="encryptedUtService"/>
- <property name="stsProperties" ref="encryptedUtSTSProperties"/>
- <property name="encryptIssuedToken" value="true"/>
- </bean>
- <bean id="encryptedUtService" class="org.apache.cxf.sts.service.StaticService">
- <property name="endpoints" ref="encryptedUtEndpoints"/>
- </bean>
- <util:list id="encryptedUtEndpoints">
- <value>http://localhost:(\d)*/doubleit/services/doubleit(a)?symmetricsaml1encrypted
- </value>
- </util:list>
- <bean id="encProperties" class="org.apache.cxf.sts.service.EncryptionProperties">
- <property name="encryptionAlgorithm" value="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
- <property name="keyWrapAlgorithm" value="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"/>
- </bean>
- <bean id="encryptedUtSTSProperties" class="org.apache.cxf.sts.StaticSTSProperties">
- <property name="signaturePropertiesFile" value="stsKeystore.properties"/>
- <property name="signatureUsername" value="mystskey"/>
- <property name="callbackHandlerClass" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
- <property name="encryptionPropertiesFile" value="stsKeystore.properties"/>
- <property name="encryptionProperties" ref="encProperties"/>
- <property name="issuer" value="DoubleItSTSIssuer"/>
- <property name="encryptionUsername" value="myservicekey"/>
- </bean>
- <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="EncryptedUTSTS" implementor="#encryptedUtSTSProviderBean" address="http://localhost:${testutil.ports.STSServer.2}/SecurityTokenService/UTEncrypted" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:UTEncrypted_Port">
- <jaxws:properties>
- <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
- <entry key="security.signature.properties" value="stsKeystore.properties"/>
- <entry key="security.signature.username" value="mystskey"/>
- </jaxws:properties>
- </jaxws:endpoint>
</beans>
http://git-wip-us.apache.org/repos/asf/cxf/blob/686dfd64/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-ut-encrypted.xml
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-ut-encrypted.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-ut-encrypted.xml
new file mode 100644
index 0000000..4b6ba50
--- /dev/null
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-ut-encrypted.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<!--
+ 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:cxf="http://cxf.apache.org/core" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:test="http://apache.org/hello_world_soap_http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation=" http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd">
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+ <cxf:bus>
+ <cxf:features>
+ <cxf:logging/>
+ </cxf:features>
+ </cxf:bus>
+
+ <import resource="cxf-sts.xml" />
+
+ <!-- Override org.apache.cxf.sts.operation.TokenIssueOperation -->
+ <bean id="issueDelegate" class="org.apache.cxf.sts.operation.TokenIssueOperation">
+ <property name="tokenProviders" ref="tokenProviders"/>
+ <property name="tokenValidators" ref="tokenValidators"/>
+ <property name="services" ref="service"/>
+ <property name="stsProperties" ref="stsProperties"/>
+ <property name="delegationHandlers" ref="delegationHandlers"/>
+ <property name="claimsManager" ref="claimsManager"/>
+ <property name="encryptIssuedToken" value="true"/>
+ </bean>
+
+ <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="EncryptedUTSTS" implementor="#stsProviderBean" address="http://localhost:${testutil.ports.StaxSTSServer.2}/SecurityTokenService/UTEncrypted" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:UTEncrypted_Port">
+ <jaxws:properties>
+ <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+ <entry key="security.signature.properties" value="stsKeystore.properties"/>
+ <entry key="security.signature.username" value="mystskey"/>
+ <entry key="ws-security.enable.streaming" value="true"/>
+ </jaxws:properties>
+ </jaxws:endpoint>
+</beans>
http://git-wip-us.apache.org/repos/asf/cxf/blob/686dfd64/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-ut.xml
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-ut.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-ut.xml
index 20420ef..f70d2bd 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-ut.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-ut.xml
@@ -35,37 +35,4 @@
</jaxws:properties>
</jaxws:endpoint>
- <bean id="encryptedUtSTSProviderBean" class="org.apache.cxf.sts.provider.DefaultSecurityTokenServiceProvider">
- <property name="services" ref="encryptedUtService"/>
- <property name="stsProperties" ref="encryptedUtSTSProperties"/>
- <property name="encryptIssuedToken" value="true"/>
- </bean>
- <bean id="encryptedUtService" class="org.apache.cxf.sts.service.StaticService">
- <property name="endpoints" ref="encryptedUtEndpoints"/>
- </bean>
- <util:list id="encryptedUtEndpoints">
- <value>http://localhost:(\d)*/doubleit/services/doubleit(a)?symmetricsaml1encrypted
- </value>
- </util:list>
- <bean id="encProperties" class="org.apache.cxf.sts.service.EncryptionProperties">
- <property name="encryptionAlgorithm" value="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
- <property name="keyWrapAlgorithm" value="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"/>
- </bean>
- <bean id="encryptedUtSTSProperties" class="org.apache.cxf.sts.StaticSTSProperties">
- <property name="signaturePropertiesFile" value="stsKeystore.properties"/>
- <property name="signatureUsername" value="mystskey"/>
- <property name="callbackHandlerClass" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
- <property name="encryptionPropertiesFile" value="stsKeystore.properties"/>
- <property name="encryptionProperties" ref="encProperties"/>
- <property name="issuer" value="DoubleItSTSIssuer"/>
- <property name="encryptionUsername" value="myservicekey"/>
- </bean>
- <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="EncryptedUTSTS" implementor="#encryptedUtSTSProviderBean" address="http://localhost:${testutil.ports.StaxSTSServer.2}/SecurityTokenService/UTEncrypted" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:UTEncrypted_Port">
- <jaxws:properties>
- <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
- <entry key="security.signature.properties" value="stsKeystore.properties"/>
- <entry key="security.signature.username" value="mystskey"/>
- <entry key="ws-security.enable.streaming" value="true"/>
- </jaxws:properties>
- </jaxws:endpoint>
</beans>
[2/3] cxf git commit: More config refactoring
Posted by co...@apache.org.
More config refactoring
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/a3928641
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/a3928641
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/a3928641
Branch: refs/heads/master
Commit: a3928641e1be035e68ff891cb40f228ab19c3e3a
Parents: 686dfd6
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Thu Aug 4 14:30:43 2016 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Thu Aug 4 18:03:54 2016 +0100
----------------------------------------------------------------------
.../sts/delegation/cxf-sts-transport.xml | 13 +--
.../cxf/systest/sts/deployment/cxf-sts.xml | 111 -------------------
.../systest/sts/deployment/cxf-transport.xml | 2 +-
.../systest/sts/deployment/cxf-ut-encrypted.xml | 2 +-
.../cxf/systest/sts/deployment/cxf-ut.xml | 2 +-
.../cxf/systest/sts/deployment/cxf-x509.xml | 2 +-
.../cxf/systest/sts/deployment/realms.xml | 33 ------
.../sts/deployment/stax-cxf-transport.xml | 2 +-
.../sts/deployment/stax-cxf-ut-encrypted.xml | 2 +-
.../cxf/systest/sts/deployment/stax-cxf-ut.xml | 2 +-
.../systest/sts/deployment/stax-cxf-x509.xml | 2 +-
.../cxf/systest/sts/deployment/sts/cxf-sts.xml | 111 +++++++++++++++++++
.../cxf/systest/sts/deployment/sts/realms.xml | 33 ++++++
.../sts/issuer/cxf-issuer-sts-transport.xml | 99 +----------------
14 files changed, 160 insertions(+), 256 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/a3928641/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/delegation/cxf-sts-transport.xml
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/delegation/cxf-sts-transport.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/delegation/cxf-sts-transport.xml
index 7240914..2510ebb 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/delegation/cxf-sts-transport.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/delegation/cxf-sts-transport.xml
@@ -24,6 +24,9 @@
<cxf:logging/>
</cxf:features>
</cxf:bus>
+
+ <import resource="../deployment/sts/realms.xml" />
+
<bean id="samlDelegationHandler" class="org.apache.cxf.sts.token.delegation.SAMLDelegationHandler"/>
<bean id="transportUTSTSProviderBean" class="org.apache.cxf.ws.security.sts.provider.SecurityTokenServiceProvider">
<property name="issueOperation" ref="transportIssueDelegate2"/>
@@ -83,16 +86,6 @@
<value>https://localhost:(\d)*/doubleit/services/doubleittransport.*
</value>
</util:list>
- <bean id="realmA" class="org.apache.cxf.sts.token.realm.RealmProperties">
- <property name="issuer" value="a-issuer"/>
- </bean>
- <bean id="realmB" class="org.apache.cxf.sts.token.realm.RealmProperties">
- <property name="issuer" value="b-issuer"/>
- </bean>
- <util:map id="realms">
- <entry key="a-issuer" value-ref="realmA"/>
- <entry key="b-issuer" value-ref="realmB"/>
- </util:map>
<bean id="samlRealmCodec" class="org.apache.cxf.systest.sts.common.SAMLRealmCNCodec"/>
<bean id="customRealmParser" class="org.apache.cxf.systest.sts.common.UriRealmParser"/>
<bean id="identityMapper" class="org.apache.cxf.systest.sts.common.CustomIdentityMapper"/>
http://git-wip-us.apache.org/repos/asf/cxf/blob/a3928641/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-sts.xml
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-sts.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-sts.xml
deleted file mode 100644
index 7c54d26..0000000
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-sts.xml
+++ /dev/null
@@ -1,111 +0,0 @@
-<?xml version="1.0"?>
-<!--
- 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:cxf="http://cxf.apache.org/core" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:sec="http://cxf.apache.org/configuration/security" xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration" xmlns:test="http://apache.org/hello_world_soap_http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation=" http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/sc
hemas/configuration/http-jetty.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd">
- <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
- <cxf:bus>
- <cxf:features>
- <cxf:logging/>
- </cxf:features>
- </cxf:bus>
-
- <import resource="realms.xml" />
-
- <bean id="hokDelegationHandler" class="org.apache.cxf.sts.token.delegation.HOKDelegationHandler"/>
- <bean id="utDelegationHandler" class="org.apache.cxf.sts.token.delegation.UsernameTokenDelegationHandler"/>
-
- <util:list id="delegationHandlers">
- <ref bean="hokDelegationHandler"/>
- <ref bean="utDelegationHandler"/>
- </util:list>
-
- <bean id="issueDelegate" class="org.apache.cxf.sts.operation.TokenIssueOperation">
- <property name="tokenProviders" ref="tokenProviders"/>
- <property name="tokenValidators" ref="tokenValidators"/>
- <property name="services" ref="service"/>
- <property name="stsProperties" ref="stsProperties"/>
- <property name="delegationHandlers" ref="delegationHandlers"/>
- <property name="claimsManager" ref="claimsManager"/>
- </bean>
- <bean id="validateDelegate" class="org.apache.cxf.sts.operation.TokenValidateOperation">
- <property name="tokenValidators" ref="tokenValidators"/>
- <property name="stsProperties" ref="stsProperties"/>
- </bean>
- <bean id="utTokenValidator" class="org.apache.cxf.sts.token.validator.UsernameTokenValidator">
- </bean>
- <util:list id="tokenValidators">
- <ref bean="samlTokenValidator"/>
- <ref bean="utTokenValidator"/>
- </util:list>
- <util:list id="tokenProviders">
- <ref bean="samlTokenProvider"/>
- </util:list>
- <bean id="samlTokenValidator" class="org.apache.cxf.sts.token.validator.SAMLTokenValidator">
- <property name="samlRealmCodec" ref="samlRealmCodec"/>
- </bean>
- <bean id="samlTokenProvider" class="org.apache.cxf.sts.token.provider.SAMLTokenProvider">
- <property name="realmMap" ref="realms"/>
- </bean>
- <bean id="stsProviderBean" class="org.apache.cxf.ws.security.sts.provider.SecurityTokenServiceProvider">
- <property name="issueOperation" ref="issueDelegate"/>
- <property name="validateOperation" ref="validateDelegate"/>
- </bean>
- <bean id="service" class="org.apache.cxf.sts.service.StaticService">
- <property name="endpoints" ref="endpoints"/>
- </bean>
- <util:list id="endpoints">
- <value>http(s)?://localhost:(\d)*/doubleit/services/doubleit.*</value>
- </util:list>
- <bean id="samlRealmCodec" class="org.apache.cxf.systest.sts.common.SAMLRealmCNCodec"/>
- <bean id="customRealmParser" class="org.apache.cxf.systest.sts.common.UriRealmParser"/>
- <bean id="identityMapper" class="org.apache.cxf.systest.sts.common.CustomIdentityMapper"/>
- <util:list id="relationships">
- <bean class="org.apache.cxf.sts.token.realm.Relationship">
- <property name="sourceRealm" value="a-issuer"/>
- <property name="targetRealm" value="b-issuer"/>
- <property name="identityMapper" ref="identityMapper"/>
- <property name="type" value="FederatedIdentity"/>
- </bean>
- </util:list>
-
- <bean id="encProperties" class="org.apache.cxf.sts.service.EncryptionProperties">
- <property name="encryptionAlgorithm" value="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
- <property name="keyWrapAlgorithm" value="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"/>
- </bean>
-
- <bean id="stsProperties" class="org.apache.cxf.sts.StaticSTSProperties">
- <property name="signaturePropertiesFile" value="stsKeystore.properties"/>
- <property name="signatureUsername" value="mystskey"/>
- <property name="callbackHandlerClass" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
- <property name="encryptionPropertiesFile" value="stsKeystore.properties"/>
- <property name="issuer" value="DoubleItSTSIssuer"/>
- <property name="encryptionUsername" value="myservicekey"/>
- <property name="encryptionProperties" ref="encProperties"/>
- <property name="realmParser" ref="customRealmParser"/>
- <property name="relationships" ref="relationships"/>
- <property name="samlRealmCodec" ref="samlRealmCodec"/>
- </bean>
-
- <bean id="claimsManager" class="org.apache.cxf.sts.claims.ClaimsManager">
- <property name="claimHandlers" ref="customClaimsHandler"/>
- </bean>
- <bean id="customClaimsHandler" class="org.apache.cxf.systest.sts.deployment.CustomClaimsHandler">
- </bean>
-
-</beans>
http://git-wip-us.apache.org/repos/asf/cxf/blob/a3928641/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-transport.xml
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-transport.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-transport.xml
index 2a83d1f..93d8bdb 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-transport.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-transport.xml
@@ -25,7 +25,7 @@
</cxf:features>
</cxf:bus>
- <import resource="cxf-sts.xml" />
+ <import resource="sts/cxf-sts.xml" />
<jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="transportSTS" implementor="#stsProviderBean" address="https://localhost:${testutil.ports.STSServer}/SecurityTokenService/Transport" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:Transport_Port" depends-on="ClientAuthHttpsSettings">
<jaxws:properties>
http://git-wip-us.apache.org/repos/asf/cxf/blob/a3928641/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-ut-encrypted.xml
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-ut-encrypted.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-ut-encrypted.xml
index d93a22b..35f9947 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-ut-encrypted.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-ut-encrypted.xml
@@ -25,7 +25,7 @@
</cxf:features>
</cxf:bus>
- <import resource="cxf-sts.xml" />
+ <import resource="sts/cxf-sts.xml" />
<!-- Override org.apache.cxf.sts.operation.TokenIssueOperation -->
<bean id="issueDelegate" class="org.apache.cxf.sts.operation.TokenIssueOperation">
http://git-wip-us.apache.org/repos/asf/cxf/blob/a3928641/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-ut.xml
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-ut.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-ut.xml
index 8237ad9..662ce17 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-ut.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-ut.xml
@@ -25,7 +25,7 @@
</cxf:features>
</cxf:bus>
- <import resource="cxf-sts.xml" />
+ <import resource="sts/cxf-sts.xml" />
<jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="UTSTS" implementor="#stsProviderBean" address="http://localhost:${testutil.ports.STSServer.2}/SecurityTokenService/UT" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:UT_Port">
<jaxws:properties>
http://git-wip-us.apache.org/repos/asf/cxf/blob/a3928641/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-x509.xml
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-x509.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-x509.xml
index b73359c..bf00fdb 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-x509.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-x509.xml
@@ -25,7 +25,7 @@
</cxf:features>
</cxf:bus>
- <import resource="cxf-sts.xml" />
+ <import resource="sts/cxf-sts.xml" />
<!-- Override UsernameTokenValidator -->
<util:list id="tokenValidators">
http://git-wip-us.apache.org/repos/asf/cxf/blob/a3928641/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/realms.xml
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/realms.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/realms.xml
deleted file mode 100644
index 4aee41d..0000000
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/realms.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0"?>
-<!--
- 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:cxf="http://cxf.apache.org/core" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:sec="http://cxf.apache.org/configuration/security" xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration" xmlns:test="http://apache.org/hello_world_soap_http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation=" http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/sc
hemas/configuration/http-jetty.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd">
- <bean id="realmA" class="org.apache.cxf.sts.token.realm.RealmProperties">
- <property name="issuer" value="a-issuer"/>
- <property name="name" value="a-issuer"/>
- </bean>
- <bean id="realmB" class="org.apache.cxf.sts.token.realm.RealmProperties">
- <property name="issuer" value="b-issuer"/>
- <property name="name" value="b-issuer"/>
- </bean>
- <util:map id="realms">
- <entry key="#{realmA.getName()}" value-ref="realmA"/>
- <entry key="#{realmB.getName()}" value-ref="realmB"/>
- </util:map>
-</beans>
http://git-wip-us.apache.org/repos/asf/cxf/blob/a3928641/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-transport.xml
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-transport.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-transport.xml
index 7265e7d..1dbc0c2 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-transport.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-transport.xml
@@ -25,7 +25,7 @@
</cxf:features>
</cxf:bus>
- <import resource="cxf-sts.xml" />
+ <import resource="sts/cxf-sts.xml" />
<jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="transportSTS" implementor="#stsProviderBean" address="https://localhost:${testutil.ports.StaxSTSServer}/SecurityTokenService/Transport" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:Transport_Port" depends-on="ClientAuthHttpsSettings">
<jaxws:properties>
http://git-wip-us.apache.org/repos/asf/cxf/blob/a3928641/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-ut-encrypted.xml
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-ut-encrypted.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-ut-encrypted.xml
index 4b6ba50..383d244 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-ut-encrypted.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-ut-encrypted.xml
@@ -25,7 +25,7 @@
</cxf:features>
</cxf:bus>
- <import resource="cxf-sts.xml" />
+ <import resource="sts/cxf-sts.xml" />
<!-- Override org.apache.cxf.sts.operation.TokenIssueOperation -->
<bean id="issueDelegate" class="org.apache.cxf.sts.operation.TokenIssueOperation">
http://git-wip-us.apache.org/repos/asf/cxf/blob/a3928641/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-ut.xml
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-ut.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-ut.xml
index f70d2bd..e901d49 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-ut.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-ut.xml
@@ -25,7 +25,7 @@
</cxf:features>
</cxf:bus>
- <import resource="cxf-sts.xml" />
+ <import resource="sts/cxf-sts.xml" />
<jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="UTSTS" implementor="#stsProviderBean" address="http://localhost:${testutil.ports.StaxSTSServer.2}/SecurityTokenService/UT" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:UT_Port">
<jaxws:properties>
http://git-wip-us.apache.org/repos/asf/cxf/blob/a3928641/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-x509.xml
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-x509.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-x509.xml
index 7a5a3ab..b38e515 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-x509.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-x509.xml
@@ -25,7 +25,7 @@
</cxf:features>
</cxf:bus>
- <import resource="cxf-sts.xml" />
+ <import resource="sts/cxf-sts.xml" />
<!-- Override UsernameTokenValidator -->
<util:list id="tokenValidators">
http://git-wip-us.apache.org/repos/asf/cxf/blob/a3928641/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/cxf-sts.xml
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/cxf-sts.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/cxf-sts.xml
new file mode 100644
index 0000000..7c54d26
--- /dev/null
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/cxf-sts.xml
@@ -0,0 +1,111 @@
+<?xml version="1.0"?>
+<!--
+ 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:cxf="http://cxf.apache.org/core" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:sec="http://cxf.apache.org/configuration/security" xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration" xmlns:test="http://apache.org/hello_world_soap_http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation=" http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/sc
hemas/configuration/http-jetty.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd">
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+ <cxf:bus>
+ <cxf:features>
+ <cxf:logging/>
+ </cxf:features>
+ </cxf:bus>
+
+ <import resource="realms.xml" />
+
+ <bean id="hokDelegationHandler" class="org.apache.cxf.sts.token.delegation.HOKDelegationHandler"/>
+ <bean id="utDelegationHandler" class="org.apache.cxf.sts.token.delegation.UsernameTokenDelegationHandler"/>
+
+ <util:list id="delegationHandlers">
+ <ref bean="hokDelegationHandler"/>
+ <ref bean="utDelegationHandler"/>
+ </util:list>
+
+ <bean id="issueDelegate" class="org.apache.cxf.sts.operation.TokenIssueOperation">
+ <property name="tokenProviders" ref="tokenProviders"/>
+ <property name="tokenValidators" ref="tokenValidators"/>
+ <property name="services" ref="service"/>
+ <property name="stsProperties" ref="stsProperties"/>
+ <property name="delegationHandlers" ref="delegationHandlers"/>
+ <property name="claimsManager" ref="claimsManager"/>
+ </bean>
+ <bean id="validateDelegate" class="org.apache.cxf.sts.operation.TokenValidateOperation">
+ <property name="tokenValidators" ref="tokenValidators"/>
+ <property name="stsProperties" ref="stsProperties"/>
+ </bean>
+ <bean id="utTokenValidator" class="org.apache.cxf.sts.token.validator.UsernameTokenValidator">
+ </bean>
+ <util:list id="tokenValidators">
+ <ref bean="samlTokenValidator"/>
+ <ref bean="utTokenValidator"/>
+ </util:list>
+ <util:list id="tokenProviders">
+ <ref bean="samlTokenProvider"/>
+ </util:list>
+ <bean id="samlTokenValidator" class="org.apache.cxf.sts.token.validator.SAMLTokenValidator">
+ <property name="samlRealmCodec" ref="samlRealmCodec"/>
+ </bean>
+ <bean id="samlTokenProvider" class="org.apache.cxf.sts.token.provider.SAMLTokenProvider">
+ <property name="realmMap" ref="realms"/>
+ </bean>
+ <bean id="stsProviderBean" class="org.apache.cxf.ws.security.sts.provider.SecurityTokenServiceProvider">
+ <property name="issueOperation" ref="issueDelegate"/>
+ <property name="validateOperation" ref="validateDelegate"/>
+ </bean>
+ <bean id="service" class="org.apache.cxf.sts.service.StaticService">
+ <property name="endpoints" ref="endpoints"/>
+ </bean>
+ <util:list id="endpoints">
+ <value>http(s)?://localhost:(\d)*/doubleit/services/doubleit.*</value>
+ </util:list>
+ <bean id="samlRealmCodec" class="org.apache.cxf.systest.sts.common.SAMLRealmCNCodec"/>
+ <bean id="customRealmParser" class="org.apache.cxf.systest.sts.common.UriRealmParser"/>
+ <bean id="identityMapper" class="org.apache.cxf.systest.sts.common.CustomIdentityMapper"/>
+ <util:list id="relationships">
+ <bean class="org.apache.cxf.sts.token.realm.Relationship">
+ <property name="sourceRealm" value="a-issuer"/>
+ <property name="targetRealm" value="b-issuer"/>
+ <property name="identityMapper" ref="identityMapper"/>
+ <property name="type" value="FederatedIdentity"/>
+ </bean>
+ </util:list>
+
+ <bean id="encProperties" class="org.apache.cxf.sts.service.EncryptionProperties">
+ <property name="encryptionAlgorithm" value="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
+ <property name="keyWrapAlgorithm" value="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"/>
+ </bean>
+
+ <bean id="stsProperties" class="org.apache.cxf.sts.StaticSTSProperties">
+ <property name="signaturePropertiesFile" value="stsKeystore.properties"/>
+ <property name="signatureUsername" value="mystskey"/>
+ <property name="callbackHandlerClass" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+ <property name="encryptionPropertiesFile" value="stsKeystore.properties"/>
+ <property name="issuer" value="DoubleItSTSIssuer"/>
+ <property name="encryptionUsername" value="myservicekey"/>
+ <property name="encryptionProperties" ref="encProperties"/>
+ <property name="realmParser" ref="customRealmParser"/>
+ <property name="relationships" ref="relationships"/>
+ <property name="samlRealmCodec" ref="samlRealmCodec"/>
+ </bean>
+
+ <bean id="claimsManager" class="org.apache.cxf.sts.claims.ClaimsManager">
+ <property name="claimHandlers" ref="customClaimsHandler"/>
+ </bean>
+ <bean id="customClaimsHandler" class="org.apache.cxf.systest.sts.deployment.CustomClaimsHandler">
+ </bean>
+
+</beans>
http://git-wip-us.apache.org/repos/asf/cxf/blob/a3928641/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/realms.xml
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/realms.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/realms.xml
new file mode 100644
index 0000000..4aee41d
--- /dev/null
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/realms.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!--
+ 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:cxf="http://cxf.apache.org/core" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:sec="http://cxf.apache.org/configuration/security" xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration" xmlns:test="http://apache.org/hello_world_soap_http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation=" http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/sc
hemas/configuration/http-jetty.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd">
+ <bean id="realmA" class="org.apache.cxf.sts.token.realm.RealmProperties">
+ <property name="issuer" value="a-issuer"/>
+ <property name="name" value="a-issuer"/>
+ </bean>
+ <bean id="realmB" class="org.apache.cxf.sts.token.realm.RealmProperties">
+ <property name="issuer" value="b-issuer"/>
+ <property name="name" value="b-issuer"/>
+ </bean>
+ <util:map id="realms">
+ <entry key="#{realmA.getName()}" value-ref="realmA"/>
+ <entry key="#{realmB.getName()}" value-ref="realmB"/>
+ </util:map>
+</beans>
http://git-wip-us.apache.org/repos/asf/cxf/blob/a3928641/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/issuer/cxf-issuer-sts-transport.xml
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/issuer/cxf-issuer-sts-transport.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/issuer/cxf-issuer-sts-transport.xml
index 9d69637..f5ab2a7 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/issuer/cxf-issuer-sts-transport.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/issuer/cxf-issuer-sts-transport.xml
@@ -24,104 +24,15 @@
<cxf:logging/>
</cxf:features>
</cxf:bus>
- <bean id="hokDelegationHandler" class="org.apache.cxf.sts.token.delegation.HOKDelegationHandler"/>
- <bean id="transportSTSProviderBean2" class="org.apache.cxf.ws.security.sts.provider.SecurityTokenServiceProvider">
- <property name="issueOperation" ref="transportIssueDelegate2"/>
- <property name="validateOperation" ref="transportValidateDelegate2"/>
- </bean>
- <bean id="transportIssueDelegate2" class="org.apache.cxf.sts.operation.TokenIssueOperation">
- <property name="tokenProviders" ref="transportTokenProviders2"/>
- <property name="tokenValidators" ref="transportTokenValidators"/>
- <property name="services" ref="transportService"/>
- <property name="stsProperties" ref="transportSTSProperties"/>
- <property name="delegationHandlers" ref="hokDelegationHandler"/>
- </bean>
- <bean id="transportValidateDelegate2" class="org.apache.cxf.sts.operation.TokenValidateOperation">
- <property name="tokenValidators" ref="transportTokenValidators2"/>
- <property name="stsProperties" ref="transportSTSProperties"/>
- </bean>
- <util:list id="transportTokenValidators2">
- <ref bean="transportSamlTokenValidator2"/>
- </util:list>
- <util:list id="transportTokenProviders2">
- <ref bean="transportSamlTokenProvider2"/>
- </util:list>
- <bean id="transportSamlTokenValidator2" class="org.apache.cxf.sts.token.validator.SAMLTokenValidator">
- <property name="samlRealmCodec" ref="samlRealmCodec"/>
- </bean>
- <bean id="transportSamlTokenProvider2" class="org.apache.cxf.sts.token.provider.SAMLTokenProvider">
- <property name="realmMap" ref="realms"/>
- </bean>
- <bean id="transportIssueDelegate" class="org.apache.cxf.sts.operation.TokenIssueOperation">
- <property name="tokenProviders" ref="transportTokenProviders"/>
- <property name="tokenValidators" ref="transportTokenValidators"/>
- <property name="services" ref="transportService"/>
- <property name="stsProperties" ref="transportSTSProperties"/>
- <property name="delegationHandlers" ref="hokDelegationHandler"/>
- </bean>
- <bean id="transportValidateDelegate" class="org.apache.cxf.sts.operation.TokenValidateOperation">
- <property name="tokenValidators" ref="transportTokenValidators"/>
- <property name="stsProperties" ref="transportSTSProperties"/>
- </bean>
- <util:list id="transportTokenValidators">
- <ref bean="transportSamlTokenValidator"/>
- </util:list>
- <util:list id="transportTokenProviders">
- <ref bean="transportSamlTokenProvider"/>
- </util:list>
- <bean id="transportSamlTokenValidator" class="org.apache.cxf.sts.token.validator.SAMLTokenValidator">
- </bean>
- <bean id="transportSamlTokenProvider" class="org.apache.cxf.sts.token.provider.SAMLTokenProvider">
- </bean>
- <bean id="transportSTSProviderBean" class="org.apache.cxf.ws.security.sts.provider.SecurityTokenServiceProvider">
- <property name="issueOperation" ref="transportIssueDelegate"/>
- <property name="validateOperation" ref="transportValidateDelegate"/>
- </bean>
- <bean id="transportService" class="org.apache.cxf.sts.service.StaticService">
- <property name="endpoints" ref="transportEndpoints"/>
- </bean>
- <util:list id="transportEndpoints">
- <value>https://localhost:(\d)*/doubleit/services/doubleittransport.*
- </value>
- </util:list>
- <bean id="realmA" class="org.apache.cxf.sts.token.realm.RealmProperties">
- <property name="issuer" value="a-issuer"/>
- </bean>
- <bean id="realmB" class="org.apache.cxf.sts.token.realm.RealmProperties">
- <property name="issuer" value="b-issuer"/>
- </bean>
- <util:map id="realms">
- <entry key="a-issuer" value-ref="realmA"/>
- <entry key="b-issuer" value-ref="realmB"/>
- </util:map>
- <bean id="samlRealmCodec" class="org.apache.cxf.systest.sts.common.SAMLRealmCNCodec"/>
- <bean id="customRealmParser" class="org.apache.cxf.systest.sts.common.UriRealmParser"/>
- <bean id="identityMapper" class="org.apache.cxf.systest.sts.common.CustomIdentityMapper"/>
- <util:list id="relationships">
- <bean class="org.apache.cxf.sts.token.realm.Relationship">
- <property name="sourceRealm" value="a-issuer"/>
- <property name="targetRealm" value="b-issuer"/>
- <property name="identityMapper" ref="identityMapper"/>
- <property name="type" value="FederatedIdentity"/>
- </bean>
- </util:list>
- <bean id="transportSTSProperties" class="org.apache.cxf.sts.StaticSTSProperties">
- <property name="signaturePropertiesFile" value="stsKeystore.properties"/>
- <property name="signatureUsername" value="mystskey"/>
- <property name="callbackHandlerClass" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
- <property name="encryptionPropertiesFile" value="stsKeystore.properties"/>
- <property name="issuer" value="DoubleItSTSIssuer"/>
- <property name="encryptionUsername" value="myservicekey"/>
- <property name="realmParser" ref="customRealmParser"/>
- <property name="relationships" ref="relationships"/>
- <property name="samlRealmCodec" ref="samlRealmCodec"/>
- </bean>
- <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="transportSTS" implementor="#transportSTSProviderBean" address="https://localhost:30101/SecurityTokenService/Transport" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/issuer/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:Transport_Port" depends-on="ClientAuthHttpsSettings">
+
+ <import resource="../deployment/sts/cxf-sts.xml" />
+
+ <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="transportSTS" implementor="#stsProviderBean" address="https://localhost:30101/SecurityTokenService/Transport" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/issuer/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:Transport_Port" depends-on="ClientAuthHttpsSettings">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="transportSTSSoap12" implementor="#transportSTSProviderBean" address="https://localhost:30101/SecurityTokenService/TransportSoap12" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/issuer/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:Transport_Soap12_Port" depends-on="ClientAuthHttpsSettings">
+ <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="transportSTSSoap12" implementor="#stsProviderBean" address="https://localhost:30101/SecurityTokenService/TransportSoap12" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/issuer/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:Transport_Soap12_Port" depends-on="ClientAuthHttpsSettings">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
</jaxws:properties>