SSL/TLS Configuration for Zookeeper,BookKeeper and Pulsar
See original GitHub issuehello ,
i want to add ssl/tls configuration to zookeeper using the zookeeper.conf , so first step is modify the the args in the statefulset.yaml file by deleting bin/generate-zookeeper-config.sh conf/zookeeper.conf && cat conf/zookeeper.conf &&
from the image ,
args: - > bin/wait-for-all-dns.sh && bin/wait-for-my-dns.sh && bin/apply-config-from-env.py conf/zookeeper.conf && bin/apply-config-from-env.py conf/pulsar_env.sh && bin/pulsar zookeeper
if i want to provide zookeeper.conf externally via a configmap , how do i load so that i can add all the ssl configurtion into that file.
the error when starting zookeeper POD with above configuration is ,
> Traceback (most recent call last):
> File "bin/apply-config-from-env.py", line 44, in <module>
> for line in open(conf_filename):
> IOError: [Errno 2] No such file or directory: 'conf/pulsar_env.sh
Thanks,
Issue Analytics
- State:
- Created 4 years ago
- Comments:33 (12 by maintainers)
Top GitHub Comments
@sijie @skyrocknroll @rounak11 , did not have time to prepare a document when i completed enabling TLS in February.Hope the following config is helpful bin/pulsar(sh file) and conf files,
ZooKeeper:
zookeeper.conf:
Bookkeeper:
bookkeeper.conf:
` tlsProvider=OpenSSL
tlsProviderFactoryClass=org.apache.bookkeeper.tls.TLSContextFactory
tlsClientAuthentication=true
tlsEnabledProtocols=TLSv1.2
tlsKeyStoreType=JKS
tlsKeyStore=bookie.keystore.jks
tlsKeyStorePasswordPath=bookie.keystore.passwd
tlsTrustStoreType=JKS
tlsTrustStore=bookie.truststore.jks
tlsTrustStorePasswordPath=bookie.truststore.passwd
clientTrustStore=client.truststore.jks clientTrustStorePasswordPath=client.truststore.passwd clientKeyStore=client.keystore.jks clientKeyStorePasswordPath=client.keystore.passwd`
Pulsar(Broker):
if [ $COMMAND == "broker" ]; then PULSAR_LOG_FILE=${PULSAR_LOG_FILE:-"pulsar-broker.log"} exec $JAVA $OPTS -Djavax.net.debug=all -Djavax.net.debug=ssl:handshake:verbose -Djava.security.auth.login.config=bk_jaas.conf $ASPECTJ_AGENT -Dpulsar.log.file=$PULSAR_LOG_FILE org.apache.pulsar.PulsarBrokerStarter --broker-conf $PULSAR_BROKER_CONF $@
broker.conf
`tlsEnabled=true
tlsCertRefreshCheckDurationSec=300
tlsCertificateFilePath=tls.crt.pem
tlsKeyFilePath=tls.key.pem
tlsTrustCertsFilePath=ca.cert.pem
tlsAllowInsecureConnection=false
tlsProtocols=TLSv1.2,TLSv1.1
tlsRequireTrustedClientCertOnConnect=false
authenticationEnabled=true
authenticationProviders=org.apache.pulsar.broker.authentication.AuthenticationProviderTls
authorizationEnabled=false
authorizationProvider=org.apache.pulsar.broker.authorization.PulsarAuthorizationProvider
brokerClientTlsEnabled=true brokerClientAuthenticationPlugin=org.apache.pulsar.client.impl.auth.AuthenticationTls brokerClientAuthenticationParameters=tlsCertFile:tls.crt.pem,tlsKeyFile:tls.key.pem brokerClientTrustCertsFilePath=ca.cert.pem
bookkeeperTLSProviderFactoryClass=org.apache.bookkeeper.tls.TLSContextFactory
bookkeeperTLSClientAuthentication=true
bookkeeperTLSKeyFileType=JKS
bookkeeperTLSTrustCertTypes=JKS
bookkeeperTLSKeyStorePasswordPath=bookie.keystore.passwd
bookkeeperTLSTrustStorePasswordPath=bookie.truststore.passwd`
@rounak11 I have fixed the links. Please check them again.