Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 771 | blopes | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!-- |
||
| 3 | Licensed to the Apache Software Foundation (ASF) under one or more |
||
| 4 | contributor license agreements. See the NOTICE file distributed with |
||
| 5 | this work for additional information regarding copyright ownership. |
||
| 6 | The ASF licenses this file to You under the Apache License, Version 2.0 |
||
| 7 | (the "License"); you may not use this file except in compliance with |
||
| 8 | the License. You may obtain a copy of the License at |
||
| 9 | |||
| 10 | http://www.apache.org/licenses/LICENSE-2.0 |
||
| 11 | |||
| 12 | Unless required by applicable law or agreed to in writing, software |
||
| 13 | distributed under the License is distributed on an "AS IS" BASIS, |
||
| 14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||
| 15 | See the License for the specific language governing permissions and |
||
| 16 | limitations under the License. |
||
| 17 | --> |
||
| 18 | <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" |
||
| 19 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||
| 20 | xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee |
||
| 21 | http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" |
||
| 22 | version="4.0" |
||
| 23 | metadata-complete="true"> |
||
| 24 | |||
| 25 | <display-name>Tomcat Host Manager Application</display-name> |
||
| 26 | <description> |
||
| 27 | A scriptable host management web application for the Tomcat Web Server; |
||
| 28 | Manager lets you view, create and remove virtual hosts. |
||
| 29 | </description> |
||
| 30 | |||
| 31 | <request-character-encoding>UTF-8</request-character-encoding> |
||
| 32 | |||
| 33 | <servlet> |
||
| 34 | <servlet-name>HostManager</servlet-name> |
||
| 35 | <servlet-class>org.apache.catalina.manager.host.HostManagerServlet</servlet-class> |
||
| 36 | <init-param> |
||
| 37 | <param-name>debug</param-name> |
||
| 38 | <param-value>2</param-value> |
||
| 39 | </init-param> |
||
| 40 | </servlet> |
||
| 41 | <servlet> |
||
| 42 | <servlet-name>HTMLHostManager</servlet-name> |
||
| 43 | <servlet-class>org.apache.catalina.manager.host.HTMLHostManagerServlet</servlet-class> |
||
| 44 | <init-param> |
||
| 45 | <param-name>debug</param-name> |
||
| 46 | <param-value>2</param-value> |
||
| 47 | </init-param> |
||
| 48 | </servlet> |
||
| 49 | |||
| 50 | <filter> |
||
| 51 | <filter-name>CSRF</filter-name> |
||
| 52 | <filter-class>org.apache.catalina.filters.CsrfPreventionFilter</filter-class> |
||
| 53 | <init-param> |
||
| 54 | <param-name>entryPoints</param-name> |
||
| 55 | <param-value>/html,/html/,/html/list,/index.jsp</param-value> |
||
| 56 | </init-param> |
||
| 57 | </filter> |
||
| 58 | |||
| 59 | <!-- Configured to set X-FRAME-OPTIONS. Disable HSTS in case it interferes --> |
||
| 60 | <!-- with an existing setting. Keep X-Content-Type-Options and --> |
||
| 61 | <!-- X-XSS-Protection as they are page specific. --> |
||
| 62 | <filter> |
||
| 63 | <filter-name>HTTP header security filter</filter-name> |
||
| 64 | <filter-class>org.apache.catalina.filters.HttpHeaderSecurityFilter</filter-class> |
||
| 65 | <init-param> |
||
| 66 | <param-name>hstsEnabled</param-name> |
||
| 67 | <param-value>false</param-value> |
||
| 68 | </init-param> |
||
| 69 | </filter> |
||
| 70 | |||
| 71 | <filter-mapping> |
||
| 72 | <filter-name>CSRF</filter-name> |
||
| 73 | <servlet-name>HTMLHostManager</servlet-name> |
||
| 74 | </filter-mapping> |
||
| 75 | |||
| 76 | <filter-mapping> |
||
| 77 | <filter-name>HTTP header security filter</filter-name> |
||
| 78 | <url-pattern>/*</url-pattern> |
||
| 79 | </filter-mapping> |
||
| 80 | |||
| 81 | <!-- Define the Manager Servlet Mapping --> |
||
| 82 | <servlet-mapping> |
||
| 83 | <servlet-name>HostManager</servlet-name> |
||
| 84 | <url-pattern>/text/*</url-pattern> |
||
| 85 | </servlet-mapping> |
||
| 86 | <servlet-mapping> |
||
| 87 | <servlet-name>HTMLHostManager</servlet-name> |
||
| 88 | <url-pattern>/html/*</url-pattern> |
||
| 89 | </servlet-mapping> |
||
| 90 | |||
| 91 | <!-- Define a Security Constraint on this Application --> |
||
| 92 | <security-constraint> |
||
| 93 | <web-resource-collection> |
||
| 94 | <web-resource-name>HostManager commands</web-resource-name> |
||
| 95 | <url-pattern>/text/*</url-pattern> |
||
| 96 | </web-resource-collection> |
||
| 97 | <auth-constraint> |
||
| 98 | <!-- NOTE: This role is not present in the default users file --> |
||
| 99 | <role-name>admin-script</role-name> |
||
| 100 | </auth-constraint> |
||
| 101 | </security-constraint> |
||
| 102 | <security-constraint> |
||
| 103 | <web-resource-collection> |
||
| 104 | <web-resource-name>HTMLHostManager commands</web-resource-name> |
||
| 105 | <url-pattern>/html/*</url-pattern> |
||
| 106 | </web-resource-collection> |
||
| 107 | <auth-constraint> |
||
| 108 | <!-- NOTE: This role is not present in the default users file --> |
||
| 109 | <role-name>admin-gui</role-name> |
||
| 110 | </auth-constraint> |
||
| 111 | </security-constraint> |
||
| 112 | |||
| 113 | <!-- Define the Login Configuration for this Application --> |
||
| 114 | <login-config> |
||
| 115 | <auth-method>BASIC</auth-method> |
||
| 116 | <realm-name>Tomcat Host Manager Application</realm-name> |
||
| 117 | </login-config> |
||
| 118 | |||
| 119 | <!-- Security roles referenced by this web application --> |
||
| 120 | <security-role> |
||
| 121 | <description> |
||
| 122 | The role that is required to log in to the Host Manager Application HTML |
||
| 123 | interface |
||
| 124 | </description> |
||
| 125 | <role-name>admin-gui</role-name> |
||
| 126 | </security-role> |
||
| 127 | <security-role> |
||
| 128 | <description> |
||
| 129 | The role that is required to log in to the Host Manager Application text |
||
| 130 | interface |
||
| 131 | </description> |
||
| 132 | <role-name>admin-script</role-name> |
||
| 133 | </security-role> |
||
| 134 | |||
| 135 | <error-page> |
||
| 136 | <error-code>401</error-code> |
||
| 137 | <location>/WEB-INF/jsp/401.jsp</location> |
||
| 138 | </error-page> |
||
| 139 | <error-page> |
||
| 140 | <error-code>403</error-code> |
||
| 141 | <location>/WEB-INF/jsp/403.jsp</location> |
||
| 142 | </error-page> |
||
| 143 | <error-page> |
||
| 144 | <error-code>404</error-code> |
||
| 145 | <location>/WEB-INF/jsp/404.jsp</location> |
||
| 146 | </error-page> |
||
| 147 | |||
| 148 | </web-app> |