HONEYCOMB-21 Vpp-integration minimal distribution
[honeycomb.git] / infra / minimal-distribution / src / main / resources / honeycomb-minimal-resources / config / WEB-INF / web.xml
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!--
3   ~ Copyright (c) 2016 Cisco and/or its affiliates.
4   ~
5   ~ Licensed under the Apache License, Version 2.0 (the "License");
6   ~ you may not use this file except in compliance with the License.
7   ~ You may obtain a copy of the License at:
8   ~
9   ~     http://www.apache.org/licenses/LICENSE-2.0
10   ~
11   ~ Unless required by applicable law or agreed to in writing, software
12   ~ distributed under the License is distributed on an "AS IS" BASIS,
13   ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   ~ See the License for the specific language governing permissions and
15   ~ limitations under the License.
16   -->
17
18 <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
20     version="3.0">
21
22     <servlet>
23         <servlet-name>JAXRSRestconf</servlet-name>
24         <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
25         <init-param>
26             <param-name>javax.ws.rs.Application</param-name>
27             <param-value>org.opendaylight.netconf.sal.rest.impl.RestconfApplication</param-value>
28         </init-param>
29         <load-on-startup>1</load-on-startup>
30     </servlet>
31
32     <!-- FIXME-minimal configure SHIRO -->
33     <!-- FIXME-minimal configure https -->
34     <!--<context-param>-->
35       <!--<param-name>shiroEnvironmentClass</param-name>-->
36       <!--<param-value>org.opendaylight.aaa.shiro.web.env.KarafIniWebEnvironment</param-value>-->
37     <!--</context-param>-->
38
39     <!--<listener>-->
40         <!--<listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class>-->
41     <!--</listener>-->
42
43     <!--<filter>-->
44         <!--<filter-name>ShiroFilter</filter-name>-->
45         <!--<filter-class>org.opendaylight.aaa.shiro.filters.AAAFilter</filter-class>-->
46     <!--</filter>-->
47
48     <!--<filter-mapping>-->
49         <!--<filter-name>ShiroFilter</filter-name>-->
50         <!--<url-pattern>/*</url-pattern>-->
51     <!--</filter-mapping>-->
52
53     <servlet-mapping>
54         <servlet-name>JAXRSRestconf</servlet-name>
55         <url-pattern>/*</url-pattern>
56     </servlet-mapping>
57
58     <filter>
59         <filter-name>GzipFilter</filter-name>
60         <filter-class>org.eclipse.jetty.servlets.GzipFilter</filter-class>
61         <init-param>
62             <param-name>mimeTypes</param-name>
63             <param-value>application/xml,application/yang.data+xml,xml,application/json,application/yang.data+json</param-value>
64         </init-param>
65     </filter>
66     <!-- FIXME gzip filter is deprecated -->
67     <filter-mapping>
68         <filter-name>GzipFilter</filter-name>
69         <url-pattern>/*</url-pattern>
70     </filter-mapping>
71
72     <filter>
73         <filter-name>cross-origin-restconf</filter-name>
74         <filter-class>org.eclipse.jetty.servlets.CrossOriginFilter</filter-class>
75         <init-param>
76             <param-name>allowedOrigins</param-name>
77             <param-value>*</param-value>
78         </init-param>
79         <init-param>
80             <param-name>allowedMethods</param-name>
81             <param-value>GET,POST,OPTIONS,DELETE,PUT,HEAD</param-value>
82         </init-param>
83         <init-param>
84             <param-name>allowedHeaders</param-name>
85             <param-value>origin, content-type, accept, authorization</param-value>
86         </init-param>
87         <init-param>
88             <param-name>exposedHeaders</param-name>
89             <param-value>location</param-value>
90         </init-param>
91     </filter>
92     <filter-mapping>
93         <filter-name>cross-origin-restconf</filter-name>
94         <url-pattern>/*</url-pattern>
95     </filter-mapping>
96
97     <security-constraint>
98         <web-resource-collection>
99             <web-resource-name>NB api</web-resource-name>
100             <url-pattern>/*</url-pattern>
101             <http-method>POST</http-method>
102             <http-method>GET</http-method>
103             <http-method>PUT</http-method>
104             <http-method>PATCH</http-method>
105             <http-method>DELETE</http-method>
106             <http-method>HEAD</http-method>
107         </web-resource-collection>
108     </security-constraint>
109
110 </web-app>