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 | |
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')
-rw-r--r-- | src/main/java/com/att/nsa/dmaap/util/DMaaPAuthFilter.java | 6 | ||||
-rw-r--r-- | src/main/resources/docker-compose/docker-compose.yml | 15 |
2 files changed, 19 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 { diff --git a/src/main/resources/docker-compose/docker-compose.yml b/src/main/resources/docker-compose/docker-compose.yml index aece067..40a183e 100644 --- a/src/main/resources/docker-compose/docker-compose.yml +++ b/src/main/resources/docker-compose/docker-compose.yml @@ -6,11 +6,24 @@ services: - "2181:2181" kafka: + #CADI integrated kafka image + #image: nexus3.onap.org:10001/onap/dmaap/kafka01101:0.0.2 image: nexus3.onap.org:10001/onap/dmaap/kafka01101:0.0.1 ports: - "9092:9092" environment: + enableCadi: false KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 + #Properties required for using the CADI integrated Kafka + #KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL_SASL_PLAINTEXT:SASL_PLAINTEXT,EXTERNAL_SASL_PLAINTEXT:SASL_PLAINTEXT + #KAFKA_ADVERTISED_LISTENERS: INTERNAL_SASL_PLAINTEXT://kafka:9092 + #KAFKA_LISTENERS: INTERNAL_SASL_PLAINTEXT://0.0.0.0:9092 + #KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL_SASL_PLAINTEXT + #KAFKA_SASL_ENABLED_MECHANISMS: PLAIN + #KAFKA_SASL_MECHANISM_INTER_BROKER_PROTOCOL: PLAIN + #KAFKA_AUTHORIZER_CLASS_NAME: org.onap.dmaap.kafkaAuthorize.KafkaCustomAuthorizer + #aaf_locate_url: https://aaf-onap-test.osaaf.org:8095 + #Remove the below 4 properties if CADI is enabled KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL_PLAINTEXT:PLAINTEXT,EXTERNAL_PLAINTEXT:PLAINTEXT KAFKA_ADVERTISED_LISTENERS: INTERNAL_PLAINTEXT://kafka:9092 KAFKA_LISTENERS: INTERNAL_PLAINTEXT://0.0.0.0:9092 @@ -21,6 +34,8 @@ services: - zookeeper dmaap: + #CADI integrated MR image + #image: ${NEXUS_DOCKER_REPO}/onap/dmaap/dmaap-mr:1.1.7 image: nexus3.onap.org:10001/onap/dmaap/dmaap-mr:1.1.6 ports: - "3904:3904" |