Message middleware activemq-5.13.0 Security authentication Configuration

Source: Internet
Author: User

The ACTIVEMQ is divided into the control terminal and the client, the following describes the security authentication configuration method respectively.

1. Control-Side Security Configuration

(1). ACTIVEMQ Directory conf jetty.xml found:

<BeanID= "Securityconstraint"class= "Org.eclipse.jetty.util.security.Constraint">    < Propertyname= "Name"value= "BASIC" />    < Propertyname= "Roles"value= "User,admin" />    <!--set Authenticate=false to disable login -    < Propertyname= "Authenticate"value= "true" /></Bean>

Meaning:

<property name= "Authenticate" value= "true"/> true: Authentication required; False: No Authentication required

(2). ACTIVEMQ Directory conf found jetty-realm.properties

# Username:password [, rolename ...] admin:admin123, Adminuser:user, user

Description

The first admin, for the authentication user name.
The second admin123 is the authentication password.
The third admin, for the role.


(3). Restart ACTIVEMQ Verify that authentication is required
After restarting Activemq, Access: http://127.0.0.1:8161/admin/, pop up the HTTP Basic Authentication box, this time the authentication takes effect.

1. Client Security Configuration

(1). Unzip the directory/conf/activemq.xml add: Broken

        <Plugins>            <!--Use Jaas to authenticate using the Login.config file on the classpath to configure JAAS -            <JaasauthenticationpluginConfiguration= "Activemq" />            <!--lets configure a destination based authorization mechanism -            <Authorizationplugin>                <Map>                    <Authorizationmap>                        <authorizationentries>                            <AuthorizationentryTopic= ">"Read= "admins"Write= "admins"Admin= "admins" />                <AuthorizationentryQueue= ">"Read= "admins"Write= "admins"Admin= "admins" />                            <AuthorizationentryTopic= "Activemq.advisory.>"Read= "admins"Write= "admins"Admin= "admins"/>                            <AuthorizationentryQueue= "Activemq.advisory.>"Read= "admins"Write= "admins"Admin= "admins"/>                        </authorizationentries>                    </Authorizationmap>                </Map>            </Authorizationplugin>        </Plugins>

If the cluster continues to be added in broken:

        < networkconnectors >            <  userName= "User name"  password= "password"  uri= "Static: (tcp:// localhost:61616) "  duplex=" true "/>        </  Networkconnectors>

(2). Unzip the directory/conf/login.config:

activemq{    org.apache.activemq.jaas.PropertiesLoginModule required    debug=true    Org.apache.activemq.jaas.properties.user= "Users.properties"     org.apache.activemq.jaas.properties.group= " Groups.properties ";};

(3). Unzip the directory/conf/groups.properties:

admins= User Name

(4). Unzip the directory/conf/users.properties:

User name = password

Message middleware activemq-5.13.0 Security authentication Configuration

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.