如何配置 ActiveMQ 来分配“匿名”消息 未经身份验证的用户的用户和角色

发布于 2024-07-11 23:24:22 字数 345 浏览 13 评论 0原文

我希望设置一个 ActiveMQ 实例(主要作为 STOMP 服务器),它将为来自两种类型客户端的请求提供服务: 经过

  1. 身份验证的用户,可以读取和写入主题
  2. 未经身份验证的用户,只能从

我一直在使用 SimpleAuthenticationBroker 的 主题中读取到目前为止,我无论如何都看不到配置上述情况,也没有在代码中看到任何识别用户通过身份验证的通配符的位。

如果我将服务器配置为使用身份验证代理,它将期望所有连接都进行身份验证,这是我不想要的。

我认为我能看到的唯一解决方案是提供我自己的实现来支持我需要的功能,但我很想找到某种内置到服务器中的方法。

I wish to set up a ActiveMQ instance (primarily as a STOMP server) which will service requests from two types of clients:

  1. authenticated users which can read and write to topics
  2. 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

你没皮卡萌 2024-07-18 23:24:22

此功能现在从 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

你丑哭了我 2024-07-18 23:24:22

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.

无人问我粥可暖 2024-07-18 23:24:22

从 ActiveMQ 5.4 开始,您可以通过以下方式进行设置。 找到

<plugins>
    ...
</plugins>

etc/activemq.xml 文件中的部分并编辑它以包含 simpleAuthenticationPlugin,如下所示:

<simpleAuthenticationPlugin anonymousAccessAllowed="true" />

来源:http://activemq.apache.org/security.html

As of ActiveMQ 5.4, you can set it up in the following way. find the

<plugins>
    ...
</plugins>

section in the etc/activemq.xml file and edit it to contain the simpleAuthenticationPlugin like this:

<simpleAuthenticationPlugin anonymousAccessAllowed="true" />

Source: http://activemq.apache.org/security.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文