Monday, June 29, 2015

OIM 11G : End to End Process of sending custom emails using notification templates

Step 1

Define the Event. Let me call it
"MyCustomEvent"



 <EventType name="MyCustomEvent">
    <StaticData>
      <Attribute DataType="X2-Entity" EntityName="User" Name="User Login" />
    </StaticData>
    <Resolver class="com.deepak.dubey.notification.resolver.MyCustomEventResolver">
        <Param DataType="X2-Entity" EntityName="User" Name="usr_key" />
        <Param DataType="X2-Entity" EntityName="User" Name="MyCustomAttributeToBePassed" />
    </Resolver>
  </EventType>


Import this in MDS using weblogicImportMetaData.sh

Step 2

Write the Event Resolver Class

package com.deepak.dubey.notification.resolver;

import static oracle.iam.identity.utils.Constants.DISPLAYNAME;
import static oracle.iam.identity.utils.Constants.MLS_BASE_VALUE;
import static oracle.iam.identity.utils.Constants.USERKEY;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

import oracle.iam.identity.usermgmt.api.UserManager;
import oracle.iam.identity.vo.Identity;
import oracle.iam.notification.api.NotificationService;
import oracle.iam.notification.impl.NotificationEventResolver;
import oracle.iam.notification.vo.NotificationAttribute;
import oracle.iam.platform.Platform;

public class MyCustomEventResolver implements NotificationEventResolver{

   
    @Override
    public List<NotificationAttribute> getAvailableData(String eventType,
        Map<String, Object> params) throws Exception {
        List<NotificationAttribute> list = new ArrayList<NotificationAttribute>();
        return list;
    }

    @Override
    public HashMap<String, Object> getReplacedData(String eventType,
        Map<String, Object> params) throws Exception {

        HashMap<String, Object> resolvedData = new HashMap<String, Object>();
        UserManager usrMgr = Platform.getService(UserManager.class);
        String userKey = (String) params.get(USERKEY);

        // Mapping token with their actual value for user attributes.
        if (userKey != null) {
         
            NotificationService notificationService =
                Platform.getService(NotificationService.class);
            List<NotificationAttribute> notificationAttributes =
                notificationService.getStaticData(eventType);
         
            /*
             * Configuring user attributes required to be returned in the search
             * aligning with attributes being showed as 'Available Data' in the
             * notification template for this event.
                   */
            Set<String> userRetAttrs = new HashSet<String>();
            for (NotificationAttribute notificationAttribute :
                notificationAttributes.get(0).getSubtree()) {
                userRetAttrs.add(notificationAttribute.getName());
            }
         
            //Getting values for the attributes using userKey
            Identity user = usrMgr.getDetails(userKey, userRetAttrs ,false);
            HashMap<String, Object> userAttributes = user.getAttributes();
         
            /*
             * Creating map containing mapping between tokens available for template
             * to their actual values
             */
            String key = null;
            for (Map.Entry<String, Object>  entry : userAttributes.entrySet()) {
                key = entry.getKey();
                if (key != null) {
                    if ((entry.getValue() instanceof java.util.Map) &&
                        (key.equalsIgnoreCase(DISPLAYNAME))) {
                        key = key.replace(' ', '_');
                        resolvedData.put(key,
                            ((HashMap)entry.getValue()).get(MLS_BASE_VALUE));
                    } else {
                        key = key.replace(' ', '_');
                        resolvedData.put(key, entry.getValue());
                    }
                }
            }
        }
       

        return resolvedData;
    }
}


Step 3

Create plugin.xml

<?xml version="1.0" encoding="UTF-8"?>
<oimplugins xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <plugins pluginpoint="oracle.iam.notification.impl.NotificationEventResolver">
        <plugin pluginclass= "com.deepak.dubey.notification.resolver.MyCustomEventResolver"
            version="1.0" name="My Custom Event Resolver"/>    
    </plugins>
</oimplugins>

Step 4

Create the Notification Template "My Custom Email Template"
$MyCustomAttributeToBePassed
format for custom attributes

Step 5

Write the java code to invoke the notification template

