diff options
author | 2018-03-19 16:46:51 -0400 | |
---|---|---|
committer | 2018-03-19 16:47:12 -0400 | |
commit | bd9c085e11b6c735cd674599454e44f00b708400 (patch) | |
tree | c45d8fcb1f9a1b3272dceaacb636359a132d23f2 /src/main/java/com/att/nsa/cambria/service | |
parent | 2815416d16d9b2f28a0e7c71ce84e487c18c387b (diff) |
changes for deployment errors
Issue-ID: DMAAP-332
Change-Id: I740d03e88dd5104806c5302a01fd579a7c280b5c
Signed-off-by: su622b <sunil.unnava@att.com>
Diffstat (limited to 'src/main/java/com/att/nsa/cambria/service')
-rw-r--r-- | src/main/java/com/att/nsa/cambria/service/impl/AdminServiceImpl.java | 2 | ||||
-rw-r--r-- | src/main/java/com/att/nsa/cambria/service/impl/TopicServiceImpl.java | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/com/att/nsa/cambria/service/impl/AdminServiceImpl.java b/src/main/java/com/att/nsa/cambria/service/impl/AdminServiceImpl.java index 2585ab5..ead9c36 100644 --- a/src/main/java/com/att/nsa/cambria/service/impl/AdminServiceImpl.java +++ b/src/main/java/com/att/nsa/cambria/service/impl/AdminServiceImpl.java @@ -161,7 +161,7 @@ public class AdminServiceImpl implements AdminService { { final NsaApiKey user = DMaaPAuthenticatorImpl.getAuthenticatedUser(dMaaPContext); - if ( user == null || !user.getKey ().equals ( "admin" ) ) + if ( (!DMaaPAuthenticatorImpl.isIgnoreAuth())&&(user == null || !user.getKey ().equals ( "admin" )) ) { throw new AccessDeniedException (); } diff --git a/src/main/java/com/att/nsa/cambria/service/impl/TopicServiceImpl.java b/src/main/java/com/att/nsa/cambria/service/impl/TopicServiceImpl.java index c12be2f..3690583 100644 --- a/src/main/java/com/att/nsa/cambria/service/impl/TopicServiceImpl.java +++ b/src/main/java/com/att/nsa/cambria/service/impl/TopicServiceImpl.java @@ -195,7 +195,7 @@ public class TopicServiceImpl implements TopicService { String key = null; String appName=dmaapContext.getRequest().getHeader("AppName"); String enfTopicName= com.att.ajsc.beans.PropertiesMapBean.getProperty(CambriaConstants.msgRtr_prop,"enforced.topic.name.AAF"); - + if(DMaaPAuthenticatorImpl.isIgnoreAuth()){ if(user != null) { key = user.getKey(); @@ -266,6 +266,7 @@ public class TopicServiceImpl implements TopicService { } } + } try { final String topicName = topicBean.getTopicName(); @@ -315,7 +316,8 @@ public class TopicServiceImpl implements TopicService { LOGGER.info("Authenticating the user, as ACL authentication is not provided"); // String permission = "com.att.dmaap.mr.topic"+"|"+topicName+"|"+"manage"; String permission = ""; - String nameSpace = topicName.substring(0,topicName.lastIndexOf(".")); + String nameSpace=""; + nameSpace = topicName.substring(0,topicName.lastIndexOf(".")); String mrFactoryVal=AJSCPropertiesMap.getProperty(CambriaConstants.msgRtr_prop,"msgRtr.topicfactory.aaf"); // String tokens[] = topicName.split(".mr.topic."); permission = mrFactoryVal+nameSpace+"|destroy"; |