Bug 2321 - Adding Authentication to IdmLight API 92/21892/1
authorWojciech Dec <wdec@cisco.com>
Thu, 4 Jun 2015 17:37:53 +0000 (19:37 +0200)
committerWojciech Dec <wdec@cisco.com>
Thu, 4 Jun 2015 17:37:53 +0000 (19:37 +0200)
Change-Id: I6197c4e518202e9d285958df741228a1dec268ad
Signed-off-by: Wojciech Dec <wdec@cisco.com>
aaa-idmlight/src/main/resources/WEB-INF/web.xml

index 7f727046638cf80b0d77bde8ce259eb8d77a4f97..a86497724bf46d7f41cf99dcf20c61f63e8a87c0 100644 (file)
         </init-param>
         <init-param>
            <param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name><param-value>true</param-value>
-        </init-param>       
+        </init-param>
+        <init-param>
+            <param-name>com.sun.jersey.spi.container.ContainerRequestFilters</param-name>
+            <param-value> org.opendaylight.aaa.sts.TokenAuthFilter</param-value>
+        </init-param>
         <load-on-startup>1</load-on-startup>
     </servlet>
     <servlet-mapping>
         <servlet-name>IdmLight</servlet-name>
         <url-pattern>/*</url-pattern>
     </servlet-mapping>
-    
+
     <filter>
         <filter-name>cross-origin-restconf</filter-name>
         <filter-class>org.eclipse.jetty.servlets.CrossOriginFilter</filter-class>
         <url-pattern>/*</url-pattern>
     </filter-mapping>
 
+    <security-constraint>
+        <web-resource-collection>
+            <web-resource-name>NB api</web-resource-name>
+            <url-pattern>/*</url-pattern>
+            <http-method>POST</http-method>
+            <http-method>GET</http-method>
+            <http-method>PUT</http-method>
+            <http-method>PATCH</http-method>
+            <http-method>DELETE</http-method>
+            <http-method>HEAD</http-method>
+        </web-resource-collection>
+    </security-constraint>
+
 </web-app>