oracle.iam.notification.api.NotificationService notsvc = oimClient
                .getService(oracle.iam.notification.api.NotificationService.class);
        oracle.iam.notification.vo.NotificationEvent notevent = new oracle.iam.notification.vo.NotificationEvent();
        String[] receiverUserIds = { managerLogin, roleApprover };
        notevent.setUserIds(receiverUserIds);
        notevent.setTemplateName("Custom Email Template");
        java.util.HashMap templateParams = new java.util.HashMap();
        templateParams.put("usr_key", beneficiaryID);
        templateParams.put("request_id", reqId);
        templateParams.put("role_name", roleName);
        templateParams.put("requester_name", requesterDisplayName);
templateParams.put("requester_name", MyCustomAttributeToBePassed);
        notevent.setSender(null);
        notevent.setParams(templateParams);
        System.out.println("Sending Notification");
        notsvc.notify(notevent);


Package the java code and plugin.xml as a zip file and register using
ant -f pluginregistration.xml register

Sunday, June 28, 2015

OIAM 11g R2 PS3 (11.1.2.3.0) Installation Overview

This post covers the high level overview of Oracle Identity and Access Management 11g R2 PS3 (11.1.2.3.0) Setup.


  1. Start with certification matrix and ensure you are installing all compatible versions on the targeted platform
  2. Install JDK. I installed JDK 7 update 80 on my windows box for my demo setup.
  3. Install Database. You will need additional patching based on the version and target platform that it is running on. For my demo setup I did not have to do anything.
  4.  
  5. Install Weblogic. I used weblogic server 10.3.6 which is still compatible with PS3 as it was with PS2 as well.
  6. Run the RCU version 11.1.1.9.0 to create the schema.
  7. Install Oracle SOA Suite 11g Release 1 (11.1.1.9.0)
  8. Install OIAM
  9. Run the Oracle Fusion Middleware Configuration Wizard to configure OIAM onto weblogic
  10. Configure database security store
  11. Configure OIM by running OIM Configuration Wizard
  12. Start servers
  13. Run OIAM health check utility.

Oracle Identity and Access Management 11g R2 PS3 (11.1.2.3.0) RCU Installation

Set the below 3 parameters in Oracle Database and restart the DB.

alter system set processes=500 scope=spfile;
alter system set sessions=500 scope=spfile;
alter system set open_cursors=1000 scope=spfile;

Run the rcu utility by running rcu.sh from $RCU_HOME\bin\rcu.sh

Follow the screen captures as below to proceed with the necessary schema creation for Oracle Identity Manager, Oracle Access Manager, Oracle Identity Federation & Oracle Adaptive Access Manager and any other product that you wish to install later.



To create database schemas for Oracle Identity and Access Management 11g Release 2 (11.1.2.3.0) components, you will need 11.1.1.9.0 version of the Oracle Fusion Middleware Repository Creation Utility.















Friday, June 26, 2015

Oracle Identity Manager (OIM) Interview Questions

