From 1e3c9bde6ceb3920aa1695d59e6f677510ca649c Mon Sep 17 00:00:00 2001 From: "Kajur, Harish (vk250x)" Date: Mon, 17 Sep 2018 15:13:40 -0400 Subject: [PATCH] Disable authorization for /util/echo Issue-ID: AAI-1612 Change-Id: I261d0bdf005d696a825f18624059a2e5abf395fc Signed-off-by: Kajur, Harish (vk250x) --- pom.xml | 34 ++++++++++++++++++---- .../interceptors/pre/OneWaySslAuthorization.java | 4 +++ 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index f9b9232..4aa3bcd 100755 --- a/pom.xml +++ b/pom.xml @@ -107,7 +107,6 @@ 4.0.37.Final 4.3.6.RELEASE - 4.3.6.RELEASE 3.2.2 @@ -535,6 +534,22 @@ org.apache.cxf cxf-core + + org.eclipse.jetty + jetty-http + + + org.eclipse.jetty + jetty-server + + + org.springframework + spring-web + + + org.codehaus.jackson + jackson-mapper-asl + @@ -546,6 +561,12 @@ com.sun.jersey jersey-json 1.18 + + + org.codehaus.jackson + jackson-mapper-asl + + @@ -608,11 +629,6 @@ org.springframework.boot spring-boot-starter-jersey - - org.springframework - spring-web - ${spring.web.version} - org.springframework spring-test @@ -977,6 +993,12 @@ org.springframework.boot spring-boot-maven-plugin + + 1.5.12.RELEASE ${start-class} ZIP diff --git a/src/main/java/org/onap/aai/interceptors/pre/OneWaySslAuthorization.java b/src/main/java/org/onap/aai/interceptors/pre/OneWaySslAuthorization.java index 6563e23..b9fc978 100644 --- a/src/main/java/org/onap/aai/interceptors/pre/OneWaySslAuthorization.java +++ b/src/main/java/org/onap/aai/interceptors/pre/OneWaySslAuthorization.java @@ -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 acceptHeaderValues = containerRequestContext.getAcceptableMediaTypes(); -- 2.16.6