summaryrefslogtreecommitdiffstats
path: root/sandbox/lresende/sca/samples/store-secure-webapp/src/main/webapp/WEB-INF/web.xml
blob: 4d635579e739c0a7eca618e811ee67eacacc079d (plain)
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
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
  <display-name>sample-store-secure-webapp</display-name>

  <filter>
    <filter-name>tuscany</filter-name> 
    <filter-class>org.apache.tuscany.sca.host.webapp.TuscanyServletFilter</filter-class> 
  </filter>

  <filter-mapping>
    <filter-name>tuscany</filter-name> 
    <url-pattern>/*</url-pattern> 
  </filter-mapping>

  <welcome-file-list id="WelcomeFileList">
    <welcome-file>store.html</welcome-file>
  </welcome-file-list>
  
  <login-config>
  	<auth-method>BASIC</auth-method>
  	<realm-name>ldap-realm</realm-name>
  </login-config>
  
  <security-role>
  	<description>Application managers</description>
  	<role-name>manager</role-name>
  </security-role>

  <security-role>
  	<description>Application users</description>
  	<role-name>user</role-name>
  </security-role>
  
  <security-constraint>
  	<web-resource-collection>
  		<web-resource-name>Areas with authentication required</web-resource-name>
  		<url-pattern>/protected/*</url-pattern>
  		<http-method>GET</http-method>
  		<http-method>POST</http-method>
  	</web-resource-collection>
  	<auth-constraint>
  		<role-name>manager</role-name>
  	</auth-constraint>
  </security-constraint>
  
  <env-entry>
     <env-entry-name>org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint.enabled</env-entry-name>
     <env-entry-type>java.lang.String</env-entry-type>
     <env-entry-value>false</env-entry-value>
  </env-entry>
</web-app>