Showing posts with label UI Customization. Show all posts
Showing posts with label UI Customization. Show all posts

Thursday, June 18, 2020

Sailpoint IdenityIQ Run Rule Task Input Field Of Different Type

Generally in Run Rule Task we select the rule which need to be triggered , But if we have a requirement were the Run Rule Task takes the input from the user while triggering and that too input field should be of multiples type such as Text Field , Multi-Select , Radio Button , Check box , drop down ; that we can achieve using the below customization :-)
 
1. Create a xhtml file named "visCustomRuleTask.xhtml"and copy the same file in the  identityiq_home/monitor/tasks/ directory on the server on which identityIQ is running ,basically copy the below code and make the xhtml file.


<!DOCTYPE html PUBLIC
                "-//W3C//DTD XHTML 1.0 Transitional//EN"
                "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:a4j="http://richfaces.org/a4j"
  xmlns:c="http://java.sun.com/jstl/core"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:t="http://myfaces.apache.org/tomahawk"
  xmlns:sp="http://sailpoint.com/ui">
<body>
<ui:composition>
    <div style="width:97%;">
        <table class="spTable" cellspacing="0">
            <tr>
                <th colspan="2">Rule Run Input Values</th>
            </tr>			
	<!-- Dropdown Value -->			
            <tr>
                 <td>
                    <sp:outputText value="#{taskDefinition.argMap['country'].argument.prompt}"/>
                </td>
                <td>
                    <h:selectOneMenu id="country" value="#{taskDefinition.argMap['country'].value}">
                        <f:selectItem itemLabel="India" itemValue="India"></f:selectItem>
			<f:selectItem itemLabel="Brazil" itemValue="Brazil"></f:selectItem>
                        <f:selectItem itemLabel="USA" itemValue="United States"></f:selectItem>						
                        <f:selectItem itemLabel="UK" itemValue="United Kingdom"></f:selectItem>
                    </h:selectOneMenu>
                </td>
            </tr>			
	    <!-- Text Value -->			
            <tr>
                <td>
		    <sp:outputText value="#{taskDefinition.argMap['dbName'].argument.prompt}"/>
		</td>
                <td>
                    <h:inputText size="40" id="dbName" value="#{taskDefinition.argMap['dbName'].value}" required="true" />
                    <a4j:outputPanel ajaxRendered="true">
                    <h:message styleClass="formError" for="dbName" />
                    </a4j:outputPanel>
                </td>
            </tr>			
	    <!-- Text Value -->			
            <tr>
                <td>
		<sp:outputText value="#{taskDefinition.argMap['ruleName'].argument.prompt}"/>
		</td>
                <td>
                    <sp:inputText size="40" id="ruleName" value="#{taskDefinition.argMap['ruleName'].value}" redisplay="true" autocomplete="off" required="true" />
                    <a4j:outputPanel ajaxRendered="true">
                    <h:message styleClass="formError" for="ruleName"/>
                    </a4j:outputPanel>
                </td>
            </tr>			
           <!-- Secret Value -->
            <tr>
                <td>
                   <sp:outputText value="#{taskDefinition.argMap['password'].argument.prompt}"/>
                </td>
                <td>
                    <sp:inputSecret size="40" id="password" value="#{taskDefinition.argMap['password'].value}" redisplay="true" autocomplete="off" required="true" />
                    <a4j:outputPanel ajaxRendered="true">
                    <h:message styleClass="formError" for="password"/>
                    </a4j:outputPanel>
                </td>
            </tr>
            <tr>
                <td>
                    <sp:outputText value="#{taskDefinition.argMap['noAutoCreate'].argument.prompt}"/>
                </td>
                <td>
                   <h:selectBooleanCheckbox id="noAutoCreate" value="#{taskDefinition.argMap['noAutoCreate'].booleanValue}"/>
                </td>
            </tr>
            <!-- Multi Select Values -->
            <tr>
                <td>
		    <sp:outputText  value="#{taskDefinition.argMap['color'].argument.prompt}"/>
                </td>
                <td>
                    <h:selectManyListbox size="7" value="#{taskDefinition.argMap['color'].objectListValue}">
                        <f:selectItem itemLabel="Black" itemValue="Black"/>
                        <f:selectItem itemLabel="Blue" itemValue="Blue"/>
                        <f:selectItem itemLabel="Green" itemValue="Green"/>
                        <f:selectItem itemLabel="Red" itemValue="Red"/>
                    </h:selectManyListbox>
                </td>
            </tr>
            <!-- Radio button Value -->
            <tr>
                <td valign="top">
                    <sp:outputText value="#{taskDefinition.argMap['mode'].argument.prompt}"/>
                </td>
                <td>
                    <h:selectOneRadio id="mode" value="#{taskDefinition.argMap['mode'].value}">
                        <f:selectItem itemLabel="Full" itemValue="full" />
                        <f:selectItem itemLabel="Incremental" itemValue="incremental"/>
                    </h:selectOneRadio>
                </td>
            </tr>            
	     <!-- Select Rule Object -->
            <tr>
                <td>
                    <sp:outputText  value="#{taskDefinition.argMap['ruleAll'].argument.prompt}"/>
                </td>
                <td>
                    <a4j:outputPanel id="creationRulePanel">
                    <h:selectOneMenu id="ruleAll" value="#{taskDefinition.argMap['ruleAll'].value}">
                        <f:selectItem itemLabel="Rule All" itemValue=""/>
                        <f:selectItems value="#{taskDefinition.argMap['ruleAll'].objectNames}"/>
                    </h:selectOneMenu>
                    </a4j:outputPanel>
		</td>
	    </tr>
        </table>
    </div>
