修改配置文件

位置:

apache-activemq-5.9.0/conf/

vi activemq.xml

在<broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.data}">

下面添加一段:

<plugins>
<!-- use JAAS to authenticate using the login.config file on the classpath to
configure JAAS -->
<!-- 添加 jaas 认证插件 activemq 在 login.config 里面定义,详细见 login.config-->
<jaasAuthenticationPlugin configuration="activemq"/>
<!-- lets configure a destination based authorization mechanism -->
<authorizationPlugin>
<map>
<authorizationMap>
<authorizationEntries>
<authorizationEntry topic=">" read="admins" write="admins" admin="admins" />
<authorizationEntry queue=">" read="admins" write="admins" admin="admins"/>
<authorizationEntry topic="ActiveMQ.Advisory.>" read="admins" write="admins" admin="admins"/>
<authorizationEntry queue="ActiveMQ.Advisory.>" read="admins" write="admins" admin="admins"/>
</authorizationEntries>
</authorizationMap>
</map>
</authorizationPlugin>
</plugins>

重新启动activemq

先关闭,再启动

用户信息在

users.properties

角色分组信息在

groups.properties

ActiveMQ 安全认证的更多相关文章

  1. Activemq去除认证

    0.背景介绍 由于项目安全性的约束,不能在配置文件中暴露一些密码信息.   默认情况下,ActiveMQ在进行接发消息的时候会用户认证.通过ActiveMQ-client初始化ActiveMQConn ...

  2. ActiveMQ in Action(4) - Security

    关键字: activemq 2.4 Security    ActiveMQ支持可插拔的安全机制,用以在不同的provider之间切换.2.4.1 Simple Authentication Plug ...

  3. activemq用户手册

    1 JMS 在介绍ActiveMQ之前,首先简要介绍一下JMS规范. 1.1 JMS的基本构件 1.1.1 连接工厂 连接工厂是客户用来创建连接的对象,例如ActiveMQ提供的ActiveMQCon ...

  4. 转--activemq的官方中文文档

    1 JMS 在介绍ActiveMQ之前,首先简要介绍一下JMS规范. 1.1 JMS的基本构件 1.1.1 连接工厂 连接工厂是客户用来创建连接的对象,例如ActiveMQ提供的ActiveMQCon ...

  5. activeMQ 讲解及实战

    #### 软件架构项目中需要用到activeMQ 下载地址:http://activemq.apache.org/download.html #### 安装教程需要安装jdk环境activeMQ免安装 ...

  6. ActiveMQ基本使用

    消息队列,目前在实际的开发项目中应用十分广泛.本文主要介绍入门级的ActiveMQ的基本使用以及相关的概念. 一.JMS 全称 Java Message Service,即Java消息服务.JMS是一 ...

  7. 46.ActiveMQ开篇(Hello World、安全认证、Connection、Session、MessageProducer、MessageConsumer)

    要给有能力的人足够的发挥空间,公司可以养一些能力平平甚至是混日子的人,但绝不能让这些人妨碍有能力的人,否则这样的环境不留也罢. 一.背景介绍 CORBA\DCOM\RMI等RPC中间件技术已经广泛应用 ...

  8. ActiveMQ(3) ActiveMQ创建(simpleAuthenticationPlugin)安全认证

    控制端安全认证: ActiveMQ目录conf下jetty.xml: <bean id="securityLoginService" class="org.ecli ...

  9. ActiveMQ 认证与授权

    使用ActiveMQ自带simpleAuthenticationPlugin 1.直接将用户名密码写入activemq.xml文件 <plugins> <simpleAuthenti ...

随机推荐

  1. 基于SEDA的异步框架设计与实现

    基于SEDA的异步框架设计与实现 二.为什么使用SEDA 目前,面对并发环境,主流互联网服务器编程模型有两种:多线程模型以及事件驱动模型.但是这两个模型都不足以解决这个问题.我们来首先看一下这两种编程 ...

  2. 648. Replace Words

    Problem statement In English, we have a concept called root, which can be followed by some other wor ...

  3. 如何将文件上传到ftp

    方法1(推荐,炒鸡简单):双击我的电脑,在地址栏里输入你的ftp地址回车(比如: ftp://220.103.86.96),然后会弹出一个输入登录账号和密码的对话框,输入你的ftp账号和密码回车便进入 ...

  4. 如何禁止虚拟机自动获取DHCP分配的ip地址

    今天在看Hadoop视频学习的时候跟着视频里面修改ip地址,将虚拟机的ip地址修改为192.168.2.3,结果ifconfig显示ip地址为192.168.2.128,用物理主机去ping这两个ip ...

  5. cmd指令

    d:  进入D盘: cd job 进入d盘名为job的文件夹:cd显示当前路径: md test创建名为test的文件夹: rd test删除名为test的文件夹: cd.>test.json创 ...

  6. HDU - 5572 An Easy Physics Problem (计算几何模板)

    [题目概述] On an infinite smooth table, there's a big round fixed cylinder and a little ball whose volum ...

  7. Maven配置将war包部署到Tomcat(tomcat7-maven-plugin)

    Tomcat7/8: 提示:经过测试Tomcat7的配置和插件在Tomcat8中能正常运行 tomcat7-maven-plugin官方帮助文档:http://tomcat.apache.org/ma ...

  8. 辅助方法 @Html.Raw与 HtmlString区别

    //Html.Raw其实是调用 new Microsoft.AspNetCore.Html.HtmlString(xxx) @{ ViewData["Title"] = " ...

  9. ipython结合virtualenv使用

    1.virtualenv使python的开发环境相互隔离,隔离环境可以安装自己的依赖包,避免冲突 2.ipython是交互使用python变的便利 3.在virtualenv环境里使用ipython即 ...

  10. elasticsearch学习网站

    elasticsearch学习网站 https://elasticsearch.cn/