이 콘텐츠는 선택한 언어로 제공되지 않습니다.

3.4. Setting up SSL for A-MQ


ActiveMQ includes key and trust stores that reference a dummy self signed certificate.
To install and configure SSL support for A-MQ, you need to create a keystore file to store the server's private key and self-signed certificate and uncomment the SSL HTTP/1.1 Connector entry in conf/server.xml.
Note
When you create a broker certificate and trust stores for your installation, either overwrite the values in the conf directory or delete the existing dummy key and trust stores so they do not interfere.

Starting the Broker with SSL

To start the broker, use the >javax.net.ssl.keyStore and javax.net.ssl.keyStorePassword system properties
  1. Set the SSL_OPTS environment variable so that it knows to use the broker keystore. <export SSL_OPTS = -Djavax.net.ssl.keyStore=/path/to/broker.ks -Djavax.net.ssl.keyStorePassword=password
    Alternately, you can set the system properties in the broker configuration file.
To configure the security context in the broker configuration file, follow the instructions below:
  • In the conf/activemq.xml, edit the attributes in the sslContext element.
  • Set the values for KeyStore, Key StorePassword, truststore, trustStorePassword.
    <beans>
      <broker>
        <sslContext>
          <sslContext keyStore="file:${activemq.base}/conf/broker.ks"
            keyStorePassword="password"
            trustStore="file:${activemq.base}/conf/broker.ts"
            trustStorePassword="password"/>
         </sslContext>
      </broker>
    </beans>
keyStore
equivalent to setting javax.net.ssl.keyStore
keyStorePassword
equivalent to setting javax.net.ssl.keyStorePassword
keyStoreType
equivalent to setting javax.net.ssl.keyStoreType
keyStoreAlgorithm
defaults to JKS
trustStore
equivalent to setting javax.net.ssl.trustStore
trustStorePassword
equivalent to setting javax.net.ssl.trustStorePassword
trustStoreType
equivalent to setting javax.net.ssl.trustStoreType

Verifying Client Certificates

To verify client certificates, follow the below instructions:
  • Export the client's certificate to share it with the broker. keytool -export -alias client -keystore client.ks -file client_cert
  • Create a truststore for the broker and import the client's certificate. This ensures that the broker trusts the client.
    keytool -import -alias client -keystore broker.ts -file client_cert
  • Add javax.net.ssl.trustStore system property to SSL_OPTS Djavax.net.ssl.trustStore=/path/to/broker.ts
  • Instruct ActiveMQ to require client authentication by setting the following in activemq.xml.
    <transportConnectors>
      <transportConnector name="ssl" uri="ssl://localhost:61617?needClientAuth=true"/>
    </transportConnectors>
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.