Develop custom user registries
Before you beginWebSphere Application Server security supports the use of custom registries in addition to Local OS and Lightweight Directory Access Protocol (LDAP) registries for authentication and authorization purposes. A custom implemented user registry uses the UserRegistry Java interface as provided by WebSphere Application Server. A custom implemented user registry can support virtually any type or notion of an accounts repository from a relational database, flat file, and so on. The custom user registry provides considerable flexibility in adapting WebSphere Application Server security to various environments where some notion of a user registry, other than LDAP or LocalOS, already exists in the operational environment.
Implementing a custom user registry is a software development effort. Use the methods defined in the UserRegistry interface to make calls to the desired registry to obtain user and group information. The interface defines a very general set of methods, for encapsulating a wide variety of registries. One can configure a custom user registry as the active user registry when configuring WAS global security.
Make sure that your implementation of the custom registry does not depend on any WebSphere Application Server components such as data sources, EJBs, and JNDI. Do not have this dependency because security is initialized and enabled prior to most of the other WAS components during startup. If your previous implementation used these components, make a change that will eliminate the dependency. For example, if your previous implementation used data sources to connect to a database, use DriverManager to connect to the database.
Refer to the Migrating custom user registries for more information on migrating. If your previous implementation uses data sources to connect to a database, change the implementation to use JDBC connections. However, it is recommended that you use the new interface to implement your custom registry.
- If not familiar with the custom user registry concept, refer to the article, Custom user registries.
- Implement all the methods in the interface except for the CreateCredential method, which is implemented by WebSphere Application Server. FileRegistrySample.java file is provided for reference.
- Build your implementation. You need the %install_root%/lib/sas.jar and %install_root%/lib/wssec.jar files in your class path. For example: %install_root%\java\bin\javac -classpath %install_root%\lib\wssec.jar;%install_root%\lib\sas.jar yourImplementationFile.java.
- Copy the class files generated in the previous step to the product class path. The preferred location is the %install_root%/lib/ext directory. This should be copied to all the product processes (cell, all NodeAgents) class path.
- Follow the steps in Configuring custom user registries to configure your implementation using the administrative console. This step is required to implement custom user registries in V6.
What to do nextIf you are enabling security, make sure you complete the remaining steps. Once this is done, make sure you save and synchronize the configuration and restart all of the servers. Try accessing some J2EE resources to verify that the custom registry implementation is correct.
Example: Custom user registries
UserRegistry interface methods
Custom user registries
Configuring custom user registries
Custom user registry settings
WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.