This is my 100th post on my blog and in this post, I will list down interview questions on OIM.
This post will always be work in progress as I keep appending this list with more and more questions.
Please find the list of questions below :-)
  1. What are the new features in PS3 ?
  2. What are the differences between PS2 and PS3 ?
  3. How do you identify rogue account creation in target system ?
  4. What is the high level architecture of OIM 11g ?
  5. List out difference between OIM 9.1 and 11g and possibly 11gR2
  6. What are the new features in 11gR2 PS2 , PS3
  7. How do you save multi-valued attribute in process form and how the linking happens between process form & child form ,   1 child form per multi valued attribute
  8. Can we still use entity adapters in OIM 11g
  9. What is pluginservice in oim 11g/  What is the orchestration service in oim 11g.
  10. what is the difference between entity match found  and process match found ?
  11. what are service accounts in oim ?
  12. why remote manager is used ?
  13. What is a connector server and types of connector server available ?
  14. What is ICF , ICF architecture ?
  15. why connector server (ICF) is used. Can connector server replace remote manager. types of connector server.  which OOTB connector are ICF based now - 11g.
  16. What is Lookup.USR_PROCESS_TRIGGERS , how data flow happens during provisioning.
  17. How will you develop a custom connector from scratch ? List all the components involved.
  18. What are the different types of adapters and under which circumstances they are used.
  19. List some OIM api java classes.  How do we initialize the api before we can use them  (example tcUserOperationsIntf)
  20. List some differences in api classes / new classes from 11g point of view
  21. How you create a plugin in oim 11g (packaging, registration, MDS seeding etc)
  22. Difference between execute and bulkExecute in post process handler and under which scenarios they are used ?
  23. Can preprocess event handler be used during trusted user recon
  24. Email templates are now removed in oim 11g and how do we send emails in oim 11g ?
  25. What are notification templates, notification resolvers, notification event xml file registration ?
  26. oim 9.1 - formmetadata.xml - why we use it and what all is possible by changing/configuring it.
  27. How do you modify self registration page in 11g ?
  28. A lot of questions on MDS , how we use it, what all configuration objects are stored, the structure of configuration objects , oim-config.xml, list some very common file names
  29. What is the difference between object form and process form (9.1)
  30. What has replaced object form in 11g?
  31. What is the difference between approval policy, authorization policy and access policy?
  32. How do we deploy the SOA workflows in 11g?
  33. What is basic Request Templates model, how are they extended to create custom ones, how authorization is enforced while defining new one,  Is it possible that certain set of users can only see the certain request templates (yes).
  34. How do you create a custom scheduled task in OIM 11g?
  35. How do you create a custom plugin in OIM 11g?
  36. What performance improvement measures has been implemented in OIM 11g in terms of reconciliation.
  37. How do you use task assignment adapter in OIM ?
  38. under what circumstances spml is used ?
  39. Attestation - Why / what / when / how ?
  40. Certification -  Why / what / when / how ?
  41. List out the difference between LDAP sync and OID Connector when both can essentially sync the user info between oim and OID (11g )
  42. How can you disable certain menu item on OIM 11g R2 PS2 based on the user's role ?
  43. What is request dataset status change plugin and how do you use it?
  44. What is request dataset validator plugin and how do you use it ?
  45. What are application instances, disconnected applications ?
  46. What is a sandbox and how will you go about doing sandbox management, its issues and limitations ?
  47. What is a dynamic organization and how do we use it ?
  48. Pre Process Event Handlers are applicable on what all entities and event types ?
  49. What is a catalog, what all it contains, how do you publish item to a catalog, how will you do catalog management ?
  50. What is a public taskflow and how do you develop and use it in OIM ?
  51. What is Access Policy Harvesting and how will you set it up ?

Friday, June 19, 2015

OIM 11G R2 PS2 : Send Email using the NotificationService and Custom Email Template


In this post, I will list down the code to send an email notification from event handler or a scheduled task to send out an email notification.

public OIMClient getOIMClient(String oimUserName, String oimPassword,
            Object oimURL) throws LoginException {
        java.util.Hashtable env = new java.util.Hashtable();
        env.put(oracle.iam.platform.OIMClient.JAVA_NAMING_FACTORY_INITIAL,
                oracle.iam.platform.OIMClient.WLS_CONTEXT_FACTORY);
        env.put(oracle.iam.platform.OIMClient.JAVA_NAMING_PROVIDER_URL, oimURL);
        oracle.iam.platform.OIMClient client = new oracle.iam.platform.OIMClient(
                env);
        client.login(oimUserName, oimPassword.toCharArray());
        return client;
    }

    public void sendEmail(String managerLogin, String roleApprover,
            String beneficiaryID, String reqId, String roleName,
            String requesterDisplayName) throws LoginException,
            UserDetailsNotFoundException, EventException,
            UnresolvedNotificationDataException, TemplateNotFoundException,
            MultipleTemplateException, NotificationResolverNotFoundException,
            NotificationException {
        OIMClient oimClient = getOIMClient("xelsysadm", "password",
                "t3://localhost:14000");
        oracle.iam.notification.api.NotificationService notsvc = oimClient
                .getService(oracle.iam.notification.api.NotificationService.class);
        oracle.iam.notification.vo.NotificationEvent notevent = new oracle.iam.notification.vo.NotificationEvent();
        String[] receiverUserIds = { managerLogin, roleApprover };
        notevent.setUserIds(receiverUserIds);
        notevent.setTemplateName("Custom Email Template Name");
        java.util.HashMap templateParams = new java.util.HashMap();
        templateParams.put("usr_key", beneficiaryID);
        templateParams.put("request_id", reqId);
        templateParams.put("role_name", roleName);
        templateParams.put("requester_name", requesterDisplayName);
        notevent.setSender(null);
        notevent.setParams(templateParams);
        System.out.println("Sending Email");
        notsvc.notify(notevent);
    }

