Sunday, 16 July 2017

                            RUNNING NOTES:




An entitlement granted to an account on a target system enables the account owner (user) to perform a specific task or function. An entitlement can be a role, responsibility, or group membership. For example, if user Richard is granted the Inventory Analyst role on a target system, then Richard can use that entitlement to access and generate inventory-related reports from the target system.

In Oracle Identity Manager, there is one process form for each account (resource) provisioned to an OIM User. Entitlement data is stored in child process forms of the process form. In the example described earlier, the process form for Richard's account on the target system has a child process form that holds Inventory Manager role data.

Attributes that constitute entitlement data stored on a child process form may vary from one target system to another. In addition, different types of entitlements, such as roles and responsibilities, may have different attributes. For example, Target System A contains the following role data attributes:

Sunday, 2 July 2017

Docs required from trainer

1) Design console setup locally

Wednesday, 24 May 2017

Sample OIM Java Codes:


Custom scheduler:


package com.blogspot.oraclestack.testdriver;

import Thor.API.Exceptions.tcAPIException;
import Thor.API.Exceptions.tcBulkException;
import Thor.API.Exceptions.tcTaskNotFoundException;
import Thor.API.Operations.tcProvisioningOperationsIntf;
import Thor.API.Security.XLClientSecurityAssociation;
import com.thortech.xl.client.dataobj.tcDataBaseClient;
import com.thortech.xl.dataaccess.tcDataProvider;
import com.thortech.xl.dataaccess.tcDataSet;
import com.thortech.xl.dataaccess.tcDataSetException;
import com.thortech.xl.dataobj.PreparedStatementUtil;
import com.thortech.xl.orb.dataaccess.tcDataAccessException;
import java.util.Arrays;
import java.util.Hashtable;
import oracle.core.ojdl.logging.ODLLevel;
import oracle.core.ojdl.logging.ODLLogger;
import oracle.iam.platform.OIMClient;

/**
 * Test Driver to manual complete provisioning tasks.
 * @author rayedchan
 */
public class ManualCompleteProvisioningTaskTestDriver
{
    // LOGGER
    public static final ODLLogger LOGGER = ODLLogger.getODLLogger(ManualCompleteProvisioningTaskTestDriver.class.getName());
   
    // Adjust constant variables according to you OIM environment
    public static final String OIM_HOSTNAME = "localhost";
    public static final String OIM_PORT = "14000"; // For SSL, use 14001; For non-SSL, use 14000
    public static final String OIM_PROVIDER_URL = "t3://"+ OIM_HOSTNAME + ":" + OIM_PORT; // For SSL, use t3s protocol; For non-SSL, use t3 protocol
    public static final String AUTHWL_PATH = "lib/config/authwl.conf";
    public static final String APPSERVER_TYPE = "wls";
    public static final String FACTORY_INITIAL_TYPE = "weblogic.jndi.WLInitialContextFactory";
 
    // Use if using SSL connection for OIMClient
    public static final String TRUST_KEYSTORE_FOR_SSL = "/home/oracle/Oracle/Middleware/wlserver_10.3/server/lib/DemoTrust.jks";
   
    // OIM Administrator Credentials
    public static final String OIM_ADMIN_USERNAME = "xelsysadm";
    public static final String OIM_ADMIN_PASSWORD = "Password1";
   
    public static void main(String[] args) throws Exception
    {
        OIMClient oimClient = null;
       
        try
        {
            // Set system properties required for OIMClient
            System.setProperty("java.security.auth.login.config", AUTHWL_PATH);
            System.setProperty("APPSERVER_TYPE", APPSERVER_TYPE);
            System.setProperty("weblogic.security.SSL.trustedCAKeyStore", TRUST_KEYSTORE_FOR_SSL); // Provide if using SSL

            // Create an instance of OIMClient with OIM environment information
            Hashtable<String, String> env = new Hashtable<String, String>();
            env.put(OIMClient.JAVA_NAMING_FACTORY_INITIAL, FACTORY_INITIAL_TYPE);
            env.put(OIMClient.JAVA_NAMING_PROVIDER_URL, OIM_PROVIDER_URL);
           
            // Establish an OIM Client
            oimClient = new OIMClient(env);
           
            // Login to OIM with System Administrator Credentials
            oimClient.login(OIM_ADMIN_USERNAME, OIM_ADMIN_PASSWORD.toCharArray());
           
            // Manual complete provisioning tasks for a given process task in a specific process definition
            String processDefinationName = "LDAP User"; // PKG.PKG_NAME
            String processTaskName = "Disable User"; // MIL.MIL_NAME
            manualCompleteProvisioningTasks(processDefinationName, processTaskName, oimClient); // Call helper method
        }
               
        finally
        {
            // Logout of OIM client
            if(oimClient != null)
            {
                oimClient.logout();
            }
        }
    }
   
