summaryrefslogtreecommitdiffstats
path: root/sparkybe-onap-application/src/main
diff options
context:
space:
mode:
authorrenealr <reneal.rogers@amdocs.com>2018-11-29 14:03:36 -0500
committerrenealr <reneal.rogers@amdocs.com>2018-11-29 15:53:48 -0500
commitc77d4200369b9514d9731cbdcaa987943a36346d (patch)
tree94f0d1c262752f1d771dd0ec07f7ce07694def2f /sparkybe-onap-application/src/main
parent5e4b48acc875f88e2958b4469cb889222ca2f11c (diff)
update to use latest portal sdk
update epsdk-fw to latest version to make use of aaf Issue-ID: AAI-1978 Change-Id: I9cd9a4ec57db5183c95b0606cac0e1fdfd1a6ac5 Signed-off-by: renealr <reneal.rogers@amdocs.com>
Diffstat (limited to 'sparkybe-onap-application/src/main')
-rw-r--r--sparkybe-onap-application/src/main/java/org/onap/aai/sparky/portal/PortalBean.java33
-rw-r--r--sparkybe-onap-application/src/main/scripts/start.sh5
2 files changed, 28 insertions, 10 deletions
diff --git a/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/portal/PortalBean.java b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/portal/PortalBean.java
index 86f019e..4443443 100644
--- a/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/portal/PortalBean.java
+++ b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/portal/PortalBean.java
@@ -3,7 +3,8 @@ package org.onap.aai.sparky.portal;
import javax.servlet.Filter;
import org.onap.aai.sparky.security.filter.LoginFilter;
-import org.openecomp.portalsdk.core.onboarding.crossapi.PortalRestAPIProxy;
+import org.onap.portalsdk.core.onboarding.crossapi.CadiAuthFilter;
+import org.onap.portalsdk.core.onboarding.crossapi.PortalRestAPIProxy;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
@@ -13,27 +14,45 @@ import org.springframework.stereotype.Component;
@Component
@Profile("portal")
public class PortalBean {
-
+
private Filter loginFilter = new LoginFilter();
-
+ private Filter cadiAuthFilter = new CadiAuthFilter();
+
/**
* bind LoginFilter
*/
@Bean
public FilterRegistrationBean loginFilterRegistrationBean() {
FilterRegistrationBean registration = new FilterRegistrationBean();
-
registration.setFilter(loginFilter);
registration.addUrlPatterns("/*");
-
+ registration.setOrder(1);
+
return registration;
}
+ /**
+ * bind CadiAuthFilter
+ */
+ @Bean
+ public FilterRegistrationBean cadiFilterRegistrationBean() {
+ FilterRegistrationBean registration = new FilterRegistrationBean();
+
+ registration.setFilter(cadiAuthFilter);
+ registration.addUrlPatterns("/*");
+ registration.setOrder(0);
+ registration.addInitParameter("cadi_prop_files","/opt/app/sparky/resources/portal/cadi.properties");
+ registration.addInitParameter("inlclude_url_endpoints","/api/v3/*");
+ registration.addInitParameter("exclude_url_endpoints","/api/v2/*");
+
+ return registration;
+ }
+
@Bean
public ServletRegistrationBean portalApiProxy() {
-
+
final ServletRegistrationBean servlet =
- new ServletRegistrationBean(new PortalRestAPIProxy(), "/api/v2/*");
+ new ServletRegistrationBean(new PortalRestAPIProxy(), "/api/v3/*");
servlet.setName("PortalRestApiProxy");
return servlet;
}
diff --git a/sparkybe-onap-application/src/main/scripts/start.sh b/sparkybe-onap-application/src/main/scripts/start.sh
index c16c9b2..8369d6c 100644
--- a/sparkybe-onap-application/src/main/scripts/start.sh
+++ b/sparkybe-onap-application/src/main/scripts/start.sh
@@ -6,12 +6,11 @@ CONFIG_HOME=${APP_HOME}/config
PROPS="-DAPP_HOME=${APP_HOME} -DCONFIG_HOME=${CONFIG_HOME} -Dlogging.config=${CONFIG_HOME}/logging/logback.xml"
set -x
-jar ufv ${APP_HOME}/lib/sparkybe-onap-application*.jar -C ${CONFIG_HOME}/portal/ BOOT-INF/classes/portal.properties
+jar ufv ${APP_HOME}/lib/sparkybe-onap-application*.jar -C ${CONFIG_HOME}/portal/ BOOT-INF/classes/portal.properties -C ${CONFIG_HOME}/portal/ BOOT-INF/classes/key.properties
#
# change the working directory so that Spring-Boot will pick up the config folder from the right path
#
cd $APP_HOME
-java -Xms1024m -Xmx4096m $PROPS -jar ${APP_HOME}/lib/sparkybe-onap-application*.jar
-
+java -Xms1024m -Xmx4096m $PROPS -jar ${APP_HOME}/lib/sparkybe-onap-application*.jar \ No newline at end of file