简体   繁体   English

SSL 的 Spring Cloud Stream Binder Solace 配置

[英]Spring Cloud Stream Binder Solace configuration for SSL

We are using Spring cloud stream solace binders.我们正在使用 Spring Cloud 流安慰粘合剂。 We are trying to configure SSL cert when connecting to solace queue and topic.我们正在尝试在连接到安慰队列和主题时配置 SSL 证书。 Below is the configuration that we use in java and is working-以下是我们在 java 中使用的配置,并且正在运行 -

    properties.setProperty("Solace_JMS_VPN", vpn);
    properties.setProperty("Solace_JMS_Authentication_Scheme",  "AUTHENTICATION_SCHEME_CLIENT_CERTIFICATE");
    properties.setProperty("SOLACE_JMS_SSL_VALIDATE_CERTIFICATE","true");
    properties.setProperty("Solace_JMS_SSL_TrustStore", <path>);            
    properties.setProperty("Solace_JMS_SSL_TrustStorePassword", <pwd>);

We need help in configuring these properties in the solace binder.我们需要帮助来在 solace 活页夹中配置这些属性。 Currently we have the below entry -目前我们有以下条目 -

binders:
    local_solace:
          type: solace
          environment:
            solace:
              java:
                host: tcps://<host:port>
                msgVpn: <vpn>
                clientUsername: <username>

I assume that you are following the tutorial at https://solace.com/samples/solace-samples-spring/spring-cloud-streams/ and the solace binder properties mentioned above are those specified in the application.yml file.我假设您正在关注https://solace.com/samples/solace-samples-spring/spring-cloud-streams/ 上的教程,并且上面提到的 solace 绑定器属性是 application.yml 文件中指定的那些。

At the very minimum, you will need to specify the following additional properties for one-way SSL to work:至少,您需要为单向 SSL 指定以下附加属性才能工作:

  • ssl_trust_store ssl_trust_store
  • ssl_trust_store_password ssl_trust_store_password
  • ssl_validate_certificate ssl_validate_certificate

The additional properties in the application.yml file will be declared as such: application.yml 文件中的附加属性将被声明为:

  binders:
    local_solace:
      type: solace
      environment:
        solace:
          java:
            host: tcps://<host:port>
            msgVpn: <VPN>
            clientUsername: <Username>
            apiProperties:
              ssl_trust_store: <path_to_trust_store>
              ssl_trust_store_password: <trust_store_password>
              ssl_validate_certificate: true

Also, do take note of the following that is required for one-way SSL to work:此外,请注意单向 SSL 工作所需的以下内容:

a.一种。 A server certificate should already be configured on the broker应该已经在代理上配置了服务器证书

b.The port specified in host: tcps://<host:port> is the SSL port.host: tcps://<host:port>指定的host: tcps://<host:port>是 SSL 端口。 This can be verified through the following CLI command:这可以通过以下 CLI 命令进行验证:

solace# show service

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM