summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-BE-os/src/main
diff options
context:
space:
mode:
authorChristopher Lott (cl778h) <clott@research.att.com>2017-08-23 18:27:19 -0400
committerChristopher Lott (cl778h) <clott@research.att.com>2017-08-23 21:12:56 -0400
commit978dbcf0a196acbafad72fe1e2478ec0e384f02f (patch)
tree17e1ceaa4a12a599320cbb317947e990bf1a5383 /ecomp-portal-BE-os/src/main
parentbc7350dce5b7b1dcd1c472a3922b42c4ea99809d (diff)
Deliver centralized role management feature
Repair multiple defects also. Revise deployment to use docker-compose. Remove all zip archives. Issue: PORTAL-21, PORTAL-25, PORTAL-28, PORTAL-52, PORTAL-69, PORTAL-74, PORTAL-76, PORTAL-80, PORTAL-82 Change-Id: Ie72fec7d35ba78beb162bba6ed27b2caee340c61 Signed-off-by: Christopher Lott (cl778h) <clott@research.att.com>
Diffstat (limited to 'ecomp-portal-BE-os/src/main')
-rw-r--r--ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/authentication/OpenIdConnectLoginStrategy.java2
-rw-r--r--ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/authentication/SimpleLoginStrategy.java6
-rw-r--r--ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/conf/ExternalAppConfig.java2
-rw-r--r--ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/LoginController.java9
-rw-r--r--ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/transport/OnboardingApp.java4
-rw-r--r--ecomp-portal-BE-os/src/main/resources/portal.properties5
-rw-r--r--ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/raptor.properties2
-rw-r--r--ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/system.properties5
-rw-r--r--ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/login.jsp3
9 files changed, 28 insertions, 10 deletions
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/openecomp/portalapp/authentication/OpenIdConnectLoginStrategy.java
index 8365ebc2..48f447b4 100644
--- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/authentication/OpenIdConnectLoginStrategy.java
+++ b/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/authentication/OpenIdConnectLoginStrategy.java
@@ -64,7 +64,7 @@ public class OpenIdConnectLoginStrategy extends org.openecomp.portalsdk.core.aut
user.setLastName(userInfo.getFamilyName());
//store the currently logged in user's information in the session
- EPUserUtils.setUserSession(request, user, new HashSet(), new HashSet(), SystemProperties.getProperty(SystemProperties.AUTHENTICATION_MECHANISM), null);
+ EPUserUtils.setUserSession(request, user, new HashSet(), new HashSet(), SystemProperties.getProperty(SystemProperties.AUTHENTICATION_MECHANISM),null);
logger.info(EELFLoggerDelegate.errorLogger, request.getContextPath());
SessionCookieUtil.preSetUp(request, response);
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/openecomp/portalapp/authentication/SimpleLoginStrategy.java
index c1fee7f3..0c3c4996 100644
--- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/authentication/SimpleLoginStrategy.java
+++ b/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/authentication/SimpleLoginStrategy.java
@@ -24,6 +24,7 @@ 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.service.EPRoleService;
import org.openecomp.portalapp.portal.utils.EPSystemProperties;
import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
@@ -45,6 +46,9 @@ public class SimpleLoginStrategy extends org.openecomp.portalsdk.core.auth.Login
@Autowired
private EPRoleService roleService;
+ @Autowired
+ private EPRoleFunctionService ePRoleFunctionService;
+
private static final String GLOBAL_LOCATION_KEY = "Location";
EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SimpleLoginStrategy.class);
@@ -66,7 +70,7 @@ public class SimpleLoginStrategy extends org.openecomp.portalsdk.core.auth.Login
}
else {
// store the currently logged in user's information in the session
- EPUserUtils.setUserSession(request, commandBean.getUser(), commandBean.getMenu(), commandBean.getBusinessDirectMenu(), "", roleService.getRoleFunctions());
+ EPUserUtils.setUserSession(request, commandBean.getUser(), commandBean.getMenu(), commandBean.getBusinessDirectMenu(), "", ePRoleFunctionService);
logger.info(EELFLoggerDelegate.debugLogger, commandBean.getUser().getOrgUserId() + " exists in the the system.");
}
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/openecomp/portalapp/conf/ExternalAppConfig.java
index a16cf56b..92d63742 100644
--- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/conf/ExternalAppConfig.java
+++ b/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/conf/ExternalAppConfig.java
@@ -200,7 +200,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/controller/LoginController.java b/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/LoginController.java
index 6f3d2278..33cc4dd7 100644
--- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/LoginController.java
+++ b/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/LoginController.java
@@ -36,6 +36,7 @@ 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.EPRoleService;
import org.openecomp.portalapp.portal.service.SharedContextService;
import org.openecomp.portalapp.portal.utils.EPSystemProperties;
@@ -84,6 +85,9 @@ public class LoginController extends EPUnRestrictedBaseController implements Log
@Autowired
private EPRoleService roleService;
+ @Autowired
+ private EPRoleFunctionService ePRoleFunctionService;
+
String viewName = "login";
private String welcomeView;
@@ -142,8 +146,7 @@ public class LoginController extends EPUnRestrictedBaseController implements Log
}
else {
// store the currently logged in user's information in the session
- EPUserUtils.setUserSession(request, commandBean.getUser(), commandBean.getMenu(), commandBean.getBusinessDirectMenu(), SystemProperties.getProperty(SystemProperties.AUTHENTICATION_MECHANISM),
- roleService.getRoleFunctions());
+ EPUserUtils.setUserSession(request, commandBean.getUser(), commandBean.getMenu(), commandBean.getBusinessDirectMenu(), SystemProperties.getProperty(SystemProperties.AUTHENTICATION_MECHANISM),ePRoleFunctionService);
try{
logger.info(EELFLoggerDelegate.debugLogger, "******************* store user info into share context begins");
@@ -249,7 +252,7 @@ public class LoginController extends EPUnRestrictedBaseController implements Log
sbAdditionalInfo.append(String.format("Login-Id: %s, Login-Method: %s, Request-URL: %s", orgUserId, "", fullURL));
logger.info(EELFLoggerDelegate.debugLogger, "*********************** now set up user session for " + orgUserId);
- EPUserUtils.setUserSession(request, commandBean.getUser(), commandBean.getMenu(), commandBean.getBusinessDirectMenu(), SystemProperties.getProperty(SystemProperties.AUTHENTICATION_MECHANISM), roleService.getRoleFunctions());
+ EPUserUtils.setUserSession(request, commandBean.getUser(), commandBean.getMenu(), commandBean.getBusinessDirectMenu(), SystemProperties.getProperty(SystemProperties.AUTHENTICATION_MECHANISM),ePRoleFunctionService);
logger.info(EELFLoggerDelegate.debugLogger, "*********************** now set up user session for " + orgUserId + " finished");
//Store user's information into share context
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/openecomp/portalapp/portal/transport/OnboardingApp.java
index f953634a..eee12234 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/openecomp/portalapp/portal/transport/OnboardingApp.java
@@ -56,6 +56,10 @@ public class OnboardingApp {
public String uebSecret;
public Boolean restrictedApp;
+
+ public Boolean isCentralAuth;
+
+ public String nameSpace;
public void normalize() {
this.name = (this.name == null) ? "" : this.name.trim();
diff --git a/ecomp-portal-BE-os/src/main/resources/portal.properties b/ecomp-portal-BE-os/src/main/resources/portal.properties
index a1982632..e23d04e4 100644
--- a/ecomp-portal-BE-os/src/main/resources/portal.properties
+++ b/ecomp-portal-BE-os/src/main/resources/portal.properties
@@ -42,3 +42,8 @@ ecomp_portal_inbox_name = ECOMP-PORTAL-INBOX-DEV-LOCAL
# Consumer group name for UEB topic.
# Use the special tag to generate a unique one for each sdk-app server.
ueb_app_consumer_group_name = {UUID}
+
+role_access_centralized = remote
+
+ext_req_connection_timeout = 15000
+ext_req_read_timeout = 20000
diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/raptor.properties b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/raptor.properties
index 0c32ef65..68d60140 100644
--- a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/raptor.properties
+++ b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/raptor.properties
@@ -107,7 +107,7 @@ flat_file_upper_limit=200000
request_get_params=c_master,isEmbedded
print_footer_in_download=yes
## footer mentioned here appears in downloaded excel
-footer_first_line=AT&T Proprietary
+footer_first_line=Raptor
footer_second_line=Use Pursuant to Company Instructions
## to run report in popup window
report_in_popup_window=yes
diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/system.properties b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/system.properties
index 0fc2c69d..8f74a9f2 100644
--- a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/system.properties
+++ b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/system.properties
@@ -35,7 +35,7 @@ hb.idle_connection_test_period = 3600
# Ecomp portal title
app_display_name = Portal
-files_path = /demeter/WebApps/dev/ECOMP_APP/files
+files_path = /tmp
context_root = ECOMPPORTAL
# menu settings
menu_query_name = menuData
@@ -116,3 +116,6 @@ authenticate_user_server=http://todo_enter_auth_server_hostname:8383/openid-conn
#window width threshold to collapse left/right menu when page onload
window_width_threshold_left_menu = 1400
window_width_threshold_right_menu = 1350
+
+#External system notification URL
+external_system_notification_url= http://todo_external_system_notification_url?
diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/login.jsp b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/login.jsp
index 1b269d80..a8265c71 100644
--- a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/login.jsp
+++ b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/login.jsp
@@ -37,11 +37,9 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
- <link rel="stylesheet" type="text/css" href="static/fusion/css/jquery-ui.css">
<script src="static/js/jquery-1.10.2.js" type="text/javascript"></script>
<script src= "static/ebz/angular_js/angular.js"></script>
<script src= "static/ebz/angular_js/angular-sanitize.js"></script>
- <script src= "static/ebz/angular_js/app.js"></script>
<script src= "static/ebz/angular_js/gestures.js"></script>
<style>
.terms {
@@ -126,6 +124,7 @@
</div>
</body>
<script>
+var app=angular.module("abs", []);
app.controller("externalLoginController", function ($scope) {
// Table Data