Thursday, June 18, 2015

OIM 11G Separate User ID and Email Notification use case and detailed steps to achieve it



In this post, I will talk about sending separate userid and password email on user onborading.

Existing Process

Modify the existing "Generated Password Notification" and remove $username

Add new CREATE USER post-process Event Handler and send only username.

Create a new Notification Event Resolver

Create a new Notification Template

Event Metadata  ->  Notification Resolver -> Notification Template
-----------------------------------------------------------------------------------------------------------------------------------------------

OIM 11g: How to Disable Email Notification? [ID 1473778.1]

1) Export from MDS the file /metadata/iam-features-selfservice/event-definition/EventHandlers.xml. Instructions to import export can be found here. Save a local copy for future reference.

2) Remove the section

<postprocess-handler
class="oracle.iam.selfservice.uself.uselfmgmt.impl.handlers.create.SelfServiceNotificationHandler"
entity-type="User"
operation="CREATE"
name="SelfServiceNotificationHandler"
order="1160"
stage="postprocess"
sync="TRUE">
</postprocess-handler>

3) Export from MDS the file 
/metadata/iam-features-passwordmgmt/event-definition/EventHandlers.xml .


4) Remove the section:

<postprocess-handler
class="oracle.iam.passwordmgmt.eventhandlers.PasswordNotificationHandler"
entity-type="User" operation="CREATE" name="PasswordNotificationHandler"
order="1180" stage="postprocess" sync="TRUE">
</postprocess-handler>

5) Import these two files back into MDS.

6) Reexport the above two files again to verify your edits got uploaded to MDS correctly.

7) Set the system property in OIM "Should send notifications in recon or not" to FALSE.

Notes:

  (1) Currently notifications are sent in the following scenarios by event handlers in case users are created through UI or through SPML (since internally we are having a single code path -- create user orchestration) .

    Create user with manual password – SelfServiceNotificationHandler

        This can be disabled to suppress the notification being sent.

        MDS Location :
/metadata/iam-features-selfservice/event-definition/EventHandlers.xml, Edit out the section for SelfServiceNotificationHandler

Admin create user with auto-gen password – PasswordNotificationHandler

This can be disabled to suppress the notification being sent.
        MDS Location : 
/metadata/iam-features-passwordmgmt/event-definition/EventHandlers.xm, 
edit out the section for PasswordNotificationHandler
    Admin change password with manual password – Via UI based on the email checkbox selected on the UI.
        UI checkbox can be selected appropriately .
    Admin change password with auto-gen password (reset password) – ResetPasswordActionHandler
        This is NOT a post-processing handler that can be disabled. Not configurable, as password needs to be communicated

(2) LDAP Sync Scenario:

System Property name which is specific to Recon to disable notification, Recon.SEND_NOTIFICATION. This property is exercised when the users are getting created through LDAP sync.
  (3) Notes on how to edit out the event handlers :

http://download.oracle.com/docs/cd/E14571_01/doc.1111/e14309/utils.htm

-----------------------------------------------------------------------------------------------------------------------------------------------

<?xml version='1.0' encoding='UTF-8'?>
<eventhandlers xmlns="http://www.oracle.com/schema/oim/platform/kernel" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.oracle.com/schema/oim/platform/kernel orchestration-handlers.xsd">

<!--REMOVE---->
<postprocess-handler class="oracle.iam.selfservice.uself.uselfmgmt.impl.handlers.create.SelfServicePostHandler" entity-type="User" operation="CREATE" name="SelfServicePostHandler" order="1000000" stage="postprocess" sync="TRUE"/>


