For distributed platforms[16.0.0.3 and later]

Configuring the custom user repository SPI in the developer tools

To implement the com.ibm.wsspi.security.wim.CustomRepository service programming interface (SPI) by using the developer tools, you must make the SPI files available to your projects.

Procedure

  1. Add the Liberty runtime environment to Eclipse.

    In the Eclipse preferences, go to Server > Runtime Environment, and click Add. You can reference an existing Liberty runtime environment or install a new one.

  2. Verify that the Application Security 2.0 (appSecurity-2.0) and Federated Registry 1.0 (federatedRegistry-1.0) features are installed in the Liberty runtime environment.

    To list installed features, in the Runtime Explorer view, right-click the Liberty runtime environment and click Properties. If either feature is not installed, right-click the Liberty runtime environment, click Install Additional Content, and select the missing features. For more information, see Installing assets using developer tools.

  3. Create an OSGi bundle project where you are implementing the interface. To create the project, go to File > New, select OSGi Bundle Project, and define the project.
  4. Verify that the target definition includes the SPI location.

    In the Eclipse preferences, go to Plug-in Development > Target Platform. Either choose the WebSphere Application Server Liberty with SPI target definition, or edit the locations for the WebSphere Application Server Liberty target definition to include the wlp/dev/spi/ibm location for your runtime environment.

  5. Add the SPI packages to the project manifest.
    In the Enterprise Explorer view, click Manifest. Click the Dependencies tab and add the following packages in the Imported Packages section:
    • com.ibm.wsspi.security.wim
    • com.ibm.wsspi.security.wim.exception
    • com.ibm.wsspi.security.wim.model
  6. Create the class that implements the custom repository interface.

    To create the class, in the Enterprise Explorer view, right-click the src folder in the bundle, and select New > Class. Define the properties for your class. For the Interfaces field, click Add and select the CustomRepository interface.

What to do next

Implement the custom repository interface, and then package the class as described in Developing a custom user repository for Liberty.

Icon that indicates the type of topic Task topic

File name: t_sec_cust_repository.html