move http to https
[appc/deployment.git] / installation / appc / src / main / resources / jetty.xml
1 <?xml version="1.0"?>
2 <!--
3  Licensed to the Apache Software Foundation (ASF) under one
4  or more contributor license agreements.  See the NOTICE file
5  distributed with this work for additional information
6  regarding copyright ownership.  The ASF licenses this file
7  to you under the Apache License, Version 2.0 (the
8  "License"); you may not use this file except in compliance
9  with the License.  You may obtain a copy of the License at
10
11    http://www.apache.org/licenses/LICENSE-2.0
12
13  Unless required by applicable law or agreed to in writing,
14  software distributed under the License is distributed on an
15  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  KIND, either express or implied.  See the License for the
17  specific language governing permissions and limitations
18  under the License.
19 -->
20 <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//
21 DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
22
23 <Configure id="Server" class="org.eclipse.jetty.server.Server">
24
25     <!-- =========================================================== -->
26     <!-- Set connectors -->
27     <!-- =========================================================== -->
28     <!-- One of each type! -->
29     <!-- =========================================================== -->
30
31     <!-- Use this connector for many frequently idle connections and for
32         threadless continuations. -->
33     <New id="http-default" class="org.eclipse.jetty.server.HttpConfiguration">
34         <Set name="secureScheme">https</Set>
35         <Set name="securePort">
36             <Property name="jetty.secure.port" default="8443" />
37         </Set>
38         <Set name="outputBufferSize">32768</Set>
39         <Set name="requestHeaderSize">8192</Set>
40         <Set name="responseHeaderSize">8192</Set>
41
42         <!-- Default security setting: do not leak our version -->
43         <Set name="sendServerVersion">false</Set>
44
45         <Set name="sendDateHeader">false</Set>
46         <Set name="headerCacheSize">512</Set>
47     </New>
48
49     <New id="http-legacy" class="org.eclipse.jetty.server.HttpConfiguration">
50         <Set name="secureScheme">https</Set>
51         <Set name="securePort">
52             <Property name="jetty.secure.port" default="8443" />
53         </Set>
54         <Set name="outputBufferSize">32768</Set>
55         <Set name="requestHeaderSize">8192</Set>
56         <Set name="responseHeaderSize">8192</Set>
57
58         <!-- Default security setting: do not leak our version -->
59         <Set name="sendServerVersion">false</Set>
60
61         <Set name="sendDateHeader">false</Set>
62         <Set name="headerCacheSize">512</Set>
63     </New>
64
65     <Call name="addConnector">
66         <Arg>
67             <New class="org.eclipse.jetty.server.ServerConnector">
68                 <Arg name="server">
69                     <Ref refid="Server" />
70                 </Arg>
71                 <Arg name="factories">
72                     <Array type="org.eclipse.jetty.server.ConnectionFactory">
73                         <Item>
74                             <New class="org.eclipse.jetty.server.HttpConnectionFactory">
75                                 <Arg name="config">
76                                     <Ref refid="http-default"/>
77                                 </Arg>
78                             </New>
79                         </Item>
80                     </Array>
81                 </Arg>
82                 <Set name="host">
83                     <Property name="jetty.host"/>
84                 </Set>
85                 <Set name="port">
86                     <Property name="jetty.port" default="8181"/>
87                 </Set>
88                 <Set name="idleTimeout">
89                     <Property name="http.timeout" default="300000"/>
90                 </Set>
91                 <Set name="name">jetty-default</Set>
92             </New>
93         </Arg>
94     </Call>
95
96     <!-- =========================================================== -->
97     <!-- Configure Authentication Realms -->
98     <!-- Realms may be configured for the entire server here, or -->
99     <!-- they can be configured for a specific web app in a context -->
100     <!-- configuration (see $(jetty.home)/contexts/test.xml for an -->
101     <!-- example). -->
102     <!-- =========================================================== -->
103     <Call name="addBean">
104         <Arg>
105             <New class="org.eclipse.jetty.jaas.JAASLoginService">
106                 <Set name="name">karaf</Set>
107                 <Set name="loginModuleName">karaf</Set>
108                 <Set name="roleClassNames">
109                     <Array type="java.lang.String">
110                         <Item>org.apache.karaf.jaas.boot.principal.RolePrincipal
111                         </Item>
112                     </Array>
113                 </Set>
114             </New>
115         </Arg>
116     </Call>
117     <Call name="addBean">
118         <Arg>
119             <New class="org.eclipse.jetty.jaas.JAASLoginService">
120                 <Set name="name">default</Set>
121                 <Set name="loginModuleName">karaf</Set>
122                 <Set name="roleClassNames">
123                     <Array type="java.lang.String">
124                         <Item>org.apache.karaf.jaas.boot.principal.RolePrincipal
125                         </Item>
126                     </Array>
127                 </Set>
128             </New>
129         </Arg>
130     </Call>
131 </Configure>