Authentication Example should be improved
-----------------------------------------
Key: AMQ-982
URL: https://issues.apache.org/activemq/browse/AMQ-982
Project: ActiveMQ
Issue Type: Improvement
Components: Documentation
Affects Versions: 4.0.1
Environment: Windows XP Professional, JDK 1.4.2_12
Reporter: Ali Sadik Kumlali
Attachments: AuthenticationExampleConf.zip
Hi,
At http://www.activemq.org/site/security.html page, there is no enough info for
authention example. For example, there is mention where to put user.properties.
Following info should be mixed with the current info found in the site.
Provided attachment contains all the necessary files that supports following
-----------------------------
Assumption
- ACTIVEMQ_HOME=d:\activemq-4.0.1
Requirements
- Downloading activemq-jaas-x.x.x.jar and putting under %ACTIVEMQ_HOME%\lib.
For 4.0.1, we used activemq-jaas-4.0.1.jar[1].
- Adding jaas authentication plugin[2] to %ACTIVEMQ_HOME%\conf\activemq.xml
- Putting login.config into %ACTIVEMQ_HOME%\conf
- Putting users.properties and groups.properties into
%ACTIVEMQ_HOME%\conf\org\apache\activemq\security
- Changing Line 61 of %ACTIVEMQ_HOME%\example\src\ToolSupport.java to following:
Connection connection = connectionFactory.createConnection("user",
"password");
P.S: Providing an overloading method would be better: createConnection(String
username, String password)
Running Example
- Start ActiveMQ up by running %ACTIVEMQ_HOME%\bin\activemq.bat
- Start consumer by running 'ant consumer' command under %ACTIVEMQ_HOME%\example
- Start producer by running 'ant producer' command under %ACTIVEMQ_HOME%\example
[1]
http://people.apache.org/repository/incubator-activemq/jars/activemq-jaas-4.0.1.jar
[2] activemq.xml
<broker>
...
<plugins>
<!-- use JAAS to authenticate using the login.config file on the
classpath to configure JAAS -->
<jaasAuthenticationPlugin configuration="activemq-domain" />
</plugins>
</broker>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira