Plugin Manifest File
A plugin is defined in IdentityIQ by the Plugin XML object that defines the parameters of the plugin. For example, features such as REST resources, Snippets, Settings. The Plugin object is defined in the manifest.xml
file. This is a required artifact.
For more complex plugins that require support for other field types, and more dynamic behavior, such as dropdown lists or password fields, use the advanced plugin settings to define a form or reference a custom plugin configuration file.
Dynamic behavior might include showing or hiding additional fields depending on previous selections. For example, if a user chooses basic authentication, a username and password field would appear, but, if oauth authentication is chosen, it might be more appropriate to show an access token field.
Note: If your plugin requires more than simple input fields, string, Boolean or int values, you must use the plugin advanced settings.
Plugin settings are attributes that are available for modification as part of the installation. Click Configure to display the configuration settings page. Settings are displayed as a form. If the plugin does not use the plugin advanced settings, the form is created automatically.
Settings from the manifest file are listed, in order, on the plugin settings page.
The Plugin setting object can be used to represent a single setting on the configuration settings page for a Plugin. Each object is used to represent a single configurable setting on the settings page.
Attribute Name |
Description |
allowedValues |
List of allowed values for population of a dropdown |
dataType |
The type of the setting, for example, "string" or "int" or "boolean" |
defaultValue |
The default value for the setting |
helpText |
Associated help text for the setting |
label |
Label to be displayed for the setting |
name |
Name of the current setting |
value |
Value for the setting |
Plugin Advanced Settings
Plugin advanced settings are used to define forms or reference a custom plugin configuration file to define more complex plugins.
-
settingsForm – define a plugin using a form
-
settingsPage – reference a custom HTML / JS file
settingsForm
To use a form for plugin configuration, you can build a form using the form builder then copy and paste that form into the manifest file, or you can build the form directly into the manifest.
Values entered into a form can be accessed using the FormData.values. FormService has functions to assist with validating required fields and displaying errors. Additional validations are built into the HTML and AngularJS code based on the form design, which means Angular will set a field to undefined if it is not valid. These validations can be used to prevent a form from being submitted and show error messages if necessary.
settingsPage
Develop your own configuration settings page by providing the required HTML and javascript. You can use whatever frameworks you prefer for your settings, but they need to fit in with whatever IdentityIQ has loaded. For example, angular is not required, but you can use it.
To use angular frameworks, see SailPoint Angular Components.
Use the settingsPage setting to specify the name of your custom configuration settings page, for example, config.xhtml
.
Snippets are small, configurable snippets of code that can be injected into the rendering of normal IdentityIQ user interface pages. For example, you can insert a menu option, a button, or even a larger set of interface components into an IdentityIQ page.
Snippets must be specified in the plugin's manifest file. They use a regular expression pattern to identify the IdentityIQ pages where the snippet should execute, and therefore appear.
You can have multiple snippet components in the same plugin, some that apply globally, and some that apply to specific targeted pages. You need to define a separate js
file for each location a snippet applies, and then specify a separate snippet in the manifest file with the right regexPattern to run it on the appropriate pages.
The details for the user interface component's contents, and its placement within the page, are specified in the JavaScript file.
A snippet contains four equally important components:
Component Name |
Description |
regexPattern |
This is a regular expression pattern that is run against the current URL in the browser – if the URL matches the pattern, the Snippet will attempt to displayed. |
rightRequired |
This determines the scope of users allowed to view the Snippet element – should reference an IdentityIQ SPRight object. |
scripts |
This is a list of the scripts to run when a particular URL matches the regexPattern. Normally this will consist of injecting an element into the DOM of the page. The example |
styleSheets |
List of any css files that are required by Snippet Scripts. |
A Widget is a targeted snippet – one that inserts a block of user interface components into a fixed area of the Home page that can be added selectively for different users, as a unit.
Widgets can be configured to appear on the Home page for any or all IdentityIQ users.
The first thing you need, to implement a plugin Widget, is the Widget object itself. When you import that object into IdentityIQ during plugin installation, it defines the existence of the Widget making it available for any user.
Widget objects are simple, the only details about the user interface component that get defined in the object are its name and title.
Widgets require a snippet definition in the manifest file for this plugin. This snippet defines the home page hook for the widget. The regular expression pattern for the widget snippet must specify the IdentityIQ home page.
The rest of the snippet definition has IdentityIQ execute the contents of the specified JavaScript file when it loads pages that meet the regex pattern.
The contents of the JavaScript file then define both the user interface layout, in the form of a directive, and the controller for the Widget. Because the home page is an Angular page, this JavaScript must specify an Angular controller for the widget.
The name given to this directive must follow a fixed naming convention. It must be specified in relation to the name given to the widget object. Specifically, the widget object name must be prefixed with sp and suffixed with Widget. So the Search widget object requires a directive called spWidgetNameWidget.
The directive references the controller for the widget. That controller is also defined within the widget's JavaScript file and defines the variables that serve as the model for the view elements and performs the required operations to set their data values.