* ONAP Portal
* ===================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ *
+ * Modifications Copyright © 2018 IBM.
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
*
* ============LICENSE_END============================================
*
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ *
*/
package org.onap.portalapp.conf;
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;
MDC.put(MDC_SERVICE_INSTANCE_ID, "");
MDC.put(MDC_ALERT_SEVERITY, AlarmSeverityEnum.INFORMATIONAL.severity());
MDC.put(MDC_INSTANCE_UUID, SystemProperties.getProperty(SystemProperties.INSTANCE_UUID));
- if("true".equalsIgnoreCase(remotecentralizedsystemaccess)){
- importFromExternalAuth();
- }
+
+ if("true".equalsIgnoreCase(remotecentralizedsystemaccess)){
+ 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.
- *
- */
+
private void importFromExternalAuth() throws Exception {
JSONArray aafAppRoles = new JSONArray();
JSONArray aafUserList = new JSONArray();
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);
+// 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++){
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());
* @return New instance of {@link SchedulerFactoryBean}
*/
- @Bean
+ /*
+ @Bean
public EPUebHelper epUebHelper() {
return new EPUebHelper();
}
public HealthMonitor healthMonitor() {
return new HealthMonitor();
}
+ */
+
/**
* Creates and returns a new instance of a {@link MainUebHandler}.