swoole / phpkafka

PHP Kafka client is used in PHP-FPM and Swoole. PHP Kafka client supports 50 APIs, which might be one that supports the most message types ever.
https://longlang.org/
Apache License 2.0
271 stars 47 forks source link

Authentication using the SCRAM-SHA-512 mechanism #73

Closed Rishat7c closed 2 years ago

Rishat7c commented 2 years ago

Can you show an example of authentication using the SCRAM-SHA-512 mechanism? (with SASL_SSL)

An example from the cloud service documentation looks like this

kafkacat -C \
          -b adress:9091 \
          -t topic \
          -X security.protocol=SASL_SSL\
          -X sasl.mechanisms=SCRAM-SHA-512 \
          -X sasl.username="user login" \
          -X sasl.password="consumer password" \
          -X ssl.ca.location=/usr/local/share/ca-certificates/Yandex/YandexCA.crt -Z -K:

cloud service

PHP 7.4.30 (cli) (built: Jun 7 2022 08:38:19) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.30, Copyright (c), by Zend Technologies longlang/phpkafka dev-master f154746 A kafka client. Support php-fpm and Swoole.

Rishat7c commented 2 years ago

Switched to php-rdkafka. There were no problems. Can be closed

wuxi889 commented 1 year ago

@Rishat7c hi, How to verify scram-sha-512 with rdkafka in swoole?

Jeckerson commented 1 year ago

@wuxi889 Here is example of my implementation of this mechanism https://github.com/Jeckerson/phpkafka/commit/c2badad88559dde68e9aefa0e2ed067aba401e50