Develop a custom user registry for Liberty
We can develop a custom user registry class by implementing the com.ibm.websphere.security.UserRegistry interface in the Liberty server.
The UserRegistry interface is a Service Program Interface (SPI) that enables support to virtually any type of account repository. For a general view of stand-alone custom registries, see Stand-alone custom registries.
- Implement the custom user registry.
See Develop the UserRegistry interface for using custom registries.
- Convert the implementation class into an OSGi service. We can do the conversion in the following ways:
- Convert your UserRegistry class into a Declarative Service (DS) component. For more information, see Declaring your services to OSGi Declarative Services.
- Write a new UserRegistry class that is a DS component and delegate it to your UserRegistry class.
- Register your UserRegistry class directly in the Service Registry (SR) using the OSGi core APIs.
- Package the custom user registry as an OSGi bundle and export the UserRegistry service. For information on creating an OSGi bundle, see Create an OSGi service bundle.
- extensionCreate a feature manifest to include the OSGi bundle.
- After the feature is installed into the user product extension location, configure the server.xml file with the feature name. For example:
<featureManager> ... <feature>usr:customRegistrySample-1.0</feature> </featureManager>