aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap/music/main/MusicCore.java
diff options
context:
space:
mode:
authorThomas Nelson Jr (arthurdent3) tn1381@att.com <tn1381@att.com>2018-03-22 00:25:28 -0400
committerThomas Nelson Jr (arthurdent3) tn1381@att.com <tn1381@att.com>2018-03-22 00:25:28 -0400
commitde47cea9e656dabfbf3608287238041ab263f05e (patch)
treea05e73a52dd1ff7458ffbc9c341c42a7bc052f0b /src/main/java/org/onap/music/main/MusicCore.java
parente0a891de60058eab2b92082f7cc2dde59f0f42be (diff)
Fix for HAS to run its CSIT
Default action of AID(AuthID) was to allow only one keyspace. HAS required the ability to create more than one. Also included are some Logging and response fixes. Change-Id: I30b7d0f5a5c6e535ff2b737dc58b8d4fbd427d02 Issue-ID: MUSIC-64, OPTFRA-191 Signed-off-by: Thomas Nelson Jr (arthurdent3) tn1381@att.com <tn1381@att.com>
Diffstat (limited to 'src/main/java/org/onap/music/main/MusicCore.java')
-rw-r--r--src/main/java/org/onap/music/main/MusicCore.java19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/main/java/org/onap/music/main/MusicCore.java b/src/main/java/org/onap/music/main/MusicCore.java
index 4929edd8..abeedf6f 100644
--- a/src/main/java/org/onap/music/main/MusicCore.java
+++ b/src/main/java/org/onap/music/main/MusicCore.java
@@ -897,17 +897,7 @@ public class MusicCore {
return resultMap;
}
boolean isAAF = Boolean.valueOf(isAAFApp);
- if (!isAAF && !(operation.equals("createKeySpace"))) {
- if(aid == null) {
- resultMap.put("Exception", "Aid is mandatory for nonAAF applications ");
- return resultMap;
- }
- resultMap = CachingUtil.authenticateAIDUser(aid, keyspace);
-
- if (!resultMap.isEmpty())
- return resultMap;
- }
- if (aid == null && (userId == null || password == null)) {
+ if (userId == null || password == null) {
logger.error(EELFLoggerDelegate.errorLogger,"", AppMessages.MISSINGINFO ,ErrorSeverity.WARN, ErrorTypes.AUTHENTICATIONERROR);
logger.error(EELFLoggerDelegate.errorLogger,"One or more required headers is missing. userId: " + userId
+ " :: password: " + password);
@@ -915,7 +905,12 @@ public class MusicCore {
"UserId and Password are mandatory for the operation " + operation);
return resultMap;
}
-
+ if(!isAAF && !(operation.equals("createKeySpace"))) {
+ resultMap = CachingUtil.authenticateAIDUser(nameSpace, userId, password, keyspace);
+ if (!resultMap.isEmpty())
+ return resultMap;
+
+ }
if (isAAF && nameSpace != null && userId != null && password != null) {
boolean isValid = true;
try {