ActiveMQ 权限(一)
在 ActiveMQ 认证(一) 中,若用户名或密码不正确,不能连接到ActiveMQ。我们可以通过配置文件,确用户是否有消息的读取、写入和管理的权限。
在plugin配置节点下,配置以下信息:
<authorizationPlugin>
<map>
<authorizationMap>
<authorizationEntries>
<authorizationEntry queue=">" read="admins" write="admins" admin="admins" />
<authorizationEntry queue="USERS.>" read="publishers" write="publishers" admin="admins" />
<authorizationEntry queue="FirstQueue.>" read="guests" write="consumer" admin="admins" />
<authorizationEntry queue="TEST.Q" read="guests" write="guests" />
</authorizationEntries>
</authorizationMap>
</map>
</authorizationPlugin>
每个authorizationEntry配置都有read、write和admin属性,分别对应读取、写入和管理。read、write和admin的值为在认证中用户对应的groups属性中的值。
authorizationEntry和消息队列的对应关系是通过通配符方式。
例如:<authorizationEntry queue="FirstQueue.>" read="guests" write="consumer" admin="admins" /> 对应以FirstQueue开头的消息队列。
===========================
完整的认证和权限的配置如下:
<plugins>
<simpleAuthenticationPlugin>
<users> <authenticationUser username="admin" password="password"
groups="admins,publishers,consumers"/> <authenticationUser username="publisher" password="password"
groups="publishers,consumers"/> <authenticationUser username="consumer" password="password"
groups="consumers"/> <authenticationUser username="guest" password="password"
groups="guests"/>
</users>
</simpleAuthenticationPlugin> <authorizationPlugin>
<map>
<authorizationMap>
<authorizationEntries>
<authorizationEntry queue=">" read="admins" write="admins" admin="admins" />
<authorizationEntry queue="USERS.>" read="publishers" write="publishers" admin="admins" />
<authorizationEntry queue="FirstQueue.>" read="guests" write="consumer" admin="admins" />
<authorizationEntry queue="TEST.Q" read="guests" write="guests" />
</authorizationEntries>
</authorizationMap>
</map>
</authorizationPlugin> </plugins>
ActiveMQ 权限(一)的更多相关文章
- ActiveMQ 权限(二)
在 ActiveMQ 权限(一) 配置了对消息队列的权限,以下设置完成消息的权限,比如只接受某ip的消息. 两步完成, 第一步:继承接口org.apache.activemq.security.Mes ...
- SpringMVC+Shiro权限管理【转】
1.权限的简单描述 2.实例表结构及内容及POJO 3.Shiro-pom.xml 4.Shiro-web.xml 5.Shiro-MyShiro-权限认证,登录认证层 6.Shiro-applica ...
- C#工业物联网和集成系统解决方案的技术路线(数据源、数据采集、数据上传与接收、ActiveMQ、Mongodb、WebApi、手机App)
目 录 工业物联网和集成系统解决方案的技术路线... 1 前言... 1 第一章 系统架构... 3 1.1 硬件构架图... 3 1.2 ...
- ActiveMQ笔记(5):JMX监控
系统上线运行后,及时监控报警是很必要的手段,对于ActiveMQ而言,主要监控的指标有:MQ本身的健康状况.每个队列的生产者数量.消费者数量.队列的当前消息数等. ActiveMQ支持JMX监控,使用 ...
- ActiveMQ在Linux中的安装
1.下载相关activeMQ安装包 下载路径:http://activemq.apache.org/download.html 下载最新安装包,选择Linux版进行下载 2.解压重命名 (1)解压: ...
- linux上安装activeMQ
1.新建一个文件夹activeMQ mkdir /server 2.授权 chmod 777 /server 3.下载activeMQ安装包,拷贝到/activeMQ目录下apache-acti ...
- ActiveMQ 简介与安装
一. 概述与介绍 ActiveMQ 是Apache出品,最流行的.功能强大的即时通讯和集成模式的开源服务器.ActiveMQ 是一个完全支持JMS1.1和J2EE 1.4规范的 JMS Provide ...
- ActiveMQ;RabbitMQ;ZeroMQ
中间件类型: Embedded middleware: As the name suggests, this typeof middleware handles embedded applicatio ...
- activemq安装和启动
安装环境:linux redhat activemq版本:5.8.0 1.从http://activemq.apache.org/download.html地址下载apache-activemq-5. ...
随机推荐
- hdu 1907 John (anti—Nim)
John Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)http://acm.h ...
- zoj 3229 Shoot the Bullet(有源汇上下界最大流)
Shoot the Bullethttp://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=3442 Time Limit: 2 Second ...
- JAVA多线程提高七:Callable与Future的应用
Callable与Runnable 先说一下java.lang.Runnable吧,它是一个接口,在它里面只声明了一个run()方法: public interface Runnable { publ ...
- 下载Google My Tracks
http://code.google.com/p/mytracks/source/browse/?name=2.0.2#hg%2FMyTracks%253Fstate%253Dclosed 需要类似的 ...
- script标签中type为<script type="text/x-template">是个啥
写过一点前端的都会碰到需要使用JS字符串拼接HTML元素然后append到页面DOM树上的情况,一般的写法都是使用+号以字符串的形式拼接,如果是短点的还好,如果很长很长的话就会拼接到令人崩溃了. 比如 ...
- 使用wifite破解路由器密码
使用wifite破解路由器密码 发表于 2016-02-06 | 分类于 wifite | 暂无评论 | 10次阅读 简介 wifite是一款自动化wep.wpa破解工具,不支持w ...
- Tinyos 第三版Make系统
1.make系统安装 cd tools ./Bootstrap ./configure make sudo make install 2.make系统结构 3.第三版Makerules文件部分解析 # ...
- PHP 快速建立一个对象
前言 PHP 中的数组(尤其关联数组)是经常使用的 —— 因为方便.在一些框架中也经常见到返回数组格式的配置参数.然而有些时候可能需要对象而非数组类型的配置参数,在查阅网络资料后找到了方法,作以记录. ...
- python实战===python程序打包成exe
推荐PyInstaller项目www.pyinstaller.org 安装方法: 先跑pip install pywin32再跑pip install pyinstaller即可 可用一句命令打包 ...
- C# 开发(创蓝253)手机短信验证码接口
创蓝253: https://www.253.com/ #region 获取手机验证码(创蓝253) /// <summary> /// 获取手机验证码(创蓝253) /// </s ...