如何配置 ActiveMQ 来分配“匿名”消息 未经身份验证的用户的用户和角色
我希望设置一个 ActiveMQ 实例(主要作为 STOMP 服务器),它将为来自两种类型客户端的请求提供服务: 经过
- 身份验证的用户,可以读取和写入主题
- 未经身份验证的用户,只能从
我一直在使用 SimpleAuthenticationBroker 的 主题中读取到目前为止,我无论如何都看不到配置上述情况,也没有在代码中看到任何识别用户通过身份验证的通配符的位。
如果我将服务器配置为使用身份验证代理,它将期望所有连接都进行身份验证,这是我不想要的。
我认为我能看到的唯一解决方案是提供我自己的实现来支持我需要的功能,但我很想找到某种内置到服务器中的方法。
I wish to set up a ActiveMQ instance (primarily as a STOMP server) which will service requests from two types of clients:
- authenticated users which can read and write to topics
- non-authenticated users which can only read from topics
I have been using the SimpleAuthenticationBroker so far and I cannot see anyway to configure the above situation, nor do I see any bit in the code which recognises a wildcard for a user to pass authentication.
If I configure the server to use the authentication broker, it will expect ALL connections to authenticate, which is what I don't want.
The only solution I think I can see is to provide my own implementation to support the functionality I require, but I would love to find some way built into the server.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
此功能现在从 ActiveMQ 5.4 开始可用,正如我在搜索相同功能时发现的那样: http: //activemq.apache.org/security.html
This feature is now available as of ActiveMQ 5.4, as I've just found when searching for the same functionality: http://activemq.apache.org/security.html
ActiveMQ 安全实现目前不支持此功能,但您始终可以定义一个具有只读权限、无需密码即可连接的用户。
您可以提出 Jira 增强请求 (https://issues.apache.org/activemq/browse/AMQ )针对此未经身份验证的用户功能,最好为当前插件提供补丁。
This is not currently supported by ActiveMQ security implementation, but you can always define a user that can connect without a password with read-only privileges.
You can raise Jira enhancement request (https://issues.apache.org/activemq/browse/AMQ) for this non-authenticated users feature and better yet provide a patch for current plugins.
从 ActiveMQ 5.4 开始,您可以通过以下方式进行设置。 找到
etc/activemq.xml
文件中的部分并编辑它以包含 simpleAuthenticationPlugin,如下所示:来源:http://activemq.apache.org/security.html
As of ActiveMQ 5.4, you can set it up in the following way. find the
section in the
etc/activemq.xml
file and edit it to contain the simpleAuthenticationPlugin like this:Source: http://activemq.apache.org/security.html