In AM 6.5 and later, you should refer to the Authentication Node Development Guide for information on working with custom nodes.
A custom authentication node can be registered by deploying a JAR file. If you make changes to your custom node once it has been registered, you must re-register it to apply your changes.
See the following sections for further details:
The JAR file must contain the following files, which are needed to register the node with AM:META-INF/services/org.forgerock.openam.plugins.AmPlugin com/example/customAuthNode/myCustomAuthNodePlugin.java
- The org.forgerock.openam.plugins.AmPlugin file holds the fully qualified class name of the AmPlugin that registers the custom implementations. The org.forgerock.openam.plugins.AmPlugin file must not be renamed or placed in a different directory. For example: $ cat META-INF/services/org.forgerock.openam.plugins.AmPlugin .......... # When distributing Covered Software, include this CDDL Header Notice in each file and include # the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL # Header, with the fields enclosed by brackets  replaced by your own identifying # information: "Portions copyright [year] [name of copyright owner]". # # Copyright 2017-2018 ForgeRock AS. # com.example.customAuthNode.myCustomAuthNodePluginThe above file would find the myCustomAuthNodePlugin file and execute the file.
- The myCustomAuthNodePlugin Java class implements the
org.forgerock.openam.plugins.AmPlugininterface. See The Plugin Class of an Authentication Node for further information.
You can use Apache Maven™ to generate the archetype, which creates a template of the Plugin installer to get you started as described in: Preparing to Customize Authentication Nodes.
See How do I customize authentication tree nodes using source code in AM 6.0.x? and Customizing Authentication Trees for further information on building the JAR file.
- Copy the custom authentication node JAR file to the /path/to/tomcat/webapps/am/WEB-INF/lib directory, for example: $ cp custom-node-X.X.X.jar /path/to/tomcat/webapps/am/WEB-INF/lib
- Restart the web application container in which AM runs to complete the registration of the custom node.
See Building and Installing Authentication Nodes for further information.
This section assumes you have already built your new JAR file and it contains the files outlined in the Preparing the JAR file section.
If you make any changes to your custom node, you must re-register the node with AM as follows:
- Take a backup of your configuration prior to making any changes in case you need to revert per How do I make a backup of configuration data in AM 6.x?
- Uninstall the custom node using ssoadm, for example: $ ./ssoadm delete-svc -u amadmin -f pwd.txt -s [service_name]Replacing [service_name] with the name of the Java file (minus the .java extension). For example, if your file is called myCustomAuthNodePlugin.java, then your service name is myCustomAuthNodePlugin.
- Delete the node sub-entry in the configuration store using ldapdelete, for example:$ ./ldapdelete --hostname ds.example.com --port 50389 --bindDN "cn=Directory Manager" --bindPassword password "ou=[plugin_name],ou=plugins,ou=default,ou=GlobalConfig,ou=1.0,ou=amPluginService,ou=services,[configuration_suffix]"Replacing [plugin_name] and [configuration_suffix] as follows:
- [plugin_name] - for example,
com.example.customAuthNode.myCustomAuthNodePlugin. You can find this in your META-INF/services/org.forgerock.openam.plugins.AmPlugin file, for example: $ cat META-INF/services/org.forgerock.openam.plugins.AmPlugin .......... # When distributing Covered Software, include this CDDL Header Notice in each file and include # the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL # Header, with the fields enclosed by brackets  replaced by your own identifying # information: "Portions copyright [year] [name of copyright owner]". # # Copyright 2017-2018 ForgeRock AS. # com.example.customAuthNode.myCustomAuthNodePlugin
- [configuration_suffix] - for example,
- [plugin_name] - for example,
- Delete or rename the old JAR file in the /path/to/tomcat/webapps/am/WEB-INF/lib directory and replace with the updated JAR file.
- Restart the web application container in which AM runs to apply the changes.