Disable authorization for /util/echo 85/67085/4
authorKajur, Harish (vk250x) <vk250x@att.com>
Mon, 17 Sep 2018 19:13:40 +0000 (15:13 -0400)
committerKajur, Harish (vk250x) <vk250x@att.com>
Tue, 18 Sep 2018 13:46:02 +0000 (09:46 -0400)
Issue-ID: AAI-1612
Change-Id: I261d0bdf005d696a825f18624059a2e5abf395fc
Signed-off-by: Kajur, Harish (vk250x) <vk250x@att.com>
pom.xml
src/main/java/org/onap/aai/interceptors/pre/OneWaySslAuthorization.java

diff --git a/pom.xml b/pom.xml
index f9b9232..4aa3bcd 100755 (executable)
--- a/pom.xml
+++ b/pom.xml
         <netty.version>4.0.37.Final</netty.version>
 
         <spring.test.version>4.3.6.RELEASE</spring.test.version>
-        <spring.web.version>4.3.6.RELEASE</spring.web.version>
 
         <cxf.version>3.2.2</cxf.version>
 
                     <groupId>org.apache.cxf</groupId>
                     <artifactId>cxf-core</artifactId>
                 </exclusion>
+                <exclusion>
+                    <groupId>org.eclipse.jetty</groupId>
+                    <artifactId>jetty-http</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.eclipse.jetty</groupId>
+                    <artifactId>jetty-server</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.springframework</groupId>
+                    <artifactId>spring-web</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.codehaus.jackson</groupId>
+                    <artifactId>jackson-mapper-asl</artifactId>
+                </exclusion>
             </exclusions>
         </dependency>
         <dependency>
             <groupId>com.sun.jersey</groupId>
             <artifactId>jersey-json</artifactId>
             <version>1.18</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.codehaus.jackson</groupId>
+                    <artifactId>jackson-mapper-asl</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <!-- Do not use the jersey-client since jersey client 1.0 version clashes
             with jersey 2 which we are using -->
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-jersey</artifactId>
         </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-web</artifactId>
-            <version>${spring.web.version}</version>
-        </dependency>
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-test</artifactId>
             <plugin>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
+                <!-- 
+                  Issue with the spring 1.5.15.RELEASE plugin is causing build errors
+                  due to the fact that the plugin 1.5.15.RELEASE was built using maven 3.5 while
+                  the current build version being used by our jenkins is 3.3.9
+                -->
+                <version>1.5.12.RELEASE</version>
                 <configuration>
                     <mainClass>${start-class}</mainClass>
                     <layout>ZIP</layout>
index 6563e23..b9fc978 100644 (file)
@@ -52,6 +52,10 @@ public class OneWaySslAuthorization extends AAIContainerFilter implements Contai
     public void filter(ContainerRequestContext containerRequestContext) throws IOException
     {
 
+        if(containerRequestContext.getUriInfo().getRequestUri().getPath().matches("^.*/util/echo$")){
+            return;
+        }
+
         String basicAuth = containerRequestContext.getHeaderString("Authorization");
         List<MediaType> acceptHeaderValues = containerRequestContext.getAcceptableMediaTypes();