Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
188 lines (166 sloc) 7.65 KB
<!--
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:jaxrs="http://cxf.apache.org/jaxrs"
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/jaxrs
http://cxf.apache.org/schemas/jaxrs.xsd
http://cxf.apache.org/transports/http/configuration
http://cxf.apache.org/schemas/configuration/http-conf.xsd
http://cxf.apache.org/transports/http-jetty/configuration
http://cxf.apache.org/schemas/configuration/http-jetty.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
<cxf:bus>
<cxf:features>
<cxf:logging/>
</cxf:features>
</cxf:bus>
<bean id="serviceBean" class="org.apache.coheigea.cxf.jaxrs.json.common.DoubleItAuthenticationService"/>
<bean id="noAuthServiceBean" class="org.apache.coheigea.cxf.jaxrs.json.common.DoubleItService"/>
<bean id="jackson" class="com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider"/>
<bean id="jwsInFilter" class="org.apache.cxf.rs.security.jose.jaxrs.JwsJsonContainerRequestFilter" />
<bean id="keyPasswordProvider"
class="org.apache.coheigea.cxf.jaxrs.json.common.PrivateKeyPasswordProviderImpl"/>
<jaxrs:server address="http://localhost:${testutil.ports.Server}/doubleit">
<jaxrs:serviceBeans>
<ref bean="noAuthServiceBean"/>
</jaxrs:serviceBeans>
<jaxrs:providers>
<ref bean="jackson"/>
<ref bean="jwsInFilter"/>
</jaxrs:providers>
<jaxrs:properties>
<entry key="rs.security.signature.in.properties" value="serviceKeystore.properties"/>
</jaxrs:properties>
</jaxrs:server>
<bean id="compactJwsInFilter" class="org.apache.cxf.rs.security.jose.jaxrs.JwsContainerRequestFilter" />
<jaxrs:server address="http://localhost:${testutil.ports.Server.2}/doubleit">
<jaxrs:serviceBeans>
<ref bean="serviceBean"/>
</jaxrs:serviceBeans>
<jaxrs:providers>
<ref bean="jackson"/>
<ref bean="compactJwsInFilter"/>
</jaxrs:providers>
<jaxrs:properties>
<entry key="rs.security.signature.in.properties" value="serviceKeystore.properties"/>
</jaxrs:properties>
</jaxrs:server>
<jaxrs:server address="http://localhost:${testutil.ports.Server.3}/doubleit">
<jaxrs:serviceBeans>
<ref bean="noAuthServiceBean"/>
</jaxrs:serviceBeans>
<jaxrs:providers>
<ref bean="jackson"/>
<ref bean="compactJwsInFilter"/>
</jaxrs:providers>
<jaxrs:properties>
<entry key="rs.security.keystore.type" value="jwk" />
<entry key="rs.security.keystore.alias" value="HMACKey"/>
<entry key="rs.security.keystore.file" value="jwk.txt" />
</jaxrs:properties>
</jaxrs:server>
<jaxrs:server address="http://localhost:${testutil.ports.Server.4}/doubleit">
<jaxrs:serviceBeans>
<ref bean="serviceBean"/>
</jaxrs:serviceBeans>
<jaxrs:providers>
<ref bean="jackson"/>
<ref bean="compactJwsInFilter"/>
</jaxrs:providers>
<jaxrs:properties>
<entry key="rs.security.keystore.type" value="jks" />
<entry key="rs.security.keystore.alias" value="myclientkey"/>
<entry key="rs.security.keystore.password" value="cspass"/>
<entry key="rs.security.keystore.file" value="clientstore.jks" />
<entry key="rs.security.signature.algorithm" value="PS256" />
</jaxrs:properties>
</jaxrs:server>
<jaxrs:server address="http://localhost:${testutil.ports.Server.5}/doubleit">
<jaxrs:serviceBeans>
<ref bean="serviceBean"/>
</jaxrs:serviceBeans>
<jaxrs:providers>
<ref bean="jackson"/>
<ref bean="compactJwsInFilter"/>
</jaxrs:providers>
<jaxrs:properties>
<entry key="rs.security.keystore.type" value="jks" />
<entry key="rs.security.keystore.alias" value="ECDSA"/>
<entry key="rs.security.keystore.password" value="security"/>
<entry key="rs.security.keystore.file" value="ecdsa.jks" />
<entry key="rs.security.signature.algorithm" value="ES256" />
</jaxrs:properties>
</jaxrs:server>
<bean id="xmlServiceBean" class="org.apache.coheigea.cxf.jaxrs.json.common.DoubleItXMLService"/>
<jaxrs:server address="http://localhost:${testutil.ports.Server.6}/doubleit">
<jaxrs:serviceBeans>
<ref bean="xmlServiceBean"/>
</jaxrs:serviceBeans>
<jaxrs:providers>
<ref bean="jackson"/>
<ref bean="compactJwsInFilter"/>
</jaxrs:providers>
<jaxrs:properties>
<entry key="rs.security.signature.in.properties" value="serviceKeystore.properties"/>
</jaxrs:properties>
</jaxrs:server>
<jaxrs:server address="http://localhost:${testutil.ports.Server.7}/doubleit">
<jaxrs:serviceBeans>
<ref bean="serviceBean"/>
</jaxrs:serviceBeans>
<jaxrs:providers>
<ref bean="jackson"/>
<ref bean="compactJwsInFilter"/>
</jaxrs:providers>
<jaxrs:properties>
<entry key="rs.security.keystore.type" value="jks" />
<entry key="rs.security.keystore.password" value="sspass"/>
<entry key="rs.security.keystore.file" value="servicestore.jks" />
<entry key="rs.security.signature.algorithm" value="RS256" />
</jaxrs:properties>
</jaxrs:server>
<jaxrs:server address="http://localhost:${testutil.ports.Server.8}/doubleit">
<jaxrs:serviceBeans>
<ref bean="serviceBean"/>
</jaxrs:serviceBeans>
<jaxrs:providers>
<ref bean="jackson"/>
<ref bean="compactJwsInFilter"/>
</jaxrs:providers>
<jaxrs:properties>
<entry key="rs.security.keystore.type" value="jks" />
<entry key="rs.security.keystore.password" value="cspass"/>
<entry key="rs.security.keystore.file" value="clientstore.jks" />
<entry key="rs.security.signature.algorithm" value="RS256" />
</jaxrs:properties>
</jaxrs:server>
</beans>