https certs with aaf+pe containers compatibility
[policy/engine.git] / packages / base / src / files / install / servers / console / conf / server.xml
1 <?xml version='1.0' encoding='utf-8'?>
2 <!--
3   ============LICENSE_START=======================================================
4   ONAP Policy Engine
5   ================================================================================
6   Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
7   ================================================================================
8   Licensed under the Apache License, Version 2.0 (the "License");
9   you may not use this file except in compliance with the License.
10   You may obtain a copy of the License at
11   
12        http://www.apache.org/licenses/LICENSE-2.0
13   
14   Unless required by applicable law or agreed to in writing, software
15   distributed under the License is distributed on an "AS IS" BASIS,
16   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17   See the License for the specific language governing permissions and
18   limitations under the License.
19   ============LICENSE_END=========================================================
20   -->
21
22 <!--
23   Licensed to the Apache Software Foundation (ASF) under one or more
24   contributor license agreements.  See the NOTICE file distributed with
25   this work for additional information regarding copyright ownership.
26   The ASF licenses this file to You under the Apache License, Version 2.0
27   (the "License"); you may not use this file except in compliance with
28   the License.  You may obtain a copy of the License at
29
30       http://www.apache.org/licenses/LICENSE-2.0
31
32   Unless required by applicable law or agreed to in writing, software
33   distributed under the License is distributed on an "AS IS" BASIS,
34   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
35   See the License for the specific language governing permissions and
36   limitations under the License.
37 -->
38 <!-- Note:  A "Server" is not itself a "Container", so you may not
39      define subcomponents such as "Valves" at this level.
40      Documentation at /docs/config/server.html
41  -->
42 <Server port="${{TOMCAT_SHUTDOWN_PORT}}" shutdown="SHUTDOWN">
43   <Listener className="org.apache.catalina.startup.VersionLoggerListener" />
44   <!-- Security listener. Documentation at /docs/config/listeners.html
45   <Listener className="org.apache.catalina.security.SecurityListener" />
46   -->
47   <!--APR library loader. Documentation at /docs/apr.html -->
48   <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
49   <!-- Prevent memory leaks due to use of particular java/javax APIs-->
50   <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
51   <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
52   <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
53
54   <!-- Global JNDI resources
55        Documentation at /docs/jndi-resources-howto.html
56   -->
57   <GlobalNamingResources>
58     <!-- Editable user database that can also be used by
59          UserDatabaseRealm to authenticate users
60     -->
61     <Resource name="UserDatabase" auth="Container"
62               type="org.apache.catalina.UserDatabase"
63               description="User database that can be updated and saved"
64               factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
65               pathname="conf/tomcat-users.xml" />
66   </GlobalNamingResources>
67
68   <!-- A "Service" is a collection of one or more "Connectors" that share
69        a single "Container" Note:  A "Service" is not itself a "Container",
70        so you may not define subcomponents such as "Valves" at this level.
71        Documentation at /docs/config/service.html
72    -->
73   <Service name="Catalina">
74
75     <!--The connectors can use a shared executor, you can define one or more named thread pools-->
76     <!--
77     <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
78         maxThreads="150" minSpareThreads="4"/>
79     -->
80
81
82     <!-- A "Connector" represents an endpoint by which requests are received
83          and responses are returned. Documentation at :
84          Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
85          Java AJP  Connector: /docs/config/ajp.html
86          APR (HTTP/AJP) Connector: /docs/apr.html
87          Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
88     -->         
89         <!-- 
90     <Connector port="${{SSL_HTTP_CONNECTOR_PORT}}" protocol="HTTP/1.1"
91                connectionTimeout="20000"
92                redirectPort="${{SSL_HTTP_CONNECTOR_REDIRECT_PORT}}" />
93         -->               
94
95     <!-- A "Connector" using the shared thread pool-->
96     <!--
97     <Connector executor="tomcatThreadPool"
98                port="8080" protocol="HTTP/1.1"
99                connectionTimeout="20000"
100                redirectPort="8443" />
101     -->
102     <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443
103          This connector uses the NIO implementation that requires the JSSE
104          style configuration. When using the APR/native implementation, the
105          OpenSSL style configuration is required as described in the APR/native
106          documentation
107         -->
108
109     <!-- ONAP portal currently using http instead of https
110
111     Setting the keystore and truststore in the connector, overrides the javax.net.ssl system properties
112     passed in to the tomcat JVM:
113
114     <Connector port="${{SSL_HTTP_CONNECTOR_PORT}}" protocol="org.apache.coyote.http11.Http11NioProtocol"
115                maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
116                clientAuth="false" sslEnabledProtocols="TLSv1, TLSv1.1, TLSv1.2"
117                keystoreFile="${{POLICY_HOME}}/etc/ssl/policy-keystore" keystorePass="${{KEYSTORE_PASSWD}}"
118                truststoreFile="${{POLICY_HOME}}/etc/ssl/policy-truststore" truststorePass="${{TRUSTSTORE_PASSWD}}"/>
119     -->
120     <Connector port="${{SSL_HTTP_CONNECTOR_PORT}}" protocol="org.apache.coyote.http11.Http11NioProtocol"
121                maxThreads="150" />
122
123
124
125     <!-- Define an AJP 1.3 Connector on port 8009 -->
126     <Connector port="${{SSL_AJP_CONNECTOR_PORT}}" protocol="AJP/1.3" redirectPort="${{SSL_AJP_CONNECTOR_REDIRECT_PORT}}" />
127
128
129     <!-- An Engine represents the entry point (within Catalina) that processes
130          every request.  The Engine implementation for Tomcat stand alone
131          analyzes the HTTP headers included with the request, and passes them
132          on to the appropriate Host (virtual host).
133          Documentation at /docs/config/engine.html -->
134
135     <!-- You should set jvmRoute to support load-balancing via AJP ie :
136     <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
137     -->
138     <Engine name="Catalina" defaultHost="localhost">
139
140       <!--For clustering, please take a look at documentation at:
141           /docs/cluster-howto.html  (simple how to)
142           /docs/config/cluster.html (reference documentation) -->
143       <!--
144       <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
145       -->
146
147       <!-- Use the LockOutRealm to prevent attempts to guess user passwords
148            via a brute-force attack -->
149       <Realm className="org.apache.catalina.realm.LockOutRealm">
150         <!-- This Realm uses the UserDatabase configured in the global JNDI
151              resources under the key "UserDatabase".  Any edits
152              that are performed against this UserDatabase are immediately
153              available for use by the Realm.  -->
154         <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
155                resourceName="UserDatabase"/>
156       </Realm>
157
158       <Host name="localhost"  appBase="webapps"
159             unpackWARs="true" autoDeploy="true">
160
161         <!-- SingleSignOn valve, share authentication between web applications
162              Documentation at: /docs/config/valve.html -->
163         <!--
164         <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
165         -->
166
167         <!-- Access log processes all example.
168              Documentation at: /docs/config/valve.html
169              Note: The pattern used is equivalent to using pattern="common" -->
170         <Valve className="org.apache.catalina.valves.AccessLogValve" directory="${{POLICY_LOGS}}/policy/catalina"
171                prefix="localhost_access_log" suffix=".txt"
172                pattern="%h %l %u %t &quot;%r&quot; %s %b" />
173
174       </Host>
175     </Engine>
176   </Service>
177 </Server>