summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-BE-os
diff options
context:
space:
mode:
authorkg811t <kg811t@research.att.com>2018-02-08 13:25:08 -0500
committerkg811t <kg811t@research.att.com>2018-02-08 13:25:08 -0500
commit3aa28e9dd68cce134644223505f326378b5d91a8 (patch)
tree863c98fb341cb86c919b9888dded51c98562a62c /ecomp-portal-BE-os
parent08f55be6a0a9708ceeb176d5e1a0a56f885fad59 (diff)
Added Junits
Issue-ID: PORTAL-136, PORTAL-133, PORTAL-111, PORTAL-19 Includes JUNITS, replacement of openecomp to onap, role centralization changes Change-Id: I95fe9d93ccf22e04f81f52aa7ae8c2b760d8c9c4 Signed-off-by: kg811t <kg811t@research.att.com>
Diffstat (limited to 'ecomp-portal-BE-os')
-rw-r--r--ecomp-portal-BE-os/README.md8
-rw-r--r--ecomp-portal-BE-os/distribution.xml2
-rw-r--r--ecomp-portal-BE-os/pom.xml7
-rw-r--r--ecomp-portal-BE-os/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java2
-rw-r--r--ecomp-portal-BE-os/src/main/java/org/onap/portalapp/conf/HibernateMappingLocations.java2
-rw-r--r--ecomp-portal-BE-os/src/main/java/org/onap/portalapp/controller/LoginController.java3
-rw-r--r--ecomp-portal-BE-os/src/main/java/org/onap/portalapp/scheduler/RegistryAdapter.java2
-rw-r--r--ecomp-portal-BE-os/src/main/java/org/onap/portalapp/service/RemoteWebServiceCallServiceImpl.java2
-rw-r--r--ecomp-portal-BE-os/src/main/resources/logback.xml2
-rw-r--r--ecomp-portal-BE-os/src/main/webapp/WEB-INF/oid-context.xml2
-rw-r--r--ecomp-portal-BE-os/src/test/java/org/onap/portalapp/portal/service/RemoteWebServiceCallServiceImplTest.java8
-rw-r--r--ecomp-portal-BE-os/src/test/java/org/onap/portalapp/portal/service/UserServiceImplTest.java10
12 files changed, 30 insertions, 20 deletions
diff --git a/ecomp-portal-BE-os/README.md b/ecomp-portal-BE-os/README.md
index 0b091f51..adc82857 100644
--- a/ecomp-portal-BE-os/README.md
+++ b/ecomp-portal-BE-os/README.md
@@ -14,16 +14,20 @@ https://www.eclipse.org/m2e-wtp/
## Release Notes
-Version 2.1
+Version 2.2
+- [PORTAL-136] Raise JUnit test coverage ONAP Portal to 50% for Beijing
+- [PORTAL-133] replace ECOMP to ONAP on Contact Us and Get Access page
- [PORTAL-145] Harden code to address SQL injecton, XSS vulnerabilities
- [PORTAL-156] Left menu are showing web analytics items and missing plus icons on Account Details page
- [Portal-148] ONAP Portal Beijing does not accept logins; currently OIDC code is disabled; please check the web.xml
Long term solution is being worked on.
- [Portal-140] Portal role synch error with partner apps
-- [Portal-111] To get Centralized apps on Roles and Role Functions page;
+- [Portal-111] To get Centralized apps on Roles and Role Functions page
Create, Edit and Delete calls for Roles and Role Functions
- [Portal-121] GUI controls overlapping on app onboarding dialog
- [Portal-133] Replace ECOMP wording from contact us page with ONAP
+- [Portal-88] unable to deselect widget on Widget catalog page
+- [Portak-19] Replaced the keyword openecomp to onap
- [Portal-88] Unable to deselect widget on Widget catalog page
- [Portal-111] Centralized Role Management Task(Integration to AAF)
- [PORTAL-157] OpenID connect conflicting with spring security
diff --git a/ecomp-portal-BE-os/distribution.xml b/ecomp-portal-BE-os/distribution.xml
index 6cef2812..220c17b9 100644
--- a/ecomp-portal-BE-os/distribution.xml
+++ b/ecomp-portal-BE-os/distribution.xml
@@ -11,7 +11,7 @@
<directory>${basedir}</directory>
<outputDirectory/>
<excludes>
- <exclude>**/src/org/openecomp/fusion/**</exclude>
+ <exclude>**/src/org/onap/fusion/**</exclude>
<exclude>**/src/openecomp/raptor/**</exclude>
<exclude>**/.settings/**</exclude>
<exclude>**/target/**</exclude>
diff --git a/ecomp-portal-BE-os/pom.xml b/ecomp-portal-BE-os/pom.xml
index f2855b74..52650f91 100644
--- a/ecomp-portal-BE-os/pom.xml
+++ b/ecomp-portal-BE-os/pom.xml
@@ -480,6 +480,13 @@
<artifactId>epsdk-app-common</artifactId>
<version>${epsdk.version}</version>
<type>jar</type>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-beanutils</groupId>
+ <artifactId>commons-beanutils-core</artifactId>
+ </exclusion>
+ </exclusions>
+
</dependency>
<!-- EcompPortal common overlay -->
<dependency>
diff --git a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java
index b6d384d5..06657301 100644
--- a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java
+++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java
@@ -114,7 +114,7 @@ import com.google.gson.Gson;
@Configuration
@EnableWebMvc
-@ComponentScan(basePackages = {"org.onap", "org.openecomp" }, excludeFilters = {
+@ComponentScan(basePackages = {"org.onap"}, excludeFilters = {
@Filter(value = { LogoutController.class, SDKLoginController.class}, type = FilterType.ASSIGNABLE_TYPE) })
@Profile("src")
@EnableAsync
diff --git a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/conf/HibernateMappingLocations.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/conf/HibernateMappingLocations.java
index f340ec35..328d1d9d 100644
--- a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/conf/HibernateMappingLocations.java
+++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/conf/HibernateMappingLocations.java
@@ -55,7 +55,7 @@ public class HibernateMappingLocations implements HibernateMappingLocatable {
@Override
public String[] getPackagesToScan() {
- return new String[] { "org.onap","org.openecomp" };
+ return new String[] { "org.onap" };
}
}
diff --git a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/controller/LoginController.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/controller/LoginController.java
index 273a0b1e..b3019769 100644
--- a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/controller/LoginController.java
+++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/controller/LoginController.java
@@ -130,7 +130,8 @@ public class LoginController extends EPUnRestrictedBaseController implements Log
String loginId = root.get("loginId").textValue();
String password = root.get("password").textValue();
commandBean.setLoginId(loginId);
- commandBean.setLoginPwd(CipherUtil.encrypt(password));
+ commandBean.setLoginPwd(CipherUtil.encryptPKC(password));
+
HashMap additionalParamsMap = new HashMap();
StringBuilder sbAdditionalInfo = new StringBuilder();
diff --git a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/scheduler/RegistryAdapter.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/scheduler/RegistryAdapter.java
index 82120e1c..559a182d 100644
--- a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/scheduler/RegistryAdapter.java
+++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/scheduler/RegistryAdapter.java
@@ -50,7 +50,7 @@ import org.springframework.stereotype.Component;
/**
* TODO REFACTOR moved from org.onap.portalsdk.core.scheduler to
- * org.openecomp.portalapp.scheduler
+ * org.onap.portalapp.scheduler
*
*/
@Component
diff --git a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/service/RemoteWebServiceCallServiceImpl.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/service/RemoteWebServiceCallServiceImpl.java
index f3377055..271df279 100644
--- a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/service/RemoteWebServiceCallServiceImpl.java
+++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/service/RemoteWebServiceCallServiceImpl.java
@@ -59,7 +59,7 @@ public class RemoteWebServiceCallServiceImpl extends WebServiceCallServiceImpl i
/*
* (non-Javadoc)
- * @see org.openecomp.portalapp.service.sessionmgt.RemoteWebServiceCallService#verifyRESTCredential(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
+ * @see org.onap.portalapp.service.sessionmgt.RemoteWebServiceCallService#verifyRESTCredential(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
*/
public boolean verifyRESTCredential(String secretKey, String requestUebKey, String requestAppName,
String requestPassword) throws Exception {
diff --git a/ecomp-portal-BE-os/src/main/resources/logback.xml b/ecomp-portal-BE-os/src/main/resources/logback.xml
index d1efbe28..bec4aec1 100644
--- a/ecomp-portal-BE-os/src/main/resources/logback.xml
+++ b/ecomp-portal-BE-os/src/main/resources/logback.xml
@@ -117,7 +117,7 @@
<encoder>
<pattern>${applicationLoggerPattern}</pattern>
</encoder>
- <filter class="org.openecomp.portalapp.portal.utils.CustomLoggingFilter" />
+ <filter class="org.onap.portalapp.portal.utils.CustomLoggingFilter" />
</appender>
<appender name="asyncEELF" class="ch.qos.logback.classic.AsyncAppender">
diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/oid-context.xml b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/oid-context.xml
index 119f9e54..2aa4c354 100644
--- a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/oid-context.xml
+++ b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/oid-context.xml
@@ -85,7 +85,7 @@
<property name="suffix" value=".jsp" />
</bean>
- <context:component-scan base-package="org.openecomp.portalapp.security.openid.controllers" />
+ <context:component-scan base-package="org.onap.portalapp.security.openid.controllers" />
<security:global-method-security pre-post-annotations="enabled" proxy-target-class="true" authentication-manager-ref="authenticationManager"/>
diff --git a/ecomp-portal-BE-os/src/test/java/org/onap/portalapp/portal/service/RemoteWebServiceCallServiceImplTest.java b/ecomp-portal-BE-os/src/test/java/org/onap/portalapp/portal/service/RemoteWebServiceCallServiceImplTest.java
index ad208f39..c903d12c 100644
--- a/ecomp-portal-BE-os/src/test/java/org/onap/portalapp/portal/service/RemoteWebServiceCallServiceImplTest.java
+++ b/ecomp-portal-BE-os/src/test/java/org/onap/portalapp/portal/service/RemoteWebServiceCallServiceImplTest.java
@@ -37,7 +37,8 @@
*/
package org.onap.portalapp.portal.service;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
import java.util.ArrayList;
import java.util.List;
@@ -45,7 +46,6 @@ import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.onap.portalsdk.core.util.SystemProperties;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -55,11 +55,10 @@ import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import org.onap.portalapp.portal.domain.EPApp;
import org.onap.portalapp.portal.framework.MockitoTestSuite;
-import org.onap.portalapp.portal.service.AppsCacheService;
-import org.onap.portalapp.portal.utils.EcompPortalUtils;
import org.onap.portalapp.service.RemoteWebServiceCallServiceImpl;
import org.onap.portalsdk.core.onboarding.util.CipherUtil;
import org.onap.portalsdk.core.service.DataAccessService;
+import org.onap.portalsdk.core.util.SystemProperties;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
@@ -77,7 +76,6 @@ public class RemoteWebServiceCallServiceImplTest {
@Mock
DataAccessService dataAccessService;
-
@Before
public void setup() {
diff --git a/ecomp-portal-BE-os/src/test/java/org/onap/portalapp/portal/service/UserServiceImplTest.java b/ecomp-portal-BE-os/src/test/java/org/onap/portalapp/portal/service/UserServiceImplTest.java
index f4afb0fe..934d848b 100644
--- a/ecomp-portal-BE-os/src/test/java/org/onap/portalapp/portal/service/UserServiceImplTest.java
+++ b/ecomp-portal-BE-os/src/test/java/org/onap/portalapp/portal/service/UserServiceImplTest.java
@@ -36,7 +36,7 @@
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
package org.onap.portalapp.portal.service;
-//package org.openecomp.portalapp.portal.service;
+//package org.onap.portalapp.portal.service;
//
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
@@ -48,10 +48,10 @@ package org.onap.portalapp.portal.service;
//import org.mockito.Mock;
//import org.mockito.Mockito;
//import org.mockito.MockitoAnnotations;
-//import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
-//import org.openecomp.portalapp.portal.utils.EPSystemProperties;
-//import org.openecomp.portalsdk.core.service.DataAccessService;
-//import org.openecomp.portalsdk.core.util.SystemProperties;
+//import org.onap.portalapp.portal.framework.MockitoTestSuite;
+//import org.onap.portalapp.portal.utils.EPSystemProperties;
+//import org.onap.portalsdk.core.service.DataAccessService;
+//import org.onap.portalsdk.core.util.SystemProperties;
//import org.powermock.api.mockito.PowerMockito;
//
//import java.io.BufferedReader;