<?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. | |
--> | |
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee | |
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" | |
version="3.0" metadata-complete="true"> | |
<description> | |
WS Federation Spring Example | |
</description> | |
<display-name>WS Federation Spring Example</display-name> | |
<!-- | |
- Location of the XML file that defines the root application context | |
- Applied by ContextLoaderListener. | |
--> | |
<context-param> | |
<param-name>contextConfigLocation</param-name> | |
<param-value> | |
/WEB-INF/applicationContext-security.xml | |
</param-value> | |
</context-param> | |
<filter> | |
<filter-name>filterChainProxy</filter-name> | |
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> | |
</filter> | |
<!-- Optional: Cache the security token in Thread Local Storage --> | |
<filter> | |
<filter-name>FederationFilter</filter-name> | |
<filter-class>org.apache.cxf.fediz.core.servlet.FederationFilter</filter-class> | |
</filter> | |
<filter-mapping> | |
<filter-name>filterChainProxy</filter-name> | |
<url-pattern>/*</url-pattern> | |
</filter-mapping> | |
<filter-mapping> | |
<filter-name>FederationFilter</filter-name> | |
<url-pattern>/secure/*</url-pattern> | |
</filter-mapping> | |
<!-- | |
- Loads the root application context of this web app at startup. | |
- The application context is then available via | |
- WebApplicationContextUtils.getWebApplicationContext(servletContext). | |
--> | |
<listener> | |
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> | |
</listener> | |
<servlet> | |
<servlet-name>FederationServlet</servlet-name> | |
<servlet-class>org.apache.cxf.fediz.example.FederationServlet</servlet-class> | |
</servlet> | |
<servlet-mapping> | |
<servlet-name>FederationServlet</servlet-name> | |
<url-pattern>/secure/fedservlet</url-pattern> | |
</servlet-mapping> | |
<servlet-mapping> | |
<servlet-name>FederationServlet</servlet-name> | |
<url-pattern>/secure/admin/fedservlet</url-pattern> | |
</servlet-mapping> | |
<servlet-mapping> | |
<servlet-name>FederationServlet</servlet-name> | |
<url-pattern>/secure/user/fedservlet</url-pattern> | |
</servlet-mapping> | |
<servlet-mapping> | |
<servlet-name>FederationServlet</servlet-name> | |
<url-pattern>/secure/manager/fedservlet</url-pattern> | |
</servlet-mapping> | |
<security-role> | |
<role-name>Manager</role-name> | |
</security-role> | |
<security-role> | |
<role-name>User</role-name> | |
</security-role> | |
<security-role> | |
<role-name>Admin</role-name> | |
</security-role> | |
<security-role> | |
<role-name>Authenticated</role-name> | |
</security-role> | |
<security-role> | |
<role-name>Secretary</role-name> | |
</security-role> | |
<security-constraint> | |
<web-resource-collection> | |
<web-resource-name>Protected Area</web-resource-name> | |
<url-pattern>/secure/*</url-pattern> | |
</web-resource-collection> | |
<auth-constraint> | |
<role-name>*</role-name> | |
</auth-constraint> | |
</security-constraint> | |
<login-config> | |
<auth-method>WSFED</auth-method> | |
<realm-name>WSFED</realm-name> | |
</login-config> | |
</web-app> |