【发布时间】:2016-08-30 02:42:00
【问题描述】:
一点上下文
我有 3 个实例在运行 Zookeeper 和 ActiveMQ。
我想让我的通信安全,所以我必须担心 3 件事:
- follower 和 leader 如何通信(Zookeeper 的法定人数)
- ActiveMQ 消费者如何与其通信(应用程序/SSL)
- 我的团队如何访问 ActiveMQ WebConsole (https)
好的,第一种情况is not possible according to Zookeeper documentation.
在我的第二个案例中;我已经创建了我自己的 CA 证书,以及我自己的证书和密钥库。这就是我在 /etc/activemq/conf/activemq.xml 上使用它们的方式:
...
<persistenceAdapter>
<replicatedLevelDB
directory="${activemq.data}/leveldb"
replicas="3"
bind="tcp://0.0.0.0:61616"
zkAddress="activemq1.company.com:2881,activemq2.company.com:2881,activemq3.company.com:2881"
zkPassword="password"
zkPath="/activemq/leveldb-stores"
hostname="activemq3.company.com"
/>
</persistenceAdapter>
<sslContext>
<sslContext keyStore="/usr/share/ca-certificates/company/activemq/keystore" keyStorePassword="password-2" trustStore="/usr/share/ca-certificates/company/activemq/trustore" trustStorePassword="password-2" />
</sslContext>
...
最后,我的第三个案例;为了获得有效的证书颁发机构,我使用Let'sEncrypt api 生成新的有效证书,并使用它们创建一个新的密钥库;像这样使用:
...
<!--
Enable this connector if you wish to use https with web console
-->
<bean id="SecureConnector" class="org.eclipse.jetty.server.ServerConnector">
<constructor-arg ref="Server" />
<constructor-arg>
<bean id="handlers" class="org.eclipse.jetty.util.ssl.SslContextFactory">
<property name="keyStorePath" value="${activemq.conf}/keystore.jks" />
<property name="keyStorePassword" value="password-3" />
</bean>
</constructor-arg>
<property name="port" value="8162" />
</bean>
...
问题
我应该使用 Let'sEncrypt 生成的同一个密钥库来进行 SSL 和 HTTPS 通信吗?还是我应该将它们分开以采取更多(也许?)安全措施?
【问题讨论】:
标签: java ssl https activemq apache-zookeeper