<preview-handler class="oracle.iam.selfservice.self.selfmgmt.impl.handlers.setchallenge.SetChallengeValuesPreviewHandler" entity-type="User" operation="SELFSETCHALLENGE" name="SetChallengeValuesPreviewHandler" order="FIRST"/>
<validation-handler class="oracle.iam.selfservice.self.selfmgmt.impl.handlers.setchallenge.SetChallengeValuesValidationHandler" entity-type="User" operation="SELFSETCHALLENGE" name="SetChallengeValuesValidationHandler" order="FIRST"/>
<action-handler class="oracle.iam.selfservice.self.selfmgmt.impl.handlers.setchallenge.SetChallengeValuesActionHandler" entity-type="User" operation="SELFSETCHALLENGE" name="SetChallengeValuesActionHandler" order="FIRST" stage="action" sync="TRUE"/>
<preview-handler class="oracle.iam.selfservice.self.selfmgmt.impl.handlers.expiredpwd.ExpiredPasswordPreviewHandler" entity-type="User" operation="SELFEXPIREDPWD" name="ExpiredPasswordPreviewHandler" order="FIRST"/>
<action-handler class="oracle.iam.selfservice.self.selfmgmt.impl.handlers.expiredpwd.ExpiredPasswordActionHandler" entity-type="User" operation="SELFEXPIREDPWD" name="ExpiredPasswordActionHandler" order="FIRST" stage="action" sync="TRUE"/>
<preview-handler class="oracle.iam.selfservice.self.selfmgmt.impl.handlers.changepwd.ChangePasswordPreviewHandler" entity-type="User" operation="CHANGE_PASSWORD" name="SelfChangePasswordPreviewHandler" order="FIRST"/>
<validation-handler class="oracle.iam.selfservice.self.selfmgmt.impl.handlers.changepwd.ChangePasswordValidationHandler" entity-type="User" operation="CHANGE_PASSWORD" name="SelfChangePasswordValidationHandler" order="FIRST"/>
<action-handler class="oracle.iam.selfservice.self.selfmgmt.impl.handlers.changepwd.ChangePasswordActionHandler" entity-type="User" operation="CHANGE_PASSWORD" name="SelfChangePasswordActionHandler" order="FIRST" stage="action" sync="TRUE"/>
<postprocess-handler class="oracle.iam.selfservice.uself.uselfmgmt.impl.handlers.create.SelfServiceNotificationHandler" entity-type="User" operation="CREATE" name="SelfServiceNotificationHandler" order="1160" stage="postprocess" sync="TRUE"/>
</eventhandlers>
-----------------------------------------------------------------------------------------------------------------------------------------------
<?xml version='1.0' encoding='UTF-8'?>
<eventhandlers xmlns="http://www.oracle.com/schema/oim/platform/kernel" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.oracle.com/schema/oim/platform/kernel orchestration-handlers.xsd">
<preview-handler class="oracle.iam.passwordmgmt.eventhandlers.ResetPasswordPreviewHandler" entity-type="User" operation="RESET_PASSWORD" name="ResetPasswordPreviewHandler" order="FIRST"/>
<validation-handler class="oracle.iam.passwordmgmt.eventhandlers.ResetPasswordValidationHandler" entity-type="User" operation="RESET_PASSWORD" name="ResetPasswordValidationHandler" order="FIRST" sync="TRUE"/>
<validation-handler class="oracle.iam.passwordmgmt.eventhandlers.UserPasswordValidationHandler" entity-type="User" operation="CREATE" name="UserPasswordValidationHandler" order="1020"/>
<validation-handler class="oracle.iam.passwordmgmt.eventhandlers.UserPasswordValidationHandler" entity-type="User" operation="CHANGE_PASSWORD" name="UserPasswordValidationHandler" order="2"/>
<action-handler class="oracle.iam.passwordmgmt.eventhandlers.ResetPasswordPreProcessHandler" entity-type="User" operation="RESET_PASSWORD" name="ResetPasswordPreProcessHandler" stage="preprocess" sync="TRUE" order="9900"/>
<action-handler class="oracle.iam.passwordmgmt.eventhandlers.ResetPasswordActionHandler" entity-type="User" operation="RESET_PASSWORD" name="ResetPasswordActionHandler" order="FIRST" stage="action" sync="TRUE"/>

<!--REMOVE--->
<postprocess-handler class="oracle.iam.passwordmgmt.eventhandlers.PasswordNotificationHandler" entity-type="User" operation="CREATE" name="PasswordNotificationHandler" order="1180" stage="postprocess" sync="TRUE"/>



