summaryrefslogtreecommitdiffstats
path: root/sparkybe-onap-application
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
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')
-rw-r--r--sparkybe-onap-application/config/portal/BOOT-INF/classes/key.properties1
-rw-r--r--sparkybe-onap-application/config/portal/BOOT-INF/classes/portal.properties14
-rw-r--r--sparkybe-onap-application/config/portal/portal-authentication.properties4
-rw-r--r--sparkybe-onap-application/pom.xml2
-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
6 files changed, 45 insertions, 14 deletions
diff --git a/sparkybe-onap-application/config/portal/BOOT-INF/classes/key.properties b/sparkybe-onap-application/config/portal/BOOT-INF/classes/key.properties
new file mode 100644
index 0000000..2b7b95f
--- /dev/null
+++ b/sparkybe-onap-application/config/portal/BOOT-INF/classes/key.properties
@@ -0,0 +1 @@
+cipher.enc.key=AGLDdG4D04BKm2IxIWEr8o==! \ No newline at end of file
diff --git a/sparkybe-onap-application/config/portal/BOOT-INF/classes/portal.properties b/sparkybe-onap-application/config/portal/BOOT-INF/classes/portal.properties
index ca6b34b..ae86ac6 100644
--- a/sparkybe-onap-application/config/portal/BOOT-INF/classes/portal.properties
+++ b/sparkybe-onap-application/config/portal/BOOT-INF/classes/portal.properties
@@ -13,9 +13,19 @@ ecomp_redirect_url=<%= @ECOMP_REDIRECT_URL %>
# CSP settings
csp_cookie_name=<%= @CSP_COOKIE_NAME %>
# Alternate values: DEVL, V_DEVL, V_PROD
-csp_gate_keeper_prod_key=PROD
+csp_gate_keeper_prod_key = PROD
# No use of UEB; however, this key is used to identify the app.
ueb_listeners_enable=false
# cl778h demo app
-ueb_app_key=<%= @UEB_APP_KEY %> \ No newline at end of file
+ueb_app_key=<%= @UEB_APP_KEY %>
+
+# Use this tag if the app is centralized
+role_access_centralized = <%= @ROLE_ACCESS_CENTRALIZED %>
+
+# Connection and Read timeout values
+ext_req_connection_timeout = <%= @PORTAL_CONNECTION_TIMEOUT %>
+ext_req_read_timeout = <%= @PORTAL_READ_TIMEOUT %>
+
+#Add AAF namespace if the app is centralized
+aaf_namespace = <%= @AAF_NAMESPACE %>
diff --git a/sparkybe-onap-application/config/portal/portal-authentication.properties b/sparkybe-onap-application/config/portal/portal-authentication.properties
index a49cc69..41c25a6 100644
--- a/sparkybe-onap-application/config/portal/portal-authentication.properties
+++ b/sparkybe-onap-application/config/portal/portal-authentication.properties
@@ -1,3 +1,5 @@
username=admin
password=OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10
-onap_enabled=true \ No newline at end of file
+onap_enabled=true
+onap.user_id_cookie_name=UserId
+cookie_decryptor_classname=org.onap.aai.sparky.security.BaseCookieDecryptor \ No newline at end of file
diff --git a/sparkybe-onap-application/pom.xml b/sparkybe-onap-application/pom.xml
index c2fb53c..d342725 100644
--- a/sparkybe-onap-application/pom.xml
+++ b/sparkybe-onap-application/pom.xml
@@ -272,7 +272,7 @@
<dependency>
<groupId>org.onap.portal.sdk</groupId>
<artifactId>epsdk-fw</artifactId>
- <version>1.3.0 </version>
+ <version>2.5.0-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
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