    /**
     * Manually complete provisioning tasks for a given process definition.
     * When a task is marked for manual completion, the value for SCH.SCH_STATUS
     * is changed to 'MC'.
     * @param processDefinitionName     PKG.PKG_NAME
     * @param processTaskName           MIL.MIL_NAME
     * @param oimClient                 OIM Client
     * @throws tcDataSetException
     * @throws tcDataAccessException
     * @throws tcTaskNotFoundException
     * @throws tcBulkException
     * @throws tcAPIException
     */
   public static void manualCompleteProvisioningTasks(String processDefinitionName, String processTaskName, OIMClient oimClient) throws tcDataSetException, tcDataAccessException, tcTaskNotFoundException, tcBulkException, tcAPIException
   {
       tcProvisioningOperationsIntf provOps = null;
     
       try
       {
           // Get OIM tcProvisioningOperations service
           provOps = oimClient.getService(tcProvisioningOperationsIntf.class);
         
           // Establish database connection to OIM Schema through the OIMClient
           XLClientSecurityAssociation.setClientHandle(oimClient);
           tcDataProvider dbProvider = new tcDataBaseClient();
         
           // Setup query to fetch 'Rejected', 'Pending', and 'Uncompleted' provisioning tasks for a given process task and process definition
           String query = "select sch.sch_key from sch inner join osi on sch.sch_key = osi.sch_key inner join mil on osi.mil_key = mil.mil_key inner join pkg on pkg.pkg_key = osi.pkg_key where pkg.pkg_name = ? and mil.mil_name = ? and sch_status in ('R', 'P', 'UC') order by sch.sch_key";
           PreparedStatementUtil ps = new PreparedStatementUtil();
           ps.setStatement(dbProvider, query);
           ps.setString(1, processDefinitionName); // PKG_NAME
           ps.setString(2, processTaskName); // MIL_NAME
           ps.execute(); // Execute query
           LOGGER.log(ODLLevel.NOTIFICATION, "Executed Statement: {0}", new Object[]{ps.getStatement()});
       
           // Provisioning Tasks Result set
           tcDataSet tasksDataSet = ps.getDataSet();
           int numRecords = tasksDataSet.getTotalRowCount();
           long[] schKeys = new long[numRecords];
           LOGGER.log(ODLLevel.NOTIFICATION, "Total Provisioning Tasks to Update: {0}", new Object[]{numRecords});
         
           // Iterate through each record in result set
           for(int i = 0; i < numRecords; i++)
           {              
               tasksDataSet.goToRow(i); // Move cursor to next record in result set
               Long id = tasksDataSet.getLong("sch_key"); // Get key from record
               schKeys[i] = id; // Add to array
               LOGGER.log(ODLLevel.NOTIFICATION, "Provisioning Task ID: {0}", new Object[]{id});
           }
         
           LOGGER.log(ODLLevel.NOTIFICATION, "Provisioning Tasks to Complete: {0}", new Object[]{Arrays.toString(schKeys)});
           provOps.setTasksCompletedManually(schKeys); // Bulk Manual Complete provisioning tasks
       }
     
       finally
       {
           // Close tc* service
           if(provOps != null)
           {
               provOps.close();  
           }
         
           // Clear session
           XLClientSecurityAssociation.clearThreadLoginSession();
       }
   }
}

Wednesday, 29 March 2017

UDF custom label -  #{bindings.UserVO1.hints.JobCode__c.label}

Saturday, 25 February 2017

Oracle Identity And Access Manger FAQ's
===================================
What is the difference between OID & OUD?
Types of Reconciliation? what is the difference between those?
Who will decide how many roles & groups are required in OIM or OID?
What the password policy? and where did you implemented in your project & tell me the steps?
Types of Adapter? How to create a pre-populate Adapter?
How many consoles in OIM?
What is Resource Object?
What is Application Instance?
How to compile a connector?
Troubleshoot a connector?
Connector polling frequency
How to find the custom proper lookup?
failover in OUD?
While doing reconciliation if the users already there what will happen?
If the user profile updated what will happen?
How the LatestToken works?
Tell me about OUD Replication?
Once the employee joins the organization, how the employee provision to application resources?
What are default users in OIM?
OIM Notifications?
How to find the user status in OIM? using a query
How to confirm that replication is working in OID?
What is the use case of custom scheduler?
What is the Method of procedure?
What is two-factor authentication? how you implement using OAM?
What is webgate and how you configure it?
What is authentication & authorization?
How can you archive SSO using OAM?
A user request for SSO via OAM?
What is a connected application/resource?
What is Fulfillment Role?
What is POC?
How to make an attribute mandatory?
Migration of code from other environments?
The difference between Object Form & Process Form?
Define Process Task?
Integration of OIM & OAM?
What is DB security store?
What is the purpose of OPSS schema?
Authentication & Authorization Policies?

Sunday, 19 February 2017

BEA-000402

Here's how you get this to work:

1. Set ThreadPoolSize
ThreadPoolSize is a java parameter that is used to calculate the max Socket readers. Set it via -Dweblogic.ThreadPoolSize

2. Set ThreadPoolPercentSocketReaders

ThreadPoolPercentSocketReaders can be set via weblogic.WLST or otherwise.

3. Set SelfTuningThreadPoolSizeMin == ThreadPoolSize

Unless you increase your default thread pool size, your server will have a slow ramp-up, serving clients. Set this to equal the ThreadPoolSize. You can only do this via WLST.

The following example sets this up so that you have a floor of 50 socket readers

connect()
edit()
startEdit()
cd('/Servers/YOUR_SERVER_NAME')
set('SelfTuningThreadPoolSizeMin',100)
set('ThreadPoolPercentSocketReaders',50)
save()
activate()
disconnect()
exit()

Saturday, 28 January 2017

Create a startup script for OUD


==================================

create-rc-script -f myscript -u sysAdmin -j /usr/java -J "-Xms128m -Xmx128m"

The following command uses the -u (--userName), -j (--javaHome) and -J (--javaArgs) options.

Example:

create-rc-script -f /etc/init.d/OUD_startall -u oracle -j /usr/java/jdk1.7.0_51 -J "-Xms128m -Xmx128m"

Then run this script when the appropriate run level change on the target distribution. For instance, on OEL, run

sudo chkconfig --level 3 OUD_startall on