---
title: Create your own plugins
description: Create your own plugins from scratch using the Add-on SDK.
component: pingaccess
version: 9.0
page_id: pingaccess:agents_and_integrations:pa_create_your_own_plugins
canonical_url: https://docs.pingidentity.com/pingaccess/9.0/agents_and_integrations/pa_create_your_own_plugins.html
revdate: February 6, 2023
section_ids:
  section_rkz_ncj_fdb: Rule details
  section_lrc_4cj_fdb: Site authenticator details
  section_qpg_4cj_fdb: Identity mapping details
  section_dyj_4cj_fdb: Load balancing strategy details
  section_jd4_4cj_fdb: Locale override service details
---

# Create your own plugins

Create your own plugins from scratch using the Add-on SDK.

Generally, the following steps are taken to implement a plugin:

1. Create a new, empty Maven project. The root directory of the Maven project is referred to as `<PLUGIN_HOME>`.

2. Copy the `pom.xml` from the appropriate sample provided in `<PA_HOME>/sdk/samples`.

   |   |                                                                                                            |
   | - | ---------------------------------------------------------------------------------------------------------- |
   |   | For example, to create a rule, copy the `pom.xml` from `<PA_HOME>/sdk/samples/Rules/` to `<PLUGIN_HOME>/`. |

3. Modify the `groupId`, `artifactId`, `name`, and `version` in the copied `pom.xml` file as appropriate.

4. Create a Java class that implements the plugin interface from the SDK in the `<PLUGIN_HOME>/src/main/java/com/yourpackagename` directory. This interface is referred to as a Service Provider Interface (SPI).

   |   |                                                                                              |
   | - | -------------------------------------------------------------------------------------------- |
   |   | For example, to implement a custom rule, the class should implement the RuleInterceptor SPI. |

   For each SPI, base classes are provided that simplify the implementation of the SPI.

5. Create a provider-configuration file for the plugin SPI containing the fully-qualified class name for the class created in the previous step.

   |   |                                                                                                                                                                                         |
   | - | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
   |   | For example, to implement a custom rule, create a file called `<PLUGIN_HOME>/META-INF/services/com.pingidentity.pa.sdk.policy.RuleInterceptor`. Its contents are the FQCN of the class. |

6. Build the Maven project to obtain a jar containing the plugin implementation.

7. Copy the jar to `<PA_HOME>/deploy`.

   |   |                                                                                                                                       |
   | - | ------------------------------------------------------------------------------------------------------------------------------------- |
   |   | After copying a custom plugin JAR to the PingAccess lib, you must restart PingAccess to complete the deployment of the custom plugin. |

The following sections provide the details required to complete these steps for each type of plugin:

* [Rule details](#section_rkz_ncj_fdb)

* [Site authenticator details](#section_lrc_4cj_fdb)

* [Identity mapping details](#section_qpg_4cj_fdb)

* [Load balancing strategy details](#section_dyj_4cj_fdb)

* [Locale override service details](#section_jd4_4cj_fdb)

## Rule details

If you do not need to integrate with a third-party service, use the following SPIs and base classes:

* SPI

  `com.pingidentity.pa.sdk.policy.RuleInterceptor`

* Provider-configuration file

  `<PLUGIN_HOME>/META-INF/services/com.pingidentity.pa.sdk.policy.RuleInterceptor`

* Base classes

  `com.pingidentity.pa.sdk.policy.RuleInterceptorBase`

If you need to integrate with a Third-Party Service, use the following SPIs and base classes:

* SPI

  `com.pingidentity.pa.sdk.policy.AsyncRuleInterceptor`

* Provider-configuration file

  `<PLUGIN_HOME>/META-INF/services/com.pingidentity.pa.sdk.policy.AsyncRuleInterceptor`

* Base classes

  `com.pingidentity.pa.sdk.policy.AsyncRuleInterceptorBase`

## Site authenticator details

If you do not need to integrate with a Third-Party Service, use the following SPIs and base classes:

* SPI

  `com.pingidentity.pa.sdk.siteauthenticator.SiteAuthenticatorInterceptor`

* Provider-configuration file

  `<PLUGIN_HOME>/META-INF/services/com.pingidentity.pa.sdk.siteauthenticator.SiteAuthenticatorInterceptor`

* Base classes

  `com.pingidentity.pa.sdk.siteauthenticator.SiteAuthenticatorInterceptorBase`

If you need to integrate with a Third-Party Service, use the following SPIs and base classes:

* SPI

  `com.pingidentity.pa.sdk.siteauthenticator.AsyncSiteAuthenticatorInterceptor`

* Provider-configuration file

  `<PLUGIN_HOME>/META-INF/services/com.pingidentity.pa.sdk.siteauthenticator.AsyncSiteAuthenticatorInterceptor`

* Base classes

  `com.pingidentity.pa.sdk.siteauthenticator.AsyncSiteAuthenticatorInterceptorBase`

## Identity mapping details

If you do not need to integrate with a Third-Party Service, use the following SPIs and base classes:

* SPI

  `com.pingidentity.pa.sdk.identitymapping.IdentityMappingPlugin`

* Provider-configuration file

  `<PLUGIN_HOME>/META-INF/services/com.pingidentity.pa.sdk.identitymapping.IdentityMappingPlugin`

* Base classes

  `com.pingidentity.pa.sdk.identitymapping.IdentityMappingPluginBase``com.pingidentity.pa.sdk.identitymapping.header.HeaderIdentityMappingPlugin`

If you need to integrate with a Third-Party Service, use the following SPIs and base classes:

* SPI

  `com.pingidentity.pa.sdk.identitymapping.AsyncIdentityMappingPlugin`

* Provider-configuration file

  `<PLUGIN_HOME>/META-INF/services/com.pingidentity.pa.sdk.identitymapping.AsyncIdentityMappingPlugin`

* Base classes

  `com.pingidentity.pa.sdk.identitymapping.AsyncIdentityMappingPluginBase`

## Load balancing strategy details

If you do not need to integrate with a Third-Party Service, use the following SPIs and base classes:

* SPI

  `com.pingidentity.pa.sdk.ha.lb.LoadBalancingPlugin`

* Provider-configuration file

  `<PLUGIN_HOME>/META-INF/services/com.pingidentity.pa.sdk.ha.lb.LoadBalancingPlugin`

* Base classes

  `com.pingidentity.pa.sdk.ha.lb.LoadBalancingPluginBase`

If you need to integrate with a Third-Party Service, use the following SPIs and base classes:

* SPI

  `com.pingidentity.pa.sdk.ha.lb.AsyncLoadBalancingPlugin`

* Provider-configuration file

  `<PLUGIN_HOME>/META-INF/services/com.pingidentity.pa.sdk.ha.lb.AsyncLoadBalancingPlugin`

* Base classes

  `com.pingidentity.pa.sdk.ha.lb.AsyncLoadBalancingPluginBase`

## Locale override service details

A Locale Override Service cannot integrate with a Third-Party Service, so the following SPIs and base classes are used for all implementations:

* SPI

  `com.pingidentity.pa.sdk.localization.LocaleOverrideService`

* Provider-configuration file

  `<PLUGIN_HOME>/META-INF/services/com.pingidentity.pa.sdk.localization.LocaleOverrideService`

* Base classes

  No base classes are provided.
