Tutorial: Writing a Jacl script that lists security roles

This tutorial addresses how to write and execute a simple Jacl script that can access and manage a JMX MBean. This particular script is concerned with calling roles when global security is enables. Using this script, you will be able to print out the role name for each role in a relationship.

Objective of this tutorial

After completing this tutorial, you will be able to:
  • Write a Jacl script that calls a JMX MBean requesting a list of all relationships.
For more information about writing scripts, refer to "Using scripting (wsadmin)" in the WebSphere Application Server Network Deployment, version 6.0 information center.

Time required to complete this tutorial

This tutorial requires approximately 15-30 minutes to complete.

Prerequisites

This tutorial uses a script that is included with the JMX Security sample. This sample demonstrates the MBean function of printing out a list of role relationships.
Note: To use this script, you must select the option to install code samples during the installation of WebSphere Process Server.

The location of the sample Jacl script is in <wbi_root>/samples/JMXSample/scripts. The name of the script is: RelServicesAdmin.jacl.

To run the script, enter:
wsadmin -f ../samples/JMXSample/scripts/RelServicesAdmin.jacl
 -server servername -node nodename

This script will call up to 10 relationships in your environment and up to 10 roles for each relationship will be printed on the console.


Terms of use |

Last updated: Tue Feb 21 17:33:02 2006

(c) Copyright IBM Corporation 2005.
This information center is powered by Eclipse technology (http://www.eclipse.org)