summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-BE-os/src/main
diff options
context:
space:
mode:
authorKotta, Shireesha (sk434m) <shireesha.kotta@att.com>2018-10-09 11:28:41 -0400
committerKotta, Shireesha (sk434m) <shireesha.kotta@att.com>2018-10-09 16:55:17 -0400
commit47bcf09a62fb260a60b90d4f6c8406d956ab5a8a (patch)
treed1eb28e038f362bc4a68207c6f6a74535e47f782 /ecomp-portal-BE-os/src/main
parent15586620ec762ba42f2c6ec1b596ea6ea4425355 (diff)
Add roles to user
Issue-ID: PORTAL-432 add roles to user when the app is centralized Change-Id: I46a782be24ea1804597dc7205bf98170731ffe4d Signed-off-by: Kotta, Shireesha (sk434m) <shireesha.kotta@att.com>
Diffstat (limited to 'ecomp-portal-BE-os/src/main')
-rw-r--r--ecomp-portal-BE-os/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java20
-rw-r--r--ecomp-portal-BE-os/src/main/resources/music.properties12
2 files changed, 12 insertions, 20 deletions
diff --git a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java
index e9c48251..ac7c3f72 100644
--- a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java
+++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java
@@ -162,23 +162,15 @@ public class ExternalAppConfig extends AppConfig implements Configurable {
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.
- *
- * This is being handled in AAF directly, so it has been deprecated
- *
- */
- @Deprecated
+
private void importFromExternalAuth() throws Exception {
JSONArray aafAppRoles = new JSONArray();
JSONArray aafUserList = new JSONArray();
@@ -195,8 +187,8 @@ public class ExternalAppConfig extends AppConfig implements Configurable {
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++){
diff --git a/ecomp-portal-BE-os/src/main/resources/music.properties b/ecomp-portal-BE-os/src/main/resources/music.properties
index fdf6e499..87c4c942 100644
--- a/ecomp-portal-BE-os/src/main/resources/music.properties
+++ b/ecomp-portal-BE-os/src/main/resources/music.properties
@@ -12,19 +12,19 @@ music.atomic.put = false
music.cleanup.frequency = 6
#how old of session need to be cleaned up (hour)
music.cleanup.threshold = 10
-cassandra.host=135.197.226.103
-zookeeper.host=135.197.226.103, 135.197.226.108, 135.197.226.119
+cassandra.host=localhost
+zookeeper.host=localhost
cassandra.user=cassandra
cassandra.password=cassandra
#Music API
-#music.endpoint = http://vm-ep-dev4.research.att.com/MUSIC/rest/
+#music.endpoint = localhost
#music.version = v2
#music.keyspace = keyspaces
#music.x.minor.version = 3
#music.x.patch.version = 0
-#music.ns = com.att.ecomp.portal.demeter
-#music.user.id = m00468@portal.ecomp.att.com
-#music.password = friedG33nS-
+#music.ns = org.onap.portal
+#music.user.id = xxxxxx@portal.onap.org
+#music.password = xxxxxx
#music.consistency.info = type
#music.consistency.info.value = eventual \ No newline at end of file