diff options
author | su622b <sunil.unnava@att.com> | 2018-03-21 16:22:41 -0400 |
---|---|---|
committer | su622b <sunil.unnava@att.com> | 2018-03-21 16:22:53 -0400 |
commit | 460b2066308869e50f7b5320726780676d0d1f05 (patch) | |
tree | 74a6512b80e5dd4bfc3ffc3a8a0d568a03c269de /src/main | |
parent | 30a84f5af13658f780270b6fc474b344310d7464 (diff) |
changes for deployment errorsv1.1.2
Issue-ID: DMAAP-332
Change-Id: I28da5fea23c8680fb921c97348eee26edb86ed35
Signed-off-by: su622b <sunil.unnava@att.com>
Diffstat (limited to 'src/main')
3 files changed, 3 insertions, 9 deletions
diff --git a/src/main/java/com/att/nsa/cambria/security/DMaaPAuthenticatorImpl.java b/src/main/java/com/att/nsa/cambria/security/DMaaPAuthenticatorImpl.java index dfcb0d5..709d035 100644 --- a/src/main/java/com/att/nsa/cambria/security/DMaaPAuthenticatorImpl.java +++ b/src/main/java/com/att/nsa/cambria/security/DMaaPAuthenticatorImpl.java @@ -132,9 +132,5 @@ public class DMaaPAuthenticatorImpl<K extends NsaApiKey> implements DMaaPAuthent this.fAuthenticators.add(a); } - public static boolean isIgnoreAuth(){ - return (System.getenv("ignoreAuth")!=null) ? Boolean.valueOf(System.getenv("ignoreAuth")):(System.getProperty("ignoreAuth")!=null? Boolean.valueOf(System.getProperty("ignoreAuth")):false ); - - } } 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 ead9c36..8b651f5 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 ( (!DMaaPAuthenticatorImpl.isIgnoreAuth())&&(user == null || !user.getKey ().equals ( "admin" )) ) + if ( (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 3690583..a9c1882 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,6 @@ 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(); @@ -214,7 +213,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 (user == null && null==dmaapContext.getRequest().getHeader("Authorization") && (null == appName && null == dmaapContext.getRequest().getHeader("cookie"))) { LOGGER.error("Failed to create topic"+topicBean.getTopicName()+", Authentication failed."); @@ -223,7 +222,7 @@ public class TopicServiceImpl implements TopicService { errorMessages.getCreateTopicFail()+" "+errorMessages.getNotPermitted1()+" create "+errorMessages.getNotPermitted2()); LOGGER.info(errRes.toString()); throw new DMaaPAccessDeniedException(errRes); - } + }*/ if (user == null && (null!=dmaapContext.getRequest().getHeader("Authorization") || null != dmaapContext.getRequest().getHeader("cookie"))) { @@ -266,7 +265,6 @@ public class TopicServiceImpl implements TopicService { } } - } try { final String topicName = topicBean.getTopicName(); |