<postprocess-handler class="oracle.iam.passwordmgmt.eventhandlers.PasswordHistoryPostProcessHandler" entity-type="User" operation="CREATE" name="PasswordHistoryPostProcessHandler" order="1200" stage="postprocess" sync="TRUE"/>
<postprocess-handler class="oracle.iam.passwordmgmt.eventhandlers.PasswordHistoryPostProcessHandler" entity-type="User" operation="CHANGE_PASSWORD" name="PasswordHistoryPostProcessHandler" order="SECOND" stage="postprocess" sync="TRUE"/>
</eventhandlers>

-----------------------------------------------------------------------------------------------------------------------------------------------
Notification RESOLVER
-----------------------------------------------------------------------------------------------------------------------------------------------
<?xml version='1.0' encoding='UTF-8'?>
<Events xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../notification/metadata/NotificationEvent.xsd">
<EventType name="CreateSelfUser">
<Resolver class="oracle.iam.selfservice.notification.CreateNewSelfUserResolver">
<Param Name="CreateSelfUser" DataType="X2-Entity" EntityName="CreateSelfUser"/>
</Resolver>
</EventType>
</Events>
__________________________________________________________________________________________________________________________________________________
NotificationEvent.xsd
---------------------------------------------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

          <xs:complexType name="ParamType">
               <xs:attribute name="Name" type="xs:string" use="required" />
               <xs:attribute name="DataType" use="required">
                    <xs:simpleType>
                         <xs:restriction base="xs:string">
                              <xs:enumeration value="X2-Entity" />
                              <xs:enumeration value="91-Entity" />
                         </xs:restriction>
                    </xs:simpleType>
               </xs:attribute>
               <xs:attribute name="EntityName" type="xs:string"></xs:attribute>
          </xs:complexType>


          <xs:complexType name="AttributeType">
               <xs:attribute name="Name" type="xs:string" use="required" />
               <xs:attribute name="DataType" use="required" >
                    <xs:simpleType>
                         <xs:restriction base="xs:string">
                              <xs:enumeration value="X2-Entity" />
                              <xs:enumeration value="91-Entity" />
                              <xs:enumeration value="X2-DataSet" />
                         </xs:restriction>
                    </xs:simpleType>             
               </xs:attribute>
               <xs:attribute name="EntityName" type="xs:string"></xs:attribute>
          </xs:complexType>

          <xs:complexType name="StaticDataType">
               <xs:sequence>
                    <xs:element name="Attribute" minOccurs="0" maxOccurs="unbounded"
                         type="AttributeType" />
               </xs:sequence>
          </xs:complexType>

          <xs:complexType name="ResolverType">
               <xs:sequence>
                    <xs:element name="Param" minOccurs="1" maxOccurs="unbounded"
                         type="ParamType" />
               </xs:sequence>
               <xs:attribute name="class" type="xs:string" />
          </xs:complexType>

          <xs:complexType name="EventTypeType">
               <xs:sequence>
                    <xs:element name="StaticData" type="StaticDataType"
                         minOccurs="0" maxOccurs="unbounded" />
                    <xs:element name="Resolver" type="ResolverType"
                         minOccurs="1" maxOccurs="1" />
               </xs:sequence>
               <xs:attribute name="name" type="xs:string" />
          </xs:complexType>

          <xs:element name="Events">
               <xs:complexType>
                    <xs:choice minOccurs="1" maxOccurs="unbounded">
                         <xs:element name="EventType" type="EventTypeType"
                              minOccurs="1" maxOccurs="unbounded" />
                    </xs:choice>
               </xs:complexType>
          </xs:element>
</xs:schema>








151141

1. Added in "/home/oracle/MDS2/metadata/iam-features-passwordmgmt/event-definition/EventHandlers.xml"


<postprocess-handler class="com.ee.oim.user.NotifyUserIdToUser" entity-type="User" operation="CREATE" name="NotifyUserIdToUser" order="2180" stage="postprocess" sync="TRUE"/>




2. Added in "/home/oracle/MDS2/metadata/iam-features-passwordmgmt/notification/ResetPasswordEvent.xml"


