ActiveMQ security--Implementation Login Verification __ Message

Source: Internet
Author: User

Security

ACTIVEMQ supports pluggable security mechanisms for switching between different provider. For example, JAAS authentication Plugin,custom authentication Implementation,authorization Plugin
The following is an example of Jaas authentication plugin.

The Jaas authentication plugin relies on the standard JAAS mechanism to implement authentication. In general, you need to configure the login modules configuration file by setting the Java.security.auth.login.config system properties. If this system attribute is not specified, then the JAAS authentication plugin uses login.config as the file name by default.

To the official website http://activemq.apache.org/Download ACTIVEMQ release, the current activeMQ5.11 need JDK7 support, the following to Activemq5.9+jdk6 as an example. Open the Conf folder as follows

1. Open File Login.config,

[HTML] view plain copy activemq-domain {org.apache.activemq.jaas.PropertiesLoginModule required Org.apache.activemq.jaas.properties.user= "Users.properties" org.apache.activemq.jaas.properties.group= "   Groups.properties "; };
Two properties are set in this Login.config file: Org.apache.activemq.jaas.properties.user and Org.apache.activemq.jaas.properties.group are used to point to user.properties, respectively.

2. Open File Groups.properties

[HTML] view plain copy #格式: User group = user 1, user 2,... admins=system, Users=system,client,user guests=guest
3. Open File User.properties

[HTML] view plain copy #格式user =password system=pass0 user=pass1 guest=pass2


4. Open File Activemq.xml

[HTML]  View Plain  copy           <plugins>        <!--Use jaas to authenticate using the login.config  file on the classpath to configure JAAS -->        <jaasauthenticationplugin configuration= "Activemq-domain"  />        <!--  lets configure a destination based  authorization mechanism -->       <authorizationPlugin>          <map>           <authorizationMap>             < authorizationentries>                <authorizationentry queue= "> " read=" admins " write=" admins " admin=" admins " 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.