diff options
author | st782s <statta@research.att.com> | 2018-01-30 17:29:36 -0500 |
---|---|---|
committer | st782s <statta@research.att.com> | 2018-02-01 15:10:02 -0500 |
commit | 21a8761f684745bb300e075c7e98ad897ace9eed (patch) | |
tree | 6d585c3fe39fbb42a314941dbc8646e6ccf188cf /ecomp-portal-BE-os/src/main/java | |
parent | 3af8af1310d5a27cb58be29505573f0bbdc1717c (diff) |
Security/ Package Name changes
Issue-ID: PORTAL-174, PORTAL-157, PORTAL-156, PORTAL-148, PORTAL-145,
PORTAL-140, PORTAL-133, PORTAL-121, PORTAL-111, PORTAL-88
Includes security fixes, Role Centralization, replace certain ECOMP
occurrences etc
Change-Id: I3c8b706709c6b92e646e3cbe50c2d660e8a46ef4
Signed-off-by: st782s <statta@research.att.com>
Diffstat (limited to 'ecomp-portal-BE-os/src/main/java')
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/authentication/LoginStrategy.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/authentication/LoginStrategy.java) | 8 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/authentication/OpenIdConnectLoginStrategy.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/authentication/OpenIdConnectLoginStrategy.java) | 28 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/authentication/SimpleLoginStrategy.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/authentication/SimpleLoginStrategy.java) | 30 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/conf/ExternalAppConfig.java) | 185 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/conf/ExternalAppInitializer.java) | 10 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/conf/HibernateMappingLocations.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/conf/HibernateMappingLocations.java) | 12 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/controller/ECOMPLogoutController.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/ECOMPLogoutController.java) | 21 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/controller/LoginController.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/LoginController.java) | 53 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/controller/LoginService.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/LoginService.java) | 8 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/controller/ONAPLoginController.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/ONAPLoginController.java) | 20 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/controller/ONAPWelcomeController.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/ONAPWelcomeController.java) | 14 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/controller/OpenCollaborationController.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/OpenCollaborationController.java) | 8 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/controller/PeerBroadcastSocket.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/PeerBroadcastSocket.java) | 10 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/filter/SecurityXssFilter.java | 158 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/filter/SecurityXssValidator.java | 207 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/controller/AppsOSController.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/controller/AppsOSController.java) | 29 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/controller/DashboardSearchResultController.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/controller/DashboardSearchResultController.java) | 33 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/controller/ExternalAppsRestfulController.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/controller/ExternalAppsRestfulController.java) | 35 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/controller/PortalAdminController.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/controller/PortalAdminController.java) | 31 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/interceptor/SessionTimeoutInterceptor.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/interceptor/SessionTimeoutInterceptor.java) | 26 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/logging/aop/EPEELFLoggerAspect.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/logging/aop/EPEELFLoggerAspect.java) | 37 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/service/AppsCacheService.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/AppsCacheService.java) | 10 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/service/AppsCacheServiceImple.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/AppsCacheServiceImple.java) | 16 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/service/EPAppServiceImpl.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/EPAppServiceImpl.java) | 30 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/service/SearchService.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/SearchService.java) | 12 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/service/SearchServiceImpl.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/SearchServiceImpl.java) | 21 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/service/TicketEventServiceImpl.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/TicketEventServiceImpl.java) | 13 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/service/UserRolesServiceImpl.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/UserRolesServiceImpl.java) | 24 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/service/UserService.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/UserService.java) | 10 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/service/UserServiceImpl.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/UserServiceImpl.java) | 28 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/transport/OnboardingApp.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/transport/OnboardingApp.java) | 8 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/ueb/EPUebHelper.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/ueb/EPUebHelper.java) | 39 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/ueb/EPUebMsgTypes.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/ueb/EPUebMsgTypes.java) | 10 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/utils/EPSystemProperties.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/utils/EPSystemProperties.java) | 9 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/scheduler/LogJob.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/scheduler/LogJob.java) | 10 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/scheduler/LogRegistry.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/scheduler/LogRegistry.java) | 12 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/scheduler/Register.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/scheduler/Register.java) | 14 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/scheduler/RegistryAdapter.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/scheduler/RegistryAdapter.java) | 14 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/scheduler/SessionMgtRegistry.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/scheduler/SessionMgtRegistry.java) | 18 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/service/RemoteWebServiceCallServiceImpl.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/service/RemoteWebServiceCallServiceImpl.java) | 26 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/uebhandler/FunctionalMenuHandler.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/uebhandler/FunctionalMenuHandler.java) | 30 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/uebhandler/InitUebHandler.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/uebhandler/InitUebHandler.java) | 18 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/uebhandler/MainUebHandler.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/uebhandler/MainUebHandler.java) | 18 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/uebhandler/WidgetNotificationHandler.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/uebhandler/WidgetNotificationHandler.java) | 26 | ||||
-rw-r--r-- | ecomp-portal-BE-os/src/main/java/org/onap/portalapp/util/SessionCookieUtil.java (renamed from ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/util/SessionCookieUtil.java) | 26 |
45 files changed, 942 insertions, 463 deletions
diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/authentication/LoginStrategy.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/authentication/LoginStrategy.java index 6cdcb6ba..767bd520 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/authentication/LoginStrategy.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/authentication/LoginStrategy.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,7 +35,7 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.authentication; +package org.onap.portalapp.authentication; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/authentication/OpenIdConnectLoginStrategy.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/authentication/OpenIdConnectLoginStrategy.java index 02cd340a..cbe4b352 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/authentication/OpenIdConnectLoginStrategy.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/authentication/OpenIdConnectLoginStrategy.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,7 +35,7 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.authentication; +package org.onap.portalapp.authentication; import java.util.HashSet; @@ -43,25 +43,25 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.mitre.openid.connect.model.UserInfo; -import org.openecomp.portalapp.command.EPLoginBean; -import org.openecomp.portalapp.portal.domain.EPUser; -import org.openecomp.portalapp.portal.utils.EPSystemProperties; -import org.openecomp.portalapp.util.EPUserUtils; -import org.openecomp.portalapp.util.SessionCookieUtil; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.onboarding.exception.PortalAPIException; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalapp.command.EPLoginBean; +import org.onap.portalapp.portal.domain.EPUser; +import org.onap.portalapp.portal.utils.EPSystemProperties; +import org.onap.portalapp.util.EPUserUtils; +import org.onap.portalapp.util.SessionCookieUtil; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.onboarding.exception.PortalAPIException; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.util.StringUtils; import org.springframework.web.servlet.ModelAndView; -public class OpenIdConnectLoginStrategy extends org.openecomp.portalsdk.core.auth.LoginStrategy implements org.openecomp.portalapp.authentication.LoginStrategy { +public class OpenIdConnectLoginStrategy extends org.onap.portalsdk.core.auth.LoginStrategy implements org.onap.portalapp.authentication.LoginStrategy { private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(OpenIdConnectLoginStrategy.class); private static final String GLOBAL_LOCATION_KEY = "Location"; @SuppressWarnings("rawtypes") - public boolean login(HttpServletRequest request, HttpServletResponse response){ + public boolean login(HttpServletRequest request, HttpServletResponse response) throws Exception{ logger.info("Attempting Login"); diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/authentication/SimpleLoginStrategy.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/authentication/SimpleLoginStrategy.java index b7e16443..55a0f10a 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/authentication/SimpleLoginStrategy.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/authentication/SimpleLoginStrategy.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,26 +35,26 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.authentication; +package org.onap.portalapp.authentication; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.openecomp.portalapp.command.EPLoginBean; -import org.openecomp.portalapp.portal.service.EPLoginService; -import org.openecomp.portalapp.portal.service.EPRoleFunctionService; -import org.openecomp.portalapp.portal.utils.EPSystemProperties; -import org.openecomp.portalapp.util.EPUserUtils; -import org.openecomp.portalapp.util.SessionCookieUtil; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.menu.MenuProperties; -import org.openecomp.portalsdk.core.onboarding.exception.PortalAPIException; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalapp.command.EPLoginBean; +import org.onap.portalapp.portal.service.EPLoginService; +import org.onap.portalapp.portal.service.EPRoleFunctionService; +import org.onap.portalapp.portal.utils.EPSystemProperties; +import org.onap.portalapp.util.EPUserUtils; +import org.onap.portalapp.util.SessionCookieUtil; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.menu.MenuProperties; +import org.onap.portalsdk.core.onboarding.exception.PortalAPIException; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.StringUtils; import org.springframework.web.servlet.ModelAndView; -public class SimpleLoginStrategy extends org.openecomp.portalsdk.core.auth.LoginStrategy implements LoginStrategy{ +public class SimpleLoginStrategy extends org.onap.portalsdk.core.auth.LoginStrategy implements LoginStrategy{ @Autowired private EPLoginService loginService; diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/conf/ExternalAppConfig.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java index 7b44add9..b6d384d5 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/conf/ExternalAppConfig.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,7 +35,7 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.conf; +package org.onap.portalapp.conf; import static com.att.eelf.configuration.Configuration.MDC_ALERT_SEVERITY; import static com.att.eelf.configuration.Configuration.MDC_INSTANCE_UUID; @@ -48,38 +48,51 @@ import java.net.InetAddress; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Calendar; +import java.util.HashMap; import java.util.List; +import java.util.Map; import javax.annotation.PostConstruct; -import org.openecomp.portalapp.authentication.LoginStrategy; -import org.openecomp.portalapp.authentication.OpenIdConnectLoginStrategy; -import org.openecomp.portalapp.authentication.SimpleLoginStrategy; -import org.openecomp.portalapp.controller.core.LogoutController; -import org.openecomp.portalapp.controller.core.SDKLoginController; -import org.openecomp.portalapp.portal.interceptor.PortalResourceInterceptor; -import org.openecomp.portalapp.portal.interceptor.SessionTimeoutInterceptor; -import org.openecomp.portalapp.portal.listener.HealthMonitor; -import org.openecomp.portalapp.portal.service.EPLoginService; -import org.openecomp.portalapp.portal.service.EPLoginServiceImpl; -import org.openecomp.portalapp.portal.ueb.EPUebHelper; -import org.openecomp.portalapp.portal.utils.EPSystemProperties; -import org.openecomp.portalapp.portal.utils.EcompPortalUtils; -import org.openecomp.portalapp.scheduler.RegistryAdapter; -import org.openecomp.portalapp.uebhandler.FunctionalMenuHandler; -import org.openecomp.portalapp.uebhandler.InitUebHandler; -import org.openecomp.portalapp.uebhandler.MainUebHandler; -import org.openecomp.portalapp.uebhandler.WidgetNotificationHandler; -import org.openecomp.portalsdk.core.conf.AppConfig; -import org.openecomp.portalsdk.core.conf.Configurable; -import org.openecomp.portalsdk.core.logging.format.AlarmSeverityEnum; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.objectcache.AbstractCacheManager; -import org.openecomp.portalsdk.core.service.DataAccessService; -import org.openecomp.portalsdk.core.service.FnMenuService; -import org.openecomp.portalsdk.core.service.FnMenuServiceImpl; -import org.openecomp.portalsdk.core.util.CacheManager; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.json.JSONArray; +import org.json.JSONObject; +import org.onap.portalapp.authentication.LoginStrategy; +import org.onap.portalapp.authentication.OpenIdConnectLoginStrategy; +import org.onap.portalapp.authentication.SimpleLoginStrategy; +import org.onap.portalapp.controller.core.LogoutController; +import org.onap.portalapp.controller.core.SDKLoginController; +import org.onap.portalapp.portal.domain.EPApp; +import org.onap.portalapp.portal.domain.EPUser; +import org.onap.portalapp.portal.domain.EPUserApp; +import org.onap.portalapp.portal.interceptor.PortalResourceInterceptor; +import org.onap.portalapp.portal.interceptor.SessionTimeoutInterceptor; +import org.onap.portalapp.portal.listener.HealthMonitor; +import org.onap.portalapp.portal.service.EPLoginService; +import org.onap.portalapp.portal.service.EPLoginServiceImpl; +import org.onap.portalapp.portal.service.ExternalAccessRolesService; +import org.onap.portalapp.portal.service.UserRolesService; +import org.onap.portalapp.portal.transport.ExternalAuthUserRole; +import org.onap.portalapp.portal.transport.ExternalRoleDescription; +import org.onap.portalapp.portal.ueb.EPUebHelper; +import org.onap.portalapp.portal.utils.EPCommonSystemProperties; +import org.onap.portalapp.portal.utils.EPSystemProperties; +import org.onap.portalapp.scheduler.RegistryAdapter; +import org.onap.portalapp.uebhandler.FunctionalMenuHandler; +import org.onap.portalapp.uebhandler.InitUebHandler; +import org.onap.portalapp.uebhandler.MainUebHandler; +import org.onap.portalapp.uebhandler.WidgetNotificationHandler; +import org.onap.portalsdk.core.conf.AppConfig; +import org.onap.portalsdk.core.conf.Configurable; +import org.onap.portalsdk.core.logging.format.AlarmSeverityEnum; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.objectcache.AbstractCacheManager; +import org.onap.portalsdk.core.onboarding.util.PortalApiConstants; +import org.onap.portalsdk.core.onboarding.util.PortalApiProperties; +import org.onap.portalsdk.core.service.DataAccessService; +import org.onap.portalsdk.core.service.FnMenuService; +import org.onap.portalsdk.core.service.FnMenuServiceImpl; +import org.onap.portalsdk.core.util.CacheManager; +import org.onap.portalsdk.core.util.SystemProperties; import org.slf4j.MDC; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; @@ -96,26 +109,41 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.gson.Gson; + @Configuration @EnableWebMvc -@ComponentScan(basePackages = { "org.openecomp" }, excludeFilters = { - @Filter(value = { LogoutController.class, SDKLoginController.class }, type = FilterType.ASSIGNABLE_TYPE) }) +@ComponentScan(basePackages = {"org.onap", "org.openecomp" }, excludeFilters = { + @Filter(value = { LogoutController.class, SDKLoginController.class}, type = FilterType.ASSIGNABLE_TYPE) }) @Profile("src") @EnableAsync @EnableScheduling + public class ExternalAppConfig extends AppConfig implements Configurable { - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ExternalAppConfig.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ExternalAppConfig.class); + + @Autowired + private DataAccessService dataAccessService; + + @Autowired + private UserRolesService userRolesService; + + @Autowired + private ExternalAccessRolesService externalAccessRolesService; private RegistryAdapter schedulerRegistryAdapter; + String UEB_APP_KEY = PortalApiProperties.getProperty(PortalApiConstants.UEB_APP_KEY); + public ViewResolver viewResolver() { return super.viewResolver(); } @Override public void addResourceHandlers(ResourceHandlerRegistry registry) { - registry.addResourceHandler("/app/fusion/**").addResourceLocations("/app/fusion/"); + registry.addResourceHandler("/app/fusion/**").addResourceLocations("/app/fusion/"); registry.addResourceHandler("/static/**").addResourceLocations("/static/"); registry.addResourceHandler("/images/**").addResourceLocations("/images/"); registry.addResourceHandler("/**").addResourceLocations("/public/"); @@ -123,34 +151,83 @@ public class ExternalAppConfig extends AppConfig implements Configurable { @PostConstruct private void init() { + String remotecentralizedsystemaccess = SystemProperties.getProperty(EPCommonSystemProperties.REMOTE_CENTRALIZED_SYSTEM_ACCESS); try { // Loading defaults MDC.put(MDC_SERVICE_NAME, EPSystemProperties.ECOMP_PORTAL_BE); MDC.put(MDC_SERVER_FQDN, InetAddress.getLocalHost().getHostName()); MDC.put(MDC_SERVER_IP_ADDRESS, InetAddress.getLocalHost().getHostAddress()); MDC.put(MDC_SERVICE_INSTANCE_ID, ""); - MDC.put(MDC_ALERT_SEVERITY, AlarmSeverityEnum.INFORMATIONAL.toString()); + MDC.put(MDC_ALERT_SEVERITY, AlarmSeverityEnum.INFORMATIONAL.severity()); MDC.put(MDC_INSTANCE_UUID, SystemProperties.getProperty(SystemProperties.INSTANCE_UUID)); + if(remotecentralizedsystemaccess.equalsIgnoreCase("true")){ + importFromExternalAuth(); + } } catch (Exception e) { logger.error(EELFLoggerDelegate.errorLogger, "init failed", e); } } - - /* - * / + + /** + * Does a sync on functions, roles and role functions based on namespace + * for all the centralized applications between AAF and ONAP, updates + * fn_user and fn_user_role with user information from AAF. * - * @PostConstruct // file://${catalina.home}/conf/log4j.properties public - * void initLog4j() throws FileNotFoundException { try { URL[] classpathurls - * = ((URLClassLoader) - * (Thread.currentThread().getContextClassLoader())).getURLs(); for (URL url - * : classpathurls) { System.out.println(url.getFile().toString()); } - * Log4jConfigurer.initLogging( - * "file://${catalina.home}/conf/log4j.properties"); } catch - * (FileNotFoundException e) { ((URLClassLoader) - * (Thread.currentThread().getContextClassLoader())).getURLs(); - * Log4jConfigurer.initLogging("classpath:../conf/log4j.properties"); } } / - **/ - + */ + private void importFromExternalAuth() throws Exception { + JSONArray aafAppRoles = new JSONArray(); + JSONArray aafUserList = new JSONArray(); + List<EPApp> appList; + //to get all centralized apps + List<EPApp> centralizedAppList = dataAccessService.executeNamedQuery("getCentralizedApps", null, null); + if(centralizedAppList != null && centralizedAppList.size() > 0){ + for(int i = 0; i < centralizedAppList.size(); i++){ + //syncRoles(does a sync on functions, roles and role functions) + externalAccessRolesService.syncApplicationRolesWithEcompDB(centralizedAppList.get(i)); + //retrieve roles based on NS + aafAppRoles = externalAccessRolesService.getAppRolesJSONFromExtAuthSystem(centralizedAppList.get(i)); + if(aafAppRoles != null && aafAppRoles.length() > 0){ + for(int j = 0; j < aafAppRoles.length(); j++){ + ObjectMapper mapper = new ObjectMapper(); + String name = aafAppRoles.getJSONObject(j).getString("name"); + String desc = aafAppRoles.getJSONObject(j).getString("description"); + ExternalRoleDescription externalRoleDescription = mapper.readValue(desc, ExternalRoleDescription.class); + aafUserList = externalAccessRolesService.getAllUsersByRole(name); + if(aafUserList != null && aafUserList.length() > 0){ + for(int k = 0; k < aafUserList.length(); k++){ + EPUser user = null; + List<EPUser> usersList = null; + List<EPUserApp> userRolesList = new ArrayList<EPUserApp>(); + JSONObject userRole = (JSONObject) aafUserList.get(k); + Gson gson = new Gson(); + ExternalAuthUserRole userRoleObj = gson.fromJson(userRole.toString(), ExternalAuthUserRole.class); + if(userRoleObj.getUser() != null){ + userRoleObj.setUser(userRoleObj.getUser().substring(0, userRoleObj.getUser().indexOf("@"))); + } + //for each role and user in that role, check if user exists in fn_user. If not, add + Map<String, String> orgUserId = new HashMap<>(); + orgUserId.put("orgUserIdValue", userRoleObj.getUser()); + usersList = dataAccessService.executeNamedQuery("epUserAppId", orgUserId, null); + if(usersList != null && usersList.size() > 0){ + user = usersList.get(0); + } + if(user == null){ + // add user to fn_user(needs to be revisited after getting user info from AAF PORTAL-172) + } + //for each role and user in that role, check if user exists in fn_user_role. If not, add + /*userRolesList = userRolesService.getUserRolesList(centralizedAppList.get(0).getId(), user.getId(), Long.valueOf(externalRoleDescription.getId())); + if(userRolesList == null || userRolesList.isEmpty()){ + // add userRole to fn_user_role(needs to be revisited after getting user info from AAF PORTAL-172) + }*/ + } + } + + } + } + } + } + } + public DataAccessService dataAccessService() { return super.dataAccessService(); } @@ -186,7 +263,7 @@ public class ExternalAppConfig extends AppConfig implements Configurable { } @Bean - public org.openecomp.portalsdk.core.auth.LoginStrategy coreLoginStrategy() { + public org.onap.portalsdk.core.auth.LoginStrategy coreLoginStrategy() { if (SystemProperties.getProperty(SystemProperties.AUTHENTICATION_MECHANISM).trim().equalsIgnoreCase("OIDC")) return new OpenIdConnectLoginStrategy(); else @@ -218,7 +295,7 @@ public class ExternalAppConfig extends AppConfig implements Configurable { registry.addInterceptor(sessionTimeoutInterceptor()).excludePathPatterns("/oid-login", "/portalApi/healthCheck", "/portalApi/healthCheck/", "/portalApi/healthCheckSuspend", "/portalApi/healthCheckSuspend/", "/portalApi/healthCheckResume", "/portalApi/healthCheckResume/", "/login_external", - "/login_external.htm*", "login", "/login.htm*","/auxapi/*","/context/*", "/api*", + "/login_external.htm*", "login", "/login.htm*", "/auxapi/*", "/context/*", "/api*", "/single_signon.htm", "/single_signon", "/dashboard", "/OpenSourceLogin.htm"); registry.addInterceptor(portalResourceInterceptor()); diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/conf/ExternalAppInitializer.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java index 121c4beb..62051b1d 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/conf/ExternalAppInitializer.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,11 +35,11 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.conf; +package org.onap.portalapp.conf; import java.util.Arrays; -import org.openecomp.portalsdk.core.conf.AppInitializer; +import org.onap.portalsdk.core.conf.AppInitializer; public class ExternalAppInitializer extends AppInitializer{ diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/conf/HibernateMappingLocations.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/conf/HibernateMappingLocations.java index 7f0e9569..f340ec35 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/conf/HibernateMappingLocations.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/conf/HibernateMappingLocations.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,9 +35,9 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.conf; +package org.onap.portalapp.conf; -import org.openecomp.portalsdk.core.conf.HibernateMappingLocatable; +import org.onap.portalsdk.core.conf.HibernateMappingLocatable; import org.springframework.context.annotation.Profile; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; @@ -55,7 +55,7 @@ public class HibernateMappingLocations implements HibernateMappingLocatable { @Override public String[] getPackagesToScan() { - return new String[] { "org.openecomp" }; + return new String[] { "org.onap","org.openecomp" }; } } diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/ECOMPLogoutController.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/controller/ECOMPLogoutController.java index 10ae7b9d..0f0cf270 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/ECOMPLogoutController.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/controller/ECOMPLogoutController.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,18 +35,19 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller; +package org.onap.portalapp.controller; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.openecomp.portalapp.portal.domain.EPUser; -import org.openecomp.portalapp.portal.logging.aop.EPAuditLog; -import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog; -import org.openecomp.portalapp.portal.utils.EPSystemProperties; -import org.openecomp.portalapp.util.EPUserUtils; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalapp.controller.EPUnRestrictedBaseController; +import org.onap.portalapp.portal.domain.EPUser; +import org.onap.portalapp.portal.logging.aop.EPAuditLog; +import org.onap.portalapp.portal.logging.aop.EPMetricsLog; +import org.onap.portalapp.portal.utils.EPSystemProperties; +import org.onap.portalapp.util.EPUserUtils; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.context.annotation.Profile; import org.springframework.stereotype.Controller; diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/LoginController.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/controller/LoginController.java index ce6cc530..273a0b1e 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/LoginController.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/controller/LoginController.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,10 +35,12 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller; +package org.onap.portalapp.controller; import static com.att.eelf.configuration.Configuration.MDC_KEY_REQUEST_ID; +import java.net.MalformedURLException; +import java.net.URL; import java.net.URLDecoder; import java.util.Enumeration; import java.util.HashMap; @@ -50,19 +52,22 @@ import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.apache.commons.lang.StringUtils; import org.json.JSONObject; -import org.openecomp.portalapp.command.EPLoginBean; -import org.openecomp.portalapp.portal.domain.SharedContext; -import org.openecomp.portalapp.portal.service.EPLoginService; -import org.openecomp.portalapp.portal.service.EPRoleFunctionService; -import org.openecomp.portalapp.portal.service.SharedContextService; -import org.openecomp.portalapp.portal.utils.EPSystemProperties; -import org.openecomp.portalapp.util.EPUserUtils; -import org.openecomp.portalapp.util.SessionCookieUtil; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.menu.MenuProperties; -import org.openecomp.portalsdk.core.onboarding.util.CipherUtil; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalapp.command.EPLoginBean; +import org.onap.portalapp.controller.EPUnRestrictedBaseController; +import org.onap.portalapp.portal.domain.SharedContext; +import org.onap.portalapp.portal.service.EPLoginService; +import org.onap.portalapp.portal.service.EPRoleFunctionService; +import org.onap.portalapp.portal.service.SharedContextService; +import org.onap.portalapp.portal.utils.EPCommonSystemProperties; +import org.onap.portalapp.portal.utils.EPSystemProperties; +import org.onap.portalapp.util.EPUserUtils; +import org.onap.portalapp.util.SessionCookieUtil; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.menu.MenuProperties; +import org.onap.portalsdk.core.onboarding.util.CipherUtil; +import org.onap.portalsdk.core.util.SystemProperties; import org.slf4j.MDC; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -200,6 +205,7 @@ public class LoginController extends EPUnRestrictedBaseController implements Log logger.info(EELFLoggerDelegate.debugLogger, "processSingleSignOn: begins with orgUserId {}", orgUserId); StringBuilder sbAdditionalInfo = new StringBuilder(); + validateDomain(request); if (orgUserId == null || orgUserId.length() == 0) { model.put(ERROR_MESSAGE_KEY, SystemProperties.MESSAGE_KEY_LOGIN_ERROR_COOKIE_EMPTY); if (request.getParameter(REDIRECT_URL) != null && request.getParameter(REDIRECT_URL).length() != 0) { @@ -242,6 +248,7 @@ public class LoginController extends EPUnRestrictedBaseController implements Log sbAdditionalInfo.append(String.format( "But the Login-Id: %s doesn't exist in the Database. Created a Guest Session. Request-URL: %s", orgUserId, fullURL)); + validateDomain(request); if (request.getParameter(REDIRECT_URL) != null && request.getParameter(REDIRECT_URL).length() != 0) { return new ModelAndView(REDIRECT_COLON + DEFAULT_FAILURE_VIEW + ".htm" + "?redirectUrl=" + request.getParameter(REDIRECT_URL)); @@ -292,6 +299,7 @@ public class LoginController extends EPUnRestrictedBaseController implements Log commandBean.getUser().getOrgUserId() + " exists in the the system."); // get redirectUrl from URL parameter + validateDomain(request); if (request.getParameter(REDIRECT_URL) != null && request.getParameter(REDIRECT_URL).length() != 0) { String forwardUrl = URLDecoder.decode(request.getParameter(REDIRECT_URL), "UTF-8"); // clean cookie @@ -327,6 +335,19 @@ public class LoginController extends EPUnRestrictedBaseController implements Log return new ModelAndView(REDIRECT_COLON + SystemProperties.getProperty(EPSystemProperties.FE_URL)); } + private void validateDomain(HttpServletRequest request) throws MalformedURLException { + final String returnToAppUrl = request.getParameter(REDIRECT_URL); + if (StringUtils.isNotBlank(returnToAppUrl)) { + String hostName = new URL(returnToAppUrl).getHost(); + if (StringUtils.isNotBlank(hostName) + && !hostName.endsWith(EPSystemProperties.getProperty(EPCommonSystemProperties.COOKIE_DOMAIN))) { + logger.debug(EELFLoggerDelegate.debugLogger, + "processSingleSignOn () accessing Unauthorized url :" + hostName); + throw new SecurityException("accessing Unauthorized url : " + hostName); + } + } + } + private String getFullURL(HttpServletRequest request) { if (request != null) { String requestURL = request.getRequestURL().toString(); diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/LoginService.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/controller/LoginService.java index 4b5a8d96..41e07a8e 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/LoginService.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/controller/LoginService.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,7 +35,7 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller; +package org.onap.portalapp.controller; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/ONAPLoginController.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/controller/ONAPLoginController.java index 64f38c18..d20a4608 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/ONAPLoginController.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/controller/ONAPLoginController.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,7 +35,7 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller; +package org.onap.portalapp.controller; import java.util.HashMap; import java.util.Map; @@ -43,12 +43,12 @@ import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.openecomp.portalsdk.core.auth.LoginStrategy; -import org.openecomp.portalsdk.core.controller.UnRestrictedBaseController; -import org.openecomp.portalsdk.core.onboarding.listener.PortalTimeoutHandler; -import org.openecomp.portalsdk.core.service.LoginService; -import org.openecomp.portalsdk.core.service.ProfileService; -import org.openecomp.portalsdk.core.web.support.AppUtils; +import org.onap.portalsdk.core.auth.LoginStrategy; +import org.onap.portalsdk.core.controller.UnRestrictedBaseController; +import org.onap.portalsdk.core.onboarding.listener.PortalTimeoutHandler; +import org.onap.portalsdk.core.service.LoginService; +import org.onap.portalsdk.core.service.ProfileService; +import org.onap.portalsdk.core.web.support.AppUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/ONAPWelcomeController.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/controller/ONAPWelcomeController.java index 917d7713..0435dbaf 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/ONAPWelcomeController.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/controller/ONAPWelcomeController.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,7 +35,7 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller; +package org.onap.portalapp.controller; import java.security.Principal; import java.util.Set; @@ -45,7 +45,8 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.mitre.openid.connect.client.SubjectIssuerGrantedAuthority; -import org.openecomp.portalapp.portal.logging.aop.EPAuditLog; +import org.onap.portalapp.controller.EPRestrictedBaseController; +import org.onap.portalapp.portal.logging.aop.EPAuditLog; import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; @@ -79,8 +80,7 @@ public class ONAPWelcomeController extends EPRestrictedBaseController{ this.viewName = viewName; } - - @Resource(name = "namedAdmins") + //@Resource(name = "namedAdmins") private Set<SubjectIssuerGrantedAuthority> admins; @RequestMapping("/user") diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/OpenCollaborationController.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/controller/OpenCollaborationController.java index 9e87ae2e..5348f237 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/OpenCollaborationController.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/controller/OpenCollaborationController.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,7 +35,7 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller; +package org.onap.portalapp.controller; import java.util.HashMap; import java.util.Map; diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/PeerBroadcastSocket.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/controller/PeerBroadcastSocket.java index 9366b1e7..170c3ce1 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/PeerBroadcastSocket.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/controller/PeerBroadcastSocket.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,7 +35,7 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.controller; +package org.onap.portalapp.controller; import java.io.IOException; import java.util.Hashtable; @@ -47,7 +47,7 @@ import javax.websocket.OnOpen; import javax.websocket.Session; import javax.websocket.server.ServerEndpoint; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import com.fasterxml.jackson.databind.ObjectMapper; @ServerEndpoint("/opencontact") diff --git a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/filter/SecurityXssFilter.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/filter/SecurityXssFilter.java new file mode 100644 index 00000000..11d1a449 --- /dev/null +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/filter/SecurityXssFilter.java @@ -0,0 +1,158 @@ + +/*- + * ============LICENSE_START========================================== + * ONAP Portal + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the "License"); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalapp.filter; + +import java.io.BufferedReader; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.nio.charset.StandardCharsets; + +import javax.servlet.FilterChain; +import javax.servlet.ReadListener; +import javax.servlet.ServletException; +import javax.servlet.ServletInputStream; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletRequestWrapper; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang.StringUtils; +import org.apache.http.HttpStatus; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.springframework.web.filter.OncePerRequestFilter; + +public class SecurityXssFilter extends OncePerRequestFilter { + + private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SecurityXssFilter.class); + + private static final String APPLICATION_JSON = "application/json"; + + private static final String ERROR_BAD_REQUEST = "{\"error\":\"BAD_REQUEST\"}"; + + private SecurityXssValidator validator = SecurityXssValidator.getInstance(); + + public class RequestWrapper extends HttpServletRequestWrapper { + + private ByteArrayOutputStream cachedBytes; + + public RequestWrapper(HttpServletRequest request) { + super(request); + } + + @Override + public ServletInputStream getInputStream() throws IOException { + if (cachedBytes == null) + cacheInputStream(); + + return new CachedServletInputStream(); + } + + @Override + public BufferedReader getReader() throws IOException { + return new BufferedReader(new InputStreamReader(getInputStream())); + } + + private void cacheInputStream() throws IOException { + cachedBytes = new ByteArrayOutputStream(); + IOUtils.copy(super.getInputStream(), cachedBytes); + } + + public class CachedServletInputStream extends ServletInputStream { + private ByteArrayInputStream input; + + public CachedServletInputStream() { + input = new ByteArrayInputStream(cachedBytes.toByteArray()); + } + + @Override + public int read() throws IOException { + return input.read(); + } + + @Override + public boolean isFinished() { + return false; + } + + @Override + public boolean isReady() { + return false; + } + + @Override + public void setReadListener(ReadListener readListener) { + + } + + } + } + + @Override + protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) + throws ServletException, IOException { + if (validateRequestType(request)) { + request = new RequestWrapper(request); + String requestData = IOUtils.toString(request.getInputStream(), StandardCharsets.UTF_8.toString()); + try { + if (StringUtils.isNotBlank(requestData) && validator.denyXSS(requestData)) { + response.setContentType(APPLICATION_JSON); + response.setStatus(HttpStatus.SC_BAD_REQUEST); + response.getWriter().write(ERROR_BAD_REQUEST); + throw new SecurityException(ERROR_BAD_REQUEST); + } + } catch (Exception e) { + logger.error(EELFLoggerDelegate.errorLogger, "doFilterInternal() failed due to BAD_REQUEST", e); + response.getWriter().close(); + return; + } + filterChain.doFilter(request, response); + + } else { + filterChain.doFilter(request, response); + } + + } + + private boolean validateRequestType(HttpServletRequest request) { + return (request.getMethod().equalsIgnoreCase("POST") || request.getMethod().equalsIgnoreCase("PUT") + || request.getMethod().equalsIgnoreCase("DELETE")); + } +}
\ No newline at end of file diff --git a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/filter/SecurityXssValidator.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/filter/SecurityXssValidator.java new file mode 100644 index 00000000..4d6a9fe2 --- /dev/null +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/filter/SecurityXssValidator.java @@ -0,0 +1,207 @@ +/*- + * ============LICENSE_START========================================== + * ONAP Portal + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the "License"); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * ECOMP is a trademark and service mark of AT&T Intellectual Property. + */ +package org.onap.portalapp.filter; + +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReentrantLock; +import java.util.regex.Pattern; + +import org.apache.commons.lang.NotImplementedException; +import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringEscapeUtils; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.util.SystemProperties; +import org.owasp.esapi.ESAPI; +import org.owasp.esapi.codecs.Codec; +import org.owasp.esapi.codecs.MySQLCodec; +import org.owasp.esapi.codecs.MySQLCodec.Mode; +import org.owasp.esapi.codecs.OracleCodec; + +public class SecurityXssValidator { + + private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SecurityXssValidator.class); + + private static final String MYSQL_DB = "mysql"; + private static final String ORACLE_DB = "oracle"; + private static final String MARIA_DB = "mariadb"; + private static final int FLAGS = Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL; + static SecurityXssValidator validator = null; + private static Codec instance; + private static final Lock lock = new ReentrantLock(); + + public static SecurityXssValidator getInstance() { + + if (validator == null) { + lock.lock(); + try { + if (validator == null) + validator = new SecurityXssValidator(); + } finally { + lock.unlock(); + } + } + + return validator; + } + + private SecurityXssValidator() { + // Avoid anything between script tags + XSS_INPUT_PATTERNS.add(Pattern.compile("<script>(.*?)</script>", FLAGS)); + + // avoid iframes + XSS_INPUT_PATTERNS.add(Pattern.compile("<iframe(.*?)>(.*?)</iframe>", FLAGS)); + + // Avoid anything in a src='...' type of expression + XSS_INPUT_PATTERNS.add(Pattern.compile("src[\r\n]*=[\r\n]*\\\'(.*?)\\\'", FLAGS)); + + XSS_INPUT_PATTERNS.add(Pattern.compile("src[\r\n]*=[\r\n]*\\\"(.*?)\\\"", FLAGS)); + + XSS_INPUT_PATTERNS.add(Pattern.compile("src[\r\n]*=[\r\n]*([^>]+)", FLAGS)); + + // Remove any lonesome </script> tag + XSS_INPUT_PATTERNS.add(Pattern.compile("</script>", FLAGS)); + + XSS_INPUT_PATTERNS.add(Pattern.compile(".*(<script>|</script>).*", FLAGS)); + + XSS_INPUT_PATTERNS.add(Pattern.compile(".*(<iframe>|</iframe>).*", FLAGS)); + + // Remove any lonesome <script ...> tag + XSS_INPUT_PATTERNS.add(Pattern.compile("<script(.*?)>", FLAGS)); + + // Avoid eval(...) expressions + XSS_INPUT_PATTERNS.add(Pattern.compile("eval\\((.*?)\\)", FLAGS)); + + // Avoid expression(...) expressions + XSS_INPUT_PATTERNS.add(Pattern.compile("expression\\((.*?)\\)", FLAGS)); + + // Avoid javascript:... expressions + XSS_INPUT_PATTERNS.add(Pattern.compile(".*(javascript:|vbscript:).*", FLAGS)); + + // Avoid onload= expressions + XSS_INPUT_PATTERNS.add(Pattern.compile(".*(onload(.*?)=).*", FLAGS)); + } + + private List<Pattern> XSS_INPUT_PATTERNS = new ArrayList<Pattern>(); + + /** + * * This method takes a string and strips out any potential script injections. + * + * @param value + * @return String - the new "sanitized" string. + */ + public String stripXSS(String value) { + + try { + + if (StringUtils.isNotBlank(value)) { + + value = StringEscapeUtils.escapeHtml4(value); + + value = ESAPI.encoder().canonicalize(value); + + // Avoid null characters + value = value.replaceAll("\0", ""); + + for (Pattern xssInputPattern : XSS_INPUT_PATTERNS) { + value = xssInputPattern.matcher(value).replaceAll(""); + } + } + + } catch (Exception e) { + logger.error(EELFLoggerDelegate.errorLogger, "stripXSS() failed", e); + } + + return value; + } + + public Boolean denyXSS(String value) { + Boolean flag = Boolean.FALSE; + try { + if (StringUtils.isNotBlank(value)) { + value = ESAPI.encoder().canonicalize(value); + for (Pattern xssInputPattern : XSS_INPUT_PATTERNS) { + if (xssInputPattern.matcher(value).matches()) { + flag = Boolean.TRUE; + break; + } + + } + } + + } catch (Exception e) { + logger.error(EELFLoggerDelegate.errorLogger, "denyXSS() failed", e); + } + + return flag; + } + + public Codec getCodec() { + try { + if (null == instance) { + if (StringUtils.containsIgnoreCase(SystemProperties.getProperty(SystemProperties.DB_DRIVER), MYSQL_DB) + || StringUtils.containsIgnoreCase(SystemProperties.getProperty(SystemProperties.DB_DRIVER), + MARIA_DB)) { + instance = new MySQLCodec(Mode.STANDARD); + + } else if (StringUtils.containsIgnoreCase(SystemProperties.getProperty(SystemProperties.DB_DRIVER), + ORACLE_DB)) { + instance = new OracleCodec(); + } else { + throw new NotImplementedException("Handling for data base \"" + + SystemProperties.getProperty(SystemProperties.DB_DRIVER) + "\" not yet implemented."); + } + } + + } catch (Exception ex) { + logger.error(EELFLoggerDelegate.errorLogger, "getCodec() failed", ex); + } + return instance; + + } + + public List<Pattern> getXSS_INPUT_PATTERNS() { + return XSS_INPUT_PATTERNS; + } + + public void setXSS_INPUT_PATTERNS(List<Pattern> xSS_INPUT_PATTERNS) { + XSS_INPUT_PATTERNS = xSS_INPUT_PATTERNS; + } + +}
\ No newline at end of file diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/controller/AppsOSController.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/controller/AppsOSController.java index 5cffe8cd..364899da 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/controller/AppsOSController.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/controller/AppsOSController.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,7 +35,7 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.portal.controller; +package org.onap.portalapp.portal.controller; import java.util.HashMap; import java.util.Map; @@ -43,16 +43,17 @@ import java.util.Map; import javax.servlet.http.HttpServletRequest; import org.json.JSONObject; -import org.openecomp.portalapp.portal.domain.EPUser; -import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse; -import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum; -import org.openecomp.portalapp.portal.logging.aop.EPAuditLog; -import org.openecomp.portalapp.portal.service.AdminRolesService; -import org.openecomp.portalapp.portal.service.EPAppService; -import org.openecomp.portalapp.portal.service.PersUserAppService; -import org.openecomp.portalapp.portal.service.UserService; -import org.openecomp.portalapp.util.EPUserUtils; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalapp.portal.controller.AppsController; +import org.onap.portalapp.portal.domain.EPUser; +import org.onap.portalapp.portal.ecomp.model.PortalRestResponse; +import org.onap.portalapp.portal.ecomp.model.PortalRestStatusEnum; +import org.onap.portalapp.portal.logging.aop.EPAuditLog; +import org.onap.portalapp.portal.service.AdminRolesService; +import org.onap.portalapp.portal.service.EPAppService; +import org.onap.portalapp.portal.service.PersUserAppService; +import org.onap.portalapp.portal.service.UserService; +import org.onap.portalapp.util.EPUserUtils; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.web.bind.annotation.PathVariable; diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/controller/DashboardSearchResultController.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/controller/DashboardSearchResultController.java index 313ae683..7670f883 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/controller/DashboardSearchResultController.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/controller/DashboardSearchResultController.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,7 +35,7 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.portal.controller; +package org.onap.portalapp.portal.controller; import java.text.ParseException; import java.text.SimpleDateFormat; @@ -47,17 +47,18 @@ import java.util.Map; import javax.servlet.http.HttpServletRequest; -import org.openecomp.portalapp.controller.EPRestrictedBaseController; -import org.openecomp.portalapp.portal.domain.EPUser; -import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse; -import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum; -import org.openecomp.portalapp.portal.ecomp.model.SearchResultItem; -import org.openecomp.portalapp.portal.service.DashboardSearchService; -import org.openecomp.portalapp.portal.transport.CommonWidget; -import org.openecomp.portalapp.portal.transport.CommonWidgetMeta; -import org.openecomp.portalapp.util.EPUserUtils; -import org.openecomp.portalsdk.core.domain.support.CollaborateList; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalapp.controller.EPRestrictedBaseController; +import org.onap.portalapp.portal.controller.DashboardSearchResultController; +import org.onap.portalapp.portal.domain.EPUser; +import org.onap.portalapp.portal.ecomp.model.PortalRestResponse; +import org.onap.portalapp.portal.ecomp.model.PortalRestStatusEnum; +import org.onap.portalapp.portal.ecomp.model.SearchResultItem; +import org.onap.portalapp.portal.service.DashboardSearchService; +import org.onap.portalapp.portal.transport.CommonWidget; +import org.onap.portalapp.portal.transport.CommonWidgetMeta; +import org.onap.portalapp.util.EPUserUtils; +import org.onap.portalsdk.core.domain.support.CollaborateList; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; @@ -220,7 +221,7 @@ public class DashboardSearchResultController extends EPRestrictedBaseController String userId = user.getOrgUserId(); activeUsers = searchService.getRelatedUsers(userId); - HashSet<String> usersSet = CollaborateList.getInstance().getAllUserName(); + HashSet<String> usersSet = (HashSet<String>) CollaborateList.getInstance().getAllUserName(); for (String users : activeUsers) { if (usersSet.contains(users)) { onlineUsers.add(users); diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/controller/ExternalAppsRestfulController.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/controller/ExternalAppsRestfulController.java index 95623661..f877587e 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/controller/ExternalAppsRestfulController.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/controller/ExternalAppsRestfulController.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,7 +35,7 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.portal.controller; +package org.onap.portalapp.portal.controller; import java.io.IOException; import java.util.List; @@ -43,19 +43,20 @@ import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.openecomp.portalapp.controller.EPRestrictedRESTfulBaseController; -import org.openecomp.portalapp.portal.domain.EPUser; -import org.openecomp.portalapp.portal.logging.aop.EPAuditLog; -import org.openecomp.portalapp.portal.service.AdminRolesService; -import org.openecomp.portalapp.portal.service.EPLoginService; -import org.openecomp.portalapp.portal.service.FunctionalMenuService; -import org.openecomp.portalapp.portal.transport.FavoritesFunctionalMenuItemJson; -import org.openecomp.portalapp.portal.transport.FieldsValidator; -import org.openecomp.portalapp.portal.transport.FunctionalMenuItem; -import org.openecomp.portalapp.portal.utils.EPSystemProperties; -import org.openecomp.portalapp.portal.utils.EcompPortalUtils; -import org.openecomp.portalapp.portal.utils.PortalConstants; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalapp.controller.EPRestrictedRESTfulBaseController; +import org.onap.portalapp.portal.controller.ExternalAppsRestfulController; +import org.onap.portalapp.portal.domain.EPUser; +import org.onap.portalapp.portal.logging.aop.EPAuditLog; +import org.onap.portalapp.portal.service.AdminRolesService; +import org.onap.portalapp.portal.service.EPLoginService; +import org.onap.portalapp.portal.service.FunctionalMenuService; +import org.onap.portalapp.portal.transport.FavoritesFunctionalMenuItemJson; +import org.onap.portalapp.portal.transport.FieldsValidator; +import org.onap.portalapp.portal.transport.FunctionalMenuItem; +import org.onap.portalapp.portal.utils.EPSystemProperties; +import org.onap.portalapp.portal.utils.EcompPortalUtils; +import org.onap.portalapp.portal.utils.PortalConstants; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.slf4j.MDC; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.EnableAspectJAutoProxy; diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/controller/PortalAdminController.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/controller/PortalAdminController.java index d2585ab4..45fb2f4c 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/controller/PortalAdminController.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/controller/PortalAdminController.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,24 +35,25 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.portal.controller; +package org.onap.portalapp.portal.controller; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.openecomp.portalapp.controller.EPRestrictedBaseController; -import org.openecomp.portalapp.portal.domain.EPRole; -import org.openecomp.portalapp.portal.domain.EPUser; -import org.openecomp.portalapp.portal.logging.aop.EPAuditLog; -import org.openecomp.portalapp.portal.service.AdminRolesService; -import org.openecomp.portalapp.portal.service.PortalAdminService; -import org.openecomp.portalapp.portal.transport.FieldsValidator; -import org.openecomp.portalapp.portal.transport.PortalAdmin; -import org.openecomp.portalapp.portal.utils.EcompPortalUtils; -import org.openecomp.portalapp.util.EPUserUtils; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalapp.controller.EPRestrictedBaseController; +import org.onap.portalapp.portal.controller.PortalAdminController; +import org.onap.portalapp.portal.domain.EPRole; +import org.onap.portalapp.portal.domain.EPUser; +import org.onap.portalapp.portal.logging.aop.EPAuditLog; +import org.onap.portalapp.portal.service.AdminRolesService; +import org.onap.portalapp.portal.service.PortalAdminService; +import org.onap.portalapp.portal.transport.FieldsValidator; +import org.onap.portalapp.portal.transport.PortalAdmin; +import org.onap.portalapp.portal.utils.EcompPortalUtils; +import org.onap.portalapp.util.EPUserUtils; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.web.bind.annotation.PathVariable; diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/interceptor/SessionTimeoutInterceptor.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/interceptor/SessionTimeoutInterceptor.java index 61b98e4f..e05e25c5 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/interceptor/SessionTimeoutInterceptor.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/interceptor/SessionTimeoutInterceptor.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,20 +35,20 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.portal.interceptor; +package org.onap.portalapp.portal.interceptor; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.openecomp.portalapp.authentication.LoginStrategy; -import org.openecomp.portalapp.portal.domain.EPUser; -import org.openecomp.portalapp.portal.utils.EcompPortalUtils; -import org.openecomp.portalapp.util.EPUserUtils; -import org.openecomp.portalapp.util.SessionCookieUtil; -import org.openecomp.portalsdk.core.controller.FusionBaseController; -import org.openecomp.portalsdk.core.domain.support.CollaborateList; -import org.openecomp.portalsdk.core.exception.SessionExpiredException; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalapp.authentication.LoginStrategy; +import org.onap.portalapp.portal.domain.EPUser; +import org.onap.portalapp.portal.utils.EcompPortalUtils; +import org.onap.portalapp.util.EPUserUtils; +import org.onap.portalapp.util.SessionCookieUtil; +import org.onap.portalsdk.core.controller.FusionBaseController; +import org.onap.portalsdk.core.domain.support.CollaborateList; +import org.onap.portalsdk.core.exception.SessionExpiredException; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.method.HandlerMethod; import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/logging/aop/EPEELFLoggerAspect.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/logging/aop/EPEELFLoggerAspect.java index 0970ec45..ab235ca6 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/logging/aop/EPEELFLoggerAspect.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/logging/aop/EPEELFLoggerAspect.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,16 +35,19 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.portal.logging.aop; +package org.onap.portalapp.portal.logging.aop; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Pointcut; -import org.openecomp.portalapp.portal.transport.FieldsValidator; -import org.openecomp.portalapp.portal.utils.EcompPortalUtils; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties.SecurityEventTypeEnum; +import org.onap.portalapp.portal.logging.aop.EPAuditLog; +import org.onap.portalapp.portal.logging.aop.EPEELFLoggerAdvice; +import org.onap.portalapp.portal.logging.aop.EPMetricsLog; +import org.onap.portalapp.portal.transport.FieldsValidator; +import org.onap.portalapp.portal.utils.EcompPortalUtils; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.util.SystemProperties.SecurityEventTypeEnum; import org.springframework.beans.factory.annotation.Autowired; @Aspect @@ -59,56 +62,56 @@ public class EPEELFLoggerAspect { /* * Point-cut expression to handle all INCOMING_REST_MESSAGES */ - @Pointcut("execution(public * org.openecomp.portalapp.portal.controller.*.*(..))") + @Pointcut("execution(public * org.onap.portalapp.portal.controller.*.*(..))") public void incomingAuditMessages() {} /* * Handles all INCOMING_REST_MESSAGES from kpiDashboard */ - @Pointcut("execution(public * org.openecomp.portalapp.kpidash.controller.*.*(..))") + @Pointcut("execution(public * org.onap.portalapp.kpidash.controller.*.*(..))") public void kpiDashboardAuditMessages() {} /* * Point-cut expression to handle all session management INCOMING_REST_MESSAGES */ - @Pointcut("execution(public * org.openecomp.portalapp.controller.sessionmgt.*.*(..))") + @Pointcut("execution(public * org.onap.portalapp.controller.sessionmgt.*.*(..))") public void sessionMgtIncomingAuditMessages() {} /* * Point-cut expression to handle UserProfileController INCOMING_REST_MESSAGES */ - @Pointcut("execution(public * org.openecomp.portalapp.controller.core.UserProfileController.*(..))") + @Pointcut("execution(public * org.onap.portalapp.controller.core.UserProfileController.*(..))") public void userProfileIncomingAuditMessages() {} /* * Point-cut expression to handle UserProfileController INCOMING_REST_MESSAGES */ - @Pointcut("execution(public * org.openecomp.portalapp.controller.ONAPWelcomeController.*(..))") + @Pointcut("execution(public * org.onap.portalapp.controller.ONAPWelcomeController.*(..))") public void welcomeIncomingAuditMessages() {} /* * Point-cut expression to handle INCOMING Logout Rest Messages */ - @Pointcut("execution(public * org.openecomp.portalapp.controller.ECOMPLogoutController.*(..))") + @Pointcut("execution(public * org.onap.portalapp.controller.ECOMPLogoutController.*(..))") public void logoutAuditMessages() {} /* * Point-cut expression which handles all the OUTGOING_REST_MESSAGES. */ - @Pointcut("execution(public * org.openecomp.portalapp.portal.service.ApplicationsRestClientServiceImpl.*(..))") + @Pointcut("execution(public * org.onap.portalapp.portal.service.ApplicationsRestClientServiceImpl.*(..))") public void outgoingAuditMessages() {} /* * Point-cut expression to handle all the session management OUTGOING_REST_MESSAGES. */ - @Pointcut("execution(public * org.openecomp.portalapp.service.sessionmgt.SessionCommunication.*(..))") + @Pointcut("execution(public * org.onap.portalapp.service.sessionmgt.SessionCommunication.*(..))") public void sessionMgtOutgoingAuditMessages() {} /* * Point-cut expression which handles all the LDAP_PHONEBOOK_USER_SEARCH calls. */ - @Pointcut("execution(public * org.openecomp.portalapp.portal.service.EPLdapServiceImpl.*(..))") + @Pointcut("execution(public * org.onap.portalapp.portal.service.EPLdapServiceImpl.*(..))") public void phoneBookSearchAuditMessages() {} /* diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/AppsCacheService.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/service/AppsCacheService.java index 20f4d59f..0ffe246c 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/AppsCacheService.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/service/AppsCacheService.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -36,9 +36,9 @@ * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.portal.service; +package org.onap.portalapp.portal.service; -import org.openecomp.portalapp.portal.domain.EPApp; +import org.onap.portalapp.portal.domain.EPApp; public interface AppsCacheService { diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/AppsCacheServiceImple.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/service/AppsCacheServiceImple.java index 09a78e85..f884d4e7 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/AppsCacheServiceImple.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/service/AppsCacheServiceImple.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,7 +35,7 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.portal.service; +package org.onap.portalapp.portal.service; import java.util.HashMap; import java.util.List; @@ -43,9 +43,11 @@ import java.util.Map; import javax.annotation.PostConstruct; -import org.openecomp.portalapp.portal.domain.EPApp; -import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalapp.portal.domain.EPApp; +import org.onap.portalapp.portal.logging.aop.EPMetricsLog; +import org.onap.portalapp.portal.service.AppsCacheService; +import org.onap.portalapp.portal.service.EPAppService; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.stereotype.Service; diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/EPAppServiceImpl.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/service/EPAppServiceImpl.java index ea92ca51..ca321044 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/EPAppServiceImpl.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/service/EPAppServiceImpl.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,7 +35,7 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.portal.service; +package org.onap.portalapp.portal.service; import java.net.MalformedURLException; import java.security.GeneralSecurityException; @@ -49,16 +49,18 @@ import javax.servlet.http.HttpServletResponse; import org.hibernate.Session; import org.hibernate.Transaction; -import org.openecomp.portalapp.portal.domain.EPApp; -import org.openecomp.portalapp.portal.domain.EPUser; -import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog; -import org.openecomp.portalapp.portal.logging.format.EPAppMessagesEnum; -import org.openecomp.portalapp.portal.logging.logic.EPLogUtil; -import org.openecomp.portalapp.portal.transport.FieldsValidator; -import org.openecomp.portalapp.portal.transport.OnboardingApp; -import org.openecomp.portalapp.portal.utils.EcompPortalUtils; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.service.DataAccessService; +import org.onap.portalapp.portal.domain.EPApp; +import org.onap.portalapp.portal.domain.EPUser; +import org.onap.portalapp.portal.logging.aop.EPMetricsLog; +import org.onap.portalapp.portal.logging.format.EPAppMessagesEnum; +import org.onap.portalapp.portal.logging.logic.EPLogUtil; +import org.onap.portalapp.portal.service.EPAppCommonServiceImpl; +import org.onap.portalapp.portal.service.EPAppService; +import org.onap.portalapp.portal.transport.FieldsValidator; +import org.onap.portalapp.portal.transport.OnboardingApp; +import org.onap.portalapp.portal.utils.EcompPortalUtils; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.service.DataAccessService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.stereotype.Service; diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/SearchService.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/service/SearchService.java index 07dc8cca..44fd7ca2 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/SearchService.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/service/SearchService.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,12 +35,12 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.portal.service; +package org.onap.portalapp.portal.service; import java.util.List; -import org.openecomp.portalapp.portal.domain.EPUser; -import org.openecomp.portalapp.portal.transport.UserWithNameSurnameTitle; +import org.onap.portalapp.portal.domain.EPUser; +import org.onap.portalapp.portal.transport.UserWithNameSurnameTitle; public interface SearchService { diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/SearchServiceImpl.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/service/SearchServiceImpl.java index 0929c480..8a2f7269 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/SearchServiceImpl.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/service/SearchServiceImpl.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,16 +35,19 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.portal.service; +package org.onap.portalapp.portal.service; import java.util.ArrayList; import java.util.List; -import org.openecomp.portalapp.portal.domain.EPUser; -import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog; -import org.openecomp.portalapp.portal.transport.UserWithNameSurnameTitle; -import org.openecomp.portalapp.portal.utils.EcompPortalUtils; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalapp.portal.domain.EPUser; +import org.onap.portalapp.portal.logging.aop.EPMetricsLog; +import org.onap.portalapp.portal.service.SearchService; +import org.onap.portalapp.portal.service.SearchServiceImpl; +import org.onap.portalapp.portal.service.UserService; +import org.onap.portalapp.portal.transport.UserWithNameSurnameTitle; +import org.onap.portalapp.portal.utils.EcompPortalUtils; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.stereotype.Service; diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/TicketEventServiceImpl.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/service/TicketEventServiceImpl.java index 446bb60e..bf71bc06 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/TicketEventServiceImpl.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/service/TicketEventServiceImpl.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,10 +35,11 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.portal.service; +package org.onap.portalapp.portal.service; -import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalapp.portal.service.TicketEventService; +import org.onap.portalapp.portal.utils.EPCommonSystemProperties; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.stereotype.Service; import com.fasterxml.jackson.databind.JsonNode; diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/UserRolesServiceImpl.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/service/UserRolesServiceImpl.java index 41b320c2..c0d14f60 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/UserRolesServiceImpl.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/service/UserRolesServiceImpl.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,18 +35,18 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.portal.service; +package org.onap.portalapp.portal.service; import java.util.List; import org.apache.cxf.transport.http.HTTPException; -import org.openecomp.portalapp.portal.domain.EPApp; -import org.openecomp.portalapp.portal.domain.EPRole; -import org.openecomp.portalapp.portal.domain.EPUser; -import org.openecomp.portalapp.portal.domain.EPUserApp; -import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.service.DataAccessService; +import org.onap.portalapp.portal.domain.EPApp; +import org.onap.portalapp.portal.domain.EPRole; +import org.onap.portalapp.portal.domain.EPUser; +import org.onap.portalapp.portal.domain.EPUserApp; +import org.onap.portalapp.portal.logging.aop.EPMetricsLog; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.service.DataAccessService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.stereotype.Service; @@ -118,4 +118,6 @@ public class UserRolesServiceImpl extends UserRolesCommonServiceImpl implements return roleList; } + + } diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/UserService.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/service/UserService.java index 69ea652c..2d149428 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/UserService.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/service/UserService.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,11 +35,11 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.portal.service; +package org.onap.portalapp.portal.service; import java.util.List; -import org.openecomp.portalapp.portal.domain.EPUser; +import org.onap.portalapp.portal.domain.EPUser; public interface UserService { diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/UserServiceImpl.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/service/UserServiceImpl.java index 9cc97460..eeb0193d 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/UserServiceImpl.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/service/UserServiceImpl.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,7 +35,7 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.portal.service; +package org.onap.portalapp.portal.service; import java.io.BufferedReader; import java.io.IOException; @@ -47,13 +47,15 @@ import java.util.List; import org.json.JSONArray; import org.json.JSONObject; -import org.openecomp.portalapp.portal.domain.EPUser; -import org.openecomp.portalapp.portal.utils.EPSystemProperties; -import org.openecomp.portalsdk.core.FusionObject.Utilities; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.onboarding.util.CipherUtil; -import org.openecomp.portalsdk.core.service.DataAccessService; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalapp.portal.domain.EPUser; +import org.onap.portalapp.portal.service.UserService; +import org.onap.portalapp.portal.service.UserServiceImpl; +import org.onap.portalapp.portal.utils.EPSystemProperties; +import org.onap.portalsdk.core.FusionObject.Utilities; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.onboarding.util.CipherUtil; +import org.onap.portalsdk.core.service.DataAccessService; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -241,7 +243,7 @@ public class UserServiceImpl implements UserService { if (list == null || list.size() == 0) { newUser.setActive(true); newUser.setOrgUserId(newUser.getLoginId()); - newUser.setLoginPwd(CipherUtil.encrypt(newUser.getLoginPwd())); + newUser.setLoginPwd(CipherUtil.encryptPKC(newUser.getLoginPwd())); getDataAccessService().saveDomainObject(newUser, null); } else { if (checkDuplicate.equals("Yes")) { @@ -254,7 +256,7 @@ public class UserServiceImpl implements UserService { oldUser.setLastName(newUser.getLastName()); oldUser.setMiddleInitial(newUser.getMiddleInitial()); if (!oldUser.getLoginPwd().equals(newUser.getLoginPwd())) - oldUser.setLoginPwd(CipherUtil.encrypt(newUser.getLoginPwd())); + oldUser.setLoginPwd(CipherUtil.encryptPKC(newUser.getLoginPwd())); else oldUser.setLoginPwd(newUser.getLoginPwd()); getDataAccessService().saveDomainObject(oldUser, null); diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/transport/OnboardingApp.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/transport/OnboardingApp.java index 4a156a1a..f37c4b1f 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/transport/OnboardingApp.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/transport/OnboardingApp.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,7 +35,7 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.portal.transport; +package org.onap.portalapp.portal.transport; public class OnboardingApp { diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/ueb/EPUebHelper.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/ueb/EPUebHelper.java index 81b1c495..5c92b5dd 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/ueb/EPUebHelper.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/ueb/EPUebHelper.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,7 +35,7 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.portal.ueb; +package org.onap.portalapp.portal.ueb; import java.net.HttpURLConnection; import java.net.URL; @@ -44,21 +44,20 @@ import java.util.List; import org.hibernate.Session; import org.hibernate.SessionFactory; -import org.openecomp.portalapp.portal.domain.EPApp; -import org.openecomp.portalapp.portal.domain.EcompApp; -import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog; -import org.openecomp.portalapp.portal.logging.format.EPAppMessagesEnum; -import org.openecomp.portalapp.portal.logging.logic.EPLogUtil; -import org.openecomp.portalapp.portal.service.EPAppService; -import org.openecomp.portalapp.portal.utils.EcompPortalUtils; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.onboarding.ueb.Helper; -import org.openecomp.portalsdk.core.onboarding.ueb.Publisher; -import org.openecomp.portalsdk.core.onboarding.ueb.UebException; -import org.openecomp.portalsdk.core.onboarding.ueb.UebManager; -import org.openecomp.portalsdk.core.onboarding.ueb.UebMsg; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties; +import org.onap.portalapp.portal.domain.EPApp; +import org.onap.portalapp.portal.domain.EcompApp; +import org.onap.portalapp.portal.logging.aop.EPMetricsLog; +import org.onap.portalapp.portal.logging.format.EPAppMessagesEnum; +import org.onap.portalapp.portal.logging.logic.EPLogUtil; +import org.onap.portalapp.portal.service.EPAppService; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.onboarding.ueb.Helper; +import org.onap.portalsdk.core.onboarding.ueb.Publisher; +import org.onap.portalsdk.core.onboarding.ueb.UebException; +import org.onap.portalsdk.core.onboarding.ueb.UebManager; +import org.onap.portalsdk.core.onboarding.ueb.UebMsg; +import org.onap.portalsdk.core.onboarding.util.PortalApiConstants; +import org.onap.portalsdk.core.onboarding.util.PortalApiProperties; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.stereotype.Component; @@ -165,7 +164,7 @@ public class EPUebHelper { // // boolean available = true; - LinkedList<String> urlList = Helper.uebUrlList(); + LinkedList<String> urlList = (LinkedList<String>) Helper.uebUrlList(); if (!urlList.isEmpty()) { String url = "http://" + urlList.getFirst() + ":3904/topics/" + PortalApiProperties.getProperty(PortalApiConstants.ECOMP_PORTAL_INBOX_NAME); diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/ueb/EPUebMsgTypes.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/ueb/EPUebMsgTypes.java index 720e0615..7e49f8f2 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/ueb/EPUebMsgTypes.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/ueb/EPUebMsgTypes.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,9 +35,9 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.portal.ueb; +package org.onap.portalapp.portal.ueb; -import org.openecomp.portalsdk.core.onboarding.ueb.UebMsgTypes; +import org.onap.portalsdk.core.onboarding.ueb.UebMsgTypes; public interface EPUebMsgTypes extends UebMsgTypes { diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/utils/EPSystemProperties.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/utils/EPSystemProperties.java index e8772677..f9b69e92 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/utils/EPSystemProperties.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/portal/utils/EPSystemProperties.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,8 +35,9 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.portal.utils; +package org.onap.portalapp.portal.utils; +import org.onap.portalapp.portal.utils.EPCommonSystemProperties; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.PropertySource; import org.springframework.context.annotation.PropertySources; diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/scheduler/LogJob.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/scheduler/LogJob.java index 63b44027..b553ff37 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/scheduler/LogJob.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/scheduler/LogJob.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,9 +35,9 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.scheduler; +package org.onap.portalapp.scheduler; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.quartz.DisallowConcurrentExecution; import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException; diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/scheduler/LogRegistry.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/scheduler/LogRegistry.java index f502a564..c54a26b0 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/scheduler/LogRegistry.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/scheduler/LogRegistry.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,14 +35,14 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.scheduler; +package org.onap.portalapp.scheduler; import java.text.ParseException; import java.util.HashMap; import java.util.Map; -import org.openecomp.portalsdk.core.scheduler.CronRegistry; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.scheduler.CronRegistry; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.context.annotation.DependsOn; import org.springframework.scheduling.quartz.CronTriggerFactoryBean; import org.springframework.scheduling.quartz.JobDetailFactoryBean; diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/scheduler/Register.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/scheduler/Register.java index 00eb7b69..aa3dfe62 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/scheduler/Register.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/scheduler/Register.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,14 +35,14 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.scheduler; +package org.onap.portalapp.scheduler; import java.util.ArrayList; import java.util.List; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.scheduler.Registerable; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.scheduler.Registerable; +import org.onap.portalsdk.core.util.SystemProperties; import org.quartz.Trigger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.DependsOn; diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/scheduler/RegistryAdapter.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/scheduler/RegistryAdapter.java index 542b0d88..82120e1c 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/scheduler/RegistryAdapter.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/scheduler/RegistryAdapter.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,21 +35,21 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.scheduler; +package org.onap.portalapp.scheduler; import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.openecomp.portalsdk.core.scheduler.Registerable; -import org.openecomp.portalsdk.workflow.services.WorkflowScheduleService; +import org.onap.portalsdk.core.scheduler.Registerable; +import org.onap.portalsdk.workflow.services.WorkflowScheduleService; import org.quartz.Trigger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.quartz.SchedulerFactoryBean; import org.springframework.stereotype.Component; /** - * TODO REFACTOR moved from org.openecomp.portalsdk.core.scheduler to + * TODO REFACTOR moved from org.onap.portalsdk.core.scheduler to * org.openecomp.portalapp.scheduler * */ diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/scheduler/SessionMgtRegistry.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/scheduler/SessionMgtRegistry.java index c18b4b35..e263d7ec 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/scheduler/SessionMgtRegistry.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/scheduler/SessionMgtRegistry.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,17 +35,17 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.scheduler; +package org.onap.portalapp.scheduler; import java.text.ParseException; import java.util.HashMap; import java.util.Map; -import org.openecomp.portalapp.portal.listener.UserSessionListener; -import org.openecomp.portalapp.service.sessionmgt.TimeoutHandler; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.scheduler.CronRegistry; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalapp.portal.listener.UserSessionListener; +import org.onap.portalapp.service.sessionmgt.TimeoutHandler; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.scheduler.CronRegistry; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.beans.BeansException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/service/RemoteWebServiceCallServiceImpl.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/service/RemoteWebServiceCallServiceImpl.java index 0b10caf6..f3377055 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/service/RemoteWebServiceCallServiceImpl.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/service/RemoteWebServiceCallServiceImpl.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,15 +35,16 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.service; +package org.onap.portalapp.service; import java.util.List; -import org.openecomp.portalapp.portal.domain.EPApp; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.onboarding.util.CipherUtil; -import org.openecomp.portalsdk.core.service.WebServiceCallServiceImpl; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalapp.portal.domain.EPApp; +import org.onap.portalapp.service.RemoteWebServiceCallService; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.onboarding.util.CipherUtil; +import org.onap.portalsdk.core.service.WebServiceCallServiceImpl; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -70,7 +71,7 @@ public class RemoteWebServiceCallServiceImpl extends WebServiceCallServiceImpl i String encryptedPwdDB = appRecord.getAppPassword(); String appUserName = appRecord.getUsername(); - String decryptedPwd = CipherUtil.decrypt(encryptedPwdDB, + String decryptedPwd = CipherUtil.decryptPKC(encryptedPwdDB, secretKey == null ? SystemProperties.getProperty(SystemProperties.Decryption_Key) : secretKey); if (decryptedPwd.equals(requestPassword) && appUserName.equals(requestAppName)) return true; @@ -110,9 +111,4 @@ public class RemoteWebServiceCallServiceImpl extends WebServiceCallServiceImpl i return (list == null || list.size() == 0) ? null : (EPApp) list.get(0); } - public static void main(String args[]) throws Exception { - String decryptedPwd = CipherUtil.decrypt("okYTaDrhzibcbGVq5mjkVQ==", "AGLDdG4D04BKm2IxIWEr8o=="); - System.out.print(decryptedPwd); - } - } diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/uebhandler/FunctionalMenuHandler.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/uebhandler/FunctionalMenuHandler.java index 8fd70a2b..6127da60 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/uebhandler/FunctionalMenuHandler.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/uebhandler/FunctionalMenuHandler.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,21 +35,21 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.uebhandler; +package org.onap.portalapp.uebhandler; import java.util.List; -import org.openecomp.portalapp.portal.domain.EPUser; -import org.openecomp.portalapp.portal.logging.aop.EPAuditLog; -import org.openecomp.portalapp.portal.service.AdminRolesService; -import org.openecomp.portalapp.portal.service.FunctionalMenuService; -import org.openecomp.portalapp.portal.service.SearchService; -import org.openecomp.portalapp.portal.transport.FunctionalMenuItem; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.onboarding.ueb.UebException; -import org.openecomp.portalsdk.core.onboarding.ueb.UebManager; -import org.openecomp.portalsdk.core.onboarding.ueb.UebMsg; -import org.openecomp.portalsdk.core.service.DataAccessService; +import org.onap.portalapp.portal.domain.EPUser; +import org.onap.portalapp.portal.logging.aop.EPAuditLog; +import org.onap.portalapp.portal.service.AdminRolesService; +import org.onap.portalapp.portal.service.FunctionalMenuService; +import org.onap.portalapp.portal.service.SearchService; +import org.onap.portalapp.portal.transport.FunctionalMenuItem; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.onboarding.ueb.UebException; +import org.onap.portalsdk.core.onboarding.ueb.UebManager; +import org.onap.portalsdk.core.onboarding.ueb.UebMsg; +import org.onap.portalsdk.core.service.DataAccessService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.scheduling.annotation.Async; diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/uebhandler/InitUebHandler.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/uebhandler/InitUebHandler.java index db60c89f..1d3d192c 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/uebhandler/InitUebHandler.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/uebhandler/InitUebHandler.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,15 +35,15 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.uebhandler; +package org.onap.portalapp.uebhandler; import java.util.concurrent.ConcurrentLinkedQueue; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.onboarding.ueb.UebManager; -import org.openecomp.portalsdk.core.onboarding.ueb.UebMsg; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.onboarding.ueb.UebManager; +import org.onap.portalsdk.core.onboarding.ueb.UebMsg; +import org.onap.portalsdk.core.onboarding.util.PortalApiConstants; +import org.onap.portalsdk.core.onboarding.util.PortalApiProperties; // // Adding this class for the sole purpose of insuring that the MainUebHandler really diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/uebhandler/MainUebHandler.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/uebhandler/MainUebHandler.java index 9e2bfff7..d522277b 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/uebhandler/MainUebHandler.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/uebhandler/MainUebHandler.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,18 +35,18 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.uebhandler; +package org.onap.portalapp.uebhandler; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import java.util.concurrent.ConcurrentLinkedQueue; -import org.openecomp.portalapp.portal.ueb.EPUebMsgTypes; -import org.openecomp.portalapp.portal.utils.EPSystemProperties; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.onboarding.ueb.UebMsg; -import org.openecomp.portalsdk.core.onboarding.ueb.UebMsgTypes; +import org.onap.portalapp.portal.ueb.EPUebMsgTypes; +import org.onap.portalapp.portal.utils.EPSystemProperties; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.onboarding.ueb.UebMsg; +import org.onap.portalsdk.core.onboarding.ueb.UebMsgTypes; import org.slf4j.MDC; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Async; diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/uebhandler/WidgetNotificationHandler.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/uebhandler/WidgetNotificationHandler.java index 1f964437..d8dd98f6 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/uebhandler/WidgetNotificationHandler.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/uebhandler/WidgetNotificationHandler.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,22 +35,22 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.uebhandler; +package org.onap.portalapp.uebhandler; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; -import org.openecomp.portalapp.portal.domain.EPApp; -import org.openecomp.portalapp.portal.domain.EPUser; -import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog; -import org.openecomp.portalapp.portal.service.EPAppService; -import org.openecomp.portalapp.portal.service.SearchService; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.onboarding.ueb.UebException; -import org.openecomp.portalsdk.core.onboarding.ueb.UebManager; -import org.openecomp.portalsdk.core.onboarding.ueb.UebMsg; +import org.onap.portalapp.portal.domain.EPApp; +import org.onap.portalapp.portal.domain.EPUser; +import org.onap.portalapp.portal.logging.aop.EPMetricsLog; +import org.onap.portalapp.portal.service.EPAppService; +import org.onap.portalapp.portal.service.SearchService; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.onboarding.ueb.UebException; +import org.onap.portalsdk.core.onboarding.ueb.UebManager; +import org.onap.portalsdk.core.onboarding.ueb.UebMsg; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.scheduling.annotation.Async; diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/util/SessionCookieUtil.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/util/SessionCookieUtil.java index 7ae34aed..edb5ebb6 100644 --- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/util/SessionCookieUtil.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/util/SessionCookieUtil.java @@ -2,11 +2,11 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the “License”); + * under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * @@ -19,7 +19,7 @@ * limitations under the License. * * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); * you may not use this documentation except in compliance with the License. * You may obtain a copy of the License at * @@ -35,20 +35,20 @@ * * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.openecomp.portalapp.util; +package org.onap.portalapp.util; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; -import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.onboarding.listener.PortalTimeoutHandler; -import org.openecomp.portalsdk.core.onboarding.util.CipherUtil; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.portalsdk.core.web.support.AppUtils; +import org.onap.portalapp.portal.utils.EPCommonSystemProperties; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.onboarding.listener.PortalTimeoutHandler; +import org.onap.portalsdk.core.onboarding.util.CipherUtil; +import org.onap.portalsdk.core.onboarding.util.PortalApiConstants; +import org.onap.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.web.support.AppUtils; public class SessionCookieUtil { @@ -78,7 +78,7 @@ public class SessionCookieUtil { public static void setUpUserIdCookie(HttpServletRequest request, HttpServletResponse response,String userId) throws Exception { logger.info("************** session cookie util set up UserId cookie begins"); - userId = CipherUtil.encrypt(userId, + userId = CipherUtil.encryptPKC(userId, SystemProperties.getProperty(SystemProperties.Decryption_Key)); Cookie cookie1 = new Cookie(USER_ID, userId); cookie1.setMaxAge(cookieMaxAge); @@ -98,7 +98,7 @@ public class SessionCookieUtil { if (cookie.getName().equals(USER_ID)) userIdcookie = cookie; if(userIdcookie!=null){ - userId = CipherUtil.decrypt(userIdcookie.getValue(), + userId = CipherUtil.decryptPKC(userIdcookie.getValue(), SystemProperties.getProperty(SystemProperties.Decryption_Key)); } |