diff options
author | sunil unnava <sunil.unnava@att.com> | 2018-10-15 15:15:50 -0400 |
---|---|---|
committer | sunil unnava <sunil.unnava@att.com> | 2018-10-15 15:16:22 -0400 |
commit | 97bb8fd7e436b07dc0a8e0d56ed9c1952e7ba41e (patch) | |
tree | f9c95eeeaa080e5028360ec4f2fbcdbcaadc69ac /src/main/java/com/att/dmf/mr/service | |
parent | 3c077fdac44a644167b246ed4e0377603f54804d (diff) |
enable/disable AAF using a flag1.1.10
Issue-ID: DMAAP-849
Change-Id: I9aa4cce6c9b484170e006866a58f99926b53e2fc
Signed-off-by: sunil unnava <sunil.unnava@att.com>
Diffstat (limited to 'src/main/java/com/att/dmf/mr/service')
-rw-r--r-- | src/main/java/com/att/dmf/mr/service/impl/TopicServiceImpl.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/com/att/dmf/mr/service/impl/TopicServiceImpl.java b/src/main/java/com/att/dmf/mr/service/impl/TopicServiceImpl.java index f6d7b21..983af7e 100644 --- a/src/main/java/com/att/dmf/mr/service/impl/TopicServiceImpl.java +++ b/src/main/java/com/att/dmf/mr/service/impl/TopicServiceImpl.java @@ -52,6 +52,7 @@ import com.att.dmf.mr.security.DMaaPAAFAuthenticatorImpl; import com.att.dmf.mr.security.DMaaPAuthenticatorImpl; import com.att.dmf.mr.service.TopicService; import com.att.dmf.mr.utils.DMaaPResponseBuilder; +import com.att.dmf.mr.utils.Utils; import com.att.eelf.configuration.EELFLogger; import com.att.eelf.configuration.EELFManager; import com.att.nsa.configs.ConfigDbException; @@ -215,7 +216,7 @@ public class TopicServiceImpl implements TopicService { // else if (user==null && // (null==dmaapContext.getRequest().getHeader("Authorization") && null // == dmaapContext.getRequest().getHeader("cookie")) ) { - else if (user == null && null == dmaapContext.getRequest().getHeader("Authorization") + else if (Utils.isCadiEnabled()&&user == null && null == dmaapContext.getRequest().getHeader("Authorization") && (null == appName && null == dmaapContext.getRequest().getHeader("cookie"))) { LOGGER.error("Failed to create topic" + topicBean.getTopicName() + ", Authentication failed."); |