</ui:composition>
</body>
</html>




 

2. Create a TaskDefination object using the debug page 

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE TaskDefinition PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<TaskDefinition  formPath="/monitor/tasks/visCustomRuleTask.xhtml" name="VIS Custom Rule Run Task" resultAction="Delete" subType="task_item_type_generic" type="Generic">
  <Attributes>
    <Map>
      <entry key="TaskDefinition.runLengthAverage" value="0"/>
      <entry key="TaskDefinition.runLengthTotal" value="4"/>
      <entry key="TaskDefinition.runs" value="36"/>
      <entry key="TaskSchedule.host"/>
      <entry key="taskCompletionEmailNotify" value="Disabled"/>
      <entry key="taskCompletionEmailRecipients"/>
      <entry key="taskCompletionEmailTemplate"/>
      <entry key="ruleName" value="VIS Custom Rule Run"/>
    </Map>
  </Attributes>
  <Description>A task that can be used to run an arbitrary rule.</Description>
  <Owner>
    <Reference class="sailpoint.object.Identity" name="spadmin"/>
  </Owner>
  <Parent>
    <Reference class="sailpoint.object.TaskDefinition" name="Run Rule"/>
  </Parent>
  <Signature>
    <Inputs>
      <Argument helpKey="help_task_run_rule_rule" name="ruleName" type="string">
        <Prompt>label_rule</Prompt>
      </Argument>
      <Argument helpKey="User Country" name="country" type="string">
        <Prompt>User Country</Prompt>
      </Argument>
      <Argument helpKey="Database Name" name="dbName" type="string">
        <Prompt>Database Name</Prompt>
      </Argument>
      <Argument helpKey="Password" name="password" type="secret">
        <Prompt>Password</Prompt>
      </Argument>
      <Argument helpKey="Auto Create" name="noAutoCreate" type="boolean">
        <Prompt>Auto Create</Prompt>
      </Argument>
      <Argument helpKey="Color" multi="true" name="color" type="string">
        <Prompt>colour</Prompt>
      </Argument>
      <Argument helpKey="Mode" name="mode" type="string">
        <Prompt>Mode</Prompt>
      </Argument>
      <Argument helpKey="Rule All" name="ruleAll" type="Rule">
        <Prompt>All Rule</Prompt>
      </Argument>
    </Inputs>
  </Signature>
