PingAccess

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

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.IdentityMappingPluginBasecom.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.