Initial OpenECOMP MSO commit
[so.git] / mso-api-handlers / mso-api-handler-infra / WebContent / WEB-INF / web.xml
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 \r
3 <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">\r
4   <display-name>MSO API Handler Infra</display-name>\r
5  \r
6  \r
7    <context-param>\r
8         <param-name>resteasy.jndi.resources</param-name>\r
9         <param-value>java:module/MsoPropertiesFactory</param-value>\r
10    </context-param>\r
11  \r
12    <!-- enable the Asynchronous Job Service -->\r
13     <context-param>\r
14         <param-name>resteasy.async.job.service.enabled</param-name>\r
15         <param-value>true</param-value>\r
16     </context-param>\r
17 \r
18     <!-- The next context parameters are all optional.  \r
19          Their default values are shown as example param-values -->\r
20 \r
21     <!-- How many jobs results can be held in memory at once? -->\r
22     <context-param>\r
23         <param-name>resteasy.async.job.service.max.job.results</param-name>\r
24         <param-value>100</param-value>\r
25     </context-param>\r
26 \r
27     <!-- Maximum wait time on a job when a client is querying for it -->\r
28     <context-param>\r
29         <param-name>resteasy.async.job.service.max.wait</param-name>\r
30         <param-value>300000</param-value>\r
31     </context-param>\r
32 \r
33     <!-- Thread pool size of background threads that run the job -->\r
34     <context-param>\r
35         <param-name>resteasy.async.job.service.thread.pool.size</param-name>\r
36         <param-value>100</param-value>\r
37     </context-param>\r
38 \r
39     <!-- Set the base path for the Job uris -->\r
40     <context-param>\r
41         <param-name>resteasy.async.job.service.base.path</param-name>\r
42         <param-value>/asynch/jobs</param-value>\r
43     </context-param>\r
44   <context-param>\r
45     <param-name>resteasy.scan</param-name>\r
46     <param-value>true</param-value>\r
47   </context-param>\r
48  \r
49   <!--  \r
50   <context-param>\r
51     <param-name>resteasy.servlet.mapping.prefix</param-name>\r
52     <param-value>/v1</param-value>\r
53   </context-param>\r
54   -->\r
55    <context-param>\r
56         <param-name>log.configuration</param-name>\r
57         <param-value>logback.apihandler-infra.xml</param-value>\r
58   </context-param>\r
59   \r
60   <context-param>\r
61         <param-name>mso.configuration</param-name>\r
62         <param-value>MSO_PROP_APIHANDLER_INFRA=mso.apihandler-infra.properties,MSO_PROP_TOPOLOGY=topology.properties</param-value>\r
63   </context-param>\r
64   \r
65   <context-param>\r
66     <param-name>resteasy.resources</param-name>\r
67     <param-value>org.openecomp.mso.logger.MsoLoggingServlet</param-value>\r
68   </context-param>\r
69   \r
70   <listener>\r
71     <listener-class>\r
72                         org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap\r
73         </listener-class>\r
74   </listener>\r
75   <servlet>\r
76     <servlet-name>msoapihandler-infra-servlet</servlet-name>\r
77     <servlet-class>\r
78                         org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher\r
79                 </servlet-class>\r
80   </servlet>\r
81   <servlet-mapping>\r
82     <servlet-name>msoapihandler-infra-servlet</servlet-name>\r
83     <url-pattern>/*</url-pattern>\r
84   </servlet-mapping>\r
85 \r
86   <security-constraint>\r
87     <web-resource-collection>\r
88       <web-resource-name>HealthcheckNoAuth</web-resource-name>\r
89       <description>No Authentication for Healthcheck</description>\r
90       <url-pattern>/healthcheck</url-pattern>\r
91         <url-pattern>/nodehealthcheck</url-pattern>\r
92         <url-pattern>/globalhealthcheck</url-pattern>\r
93       <http-method>GET</http-method>\r
94       <http-method>POST</http-method>\r
95       </web-resource-collection>\r
96    </security-constraint>\r
97     <security-constraint>\r
98         <web-resource-collection>\r
99             <web-resource-name>SiteStatus</web-resource-name>\r
100             <description>SiteStatus APIs</description>\r
101             <url-pattern>/setStatus/*</url-pattern>\r
102             <http-method>POST</http-method>\r
103         </web-resource-collection>\r
104         <auth-constraint>\r
105             <role-name>SiteControl-Client</role-name>\r
106         </auth-constraint>\r
107     </security-constraint>\r
108    <security-constraint>\r
109          <web-resource-collection>\r
110       <web-resource-name>HTTPBasicAuth</web-resource-name>\r
111       <description>Authentication for Infra Portal</description>\r
112       <url-pattern>/*</url-pattern>\r
113       <http-method>POST</http-method>\r
114       <http-method>GET</http-method>\r
115      </web-resource-collection>\r
116       <auth-constraint>\r
117        <role-name>InfraPortal-Client</role-name>\r
118      </auth-constraint>\r
119   </security-constraint>\r
120  \r
121   <login-config>\r
122         <auth-method>BASIC</auth-method>\r
123     <realm-name>ApplicationRealm</realm-name>\r
124   </login-config>\r
125   <security-role>\r
126     <role-name>InfraPortal-Client</role-name>\r
127   </security-role>\r
128     <security-role>\r
129         <role-name>SiteControl-Client</role-name>\r
130     </security-role>\r
131 \r
132     <filter>\r
133                 <filter-name>LogFilter</filter-name>\r
134                 <filter-class>org.openecomp.mso.logger.LogFilter</filter-class> \r
135   </filter>\r
136     <filter-mapping>\r
137                 <filter-name>LogFilter</filter-name>\r
138                 <url-pattern>/*</url-pattern>\r
139         </filter-mapping>\r
140   \r
141 </web-app>\r