diff options
Diffstat (limited to 'src/main/java/com/att')
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(); |