Can Apache ZooKeeper 4lw (FourLetterWord) be used with mTLS (mutual Transport Layer Security)?

ecbunoof  于 2022-12-09  发布在  Apache
关注(0)|答案(1)|浏览(125)

我已经在不安全的连接上使用了4lw,但是我想在mTLS安全的连接上使用4lw。到目前为止还没有成功。
如果不支持,建议使用什么来代替4lw?AdminServer?

pieyvz9o

pieyvz9o1#

Using Zookeeper with mTLS and ncat 4lw

  1. Create keystore in p12 format from JKS (nc need PEM)
    keytool -importkeystore -srckeystore keystore.jks -destkeystore keystore.p12 -srcstoretype jks -deststoretype pkcs12
  2. Export private key and cert to PEM
    openssl pkcs12 -in keystore.p12 -nokeys -out ~/cert.pem openssl pkcs12 -in keystore.p12 -out ~/key.pem
  3. Run nc with --ssl options (need password for private key)
    echo "stat" | nc --ssl --ssl-cert ~/cert.pem --ssl-key ~/key.pem zookeeper_host port
    make your file with private key secured (correct file permission, not read for group and all) and encrypted!

相关问题