【问题标题】:RabbitMQ Web Stomp -- Turn off non-TLS connections?RabbitMQ Web Stomp -- 关闭非 TLS 连接?
【发布时间】:2019-05-08 06:57:51
【问题描述】:

我有一个运行良好的 RabbitMQ 实例(运行当前的 3.7.9 + Erlang 21.1.1)。

我使用 Web Stomp 插件通过 websockets 和 stomp.js 使值在浏览器中可用。这也很好用。

我的问题是:如何使用新格式的 .conf 文件禁用非 TLS 连接?我想确保我们不会意外连接到错误的端口。下面是我的 .conf 文件供参考。

当前监听端口:

协议绑定到端口

amqp :: 5672

amqp/ssl :: 5671

聚类 :: 25672

http/web-stomp :: 15674

https :: 15672

https/web-stomp :: 15671

跺脚 :: 61613

listeners.ssl.default = 5671
ssl_options.cacertfile = fullchain.pem
ssl_options.certfile   = cert.pem
ssl_options.keyfile    = privkey.pem
ssl_options.verify     = verify_peer
ssl_options.fail_if_no_peer_cert = false

management.listener.port = 15672
management.listener.ssl = true
management.listener.ssl_opts.cacertfile = fullchain.pem
management.listener.ssl_opts.certfile = cert.pem
management.listener.ssl_opts.keyfile = privkey.pem

web_stomp.ssl.port       = 15671
web_stomp.ssl.backlog    = 1024
web_stomp.ssl.certfile   = cert.pem
web_stomp.ssl.keyfile    = privkey.pem
web_stomp.ssl.cacertfile = fullchain.pem

以下链接非常有帮助,但我没有找到答案。 https://www.rabbitmq.com/ssl.html#peer-verification

https://www.rabbitmq.com/web-stomp.html

【问题讨论】:

    标签: rabbitmq web-stomp


    【解决方案1】:

    从版本 3.7.9 开始,无法禁用 HTTP 侦听器。我建议使用以下设置将侦听器限制为仅限localhost

    web_stomp.tcp.ip = 127.0.0.1
    

    如果您检查netstat -pan | fgrep beam.smp 的输出,您将看到端口15674 绑定到localhost 侦听器。


    注意:RabbitMQ 团队监控 the rabbitmq-users mailing list,并且有时只回答 StackOverflow 上的问题。

    【讨论】:

      猜你喜欢
      • 2016-11-14
      • 1970-01-01
      • 1970-01-01
      • 2017-10-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-05-26
      相关资源
      最近更新 更多