0

I've used 4lw over unsecured connections, but I want to use 4lw over connections secured with mTLS. So far no success.

If this isn't supported, what is recommended in place of 4lw? AdminServer?

Cedric
  • 41
  • 1

1 Answers1

0

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!

jBee
  • 193
  • 1
  • 1
  • 11