How to configure security of ActiveMQ ?

 

Terms

{activemq.home}: The ActiveMQ installation folder.

How to configure ActiveMQ to use JAAS Authentication?

Enable Jaas Authentication Plugin

Add below configuration into {activemq.home}\conf\activemq.xml, under /beans/broker node.

Please ignore this step, if already there.

		 <plugins>
			 <jaasAuthenticationPlugin xmlns="http://activemq.apache.org/schema/core" configuration="activemq-domain"/>
	     </plugins>

 

Configure activemq-domin

Configure the login required in {activemq.home}\conf\login.config file, please pay attention the domain name should match with the name in the activemq.xml file.

activemq-domain {
    org.apache.activemq.jaas.PropertiesLoginModule required
        org.apache.activemq.jaas.properties.user="users.properties"
        org.apache.activemq.jaas.properties.group="groups.properties";
};

 

Add user

Configure the user and password in {activemq.home}\conf\users.properties.

mqadmin=password
mquser=password

 

Add user group

Configure the user group in {activemq.home}\conf\groups.properties.

admins=mqadmin
users=mquser

Reboot ActiveMQ

Reboot the ActiveMQ server.

 

How to change the default port of ActiveMQ?

Configure the ActiveMQ ports

Go to the element of /beans/broker/transportConnectors, update the ports of below.

<transportConnectors>
	<!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB -->
	<transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
	<transportConnector name="amqp" uri="amqp://0.0.0.0:5672?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
	<transportConnector name="stomp" uri="stomp://0.0.0.0:61613?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
	<transportConnector name="mqtt" uri="mqtt://0.0.0.0:1883?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
	<transportConnector name="ws" uri="ws://0.0.0.0:61614?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
</transportConnectors>

 

How to change the username / password of ActiveMQ Admin Console?

Configure the user name and password

Update the user name , password and roles information in {activemq.home}\conf\jetty-ream.properties. By the format, username: password [,rolename ...]

mqadmin: xckj_mqadmin, admin
mquser: xckj_mquser, user

转载于:https://www.cnblogs.com/BenWong/p/5537199.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值