InfoCenter Home > 5.2.3: Building and configuring the sample user registry applicationTo use the sample custom registry, perform the following steps:
Building the FileRegistrySample applicationThis section describes how to build the sample described in this article. This sample has been designed more for simplicity than performance and is intended only to familiarize you with the custom-registry feature. An implementation intended for production use requires much better scalability and performance. The sample consists of the following files:
To run this sample, you must first build it and then configure it for use. This discussion assumes that:
To build the sample, follow these steps:
Configuring the custom registrySetting up security for a custom registry is very similar to setting up security for LDAP. If you are unfamiliar with the configuration of security in WebSphere Application Server, see Administering applications for more information about the process. A custom registry is enabled by using the Security Center panel in the administrative console. On the Authentication panel, choose Lightweight Third Party Authentication (LTPA) as the authentication mechanism. Select the Custom User Registry button and fill in the required values for the following in the Custom User Registry Settings section:
The server ID and password combination must exist in the custom registry. The class name is the file in which you have implemented the CustomRegistry interface, for example, com.myCompany.mySample. This class file must be in the classpath environment variable of WebSphere Application Server. For the FileRegistrySample application, use the following values:
You can use also the Special custom settings button to create properties that are specific to your custom registry. All properties set here are provided to your implementation class during run time when the initialize method is called. For the FileRegistrySample application, two additional properties are needed; they are used for locating the files that make up the registry. Set the usersFile property to the location of the users.props file; set the groupsFile property to the location of the groups.props file. For example, if these files are stored in the C:\temp directory, insert the following custom settings:
When the required information has been entered, click the OK button. Restart WebSphere Application Server. When it restarts, the custom registry is in use. The information in the users.props and groups.props files is now the information against which authentication and authorization requests are checked.
You can also use the XMLConfig tool to update the configuration
information. When properties are entered using the Special
custom settings button on the administrative console,
the properties are stored with the prefix |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|