← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19489: reorganized oauth2 components, moved into its own module (dhis-web-uaa), needed since spring-sec-...

 

------------------------------------------------------------
revno: 19489
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-06-22 17:11:42 +0700
message:
  reorganized oauth2 components, moved into its own module (dhis-web-uaa), needed since spring-sec-oauth2 assumes a very different spring mvc setup (its included controllers depend on view resolvers etc), means you need to access /uaa/oauth/* for oauth2 instead of /api/oauth/*
added:
  dhis-2/dhis-web/dhis-web-uaa/
  dhis-2/dhis-web/dhis-web-uaa/pom.xml
  dhis-2/dhis-web/dhis-web-uaa/src/
  dhis-2/dhis-web/dhis-web-uaa/src/main/
  dhis-2/dhis-web/dhis-web-uaa/src/main/java/
  dhis-2/dhis-web/dhis-web-uaa/src/main/java/org/
  dhis-2/dhis-web/dhis-web-uaa/src/main/java/org/hisp/
  dhis-2/dhis-web/dhis-web-uaa/src/main/java/org/hisp/dhis/
  dhis-2/dhis-web/dhis-web-uaa/src/main/java/org/hisp/dhis/web/
  dhis-2/dhis-web/dhis-web-uaa/src/main/java/org/hisp/dhis/web/uaa/
  dhis-2/dhis-web/dhis-web-uaa/src/main/java/org/hisp/dhis/web/uaa/oauth2/
  dhis-2/dhis-web/dhis-web-uaa/src/main/resources/
  dhis-2/dhis-web/dhis-web-uaa/src/main/resources/META-INF/
  dhis-2/dhis-web/dhis-web-uaa/src/main/resources/META-INF/dhis/
  dhis-2/dhis-web/dhis-web-uaa/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-uaa/src/main/resources/META-INF/dhis/webapi-uaa.xml
  dhis-2/dhis-web/dhis-web-uaa/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-uaa/src/main/webapp/
  dhis-2/dhis-web/dhis-web-uaa/src/main/webapp/WEB-INF/
  dhis-2/dhis-web/dhis-web-uaa/src/main/webapp/WEB-INF/classes/
  dhis-2/dhis-web/dhis-web-uaa/src/main/webapp/WEB-INF/classes/velocity.properties
  dhis-2/dhis-web/dhis-web-uaa/src/main/webapp/WEB-INF/uaa/
  dhis-2/dhis-web/dhis-web-uaa/src/main/webapp/WEB-INF/web.xml
  dhis-2/dhis-web/dhis-web-uaa/src/test/
  dhis-2/dhis-web/dhis-web-uaa/src/test/java/
  dhis-2/dhis-web/dhis-web-uaa/src/test/resources/
modified:
  dhis-2/dhis-web/dhis-web-api/src/main/resources/META-INF/dhis/servlet.xml
  dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml
  dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java
  dhis-2/dhis-web/dhis-web-portal/pom.xml
  dhis-2/dhis-web/dhis-web-portal/src/main/webapp/WEB-INF/web.xml
  dhis-2/dhis-web/pom.xml


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/META-INF/dhis/servlet.xml'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/META-INF/dhis/servlet.xml	2015-06-21 12:44:37 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/META-INF/dhis/servlet.xml	2015-06-22 10:11:42 +0000
@@ -3,11 +3,11 @@
   xmlns="http://www.springframework.org/schema/beans";
   xmlns:context="http://www.springframework.org/schema/context";
   xmlns:mvc="http://www.springframework.org/schema/mvc";
-  xmlns:sec="http://www.springframework.org/schema/security"; xmlns:oauth="http://www.springframework.org/schema/security/oauth2";
+  xmlns:sec="http://www.springframework.org/schema/security";
   xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.1.xsd
     http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
     http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.2.xsd
-    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2.xsd";>
+    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd";>
 
   <sec:global-method-security pre-post-annotations="enabled" />
 
@@ -135,16 +135,5 @@
         <bean class="org.hisp.dhis.webapi.view.CsvGridView" />
       </list>
     </property>
-
   </bean>
-
-  <!-- OAuth2 -->
-  <oauth:authorization-server client-details-service-ref="clientDetailsService" token-services-ref="tokenServices">
-    <oauth:authorization-code />
-    <oauth:implicit />
-    <oauth:refresh-token />
-    <oauth:password authentication-manager-ref="authenticationManager" />
-  </oauth:authorization-server>
-  <!-- End OAuth2 -->
-
 </beans>

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml	2015-06-21 12:44:37 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml	2015-06-22 10:11:42 +0000
@@ -18,8 +18,8 @@
 
   <oauth:resource-server id="resourceServerFilter" token-services-ref="tokenServices" entry-point-ref="oauthAuthenticationEntryPoint" />
 
-  <sec:http pattern="/api/oauth/**" create-session="stateless" authentication-manager-ref="clientAuthenticationManager">
-    <sec:intercept-url pattern="/api/oauth/**" access="IS_AUTHENTICATED_FULLY" />
+  <sec:http pattern="/uaa/oauth/token/**" create-session="stateless" authentication-manager-ref="clientAuthenticationManager">
+    <sec:intercept-url pattern="/uaa/oauth/token/**" access="IS_AUTHENTICATED_FULLY" />
     <sec:anonymous enabled="false" />
     <sec:http-basic entry-point-ref="oauthAuthenticationEntryPoint" />
     <sec:custom-filter ref="clientCredentialsTokenEndpointFilter" before="BASIC_AUTH_FILTER" />

=== modified file 'dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java'
--- dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java	2015-06-22 10:11:42 +0000
@@ -89,7 +89,6 @@
 @RequestMapping(value = "/csd")
 public class CsdController
 {
-
     private static final String SOAP_CONTENT_TYPE = "application/soap+xml";
 
     // Name of group all facilities belong to

=== modified file 'dhis-2/dhis-web/dhis-web-portal/pom.xml'
--- dhis-2/dhis-web/dhis-web-portal/pom.xml	2015-06-11 18:44:52 +0000
+++ dhis-2/dhis-web/dhis-web-portal/pom.xml	2015-06-22 10:11:42 +0000
@@ -56,6 +56,12 @@
       <version>${project.version}</version>
       <type>war</type>
     </dependency>
+    <dependency>
+      <groupId>org.hisp.dhis</groupId>
+      <artifactId>dhis-web-uaa</artifactId>
+      <version>${project.version}</version>
+      <type>war</type>
+    </dependency>
 
     <!-- Web maintenance modules -->
 

=== modified file 'dhis-2/dhis-web/dhis-web-portal/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-portal/src/main/webapp/WEB-INF/web.xml	2015-02-26 08:12:03 +0000
+++ dhis-2/dhis-web/dhis-web-portal/src/main/webapp/WEB-INF/web.xml	2015-06-22 10:11:42 +0000
@@ -93,6 +93,14 @@
     <url-pattern>/ohie/*</url-pattern>
   </filter-mapping>
   <filter-mapping>
+    <filter-name>hiddenHttpMethodFilter</filter-name>
+    <url-pattern>/uaa/*</url-pattern>
+  </filter-mapping>
+  <filter-mapping>
+    <filter-name>OpenSessionInViewFilter</filter-name>
+    <url-pattern>/uaa/*</url-pattern>
+  </filter-mapping>
+  <filter-mapping>
     <filter-name>OpenSessionInViewFilter</filter-name>
     <url-pattern>/mobile/*</url-pattern>
   </filter-mapping>
@@ -136,8 +144,9 @@
     </init-param>
     <load-on-startup>1</load-on-startup>
   </servlet>
+
   <servlet>
-    <servlet-name>ohie</servlet-name>
+    <servlet-name>ohieServlet</servlet-name>
     <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
     <init-param>
       <param-name>contextConfigLocation</param-name>
@@ -146,6 +155,16 @@
     <load-on-startup>1</load-on-startup>
   </servlet>
 
+  <servlet>
+    <servlet-name>uaaServlet</servlet-name>
+    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+    <init-param>
+      <param-name>contextConfigLocation</param-name>
+      <param-value>classpath*:/META-INF/dhis/webapi-uaa.xml</param-value>
+    </init-param>
+    <load-on-startup>1</load-on-startup>
+  </servlet>
+
   <servlet-mapping>
     <servlet-name>mobile</servlet-name>
     <url-pattern>/mobile</url-pattern>
@@ -163,12 +182,20 @@
     <url-pattern>/api/*</url-pattern>
   </servlet-mapping>
   <servlet-mapping>
-    <servlet-name>ohie</servlet-name>
+    <servlet-name>ohieServlet</servlet-name>
     <url-pattern>/ohie</url-pattern>
   </servlet-mapping>
   <servlet-mapping>
-    <servlet-name>ohie</servlet-name>
+    <servlet-name>ohieServlet</servlet-name>
     <url-pattern>/ohie/*</url-pattern>
   </servlet-mapping>
+  <servlet-mapping>
+    <servlet-name>uaaServlet</servlet-name>
+    <url-pattern>/uaa</url-pattern>
+  </servlet-mapping>
+  <servlet-mapping>
+    <servlet-name>uaaServlet</servlet-name>
+    <url-pattern>/uaa/*</url-pattern>
+  </servlet-mapping>
 
 </web-app>

=== added directory 'dhis-2/dhis-web/dhis-web-uaa'
=== added file 'dhis-2/dhis-web/dhis-web-uaa/pom.xml'
--- dhis-2/dhis-web/dhis-web-uaa/pom.xml	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-uaa/pom.xml	2015-06-22 10:11:42 +0000
@@ -0,0 +1,62 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.hisp.dhis</groupId>
+    <artifactId>dhis-web</artifactId>
+    <version>2.20-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>dhis-web-uaa</artifactId>
+  <packaging>war</packaging>
+  <name>User Account and Authentication (UAA) Server</name>
+
+  <build>
+    <finalName>dhis-web-uaa</finalName>
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.hisp.dhis</groupId>
+      <artifactId>dhis-web-commons</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.hisp.dhis</groupId>
+      <artifactId>dhis-web-commons-resources</artifactId>
+      <type>war</type>
+      <optional>true</optional>
+    </dependency>
+    <dependency>
+      <groupId>org.hisp.dhis</groupId>
+      <artifactId>dhis-web-api</artifactId>
+      <optional>true</optional>
+    </dependency>
+
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-web</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-webmvc</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-context</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-context-support</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>servlet-api</artifactId>
+    </dependency>
+  </dependencies>
+
+  <properties>
+    <rootDir>../../</rootDir>
+  </properties>
+</project>

=== added directory 'dhis-2/dhis-web/dhis-web-uaa/src'
=== added directory 'dhis-2/dhis-web/dhis-web-uaa/src/main'
=== added directory 'dhis-2/dhis-web/dhis-web-uaa/src/main/java'
=== added directory 'dhis-2/dhis-web/dhis-web-uaa/src/main/java/org'
=== added directory 'dhis-2/dhis-web/dhis-web-uaa/src/main/java/org/hisp'
=== added directory 'dhis-2/dhis-web/dhis-web-uaa/src/main/java/org/hisp/dhis'
=== added directory 'dhis-2/dhis-web/dhis-web-uaa/src/main/java/org/hisp/dhis/web'
=== added directory 'dhis-2/dhis-web/dhis-web-uaa/src/main/java/org/hisp/dhis/web/uaa'
=== added directory 'dhis-2/dhis-web/dhis-web-uaa/src/main/java/org/hisp/dhis/web/uaa/oauth2'
=== added directory 'dhis-2/dhis-web/dhis-web-uaa/src/main/resources'
=== added directory 'dhis-2/dhis-web/dhis-web-uaa/src/main/resources/META-INF'
=== added directory 'dhis-2/dhis-web/dhis-web-uaa/src/main/resources/META-INF/dhis'
=== added file 'dhis-2/dhis-web/dhis-web-uaa/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-uaa/src/main/resources/META-INF/dhis/beans.xml	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-uaa/src/main/resources/META-INF/dhis/beans.xml	2015-06-22 10:11:42 +0000
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans";
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:context="http://www.springframework.org/schema/context";
+  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
+  http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd";>
+
+</beans>

=== added file 'dhis-2/dhis-web/dhis-web-uaa/src/main/resources/META-INF/dhis/webapi-uaa.xml'
--- dhis-2/dhis-web/dhis-web-uaa/src/main/resources/META-INF/dhis/webapi-uaa.xml	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-uaa/src/main/resources/META-INF/dhis/webapi-uaa.xml	2015-06-22 10:11:42 +0000
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xmlns="http://www.springframework.org/schema/beans";
+  xmlns:sec="http://www.springframework.org/schema/security"; xmlns:context="http://www.springframework.org/schema/context"; xmlns:mvc="http://www.springframework.org/schema/mvc"; xmlns:oauth="http://www.springframework.org/schema/security/oauth2";
+  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
+    http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.2.xsd
+    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd
+    http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.1.xsd
+    http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2.xsd";>
+
+  <sec:global-method-security pre-post-annotations="enabled" />
+
+  <bean id="velocityConfig" class="org.springframework.web.servlet.view.velocity.VelocityConfigurer">
+    <property name="resourceLoaderPath" value="/WEB-INF/uaa/" />
+  </bean>
+
+  <bean id="viewResolver" class="org.springframework.web.servlet.view.velocity.VelocityViewResolver">
+    <property name="cache" value="true" />
+    <property name="prefix" value="" />
+    <property name="suffix" value=".vm" />
+  </bean>
+
+  <context:annotation-config />
+
+  <mvc:annotation-driven />
+
+  <context:component-scan base-package="org.hisp.dhis.web.uaa" />
+
+  <!-- OAuth2 -->
+  <oauth:authorization-server client-details-service-ref="clientDetailsService" token-services-ref="tokenServices">
+    <oauth:authorization-code />
+    <oauth:refresh-token />
+    <oauth:password authentication-manager-ref="authenticationManager" />
+  </oauth:authorization-server>
+  <!-- End OAuth2 -->
+
+</beans>

=== added file 'dhis-2/dhis-web/dhis-web-uaa/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-uaa/src/main/resources/struts.xml	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-uaa/src/main/resources/struts.xml	2015-06-22 10:11:42 +0000
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE struts PUBLIC
+  "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
+  "http://struts.apache.org/dtds/struts-2.0.dtd";>
+<struts>
+  <include file="dhis-web-commons.xml" />
+
+  <package name="dhis-web-uaa" extends="dhis-web-commons" namespace="/uaa">
+  </package>
+
+</struts>

=== added directory 'dhis-2/dhis-web/dhis-web-uaa/src/main/webapp'
=== added directory 'dhis-2/dhis-web/dhis-web-uaa/src/main/webapp/WEB-INF'
=== added directory 'dhis-2/dhis-web/dhis-web-uaa/src/main/webapp/WEB-INF/classes'
=== added file 'dhis-2/dhis-web/dhis-web-uaa/src/main/webapp/WEB-INF/classes/velocity.properties'
--- dhis-2/dhis-web/dhis-web-uaa/src/main/webapp/WEB-INF/classes/velocity.properties	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-uaa/src/main/webapp/WEB-INF/classes/velocity.properties	2015-06-22 10:11:42 +0000
@@ -0,0 +1,3 @@
+resource.loader = dev
+dev.resource.loader.class = org.apache.velocity.runtime.resource.loader.FileResourceLoader
+dev.resource.loader.path = src/main/webapp,../dhis-web-commons-resources/src/main/webapp
\ No newline at end of file

=== added directory 'dhis-2/dhis-web/dhis-web-uaa/src/main/webapp/WEB-INF/uaa'
=== added file 'dhis-2/dhis-web/dhis-web-uaa/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-uaa/src/main/webapp/WEB-INF/web.xml	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-uaa/src/main/webapp/WEB-INF/web.xml	2015-06-22 10:11:42 +0000
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+  "http://java.sun.com/dtd/web-app_2_3.dtd";>
+<web-app>
+  <display-name>User Account and Authentication (UAA) Server</display-name>
+
+  <context-param>
+    <param-name>contextConfigLocation</param-name>
+    <param-value>classpath*:/META-INF/dhis/beans.xml</param-value>
+  </context-param>
+
+  <filter>
+    <filter-name>OpenSessionInViewFilter</filter-name>
+    <filter-class>org.springframework.orm.hibernate4.support.OpenSessionInViewFilter</filter-class>
+  </filter>
+  <filter>
+    <filter-name>springSecurityFilterChain</filter-name>
+    <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
+  </filter>
+  <filter>
+    <filter-name>Struts</filter-name>
+    <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
+  </filter>
+  <filter>
+    <filter-name>encodingFilter</filter-name>
+    <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
+    <init-param>
+      <param-name>encoding</param-name>
+      <param-value>UTF-8</param-value>
+    </init-param>
+    <init-param>
+      <param-name>forceEncoding</param-name>
+      <param-value>true</param-value>
+    </init-param>
+  </filter>
+
+  <filter-mapping>
+    <filter-name>encodingFilter</filter-name>
+    <url-pattern>/*</url-pattern>
+  </filter-mapping>
+  <filter-mapping>
+    <filter-name>OpenSessionInViewFilter</filter-name>
+    <url-pattern>*.action</url-pattern>
+  </filter-mapping>
+  <filter-mapping>
+    <filter-name>OpenSessionInViewFilter</filter-name>
+    <url-pattern>/api/*</url-pattern>
+  </filter-mapping>
+  <filter-mapping>
+    <filter-name>springSecurityFilterChain</filter-name>
+    <url-pattern>/*</url-pattern>
+  </filter-mapping>
+  <filter-mapping>
+    <filter-name>Struts</filter-name>
+    <url-pattern>*.action</url-pattern>
+  </filter-mapping>
+
+  <listener>
+    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+  </listener>
+
+  <listener>
+    <listener-class>org.hisp.dhis.system.startup.StartupListener</listener-class>
+  </listener>
+
+  <servlet>
+    <servlet-name>uaaServlet</servlet-name>
+    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+    <init-param>
+      <param-name>contextConfigLocation</param-name>
+      <param-value>classpath*:/META-INF/dhis/webapi-uaa.xml</param-value>
+    </init-param>
+    <load-on-startup>1</load-on-startup>
+  </servlet>
+
+  <servlet>
+    <servlet-name>webapiServlet</servlet-name>
+    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+    <init-param>
+      <param-name>contextConfigLocation</param-name>
+      <param-value>classpath*:/META-INF/dhis/servlet.xml</param-value>
+    </init-param>
+    <load-on-startup>1</load-on-startup>
+  </servlet>
+
+  <!-- Web API -->
+
+  <servlet-mapping>
+    <servlet-name>uaaServlet</servlet-name>
+    <url-pattern>/uaa</url-pattern>
+  </servlet-mapping>
+  <servlet-mapping>
+    <servlet-name>uaaServlet</servlet-name>
+    <url-pattern>/uaa/*</url-pattern>
+  </servlet-mapping>
+
+  <servlet-mapping>
+    <servlet-name>webapiServlet</servlet-name>
+    <url-pattern>/api</url-pattern>
+  </servlet-mapping>
+  <servlet-mapping>
+    <servlet-name>webapiServlet</servlet-name>
+    <url-pattern>/api/*</url-pattern>
+  </servlet-mapping>
+
+</web-app>

=== added directory 'dhis-2/dhis-web/dhis-web-uaa/src/test'
=== added directory 'dhis-2/dhis-web/dhis-web-uaa/src/test/java'
=== added directory 'dhis-2/dhis-web/dhis-web-uaa/src/test/resources'
=== modified file 'dhis-2/dhis-web/pom.xml'
--- dhis-2/dhis-web/pom.xml	2015-06-02 05:55:14 +0000
+++ dhis-2/dhis-web/pom.xml	2015-06-22 10:11:42 +0000
@@ -17,6 +17,7 @@
     <module>dhis-web-api-mobile</module>
     <module>dhis-web-api</module>
     <module>dhis-web-ohie</module>
+    <module>dhis-web-uaa</module>
     <module>dhis-web-maintenance</module>
     <module>dhis-web-dataentry</module>
     <module>dhis-web-importexport</module>