apache / incubator-pegasus

Apache Pegasus - A horizontally scalable, strongly consistent and high-performance key-value store
https://pegasus.apache.org/
Apache License 2.0
1.99k stars 312 forks source link

refactor: optimize zookeeper client init for sasl #1914

Closed GehaFearless closed 8 months ago

GehaFearless commented 9 months ago

Reference: zookeeper 3.7 client https://github.com/apache/zookeeper/blob/branch-3.7/zookeeper-client/zookeeper-client-c/src/cli.c

Notes: If you want to use kerberos zookeeper before, you just need to set [security] enable_zookeeper_kerberos to "true" and do some kerberos configurations. After this commit, you also need to set [zookeeper] sasl_mechanisms_type to "GSSAPI". Otherwise, you'll get an error log prompting you to make changes.

Some configurations are added:

[zookeeper]
sasl_service_name = zookeeper
sasl_service_fqdn =
sasl_mechanisms_type =
sasl_user_name =
sasl_realm =
sasl_password_file =