1

有什么方法可以在没有 javascript 上的兔子服务器用户名和密码的情况下连接到 rabbitmq。

我不想使用这种不安全的方式

  var client = Stomp.overWS('ws://localhost:61614/stomp');
  client.connect(login, passcode, connectCallback);
4

1 回答 1

3

At some level, the stomp connection will require a username/password. The way to secure the connection is to create a special limited RabbitMQ user with the minimum set of permissions required. You can see details of the permissions options on the RabbitMQ ACL page.

Additionally, if you don't want to pass a username/password from the stomp client, you can set a "default user" which is used with an anonymous stomp connection. See the "Default User" section of the RabbitMQ STOMP page.

However, be aware that while you aren't passing a username/password from the client, the client will still have all the permissions on the RabbitMQ broker that the "default user" has.

于 2015-04-07T11:45:17.890 回答