blob: 16a98671839a25e93f5667cef2f5e31be5322021 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxrs="http://cxf.apache.org/jaxrs"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:cxf="http://cxf.apache.org/core"
xmlns:security="http://www.springframework.org/schema/security"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd
http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.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://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
<description>
The Taverna Server bean, plus supporting configuration.
</description>
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="providers.xml" />
<context:annotation-config />
<context:component-scan base-package="org.apache.taverna.server" />
<bean id="servletContextPropertyConfigurer"
class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer">
<property name="ignoreUnresolvablePlaceholders" value="true" />
<property name="localOverride" value="true" />
<property name="order" value="0" />
<property name="location" value="/WEB-INF/tavernaserver.properties" />
</bean>
<jaxws:server id="master_SOAP"
serviceClass="org.apache.taverna.server.master.TavernaServer" address="/soap">
<jaxws:serviceBean>
<ref bean="webapp" />
</jaxws:serviceBean>
<jaxws:properties>
<entry key="mtom-enabled" value="true" />
</jaxws:properties>
<!-- <jaxws:dataBinding><ref bean="addStylesheet"/></jaxws:dataBinding> -->
</jaxws:server>
<jaxrs:server id="root_REST" address="/">
<jaxrs:serviceBeans>
<ref bean="root_facade" />
</jaxrs:serviceBeans>
<jaxrs:properties>
<entry key="org.apache.cxf.endpoint.private" value="true" />
</jaxrs:properties>
</jaxrs:server>
<jaxrs:server id="master_REST" address="/rest"
staticSubresourceResolution="true">
<jaxrs:serviceBeans>
<ref bean="webapp" />
</jaxrs:serviceBeans>
<jaxrs:features>
<!-- <cxf:logging /> --><!-- NOISY! -->
</jaxrs:features>
<jaxrs:providers>
<ref bean="ExceptionProvider.AccessDenied" />
<ref bean="ExceptionProvider.BadInputPortName" />
<ref bean="ExceptionProvider.BadPropertyValue" />
<ref bean="ExceptionProvider.BadStateChange" />
<ref bean="ExceptionProvider.FilesystemAccess" />
<ref bean="ExceptionProvider.GeneralFailure" />
<ref bean="ExceptionProvider.IllegalArgument" />
<ref bean="ExceptionProvider.ImplementationProblem" />
<ref bean="ExceptionProvider.InvalidCredential" />
<ref bean="ExceptionProvider.JAXBException" />
<ref bean="ExceptionProvider.NegotiationFailed" />
<ref bean="ExceptionProvider.NoCreate" />
<ref bean="ExceptionProvider.NoCredential" />
<ref bean="ExceptionProvider.NoDestroy" />
<ref bean="ExceptionProvider.NoDirectoryEntry" />
<ref bean="ExceptionProvider.NoListener" />
<ref bean="ExceptionProvider.NoUpdate" />
<ref bean="ExceptionProvider.NotOwner" />
<ref bean="ExceptionProvider.Overloaded" />
<ref bean="ExceptionProvider.UnknownRun" />
<ref bean="MessagingProvider.File" />
<ref bean="MessagingProvider.FileConcatenation" />
<ref bean="MessagingProvider.FileSegment" />
<ref bean="MessagingProvider.InputStream" />
<ref bean="MessagingProvider.T2flow" />
<ref bean="MessagingProvider.Permission" />
<ref bean="MessagingProvider.URIList" />
<ref bean="MessagingProvider.ZipStream" />
<ref bean="jsonProvider" />
<ref bean="atomEntryHandler" />
<ref bean="atomFeedHandler" />
<bean class="org.apache.cxf.jaxrs.model.wadl.WadlGenerator">
<property name="addResourceAndMethodIds" value="true"/>
</bean>
</jaxrs:providers>
<jaxrs:outInterceptors>
<ref bean="Interceptor.FlushThreadLocalCache" />
</jaxrs:outInterceptors>
</jaxrs:server>
<jaxrs:server id="AtomFeed" address="/feed">
<jaxrs:serviceBeans>
<ref bean="feed" />
</jaxrs:serviceBeans>
<jaxrs:properties>
<entry key="org.apache.cxf.endpoint.private" value="true" />
</jaxrs:properties>
<jaxrs:providers>
<ref bean="atomEntryHandler" />
<ref bean="atomFeedHandler" />
</jaxrs:providers>
</jaxrs:server>
<jaxrs:server id="AdministrationInterface" address="/admin"
staticSubresourceResolution="true">
<jaxrs:serviceBeans>
<ref bean="admin" />
</jaxrs:serviceBeans>
<jaxrs:providers>
<ref bean="jsonProvider" />
</jaxrs:providers>
</jaxrs:server>
<bean id="jsonProvider" class="org.apache.cxf.jaxrs.provider.json.JSONProvider">
<property name="ignoreNamespaces" value="true" />
<property name="namespaceMap" ref="jsonNamespaceMap" />
</bean>
<util:map id="jsonNamespaceMap" key-type="java.lang.String"
value-type="java.lang.String">
<entry key="http://www.w3.org/1999/xlink" value="" />
<entry key="http://www.w3.org/2000/09/xmldsig#" value="" />
<entry key="http://schema.ogf.org/urf/2003/09/urf" value="" />
<entry key="http://ns.taverna.org.uk/2010/xml/server/" value="" />
<entry key="http://ns.taverna.org.uk/2010/xml/server/rest/" value="" />
<entry key="http://ns.taverna.org.uk/2010/xml/server/soap/" value="" />
<entry key="http://ns.taverna.org.uk/2010/xml/server/feed/" value="" />
<entry key="http://ns.taverna.org.uk/2010/xml/server/admin/" value="" />
<entry key="http://ns.taverna.org.uk/2010/port/" value="" />
<entry key="http://ns.taverna.org.uk/2010/run/" value="" />
</util:map>
<bean id="root_facade" class="org.apache.taverna.server.master.facade.Facade">
<property name="file" value="/welcome.html" />
<property name="contextualizer" ref="contextualizer" />
</bean>
<bean class="org.apache.taverna.server.master.common.Uri.Rewriter"
autowire="byType" id="URI-Rewriter-Thunk">
<property name="suppressSecurity" value="${suppressRewriteEngine}" />
<property name="rewriteTarget" value="${default.webapp}" />
</bean>
<security:authentication-manager>
<security:authentication-provider ref="workflowInternalAuthProvder" />
<security:authentication-provider ref="authProvider" />
</security:authentication-manager>
<bean id="WSDLHeadOptionsInterceptor"
class="org.apache.taverna.server.master.utils.WSDLHeadOptionsInterceptor" />
<cxf:bus>
<cxf:inInterceptors>
<ref bean="WSDLHeadOptionsInterceptor" />
</cxf:inInterceptors>
</cxf:bus>
<aop:aspectj-autoproxy proxy-target-class="true" />
<security:global-method-security
jsr250-annotations="enabled" />
<security:http realm="${http.realmName}" create-session="never"
use-expressions="true">
<security:http-basic />
<security:intercept-url pattern="/"
requires-channel="any" access="permitAll" />
<security:intercept-url pattern="/rest"
requires-channel="${requiredChannel}" access="permitAll" />
<security:intercept-url pattern="/rest/"
requires-channel="${requiredChannel}" access="permitAll" />
<security:intercept-url pattern="/rest/policy"
requires-channel="${requiredChannel}" access="permitAll" />
<security:intercept-url pattern="/rest/policy/"
requires-channel="${requiredChannel}" access="permitAll" />
<security:intercept-url pattern="/services/**"
requires-channel="${requiredChannel}" access="permitAll" />
<security:intercept-url pattern="/soap/**" method="GET"
requires-channel="${requiredChannel}" access="permitAll" />
<security:intercept-url pattern="/soap/**" method="POST"
requires-channel="${requiredChannel}"
access="hasRole('ROLE_tavernauser')" />
<security:intercept-url pattern="/admin"
requires-channel="${requiredChannel}"
access="hasRole('ROLE_tavernasuperuser')" />
<security:intercept-url pattern="/admin/**"
requires-channel="${requiredChannel}"
access="hasRole('ROLE_tavernasuperuser')" />
<security:intercept-url pattern="/rest/**"
requires-channel="${requiredChannel}"
access="hasAnyRole('ROLE_tavernauser','ROLE_tavernaworkflow')" />
<security:intercept-url pattern="/feed"
requires-channel="${requiredChannel}"
access="hasRole('ROLE_tavernauser')" />
<security:intercept-url pattern="/feed/**"
requires-channel="${requiredChannel}"
access="hasRole('ROLE_tavernauser')" />
</security:http>
</beans>