This sample demonstrates how to configure a Custom User Registry Liberty user feature as a User Registry for authentication.
A custom registry is a customer-implemented registry that implements the UserRegistry Java interface, as provided by the product. A custom registry can support virtually any type of an account repository from a relational database, flat file, and so on. For this sample, a file based user registry is implemented by
FileRegistrySample.java file and users and groups are defined in the
users.props file and
This sample can be installed onto runtime versions 188.8.131.52 and later.
Online installation (requires 184.108.40.206 or later):
installUtility install CustomUserRegistrySample
Any missing features required by the server will be installed for you.
CustomUserRegistrySample.jarusing the download button at the top of the page and place it in the root of your server installation.
java -jar CustomUserRegistrySample.jar
Any missing features required by the server will need to be installed separately.
To run the SecureEJBSample application using the sample Custom User Registry:
bindirectory in the Liberty profile installation:
server run CustomUserRegistrySample
CWWKZ0001I: Application SecureEJBSample started in XX.XX seconds.
In SecureEJBServlet, Hello Secure EJB World.
sampleCustomUserRegistry-1.0_220.127.116.11306201237.esa file contains the source and binaries for the sample custom user registry feature, and can be used to import it to Eclipse. The
featureManager script can be used to install the feature in a Liberty profile. The
howto.html file describes how to create a Custom User Registry as a user Liberty Feature.