Friday, January 20, 2006

jManage configuration files you should know about

jManage configuration files can be found under the config directory. You can modify some of these files to customize jManage for your needs.

Following is a list of important jManage configuration files and their usages:

config.xml
This files contains the configured applications, alerts, graphs, etc.
You will normaly not edit this file by hand.

jmanage-key
This file contains the key encrypted using the admin password.

jmanage-users.xml
Contains jManage users.

jmanage-user-roles.xml
Edit this file to add more roles.

acl-config.properties
Contains access control list. See this doc for more information.

jetty-config.xml
The Jetty configuration file. You will need to edit this file if you want to change the default port for jManage. See Jetty documentation for more information.

jmanage.properties
General jManage configurations.

logging.properties
jManage uses JDK logging system. This the JDK logging configuration file.

html-data-format.properties
Data format configurations for web interface.

text-data-format.properties
Data format configurations for command-line interface.

jmanage-auth.conf
JAAS authentication configuration file.

external-user-roles.properties
User to role mapping, if you have configured a different authentication module in jmanage-auth.conf.

Monday, January 16, 2006

An introduction to jManage 1.0

There is a good article on JavaWorld which introduces readers to the features of jManage JMX client using J2SE 5.0 MBeans as examples. You can read the article here.

Wednesday, January 11, 2006

Connecting to a "Cluster" using jManage

Zarar Siddiqi has written an article titled "Using JMX and J2SE 5.0 to Securely Manage Web Applications". This article includes the cluster
management feature of jmanage:

http://today.java.net/pub/a/today/2005/11/15/using-jmx-to-manage-web-applications.html?page=2#jmanage

Sunday, January 08, 2006

Adding Custom Login Modules to jManage

Use case
I already have a set of users categorized under various groups. How can I configure jManage to use this (external) user base for authentication and authorization?

Solution
Authentication
Prepare jManage to use a custom login module by configuring the login module class in jmanage-auth.conf file. Custom login module should implement javax.security.auth.spi.LoginModule and login() method, where the actual authentication logic goes, should use NameCallback and PasswordCallback of javax.security.auth.callback package to retrieve the wrapped username and password respectively. A sample LoginModule for reference.

Authorization
1. jManage comes with two pre-configured groups, Administrator and User. More such groups can be added by configuring the same in jmanage-user-roles.xml file.

2. In order to make jManage aware of various user to group relationships, the same should be configured in external-user-roles.properties file. This file stores the necessary user-groups mapping for external users and it comes with a default configuration where in all users are mapped to Administrator group. One should edit this file to make appropriate changes.

e.g.
User X belongs to groups A and B, then the relationship should be configured in external-user-roles.properties file as X=A,B.