Develop custom user registries

 

+

Search Tips   |   Advanced Search

 

Overview

A custom user registry is a customer implemented user registry which implements the UserRegistry Java interface as provided by WAS. 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.

Custom user registries can be assigned to cells as part of configuring global security.

Make sure that your implementation of the custom registry does not depend on any WAS components such as data sources, enterprise beans, and so on. Security is initialized and enabled prior to most of the other WAS components during startup. If your code uses these components, make a change that will eliminate the dependency. For example, if your code uses data sources to connect to a database, use JDBC to connect to the database.

For backward compatibility, the WAS V4 custom registry is also supported. 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.

 

Steps for this task

  1. If not familiar with the custom user registry concept, refer to the article, Custom user registries.

    This section explains each of the methods in the interface in detail and the changes for these methods from the version 4 release.

  2. Implement all the methods in the interface except for the CreateCredential method, which is implemented by WAS.

    FileRegistrySample.java file for WAS is provided for reference.

  3. Build your implementation.

    You need the install_root/lib/sas.jar and install_root/lib/wssec.jar files in your class path. For example:

    $WAS_HOME/java/bin/javac -classpath $WAS_CLASSPATH:$CLASSPATH:$WAS_HOME/lib/wssec.jar:$WAS_HOME/lib/sas.jar yourImplementationFile.java

  4. Copy the class files generated in the previous step to the product class path.

    The preferred location is...

    $WAS_HOME/lib/ext

    This should be copied to all the product processes (cell, all NodeAgents) class path.

  5. Follow the steps in Configuring custom user registries to configure your implementation using the administrative console.

 

What to do next

If you enabling security, make sure you complete the remaining steps. Once this is done, make sure you save and synchronize the configuration and restart all the servers. Try accessing some J2EE resources to verify that the custom registry implementation is successful.


Related concepts
Custom user registries
Related tasks
Configuring custom user registries
Related reference
UserRegistry interface methods
UserRegistry.java files
FileRegistrySample.java file for WAS
Custom user registry settings