How to enable authentication for JMX monitoring on AppNode

How to enable authentication for JMX monitoring on AppNode

book

Article ID: KB0075327

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks 6.x

Description

Some customers might require to enable authentication for JMX monitoring on AppNode, below steps show how to do that.

Issue/Introduction

Steps to enable file-based authentication for JMX monitoring on an AppNode

Resolution

Steps to enable file-based authentication for JMX monitoring on an AppNode:
 

1. Open the AppNode TRA file and add the properties:

++++++++
java.property.com.sun.management.jmxremote=true

java.property.com.sun.management.jmxremote.port=31419

java.property.com.sun.management.jmxremote.rmi.port=31419

java.property.com.sun.management.jmxremote.ssl=false

java.property.com.sun.management.jmxremote.access.file=/filepath/jmxremote.access

java.property.com.sun.management.jmxremote.password.file=/filepath/jmxremote.password

++++++++

Here we are defining port 31419 to be used for JMX.
 

2. Create a file named "jmxremote.password" with content:

++++++++

myusername    mypassword

user                  userpassword

++++++++

In this file, we are setting the username and password of the user for the authentication.
 

3. Create a file named "jmxremote.access" with content:

++++++++

myusername    readwrite

user                  readonly

++++++++

In this case, we are setting the read and write permissions for the user of the JMX authentication.
 

4. Now we need to set the permission of the "jmxremote.access" and "jmxremote.password" files to read and write only for the user we defined.
 

5. Then the AppNode must be restarted.


 

If the AppNode is running as Windows service, the below additional steps must be followed:
 

6. Open "Services" and right-click on the AppNode service and select "Properties".
 

7. Go to "Log On" and fill the required data for "This account" with the username and password defined in the files.
 

8. Click Apply and OK.
 

9. Start the service of the AppNode.


 

Finally, the JMX tool can be run and we would be able to connect using our defined port, username and password.

Additional Information

https://gquintana.github.io/2016/09/01/Securing-remote-JMX.html
https://docs.oracle.com/javase/8/docs/technotes/guides/management/agent.html#gdeup