diff options
author | 2018-10-15 15:15:50 -0400 | |
---|---|---|
committer | 2018-10-15 15:16:22 -0400 | |
commit | 97bb8fd7e436b07dc0a8e0d56ed9c1952e7ba41e (patch) | |
tree | f9c95eeeaa080e5028360ec4f2fbcdbcaadc69ac /src/main/java/com/att/dmf/mr/beans/DMaaPKafkaMetaBroker.java | |
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/beans/DMaaPKafkaMetaBroker.java')
-rw-r--r-- | src/main/java/com/att/dmf/mr/beans/DMaaPKafkaMetaBroker.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/com/att/dmf/mr/beans/DMaaPKafkaMetaBroker.java b/src/main/java/com/att/dmf/mr/beans/DMaaPKafkaMetaBroker.java index cbb58e4..acf4824 100644 --- a/src/main/java/com/att/dmf/mr/beans/DMaaPKafkaMetaBroker.java +++ b/src/main/java/com/att/dmf/mr/beans/DMaaPKafkaMetaBroker.java @@ -84,9 +84,11 @@ public class DMaaPKafkaMetaBroker implements Broker1 { } props.put(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, fkafkaBrokers ); + if(Utils.isCadiEnabled()){ props.put("sasl.jaas.config", "org.apache.kafka.common.security.plain.PlainLoginModule required username='admin' password='"+Utils.getKafkaproperty()+"';"); props.put(AdminClientConfig.SECURITY_PROTOCOL_CONFIG, "SASL_PLAINTEXT"); props.put("sasl.mechanism", "PLAIN"); + } fKafkaAdminClient=AdminClient.create ( props ); @@ -119,10 +121,11 @@ public class DMaaPKafkaMetaBroker implements Broker1 { fkafkaBrokers = "localhost:9092"; } - + if(Utils.isCadiEnabled()){ props.put("sasl.jaas.config", "org.apache.kafka.common.security.plain.PlainLoginModule required username='admin' password='"+Utils.getKafkaproperty()+"';"); props.put(AdminClientConfig.SECURITY_PROTOCOL_CONFIG, "SASL_PLAINTEXT"); props.put("sasl.mechanism", "PLAIN"); + } props.put(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, fkafkaBrokers ); fKafkaAdminClient=AdminClient.create ( props ); |