</TaskDefinition>

3. Create a Rule which need to be triggered when the above task is triggered

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Rule PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<Rule language="beanshell" name="VIS Custom Rule Run">
  <Description>This rule is used to Run Rule .</Description>
  <Signature>
    <Inputs>
      <Argument name="log">
        <Description>
          The log object associated with the SailPointContext.
        </Description>
      </Argument>
      <Argument name="context">
        <Description>
          A sailpoint.api.SailPointContext object that can be used to query the database if necessary.
        </Description>
      </Argument>
    </Inputs>
  </Signature>
  <Source>
		import sailpoint.object.Identity;
		import java.util.List;
		import java.util.ArrayList;
		import sailpoint.object.TaskDefinition;
		import sailpoint.object.TaskResult;
		import sailpoint.object.Filter;
		import sailpoint.object.QueryOptions;
		import sailpoint.object.Application;
		import java.util.*;
		import sailpoint.object.ManagedResource;
		import java.lang.*;



		System.out.println("----Task Start ---------");
		TaskDefinition taskDef = context.getObjectByName(TaskDefinition.class,"VIS Custom Rule Run Task");
		
		System.out.println("Task Definition:"+taskDef);

		String ruleName = taskDef.getString("ruleName");
		String country = taskDef.getString("country");
		String dbName = taskDef.getString("dbName");
		String password = taskDef.getString("password");
		String noAutoCreate = taskDef.getString("noAutoCreate");
		String color = taskDef.getString("color");
		String mode = taskDef.getString("mode");
		String ruleAll = taskDef.getString("ruleAll");

		System.out.println("ruleName:"+ruleName);
		System.out.println("country:"+country);
		System.out.println("dbName:"+dbName);
		System.out.println("password:"+password);
		System.out.println("noAutoCreate:"+noAutoCreate);
		System.out.println("color:"+color);
		System.out.println("mode:"+mode);
                System.out.println("ruleAll:"+ruleAll);
		
		System.out.println("----Task End ---------");
		
  		return "Success";
  									
  									
  </Source>
</Rule>

4. Search the Task name in Task which is created in above step , you will see different type of input in this task ,here we have using different types of input such as
  •     Drop down
  •     Text Field
  •     Secret Field
  •     Checkbox
  •     Multi-Select
  •     Radio Button
  •     Object Selector 
 



















5. We have written the Rule which is just printing the input value from the task , here we can see the output as the different value selected / Input while triggering this Run Rule Task.


Saturday, August 31, 2019

Hiding Filter Attributes From Request Access , Manage Access Page Sailpoint Identity IQ


Hiding the Filter Attributes from the Request Access --> Manage Access Page using the Plugin .
We need to create the below folder structure and copy the required codes in each of the files as given below , here in expAccessSerachFilter.js we have written the JS to hide few OOTB Attributes such as the Role Type , Entitlement Attribute and Entitlement Owner. This can be even used to hide any of the Extended Attribute from the Managed Attribute.

│  
├───AccessRequestAccessFilter
│   │   manifest.xml
│   │  
│   ├───jars
│   └───ui
│       ├───images
│       └───js
│               expAccessSerachFilter.js

                

manifest.xml

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Plugin PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<Plugin name="AccessRequestAccessFilter" displayName="AccessRequestAccessFilter" disabled="false" version="0.0.1.0" minSystemVersion="7.1" maxSystemVersion="7.4"
  certificationLevel="None">
  <Attributes>
    <Map>
      <entry key="snippets">
        <value>
          <List>
            <Snippet regexPattern=".*" rightRequired="">
              <Scripts>
                <String>ui/js/expAccessSerachFilter.js</String>
              </Scripts>
            </Snippet>
          </List>
        </value>
      </entry>
    </Map>
  </Attributes>
</Plugin>


expAccessSerachFilter.js