<EventType name="NotifyUserIdToUser">
<StaticData>
<Attribute DataType="X2-Entity" EntityName="User" Name="Granted User"/>
</StaticData>
<Resolver class="oracle.iam.identity.notification.EndDateNotificationEventResolver">
<Param DataType="X2-Entity" EntityName="User" Name="usr_key"/>
</Resolver>
</EventType>

3. ./weblogicImportMetaData.sh




3. plugin.xml

<?xml version="1.0" encoding="UTF-8"?>
<oimplugins>
  <plugins pluginpoint="oracle.iam.platform.kernel.spi.EventHandler">
    <plugin pluginclass=
        "com.deepak.dubey.oim.user.NotifyUserIdToUser"
         version="1.0"
         name="NotifyUserIdToUser">
    </plugin>
  </plugins>
</oimplugins>






[oracle@voimbilt01 plugin_utility]$ ant -f pluginregistration.xml register
Buildfile: pluginregistration.xml

register:
     [echo]
     [echo] *******************************************************************************
     [echo]                                 REGISTRATION TOOL TO REGISTER
     [echo] *******************************************************************************
     [echo]             This tool can be used to register or unregister plugins to OIM.
     [echo]
     [echo]         Edit the ant.properties file to set the properties.
     [echo]         Invoke the corresponding ant targets (register or unregister) to perform registration or unregistration correspondingly.
     [echo]
     [echo]             Following are the additional system properties accepted by the utility. They would be prompted if not passed at the time of invoking the utility.
     [echo]
     [echo]             OIM.Username (User ID of the oim user)
     [echo]             ServerURL (URL of the server. t3://<host>:<port>)
     [echo]             PluginZipToRegister (Complete name with path of the plugin file. Required for registering a plugin.)
     [echo]
     [echo]             Set the other properties in ant.properties file:
     [echo]             wls.home
     [echo]             oim.home
     [echo]             login.config
     [echo]
     [echo]
     [echo] /opt/oracle/Oracle/Middleware/Oracle_IDM1/server/ext/spring.jar:/opt/oracle/Oracle/Middleware/Oracle_IDM1/server/ext/jakarta-commons/commons-logging.jar:/opt/oracle/Oracle/Middleware/Oracle_IDM1/server/ext/internal/toplink.jar:/opt/oracle/Oracle/Middleware/Oracle_IDM1/server/platform/iam-platform-context.jar:/opt/oracle/Oracle/Middleware/Oracle_IDM1/server/platform/iam-platform-utils.jar:/opt/oracle/Oracle/Middleware/Oracle_IDM1/server/platform/iam-platform-auth-client.jar:/opt/oracle/Oracle/Middleware/Oracle_IDM1/server/platform/iam-platform-pluginframework.jar:/opt/oracle/Oracle/Middleware/Oracle_IDM1/server/client/oimclient.jar:/opt/oracle/Oracle/Middleware/wlserver_10.3/server/lib/wlfullclient.jar
    [input] Enter the oim user id:
xelsysadm
    [input]Enter the oim user password:

    [input] Enter the server url [t3://<host>:<port>] :
t3://localhost:14000
    [input] Enter name (complete file name with path) of the plugin file:
/opt/oracle/deploy/plugins/notify-user.zip
     [echo]
     [echo] Plugin Registered

BUILD SUCCESSFUL
Total time: 44 seconds
[oracle@voimbilt01 plugin_utility]$

-----------------------------------------------------------------------------------------------------------------------------------------------------------
Notify UserId to User
New Account Information
Generated Password
<html>  <head>      </head>  <body>   
                    <p>
An account has been created for you with the following details. You will be required to change your password on next login.
         </p><p>
UserID: $User_Login<br>
      
         </p><p>
           For any issues, please contact admin@localdomain.com
         </p>
                     </body></html>
-----------------------------------------------------------------------------------------------------------------------------------------------------------

Modify the Existing
"Generated Password Notification"


<html>  <head>      </head>  <body>   
                    <p>
An account has been created for you with the following details. You will be required to change your password on next login.
         </p><p>
      Password: $password<br>
         </p><p>
           For any issues, please contact admin@localdomain.com
         </p>
                     </body></html>


-------------------------------------------------------------------------------------------------------------------------------------------------------------