You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@drill.apache.org by "Jaiswal, Vibhor " <vi...@citi.com.INVALID> on 2021/01/28 21:36:57 UTC
How to connect to a Kafka Topic using SASL
Hi ,
I am trying to connect to the my Kafka Topic which is secured by SASL .Where do I need to pass the below parameters-
security:
protocol: SASL_PLAINTEXT
sasl:
mechanism: SCRAM-SHA-256
jaas:
config: org.apache.kafka.common.security.scram.ScramLoginModule required username="******" password="*******";
Can I add them in my storage plugin configuration as below -
{
"type": "kafka",
"kafkaConsumerProps": {
"key.deserializer": "org.apache.kafka.common.serialization.ByteArrayDeserializer",
"auto.offset.reset": "earliest",
"bootstrap.servers": "****-phys:9092,****-phys:9092,*****-phys:9092",
"enable.auto.commit": "true",
"group.id": "drill-query-consumer",
"value.deserializer": "org.apache.kafka.common.serialization.ByteArrayDeserializer",
"sasl_encrypt": "true",
"session.timeout.ms": "30000"
},
"enabled": true
}
Regards,
Vibhor Jaiswal
Re: How to connect to a Kafka Topic using SASL
Posted by luoc <lu...@apache.org>.
Hi,
Yes, you can. kafkaConsumerProps is a `java.util.Properties` Object.
Also welcome to join our Slack Channel: https://bit.ly/3t4rozO <https://bit.ly/3t4rozO>
> 2021年1月29日 上午5:36,Jaiswal, Vibhor <vi...@citi.com.INVALID> 写道:
>
> Hi ,
>
> I am trying to connect to the my Kafka Topic which is secured by SASL .Where do I need to pass the below parameters-
>
> security:
> protocol: SASL_PLAINTEXT
> sasl:
> mechanism: SCRAM-SHA-256
> jaas:
> config: org.apache.kafka.common.security.scram.ScramLoginModule required username="******" password="*******";
>
> Can I add them in my storage plugin configuration as below -
>
> {
> "type": "kafka",
> "kafkaConsumerProps": {
> "key.deserializer": "org.apache.kafka.common.serialization.ByteArrayDeserializer",
> "auto.offset.reset": "earliest",
> "bootstrap.servers": "****-phys:9092,****-phys:9092,*****-phys:9092",
> "enable.auto.commit": "true",
> "group.id": "drill-query-consumer",
> "value.deserializer": "org.apache.kafka.common.serialization.ByteArrayDeserializer",
> "sasl_encrypt": "true",
> "session.timeout.ms": "30000"
> },
> "enabled": true
> }
> Regards,
> Vibhor Jaiswal
>