-
Notifications
You must be signed in to change notification settings - Fork 0
/
web.xml
executable file
·194 lines (164 loc) · 7.31 KB
/
web.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>WSO2HealthWebApplication</display-name>
<welcome-file-list>
<welcome-file>login.html</welcome-file>
</welcome-file-list>
<!-- Context parameters -->
<!-- The scope in which the subject would be available. Legal values are basicAuth, request-param, request-attribute, session -->
<context-param>
<param-name>subjectScope</param-name>
<param-value>request-param</param-value>
</context-param>
<!-- The name of the identifier by which to identify the subject -->
<!-- This param is Mandatory. Should be provided -->
<context-param>
<param-name>subjectAttributeName</param-name>
<param-value>user</param-value>
</context-param>
<!-- The username to perform EntitlementService query-->
<!-- This param is Mandatory. Should be provided -->
<context-param>
<param-name>userName</param-name>
<param-value>admin</param-value>
</context-param>
<!-- The password to perform EntitlementService query -->
<!-- This param is Mandatory. Should be provided -->
<context-param>
<param-name>password</param-name>
<param-value>admin</param-value>
</context-param>
<!-- The URL to perform EntitlementService query-->
<!-- This param is Mandatory. Should be provided in this format -->
<!--If the transport type is SOAP give the url like https://localhost:9443/services/-->
<!--If the transport type is Thrift give the url like https://localhost:9443/-->
<context-param>
<param-name>remoteServiceUrl</param-name>
<param-value>https://localhost:9444/services/</param-value>
</context-param>
<!-- End of Context parameters -->
<!-- Servlets referred in the web app -->
<servlet>
<servlet-name>Search</servlet-name>
<servlet-class>org.wso2.sample.QueryPatientDetailServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>Register</servlet-name>
<servlet-class>org.wso2.sample.RegisterPatientServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>EntitlementCacheUpdateServlet</servlet-name>
<servlet-class>org.wso2.carbon.identity.entitlement.filter.EntitlementCacheUpdateServlet
</servlet-class>
<!-- HTTPS port of the web container used when redirecting request to come over https port for cache update authentication -->
<init-param>
<param-name>httpsPort</param-name>
<param-value>9453</param-value>
</init-param>
<!-- Authentication mode for cache update. Legal values are webapp and wso2is -->
<init-param>
<param-name>authentication</param-name>
<param-value>wso2is</param-value>
</init-param>
<!-- Authentication page used for cache update authentication. Legal values are default and custom -->
<init-param>
<param-name>authenticationPage</param-name>
<param-value>default</param-value>
</init-param>
<!-- Authentication page URL used for cache update authentication. Works only with custom for authenticationPage -->
<init-param>
<param-name>authenticationPageUrl</param-name>
<param-value>/updateCache.html</param-value>
</init-param>
</servlet>
<!-- End of Servlets referred in the web app -->
<!-- Filters referred in the web app -->
<filter>
<filter-name>AuthenticationFilter</filter-name>
<filter-class>org.wso2.sample.AuthenticationFilter</filter-class>
</filter>
<!-- EntitlementFilter Settings -->
<filter>
<filter-name>EntitlementFilter</filter-name>
<filter-class>ru.emdev.wso2.carbon.identity.entitlement.filter.EntitlementFilter</filter-class>
<!--Client Class that extends AbstractEntitlementServiceClient. Legal values are basicAuth, soap and thrift.
Default is 'thrift'.-->
<init-param>
<param-name>client</param-name>
<param-value>basicAuth</param-value>
</init-param>
<!--Decision caching at PEPProxy. Legal values are simple and carbon.This parameter is optional.
If not specified no caching is done.-->
<init-param>
<param-name>cacheType</param-name>
<param-value>simple</param-value>
</init-param>
<!--Maximum number of cached entries. Legal values are between 0 and 10000 .
Only works with caching.-->
<init-param>
<param-name>maxCacheEntries</param-name>
<param-value>1000</param-value>
</init-param>
<!-- Time interval for which cached entry is valid. Only works with simple cache type. -->
<init-param>
<param-name>invalidationInterval</param-name>
<param-value>2000</param-value>
</init-param>
<!-- URL ro redirect to if authorization fails -->
<!-- This param is Mandatory. Should be provided -->
<init-param>
<param-name>authRedirectUrl</param-name>
<param-value>/login.html</param-value>
</init-param>
<!-- This will be used if the transport type is thrift. This is mandatory -->
<init-param>
<param-name>thriftHost</param-name>
<param-value>localhost</param-value>
</init-param>
<!-- This will be used if the transport type is thrift. This is optional. If not provided would be set to default value -->
<init-param>
<param-name>thriftPort</param-name>
<param-value>10500</param-value>
</init-param>
</filter>
<!-- End of Filters referred in the web app -->
<!-- Servlet mappings referred in the web app -->
<servlet-mapping>
<servlet-name>Search</servlet-name>
<url-pattern>/Search</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Register</servlet-name>
<url-pattern>/Register</url-pattern>
</servlet-mapping>
<!-- End of Servlet mappings referred in the web app -->
<!-- Filter mappings referred in the web app -->
<filter-mapping>
<filter-name>AuthenticationFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>EntitlementFilter</filter-name>
<url-pattern>/getPatientDetails.jsp</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>EntitlementFilter</filter-name>
<url-pattern>/addPatient.jsp</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>EntitlementFilter</filter-name>
<url-pattern>/patientInfoPage.jsp</url-pattern>
</filter-mapping>
<!-- Mandatory mapping that needs to be present to work with PEP cache update authorization-->
<filter-mapping>
<filter-name>EntitlementFilter</filter-name>
<url-pattern>/updateCacheAuth.do</url-pattern>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>
<!-- Servlet mapping needed for cache update authentication -->
<servlet-mapping>
<servlet-name>EntitlementCacheUpdateServlet</servlet-name>
<url-pattern>/updateCache.do</url-pattern>
</servlet-mapping>
<!-- End of Filter mappings referred in the web app -->
</web-app>