如何在 activeMQ web 控制台中创建只读用户

how to create read only user in activeMQ web console

我正在尝试在 activeMQ 控制台中创建一个只读用户,我也找到了 this and this。来自 Whosebug 的第二个 post 没有帮助,因为它将 Web 控制台部署到外部服务器。 pivotal 的第二页看起来很有希望,我尝试使用 activeMQ 5.14.1 版,但它也没有用。每当我尝试使用为只读用户指定的 user/password 访问控制台时,activeMQ 甚至都没有启动,我得到 !role error。 有什么想法吗?

提前致谢!

here 中找到了答案我不得不在步骤 1

中将 class="org.eclipse.jetty.http.security.Constraint" 更改为 class="org.eclipse.jetty.util.security.Constraint"

指向 Pivotal 的链接已失效。对于那些想要简单解决方案的人,您可以将这些行从 jetty.xml 更改为:

<bean id="securityConstraintMapping" class="org.eclipse.jetty.security.ConstraintMapping">
    <property name="constraint" ref="securityConstraint" />
    <property name="pathSpec" value="/api/*,/admin/*,*.jsp" />
</bean>
<bean id="adminSecurityConstraintMapping" class="org.eclipse.jetty.security.ConstraintMapping">
    <property name="constraint" ref="adminSecurityConstraint" />
    <property name="pathSpec" value="*.action" />
</bean>

<bean id="securityConstraintMapping" class="org.eclipse.jetty.security.ConstraintMapping">
    <property name="constraint" ref="securityConstraint" />
    <property name="pathSpec" value="/api/*,*.jsp,*.html,*.png,*.css,/admin/js/*" />
</bean>
<bean id="adminSecurityConstraintMapping" class="org.eclipse.jetty.security.ConstraintMapping">
    <property name="constraint" ref="adminSecurityConstraint" />
    <property name="pathSpec" value="*.action" />
</bean>