jQuery(document).ready(function(){
var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
var observer = new MutationObserver(function(mutations) {  
 mutations.forEach(function(mutation){
   for(var i =0;i < mutation.addedNodes.length;i++){
   if($("[id*='itemsFilterPanel']").length) {
    if(jQuery(mutation.addedNodes[i]).find("sp-object-suggest[sp-button-aria-label='Role Type']").length)
     {
      $("sp-object-suggest[sp-button-aria-label='Role Type']").parent().parent().parent().hide();
     }
    if(jQuery(mutation.addedNodes[i]).find("sp-object-multi-suggest[sp-button-aria-label='Entitlement Attribute']").length)
     {
      $("sp-object-multi-suggest[sp-button-aria-label='Entitlement Attribute']").parent().parent().parent().hide();
     }
    if(jQuery(mutation.addedNodes[i]).find("sp-object-suggest[sp-button-aria-label='Entitlement Owner']").length)
     {
      $("sp-object-suggest[sp-button-aria-label='Entitlement Owner']").parent().parent().parent().hide();
     }     
   }
   }
    });
 });
observer.observe(document,{childList:true,subtree:true,attributes:false});
});

create the zip folder with above structure and install the same as the plugin in UI. 
Login into Identity IQ --> Gear --> Plugins -->New -->Drag and drop a file or click in this box to install a plugin
Once we have installed logout and login and see the changes . Below UI shows and have hidden the required attributes.



Saturday, May 4, 2019

QUICKLINK POPULATIONS IN IIQ


Creating a custom QuickLink population to add to IIQ OOTB menu is fairly straightforward. Below are the the following 4 steps which can be used to successfully setup a quicklink population.

1. Modify the System Configuration object from the debug page to add a separate category under menu and in quicklink Population.

– search for the entry key quickLinkCategories and add the line below as one of the list values.

&lt;QuickLinkCategory cssClass="quickLinkCategoryCustom" enabled="true" messageKey="Business Unit and Cost Center Section" name="Business Unit and Cost Center Section" ordering="4"/>





2. Create the Quicklink object, The action tag specifies the action to be performed when the link is invoked while the category specifies which category in the menu the link will go under. Here in below example we are invoking the Custom WF “Business Unit Attribute Update Workflow” when we click on the Quicklink

&lt;?xml version='1.0' encoding='UTF-8'?>
&lt;!DOCTYPE QuickLink PUBLIC "sailpoint.dtd" "sailpoint.dtd">
&lt;QuickLink action="workflow" category="Business Unit and Cost Center Section" messageKey="Update Business Unit Attribute" name=” Business Unit Update Attribute QuickLink">
&lt;Attributes>
&lt;Map>
&lt;entry key="workflowName" value=" Business Unit Attribute Update Workflow"/>
&lt;/Map>
&lt;/Attributes>
&lt;Description>QuickLink for Updating Business Unit Attribute in IIQ table&lt;/Description>
&lt;/QuickLink>





3.Navigate to Global Settings —> QuickLink Populations. Under QuickLinks tab you will see the category that was entered in the System Configuration.

-Select the Category —> Business Unit and Cost Center Section.

Select the quicklink and configure it by clicking on the radio button when configure option is selected, then select an option for running it for self or others.


4. Login to sailpoint and see if the Custom Quicklink and Quicklink Category is created, here we can see the Quicklink "Update Cost Center Type" is created under the "Business Unit and Cost Center Section" category.




Wednesday, July 18, 2018

Branding IdentityIQ - Image-based Branding Components

The application logos displayed throughout user interfaces are rendered from image files.for branding the image based component to modify the OOTB Sailpoint image to the Company logo follow the below steps mentioned.

1.  Navigate to //webapps/identityiq_home/ui/images
















2. Modify below files as required











3. Navigate to //webapps/identityiq_home/images/icons
     Replace sailpoint.ico file with the new file







4. Restart the Application Server and make sure the Browser Cache is cleared.























NOTE:The easiest way to avoid problems with image scaling is to use a logo image which matches the dimensions of the default product logos so you do not have to change the image sizes.