Is there a way to install a plugin programmatically?

I have a Maven project to build a plugin ZIP… but is there a way to install the plugin programmatically?

If you can have the maven build or build process run command prompt stuff, you could always use IIQ console command to install the plugin.

How do you install a plugin using iiq console’s plugin command? When I tried to install/upgrade my plugin ZIP file, it complains about not being able to find pluginBeans.xml:


The same plugin ZIP file works fine via the web interface.

The IIQ console document (https://community.sailpoint.com/t5/Technical-White-Papers/IdentityIQ-Console-Command-Reference-pdf/ta-p/71813) is waaaaaaay out of date, there is no mention of “plugin” in it.

Searching for pluginBeans.xml in this forum also yields nothing.

Found it… the iiq document for 8.2 (8.2 IdentityIQ Console Guide - Compass).

The working command is:
iiq console -c “plugin upgrade [Path to ZIP]”

For the record, this is the Maven Exec Plugin configuration:

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>3.1.0</version>
                <executions>
                    <execution>
                        <phase>install</phase>
                        <id>Install plugin in local IdentityIQ</id>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <executable>${identityiq.iiq}</executable>
                    <!-- optional -->
                    <workingDirectory>${basedir}/output-resources</workingDirectory>
                    <arguments>
                        <argument>console</argument>
                        <argument>-c</argument>
                        <argument>"plugin install ${project.build.finalName}.zip"</argument>
                    </arguments>
                </configuration>
            </plugin>

Where identityiq.iiq points to iiq.bat.

It turns out to be not working.

My plugin provides a REST API. If I update the logic and use Maven to run iiq console plugin install, the REST API will stay as the old version. The REST API is only refreshed if I install the plugin via the web interface.

Tried using iiq console plugin disable then enable, but that makes no difference.

The class SailPointConsole when installing plugins, it calls PluginsService.installPlugin().

But the RESTful class PluginsListResource does more than that. After calling PluginsService.installPlugin(), it also calls SailPointPluginRestApplication.reload(Plugin).

I think that’s why I get the described behavior… by calling iiq console plugin install, the new ZIP does get installed, but the REST APIs are not reloaded.

This sounds like a bug.

Tested, using iiq console, not even uninstall/install will refresh the REST APIs from a plugin.

  1. Create a plugin that exposes a REST API. Make it return a simple hello world message.
  2. Install the plugin with IdentityIQ’s web interface, test using SoapUI.
  3. Now update plugin version and change the message content of the REST API.
  4. Use command iiq console -c “install [ZIP path]” to install the plugin.
  5. You will see updated version in IdentityIQ’s web interface.
  6. Test using SoapUI, the message content has NOT changed.
  7. Install plugin with IdentityIQ’s web interace again.
  8. Now SoapUI gets the new message.

Repeat test, but for step 4, try these variants:
a. After install, disable and enable the plugin.
b. Uninstall then install.
None of the above works.

The iiq console plugin command does NOT refresh the REST classes from a plugin, and there is no parameters that can do that.

I had a similar use case when I built the DevSAK tool. It’s a remote Console tool that communicates to IdentityIQ via REST. I tried a number of tricks to plugins refreshed when it has a REST API… not sure if it will work for you but it may be another thing to try:

https://community.sailpoint.com/t5/Professional-Services/IdentityIQ-Developer-Swiss-Army-Knife-DevSAK/ta-p/162518

Please note, there may be a catch22 for you, as it needs IdentityIQ up and running so that DevSAK can connect.

1 Like

I fixed it by using exec-maven to call curl. I tried to attach the plugin definition but the forum software won’t let me (HTTP 403).