| <!-- |
| 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. |
| --> |
| <!DOCTYPE web-app PUBLIC |
| "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" |
| "http://java.sun.com/dtd/web-app_2_3.dtd" > |
| |
| <web-app> |
| <display-name>Fortress Rest Server</display-name> |
| |
| <!-- Add for Spring support --> |
| <context-param> |
| <param-name>contextConfigLocation</param-name> |
| <param-value>classpath:applicationContext.xml</param-value> |
| </context-param> |
| <listener> |
| <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> |
| </listener> |
| |
| <servlet> |
| <servlet-name>CXFServlet</servlet-name> |
| <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class> |
| <load-on-startup>1</load-on-startup> |
| </servlet> |
| |
| <servlet-mapping> |
| <servlet-name>CXFServlet</servlet-name> |
| <url-pattern>/*</url-pattern> |
| </servlet-mapping> |
| |
| <security-constraint> |
| <display-name>Fortress Rest Security Constraint</display-name> |
| <web-resource-collection> |
| <web-resource-name>Protected Area</web-resource-name> |
| <!-- Define the context-relative URL(s) to be protected --> |
| <url-pattern>/*</url-pattern> |
| <!-- If you list http methods, only those methods are protected --> |
| <!--http-method>GET</http-method--> |
| </web-resource-collection> |
| <auth-constraint> |
| <!-- Anyone with one of the listed roles may access this area --> |
| <role-name>fortress-rest-user</role-name> |
| </auth-constraint> |
| </security-constraint> |
| |
| <!-- Default login configuration uses form-based authentication --> |
| <login-config> |
| <auth-method>BASIC</auth-method> |
| <realm-name>Fortress Rest Realm Authentication Area</realm-name> |
| </login-config> |
| |
| <!-- Security role needed to pass realm authZ --> |
| <security-role> |
| <role-name>fortress-rest-user</role-name> |
| </security-role> |
| </web-app> |