diff options
author | sunil unnava <sunil.unnava@att.com> | 2018-10-15 17:02:34 -0400 |
---|---|---|
committer | sunil unnava <sunil.unnava@att.com> | 2018-10-15 17:02:59 -0400 |
commit | 80d6c640248271da46157fd3189f72b20596ea1b (patch) | |
tree | c7b2ab5c3a57187cf925c011edd2447cb12c197c /src/main/java | |
parent | aa67165956a2723ecb48707e60d12bed78e3c601 (diff) |
add AAF based on a flag
Issue-ID: DMAAP-849
Change-Id: I8f72ce6cd23bb1205fc6a1a54bd44bef8db0dfa8
Signed-off-by: sunil unnava <sunil.unnava@att.com>
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/com/att/nsa/dmaap/util/DMaaPAuthFilter.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/com/att/nsa/dmaap/util/DMaaPAuthFilter.java b/src/main/java/com/att/nsa/dmaap/util/DMaaPAuthFilter.java index 652bfc2..64480e6 100644 --- a/src/main/java/com/att/nsa/dmaap/util/DMaaPAuthFilter.java +++ b/src/main/java/com/att/nsa/dmaap/util/DMaaPAuthFilter.java @@ -29,6 +29,7 @@ import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; +import com.att.dmf.mr.utils.Utils; import com.att.eelf.configuration.EELFLogger; import com.att.eelf.configuration.EELFManager; import org.springframework.stereotype.Component; @@ -69,10 +70,11 @@ public class DMaaPAuthFilter extends CadiFilter { log.info("inside servlet filter Cambria Auth Headers checking before doing other Authentication"); HttpServletRequest request = (HttpServletRequest) req; boolean forceAAF = Boolean.valueOf(System.getProperty("forceAAF")); + //if (forceAAF || null != request.getHeader("Authorization") ){ - if (forceAAF || null != request.getHeader("Authorization") || + if (Utils.isCadiEnabled()&&(forceAAF || null != request.getHeader("Authorization") || (null != request.getHeader("AppName") && request.getHeader("AppName").equalsIgnoreCase("invenio") && - null != request.getHeader("cookie"))){ + null != request.getHeader("cookie")))){ super.doFilter(req, res, chain); } else { |