Download
FAQ
History
PrevHomeNext API
Search
Feedback
Divider

Administering Roles, Groups, and Users

The following sections show how to use admintool to do the following:

Managing Roles

To view all existing roles in the realm, select Roles from the User Definition section in the left pane.

The Roles List and Role Actions list display in the right pane. By default, the roles defined during Java WSDP installation are displayed. These roles include admin and manager.

Use the following procedure to add a new role to the default realm.

  1. From the Role Actions List, select Create New Role.
  2. Enter the name of the role to add.
  3. Enter the description of the role.
  4. Select Save when finished. The newly defined role displays in the list.

Use the following procedure to remove a role from the default realm.

  1. From the Role Actions List, select Delete Existing Roles.
  2. Select the role to remove by checking the box to its left.
  3. Select Save.

If you entered a new role of customer, the tomcat-users.xml file would now look like this:

<?xml version='1.0'?>
<tomcat-users>
  <role rolename="customer" description="Customer of Java Web
    Service"/>
  <role rolename="manager"/>
  <role rolename="admin"/>
  <user username="your_name" password="your_password"
    roles="admin,manager"/>
</tomcat-users> 

Managing Users

To view all existing users in the realm, select Users from the User Definition section in the left pane.

The Users List and User Actions display in the right pane. By default, the user name defined during Java WSDP installation is displayed.

Use the following procedure to edit a user's profile.

  1. Select the user profile to edit in the right pane.
  2. Edit the existing user properties. You can modify a password and/or modify role assignments in this window.
  3. Select Save when finished.

Use the following procedure to add a new user to the default realm.

  1. From the User Actions List, select Create New User.
  2. Enter the name of the user to add.
  3. Enter the password for that user.
  4. Enter the full name of the user.
  5. Select the role assignments for this user.
  6. Select Save when finished. The newly defined user displays in the list.

Use the following procedure to remove a user from the default realm.

  1. Select Delete Existing Users from the User Actions list.
  2. Select the user to remove by checking the box to its left.
  3. Select Save.

The addition of a new role and user as described in the previous section are reflected in the updated tomcat-users.xml. If I added a new user named Anil and assigned him the role of customer, the updated tomcat-users.xml would look like this:

<?xml version='1.0'?>
<tomcat-users>
  <role rolename="customer" description="Customer of Java Web
    Service"/>
  <role rolename="manager"/>
  <role rolename="admin"/>
  <user username="your_name" password="your_password"
    roles="admin,manager"/>
  <user username="Anil" password="13345" fullName=""
    roles="customer"/>
</tomcat-users> 
Divider
Download
FAQ
History
PrevHomeNext API
Search
Feedback
Divider

All of the material in The Java(TM) Web Services Tutorial is copyright-protected and may not be published in other works without express written permission from Sun Microsystems.