Read-only web console access in ActiveMQ

懵懂的女人 提交于 2019-12-23 21:29:38

问题


I'm using ActiveMQ 5.10 and would like to create a user that has read-only access through the web console.

Red Hat published this article, mentioning that it's not really read only due to a bug in ActiveMQ. According to the bug report AMQ-4567, the bug is fixed as of ActiveMQ 5.9. However, I'm not seeing it work appropriately.

I have tried a number of different configurations, with the most recent being two separate JAAS implementations, one for Jetty and one for ActiveMQ. The relevant property files are excerpted below.

I can mostly log in to the web console using the "system" user. But the guest user doesn't work at all. The application user (appuser) doesn't need access to the web console at all.

My authN/authZ needs are pretty trivial: one admin user, one application account, and one read-only monitoring account.

Is there any good way to get this working with a recent version of ActiveMQ (>= 5.9.0)?

groups.properties

admins=system

users=appuser,admin

guests=guest

users.properties

system={password redacted}

appuser=appuser

guest=guest

jetty-realm.properties

system: MD5:46cf1b5451345f5176cd70713e0c9e07,user,admin

guest: guest,guest

As an aside, I used the Jetty tutorial and the Rundeck instructions to figure out the jetty-realm.properties file and chapter 6 of ActiveMQ in Action to work out the ActiveMQ JAAS.


回答1:


I was finally able to get to what I wanted by deploying the web console to an external Tomcat instance. I assume that when it runs out of process, it can't bypass security and so has to use whatever credentials you provide. In this case, I gave the Tomcat instance the read-only JMX user credentials.

It's not great, as there is no security trimmed UI. You can still attempt to create new destinations, delete destinations, etc. When you try with a read-only user, you get an error. That gets a "D" for UX, but a "B" for security.



来源:https://stackoverflow.com/questions/27050373/read-only-web-console-access-in-activemq

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!