Repository: cxf Updated Branches: refs/heads/master 67bc842ff -> a07818f8b
Finished refactoring STS configuration Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/a07818f8 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/a07818f8 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/a07818f8 Branch: refs/heads/master Commit: a07818f8b25b33a367197f3be0f4292a8d315d5c Parents: 67bc842 Author: Colm O hEigeartaigh <[email protected]> Authored: Tue Aug 9 12:27:10 2016 +0100 Committer: Colm O hEigeartaigh <[email protected]> Committed: Tue Aug 9 12:27:10 2016 +0100 ---------------------------------------------------------------------- .../org/apache/cxf/sts/StaticSTSProperties.java | 30 +++-- .../systest/sts/deployment/cxf-sts-common.xml | 128 +++++++++++++++++++ .../cxf/systest/sts/deployment/cxf-sts.xml | 106 +-------------- .../cxf/systest/sts/deployment/stax-cxf-sts.xml | 99 +------------- .../cxf/systest/sts/deployment/sts.properties | 25 ++++ .../systest/sts/deployment/cxf-transport.xml | 1 - .../systest/sts/deployment/cxf-ut-encrypted.xml | 1 - .../cxf/systest/sts/deployment/cxf-ut.xml | 1 - .../cxf/systest/sts/deployment/cxf-x509.xml | 1 - .../sts/deployment/stax-cxf-transport.xml | 1 - .../sts/deployment/stax-cxf-ut-encrypted.xml | 1 - .../cxf/systest/sts/deployment/stax-cxf-ut.xml | 1 - .../systest/sts/deployment/stax-cxf-x509.xml | 1 - .../cxf/systest/sts/deployment/sts/cxf-sts.xml | 27 +++- .../sts/deployment/sts/sts-properties.xml | 45 ------- .../systest/sts/deployment/sts/sts.properties | 25 ++++ .../sts/issuer/cxf-issuer-sts-transport.xml | 1 - 17 files changed, 230 insertions(+), 264 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/a07818f8/services/sts/sts-core/src/main/java/org/apache/cxf/sts/StaticSTSProperties.java ---------------------------------------------------------------------- diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/StaticSTSProperties.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/StaticSTSProperties.java index 0399575..1cbbb82 100644 --- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/StaticSTSProperties.java +++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/StaticSTSProperties.java @@ -70,11 +70,11 @@ public class StaticSTSProperties implements STSPropertiesMBean { * Load the CallbackHandler, Crypto objects, if necessary. */ public void configureProperties() throws STSException { - if (signatureCrypto == null && signatureCryptoProperties != null) { + if (signatureCrypto == null && getSignatureCryptoProperties() != null) { ResourceManager resourceManager = getResourceManager(); - Properties sigProperties = SecurityUtils.loadProperties(resourceManager, signatureCryptoProperties); + Properties sigProperties = SecurityUtils.loadProperties(resourceManager, getSignatureCryptoProperties()); if (sigProperties == null) { - LOG.fine("Cannot load signature properties using: " + signatureCryptoProperties); + LOG.fine("Cannot load signature properties using: " + getSignatureCryptoProperties()); throw new STSException("Configuration error: cannot load signature properties"); } try { @@ -85,11 +85,11 @@ public class StaticSTSProperties implements STSPropertiesMBean { } } - if (encryptionCrypto == null && encryptionCryptoProperties != null) { + if (encryptionCrypto == null && getEncryptionCryptoProperties() != null) { ResourceManager resourceManager = getResourceManager(); - Properties encrProperties = SecurityUtils.loadProperties(resourceManager, encryptionCryptoProperties); + Properties encrProperties = SecurityUtils.loadProperties(resourceManager, getEncryptionCryptoProperties()); if (encrProperties == null) { - LOG.fine("Cannot load encryption properties using: " + encryptionCryptoProperties); + LOG.fine("Cannot load encryption properties using: " + getEncryptionCryptoProperties()); throw new STSException("Configuration error: cannot load encryption properties"); } try { @@ -100,11 +100,11 @@ public class StaticSTSProperties implements STSPropertiesMBean { } } - if (callbackHandler == null && callbackHandlerClass != null) { + if (callbackHandler == null && getCallbackHandlerClass() != null) { try { - callbackHandler = SecurityUtils.getCallbackHandler(callbackHandlerClass); + callbackHandler = SecurityUtils.getCallbackHandler(getCallbackHandlerClass()); if (callbackHandler == null) { - LOG.fine("Cannot load CallbackHandler using: " + callbackHandlerClass); + LOG.fine("Cannot load CallbackHandler using: " + getCallbackHandlerClass()); throw new STSException("Configuration error: cannot load callback handler"); } } catch (Exception ex) { @@ -145,6 +145,10 @@ public class StaticSTSProperties implements STSPropertiesMBean { } } + public String getCallbackHandlerClass() { + return this.callbackHandlerClass; + } + /** * Get the CallbackHandler object. * @return the CallbackHandler object. @@ -182,6 +186,10 @@ public class StaticSTSProperties implements STSPropertiesMBean { } } + public Object getSignatureCryptoProperties() { + return this.signatureCryptoProperties; + } + /** * Get the signature Crypto object * @return the signature Crypto object @@ -238,6 +246,10 @@ public class StaticSTSProperties implements STSPropertiesMBean { } } + public Object getEncryptionCryptoProperties() { + return this.encryptionCryptoProperties; + } + /** * Get the encryption Crypto object * @return the encryption Crypto object http://git-wip-us.apache.org/repos/asf/cxf/blob/a07818f8/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-sts-common.xml ---------------------------------------------------------------------- diff --git a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-sts-common.xml b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-sts-common.xml new file mode 100644 index 0000000..74add4c --- /dev/null +++ b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-sts-common.xml @@ -0,0 +1,128 @@ +<?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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sec="http://cxf.apache.org/configuration/security" xmlns:http="http://cxf.apache.org/transports/http/configuration" xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation=" http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.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://c xf.apache.org/schemas/configuration/http-jetty.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.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"> + <property name="location" value="classpath:org/apache/cxf/systest/sts/deployment/sts.properties"/> + </bean> + + <cxf:bus> + <cxf:features> + <cxf:logging/> + </cxf:features> + </cxf:bus> + <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="utDelegationHandler" class="org.apache.cxf.sts.token.delegation.UsernameTokenDelegationHandler"/> + <bean id="transportIssueDelegate" class="org.apache.cxf.sts.operation.TokenIssueOperation"> + <property name="tokenProviders" ref="transportTokenProviders"/> + <property name="services" ref="transportService"/> + <property name="stsProperties" ref="transportSTSProperties"/> + <property name="claimsManager" ref="claimsManager"/> + <property name="tokenStore" ref="defaultTokenStore"/> + <property name="delegationHandlers" ref="utDelegationHandler"/> + <property name="tokenValidators" ref="transportTokenValidators"/> + </bean> + <bean id="transportValidateDelegate" class="org.apache.cxf.sts.operation.TokenValidateOperation"> + <property name="tokenProviders" ref="transportTokenProviders"/> + <property name="tokenValidators" ref="transportTokenValidators"/> + <property name="stsProperties" ref="transportSTSProperties"/> + <property name="claimsManager" ref="claimsManager"/> + <property name="tokenStore" ref="defaultTokenStore"/> + </bean> + <bean id="defaultTokenStore" class="org.apache.cxf.sts.cache.DefaultInMemoryTokenStore"> + </bean> + <util:list id="transportTokenProviders"> + <ref bean="transportSamlTokenProvider"/> + <ref bean="transportCustomBSTTokenProvider"/> + <ref bean="transportJWTTokenProvider"/> + </util:list> + <util:list id="transportTokenValidators"> + <ref bean="transportSamlTokenValidator"/> + <ref bean="transportX509TokenValidator"/> + <ref bean="transportUsernameTokenValidator"/> + <ref bean="transportCustomBSTTokenValidator"/> + <ref bean="transportJWTTokenValidator"/> + </util:list> + <bean id="transportCustomBSTTokenProvider" class="org.apache.cxf.systest.sts.deployment.CustomBSTTokenProvider"> + </bean> + <bean id="transportSamlTokenProvider" class="org.apache.cxf.sts.token.provider.SAMLTokenProvider"> + <!-- <property name="attributeStatementProviders" ref="attributeStatementProvidersList" />--> + </bean> + <bean id="transportJWTTokenProvider" class="org.apache.cxf.sts.token.provider.jwt.JWTTokenProvider"> + </bean> + <!-- + <util:list id="attributeStatementProvidersList"> + <ref bean="defaultAttributeProvider" /> + <ref bean="customAttributeProvider" /> + </util:list> + + <bean id="defaultAttributeProvider" + class="org.apache.cxf.sts.token.provider.DefaultAttributeStatementProvider"> + </bean> + + <bean id="customAttributeProvider" + class="org.apache.cxf.systest.sts.deployment.CustomAttributeStatementProvider"> + </bean> +--> + <bean id="claimsManager" class="org.apache.cxf.sts.claims.ClaimsManager"> + <property name="claimHandlers" ref="claimHandlerList"/> + <property name="claimParsers" ref="claimParserList"/> + </bean> + <util:list id="claimParserList"> + <ref bean="customClaimsParser"/> + <ref bean="identityClaimsParser"/> + </util:list> + <bean id="customClaimsParser" class="org.apache.cxf.systest.sts.deployment.CustomClaimsParser"> + </bean> + <bean id="identityClaimsParser" class="org.apache.cxf.sts.claims.IdentityClaimsParser"> + </bean> + <util:list id="claimHandlerList"> + <ref bean="customClaimsHandler"/> + </util:list> + <bean id="customClaimsHandler" class="org.apache.cxf.systest.sts.deployment.CustomClaimsHandler"> + </bean> + <bean id="transportCustomBSTTokenValidator" class="org.apache.cxf.systest.sts.deployment.CustomBSTTokenValidator"> + </bean> + <bean id="transportX509TokenValidator" class="org.apache.cxf.sts.token.validator.X509TokenValidator"> + </bean> + <bean id="transportUsernameTokenValidator" class="org.apache.cxf.sts.token.validator.UsernameTokenValidator"> + </bean> + <bean id="transportSamlTokenValidator" class="org.apache.cxf.sts.token.validator.SAMLTokenValidator"> + </bean> + <bean id="transportJWTTokenValidator" class="org.apache.cxf.sts.token.validator.jwt.JWTTokenValidator"> + </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/doubleit.*</value> + </util:list> + <bean id="transportSTSProperties" class="org.apache.cxf.sts.StaticSTSProperties"> + <property name="signaturePropertiesFile" value="${signature.properties}"/> + <property name="signatureUsername" value="${signature.username}"/> + <property name="callbackHandlerClass" value="${callback.handler}"/> + <property name="encryptionPropertiesFile" value="${encryption.properties}"/> + <property name="issuer" value="${issuer}"/> + <property name="encryptionUsername" value="${encryption.username}"/> + </bean> +</beans> http://git-wip-us.apache.org/repos/asf/cxf/blob/a07818f8/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-sts.xml ---------------------------------------------------------------------- diff --git a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-sts.xml b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-sts.xml index 8353b01..10b51e2 100644 --- a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-sts.xml +++ b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-sts.xml @@ -18,109 +18,9 @@ under the License. --> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:cxf="http://cxf.apache.org/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sec="http://cxf.apache.org/configuration/security" xmlns:http="http://cxf.apache.org/transports/http/configuration" xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation=" http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.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://c xf.apache.org/schemas/configuration/http-jetty.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.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> - <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="utDelegationHandler" class="org.apache.cxf.sts.token.delegation.UsernameTokenDelegationHandler"/> - <bean id="transportIssueDelegate" class="org.apache.cxf.sts.operation.TokenIssueOperation"> - <property name="tokenProviders" ref="transportTokenProviders"/> - <property name="services" ref="transportService"/> - <property name="stsProperties" ref="transportSTSProperties"/> - <property name="claimsManager" ref="claimsManager"/> - <property name="tokenStore" ref="defaultTokenStore"/> - <property name="delegationHandlers" ref="utDelegationHandler"/> - <property name="tokenValidators" ref="transportTokenValidators"/> - </bean> - <bean id="transportValidateDelegate" class="org.apache.cxf.sts.operation.TokenValidateOperation"> - <property name="tokenProviders" ref="transportTokenProviders"/> - <property name="tokenValidators" ref="transportTokenValidators"/> - <property name="stsProperties" ref="transportSTSProperties"/> - <property name="claimsManager" ref="claimsManager"/> - <property name="tokenStore" ref="defaultTokenStore"/> - </bean> - <bean id="defaultTokenStore" class="org.apache.cxf.sts.cache.DefaultInMemoryTokenStore"> - </bean> - <util:list id="transportTokenProviders"> - <ref bean="transportSamlTokenProvider"/> - <ref bean="transportCustomBSTTokenProvider"/> - <ref bean="transportJWTTokenProvider"/> - </util:list> - <util:list id="transportTokenValidators"> - <ref bean="transportSamlTokenValidator"/> - <ref bean="transportX509TokenValidator"/> - <ref bean="transportUsernameTokenValidator"/> - <ref bean="transportCustomBSTTokenValidator"/> - <ref bean="transportJWTTokenValidator"/> - </util:list> - <bean id="transportCustomBSTTokenProvider" class="org.apache.cxf.systest.sts.deployment.CustomBSTTokenProvider"> - </bean> - <bean id="transportSamlTokenProvider" class="org.apache.cxf.sts.token.provider.SAMLTokenProvider"> - <!-- <property name="attributeStatementProviders" ref="attributeStatementProvidersList" />--> - </bean> - <bean id="transportJWTTokenProvider" class="org.apache.cxf.sts.token.provider.jwt.JWTTokenProvider"> - </bean> - <!-- - <util:list id="attributeStatementProvidersList"> - <ref bean="defaultAttributeProvider" /> - <ref bean="customAttributeProvider" /> - </util:list> - - <bean id="defaultAttributeProvider" - class="org.apache.cxf.sts.token.provider.DefaultAttributeStatementProvider"> - </bean> - - <bean id="customAttributeProvider" - class="org.apache.cxf.systest.sts.deployment.CustomAttributeStatementProvider"> - </bean> ---> - <bean id="claimsManager" class="org.apache.cxf.sts.claims.ClaimsManager"> - <property name="claimHandlers" ref="claimHandlerList"/> - <property name="claimParsers" ref="claimParserList"/> - </bean> - <util:list id="claimParserList"> - <ref bean="customClaimsParser"/> - <ref bean="identityClaimsParser"/> - </util:list> - <bean id="customClaimsParser" class="org.apache.cxf.systest.sts.deployment.CustomClaimsParser"> - </bean> - <bean id="identityClaimsParser" class="org.apache.cxf.sts.claims.IdentityClaimsParser"> - </bean> - <util:list id="claimHandlerList"> - <ref bean="customClaimsHandler"/> - </util:list> - <bean id="customClaimsHandler" class="org.apache.cxf.systest.sts.deployment.CustomClaimsHandler"> - </bean> - <bean id="transportCustomBSTTokenValidator" class="org.apache.cxf.systest.sts.deployment.CustomBSTTokenValidator"> - </bean> - <bean id="transportX509TokenValidator" class="org.apache.cxf.sts.token.validator.X509TokenValidator"> - </bean> - <bean id="transportUsernameTokenValidator" class="org.apache.cxf.sts.token.validator.UsernameTokenValidator"> - </bean> - <bean id="transportSamlTokenValidator" class="org.apache.cxf.sts.token.validator.SAMLTokenValidator"> - </bean> - <bean id="transportJWTTokenValidator" class="org.apache.cxf.sts.token.validator.jwt.JWTTokenValidator"> - </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/doubleit.*</value> - </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"/> - </bean> + + <import resource="cxf-sts-common.xml" /> + <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="localSTS" implementor="#transportSTSProviderBean" address="https://localhost:${testutil.ports.deployment.STSServer}/SecurityTokenService/Transport" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" depends-on="ClientAuthHttpsSettings" serviceName="ns1:SecurityTokenService" endpointName="ns1:Transport_Port"> </jaxws:endpoint> <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="localSoap12STS" implementor="#transportSTSProviderBean" address="https://localhost:${testutil.ports.deployment.STSServer}/SecurityTokenService/TransportSoap12" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" depends-on="ClientAuthHttpsSettings" serviceName="ns1:SecurityTokenService" endpointName="ns1:Transport_Soap12_Port"> http://git-wip-us.apache.org/repos/asf/cxf/blob/a07818f8/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-sts.xml ---------------------------------------------------------------------- diff --git a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-sts.xml b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-sts.xml index 78ef796..1fffb7d 100644 --- a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-sts.xml +++ b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-sts.xml @@ -18,102 +18,9 @@ under the License. --> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:cxf="http://cxf.apache.org/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sec="http://cxf.apache.org/configuration/security" xmlns:http="http://cxf.apache.org/transports/http/configuration" xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation=" http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.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://c xf.apache.org/schemas/configuration/http-jetty.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.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> - <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="utDelegationHandler" class="org.apache.cxf.sts.token.delegation.UsernameTokenDelegationHandler"/> - <bean id="transportIssueDelegate" class="org.apache.cxf.sts.operation.TokenIssueOperation"> - <property name="tokenProviders" ref="transportTokenProviders"/> - <property name="services" ref="transportService"/> - <property name="stsProperties" ref="transportSTSProperties"/> - <property name="claimsManager" ref="claimsManager"/> - <property name="tokenStore" ref="defaultTokenStore"/> - <property name="delegationHandlers" ref="utDelegationHandler"/> - </bean> - <bean id="transportValidateDelegate" class="org.apache.cxf.sts.operation.TokenValidateOperation"> - <property name="tokenProviders" ref="transportTokenProviders"/> - <property name="tokenValidators" ref="transportTokenValidators"/> - <property name="stsProperties" ref="transportSTSProperties"/> - <property name="tokenStore" ref="defaultTokenStore"/> - </bean> - <bean id="defaultTokenStore" class="org.apache.cxf.sts.cache.DefaultInMemoryTokenStore"> - </bean> - <util:list id="transportTokenProviders"> - <ref bean="transportSamlTokenProvider"/> - <ref bean="transportCustomBSTTokenProvider"/> - </util:list> - <util:list id="transportTokenValidators"> - <ref bean="transportSamlTokenValidator"/> - <ref bean="transportX509TokenValidator"/> - <ref bean="transportUsernameTokenValidator"/> - <ref bean="transportCustomBSTTokenValidator"/> - </util:list> - <bean id="transportCustomBSTTokenProvider" class="org.apache.cxf.systest.sts.deployment.CustomBSTTokenProvider"> - </bean> - <bean id="transportSamlTokenProvider" class="org.apache.cxf.sts.token.provider.SAMLTokenProvider"> - <!-- <property name="attributeStatementProviders" ref="attributeStatementProvidersList" />--> - </bean> - <!-- - <util:list id="attributeStatementProvidersList"> - <ref bean="defaultAttributeProvider" /> - <ref bean="customAttributeProvider" /> - </util:list> - - <bean id="defaultAttributeProvider" - class="org.apache.cxf.sts.token.provider.DefaultAttributeStatementProvider"> - </bean> - - <bean id="customAttributeProvider" - class="org.apache.cxf.systest.sts.deployment.CustomAttributeStatementProvider"> - </bean> ---> - <bean id="claimsManager" class="org.apache.cxf.sts.claims.ClaimsManager"> - <property name="claimHandlers" ref="claimHandlerList"/> - <property name="claimParsers" ref="claimParserList"/> - </bean> - <util:list id="claimParserList"> - <ref bean="customClaimsParser"/> - <ref bean="identityClaimsParser"/> - </util:list> - <bean id="customClaimsParser" class="org.apache.cxf.systest.sts.deployment.CustomClaimsParser"> - </bean> - <bean id="identityClaimsParser" class="org.apache.cxf.sts.claims.IdentityClaimsParser"> - </bean> - <util:list id="claimHandlerList"> - <ref bean="customClaimsHandler"/> - </util:list> - <bean id="customClaimsHandler" class="org.apache.cxf.systest.sts.deployment.CustomClaimsHandler"> - </bean> - <bean id="transportCustomBSTTokenValidator" class="org.apache.cxf.systest.sts.deployment.CustomBSTTokenValidator"> - </bean> - <bean id="transportX509TokenValidator" class="org.apache.cxf.sts.token.validator.X509TokenValidator"> - </bean> - <bean id="transportUsernameTokenValidator" class="org.apache.cxf.sts.token.validator.UsernameTokenValidator"> - </bean> - <bean id="transportSamlTokenValidator" class="org.apache.cxf.sts.token.validator.SAMLTokenValidator"> - </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="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"/> - </bean> + + <import resource="cxf-sts-common.xml" /> + <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="localSTS" implementor="#transportSTSProviderBean" address="https://localhost:${testutil.ports.deployment.StaxSTSServer}/SecurityTokenService/Transport" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" depends-on="ClientAuthHttpsSettings" serviceName="ns1:SecurityTokenService" endpointName="ns1:Transport_Port"> <jaxws:properties> <entry key="ws-security.enable.streaming" value="true"/> http://git-wip-us.apache.org/repos/asf/cxf/blob/a07818f8/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/deployment/sts.properties ---------------------------------------------------------------------- diff --git a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/deployment/sts.properties b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/deployment/sts.properties new file mode 100644 index 0000000..e89bf34 --- /dev/null +++ b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/deployment/sts.properties @@ -0,0 +1,25 @@ +# +# 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. +# +signature.properties=stsKeystore.properties +signature.username=mystskey +encryption.properties=stsKeystore.properties +encryption.username=myservicekey +issuer=DoubleItSTSIssuer +callback.handler=org.apache.cxf.systest.sts.common.CommonCallbackHandler + http://git-wip-us.apache.org/repos/asf/cxf/blob/a07818f8/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 93d8bdb..ae447f1 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 @@ -18,7 +18,6 @@ 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/> http://git-wip-us.apache.org/repos/asf/cxf/blob/a07818f8/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 35f9947..ed10691 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 @@ -18,7 +18,6 @@ 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/> http://git-wip-us.apache.org/repos/asf/cxf/blob/a07818f8/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 662ce17..2ddc09c 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 @@ -18,7 +18,6 @@ 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/> http://git-wip-us.apache.org/repos/asf/cxf/blob/a07818f8/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 2790c80..f8bb75c 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 @@ -18,7 +18,6 @@ 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/> http://git-wip-us.apache.org/repos/asf/cxf/blob/a07818f8/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 1dbc0c2..14bb249 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 @@ -18,7 +18,6 @@ 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/> http://git-wip-us.apache.org/repos/asf/cxf/blob/a07818f8/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 383d244..fde8f29 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 @@ -18,7 +18,6 @@ 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/> http://git-wip-us.apache.org/repos/asf/cxf/blob/a07818f8/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 e901d49..481b9be 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 @@ -18,7 +18,6 @@ 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/> http://git-wip-us.apache.org/repos/asf/cxf/blob/a07818f8/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 26fe7a8..203fc7c 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 @@ -18,7 +18,6 @@ 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/> http://git-wip-us.apache.org/repos/asf/cxf/blob/a07818f8/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 cb737f9..de8f852 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 @@ -18,15 +18,17 @@ 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> + <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> + <property name="location" value="classpath:org/apache/cxf/systest/sts/deployment/sts/sts.properties"/> + </bean> + <import resource="realms.xml" /> - <import resource="sts-properties.xml" /> <util:list id="delegationHandlers"> <bean class="org.apache.cxf.sts.token.delegation.HOKDelegationHandler" /> @@ -71,5 +73,26 @@ </bean> <bean id="customClaimsHandler" class="org.apache.cxf.systest.sts.deployment.CustomClaimsHandler"> </bean> + + <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="${signature.properties}"/> + <property name="signatureUsername" value="${signature.username}"/> + <property name="callbackHandlerClass" value="${callback.handler}"/> + <property name="encryptionPropertiesFile" value="${encryption.properties}"/> + <property name="issuer" value="${issuer}"/> + <property name="encryptionUsername" value="${encryption.username}"/> + <property name="encryptionProperties" ref="encProperties"/> + <property name="realmParser" ref="customRealmParser"/> + <property name="relationships" ref="relationships"/> + <property name="samlRealmCodec" ref="samlRealmCodec"/> + </bean> </beans> http://git-wip-us.apache.org/repos/asf/cxf/blob/a07818f8/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 deleted file mode 100644 index 648446f..0000000 --- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/sts-properties.xml +++ /dev/null @@ -1,45 +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"> - - <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> http://git-wip-us.apache.org/repos/asf/cxf/blob/a07818f8/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/sts.properties ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/sts.properties b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/sts.properties new file mode 100644 index 0000000..e89bf34 --- /dev/null +++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/sts.properties @@ -0,0 +1,25 @@ +# +# 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. +# +signature.properties=stsKeystore.properties +signature.username=mystskey +encryption.properties=stsKeystore.properties +encryption.username=myservicekey +issuer=DoubleItSTSIssuer +callback.handler=org.apache.cxf.systest.sts.common.CommonCallbackHandler + http://git-wip-us.apache.org/repos/asf/cxf/blob/a07818f8/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 f5ab2a7..e9aa101 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 @@ -18,7 +18,6 @@ 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/>
