Showing posts with label oim. Show all posts
Showing posts with label oim. Show all posts

Wednesday, June 10, 2015

OIM 11GR2 Disconnected resource creation and provision

This post covers detailed steps about creation and provision of disconnected resource. I hope this will help for new learners who are pretty much interested learning about connectors. And also, it will handy for quick reference.

High Level Steps:
  1. Creation of  IT Resource Type Definition
  2. Creation of Resource Object
  3. Creation of  IT Resource
  4. Creation of User Form
  5. Creation of Process Definition
  6. Creation of Application Instance
  7. Provisioning Resource

Creation of IT Resource Type Definition for Virtual Resource

IT Resource Type Definition represents the resource connection details. Since this is virtual resource that is not going to interact with external system, we can have with dummy values.

Steps to create IT Resource Type Definition:
  1. Log in to the OIM Design Console.
  2. Click IT Resource Type Definition under Resource Management.
  3. Create a new IT Resource Type Definition with the Server Type defined as IT_SSU.
  4. Add parameter Field Name as “Name” and Default Field Value is “SSU” as per below screen shot:


Creation of Resource Object for Virtual Resource

The resource object is OIM representation of resource.

Steps to create Resource Object:
  1. Log in to the OIM Design Console.
  2. Click Resource Objects under Resource Management.
  3. Create a new resource object with the name RO_SSU and save it.

This Resource Object should have below values:
·        Type as Application
·        In Status Definition tab, you should be checked “Enabled” and “Provisioned”



Creation of IT Resource for Virtual Resource

Login in to OIM system admin console and create new IT Resource with name “ITR_SSU”. Since this is dummy resource so, we can give any dummy value to IT Resource parameters. I have given parameter “Name” as Value “SSU”.



Creation of User Form for Virtual Resource

Process form contains provisioning details that needs to be pass to target system. Since this is virtual resource, I have set default value for all field values.

Steps to create process form:
  1. Log in to the Oracle Identity Manager Design Console.
  2. Click Form Designer under Development Tools.
  3. Create a new form with the Table Name UD_SSU as per below screen shot. Save it.
  
  1. Click on Properties tab, add the properties Type as “IT_SSU”, Required as “true”, and IT Resource as “ITR_SSU” for ITResource column as per below screen shots.

  1. Save it.

Creation of Process Definition for Virtual Resource

Process definition defines the behavior of connector. Every operation corresponding task associated with it. In this post, we are covering only provisioning and deprovisioning.

Steps to create Process Definition
  1. Log in to the Oracle Identity Manager Design Console.
  2. Click Process Definition under the Process Management tab.
  3. Create a new process definition and name it PD_SSU
  4. Select Provisioning as the Type of process.
  5. Provide the resource Object Name for the identity connector and select RO_SSU.
  6. Provide the process form Table Name and select UD_SSU.
  7. Save it

  1. Add process task and name it Delete User. This will trigger when a resource is deprovisioning for user.
Create task with name “Delete user”. Save it.

Make sure you should checked the box Conditional and unchecked the Allow Multiple Instances. This is optional, you can set the retry count and retry period in minutes in order to retry failed task by OIM.


In the integration tab, choose  adapter  “tcCompleteTask” because, this is not going to interact with real world target system. 

Add response for complete with status “R”


In Task to Object Status Mapping, the status of the complete to be displayed in Resource history.


  1. Add process task and name it Create User. This will trigger when a resource is provisioning for user.

Create task with name “Create User” and description as your wish. Save it.

Make sure you should unchecked the Conditional as well, Allow Multiple Instances. This is optional, you can set the retry count and retry period in minutes in order to retry failed task by OIM.


In the integration tab, choose  adapter  “tcCompleteTask” because, this is not going to interact with real world target system.


Add response for complete with status “C”


In undo/recovery tab, add the deprovisioning task that is “Delete User”

In Task to Object Status Mapping, the status of the complete to be displayed in Resource history.


Save all process definition changes.

Creation of Application Instance

  1. Log in to OIM system admin console with admin privileges.
  2. Create sandbox “SSU” and activate for Application Instance.
  3. Create New Form “FORMSSU” for resource object “RO_SSU”.
  1.  Create new application instance AppSSU1

  1. Export the sandbox “SSU” in case if you propagating from one environment to another. Otherwise, you can publish it.

Note: Once you created Application Instance, you should run “Catalog Synchronization” job in order to make available newly created app instance to users.


Provision Resource to User

Testing provisioning a resource to user:

  1. Log in to OIM identity console
  2. Select any user and go to accounts tab then, click on “Request Accounts” and it will take you to Catalog page.
  3. Select the application instance “AppSSU1” and then click on “Add to Cart”.
  4. Click on “Checkout” and then, “Ready To Submit”.
  5. Finally click on Submit and the resource will be provisioned to user.

Friday, May 22, 2015

List of resource provisioned to user in OIM

Query to list the resource that are in different status for given user.

Table Name
Table Description
OIU
Object Instance Request Target User Information.

Associate user information to the resource object instance when provisioning take places.
OST
Object Status Information.
OBI
Object Instance Information.

Once resource provisioned to user, OIM created resource instance for each resource provisioning.
OBJ
Resource Object definition information

This contains detail about resource such as resource name, auto-save enable or not and auto-prepopulate is enable or not, and whether or not the resource object allows multiple instances.
USR
It contains user information like login id, password, etc.,

SQL Query:
select oiu.oiu_key, oiu.obi_key, oiu.orc_key, ost.ost_status, obj.obj_name, obj.obj_key,oiu.req_key 
from oiu 
inner join ost on oiu.ost_key = ost.ost_key 
inner join obi on oiu.obi_key = obi.obi_key
inner join obj on obi.obj_key = obj.obj_key 
where oiu.usr_key =(select usr_key from usr where usr_login='chellappan.sampath');

Tuesday, May 19, 2015

OIM 11G Orchestration tables

Orchestration is vital component in OIM and we can say it is heart of OIM because, all operations, such as create user, modify user, delete, ldap sync, etc., were closely integrate with OIM Orchestration.

Known Issue: OIM Orchestration will retry failed event handlers ONLY 2 times and will ignore after that. Because, the retry limit was hard coded in OIM.

Table Name
Table Description
ORCHPROCESS
Stores the process instances that are being executed.
ORCHEVENTS
Stores event handler names, status and result for all orchestration processes.

Event status like COMPLETED, FAILED, PENDING, etc.
ORCHFAILEDEVENTS
Stores event handler information that are executed because of failures in main flow.

SQL Query:

Below sql query is to get list of event handlers, which are executed for a particular users during enable process:

This query used to get user key from usr table.
select usr_key from USR 
where usr_login = ‘chellappan.sampath’;
-- 1024
This query get process instance of enabled user ‘chellappan.sampath’
select id from orchprocess 
where entityid=’1024’ and entitytype='User' and operation='ENABLE';
-- 561092
This query gets all the event handler for enabled user ‘chellappan.sampath’
select * from orchevents 
where processid=’561092’ order by orchorder;
Similarly you can do for user enable, create user, etc.,

Tuning database & application servers for OIM

Tuning Database

Since OIM has heavily depends on database, obviously we need to tune the database for better performance. Every time a user is created or provisioned resource to user, there are dozens of operations taking places behind the scenes especially tables of the functional databases.

Below table show recommended initial setting for 4 CPU (64 bit) and 8/20 GB RAM:

Parameters
Initial setting for DB
db_block_size
8192
memory_target
Minimum value is 6 GB.
Maximum is MEMORY_TARGET/MEMORY_MAX_TARGET=Total Memory X 80% or 20GB, whichever is greate
sga_target
Minimum value is 4 GB.
Maximum is SGA_TARGET=Total Memory X 80% X 60% or 16 GB assuming an overall memory cap of 20 GB for the Oracle Identity Manager database to run.
pga_aggregate_target
Minimum value is 2 GB. Maximum is
PGA_TARGET=Total Memory X 80% X 40% or 4 GB whichever is greater
sga_max_size
10 GB
db_keep_cache_size
800M
log_buffer
15 MB
cursor_sharing
FORCE
open_cursors
2000
session_cached_cursors
800
query_rewrite_integrity
TRUSTED
db_file_multiblock_read_count
16
db_writer_processes
2
processes
Based on connection pool settings

While it is always recommended to check the Oracle Database Tuning reports within the database, Oracle provides recommendations of which can be found at this location: http://docs.oracle.com/cd/E14571_01/doc.1111/e14308/tuningfordb.htm#OMADM1811


Tuning Application Server

  1. OIM uses oimOperationsDB and oimJMSStoreDS datasource deployed on WebLogic server. By default, maximum connection size is set to 50. You can increase size as per your environment. Note: Make sure the same connection size should be set to in DB side too.
  2. Number of Message Driven Bean (MDB):OIM uses OIMMDBWorkManager MDB for processing all offline operations such as recon, audit, orchestration, etc. By default, it set to 80. You can set to -1 for unlimited.
  3. Disable Reloading of Adapters and Plug-in Configuration
  4. Change default memory arguments.
Periodically purging the Orchestration, Requests, Audit, Reconciliation tables in OIM.

Monday, May 18, 2015

OIM 11G R2 PS2 Installation Steps – High Level

Before you begin on OIM 11GR2 installation, I strongly recommend you to have look at the certification matrix. Because, developers may spend more time working with wrong components such as, OS version, JDK/JRE version etc. As a result, they could not complete installation.


Note: Make sure you should have given full privileges to installation folder.

This post covers high-level steps based on the above certification matrix.

  1. Install WebLogic 10.3.6 or later
  2. Run the Repository Creation Utility.
  3. Install SOA into the middleware home
  4. Install the IAM components into the middleware home
  5. Extend the WebLogic domain (If already exists) OR create a new domain for all the required IAM components by running the domain configuration.
  6. Create the Policy Store
  7. Configure SOA
  8. Start WebLogic server
  9. Configure OIM
  10. Stop WebLogic Admin server
  11. Start WebLogic Admin server, SOA, and followed by OIM

Friday, May 15, 2015

OIM SQL query to find who modified user attributes

We can identify when and who made change for user profile attributes for example, email address.

Below are tables stores users and audit information:

Table Name
Table Description
USR
It contains user information like login id, password, etc.,
UPA
User profile audit information

SQL Query:

Below query fetch the email address value for user ‘chellappan.sampath’ from audit table: 
select field_name, field_old_value, field_new_value 
from upa_fields fields 
where upa_usr_key in ( select upa_key from upa 
                       where upa_key in (select usr_key 
                                         from usr 
                                         where lower(usr_login) like 'chellappan.sampath')))
and field_name = 'Users.Email' 
order by upa_usr_key, field_name;

OIM SQL query to find who assigned role to users

OIM provides strong auditing features that will capture all user profile modification. It will be stored on UPA table.

Below are tables stores users and audit information:

Table Name
Table Description
USR
It contains user information like login id, password, etc.,
UPA
User profile audit information

SQL Query:

Below query gets list of roles when was assigned to user ‘chellappan.sampath’:
select * from upa 
where usr_key = (select usr_key from usr 
                 where lower(usr_login)= 'chellappan.sampath')
and src like '%RoleManager%CREATE%';

Similarly, we can check for user role revoked by using src with ‘%RoleManager%DELETE%'

OIM SQL query to get users whose specific role

We often may need to find user who has specific role in OIM.

Table Name
Table Description
USR
It contains user information like login id, password, etc.,
USG
Role assigned to user

SQL Query:
In this below example, I have used query to get users who have role called ‘System Administrator’.
select usr.usr_display_name, usr.usr_login, usr.usr_email, ugp.ugp_name
from usg usg
left outer join usr usr on (usg.usr_key = usr.usr_key)
left outer join ugp ugp on (ugp.ugp_key = usg.ugp_key)
where upper(ugp_name) in (upper('System Administrator'));

OIM SQL query to force users to change password on next login

When user’s password reset by either OIM Admin or API, user will be prompt to reset on next login.

We can avoid the force user password on next login by update column 'USR_CHANGE_PWD_AT_NEXT_LOGON' in table ‘usr’. This column takes values 0 or 1.

The column value 0 means User not forced to reset password on next login.
update usr set USR_CHANGE_PWD_AT_NEXT_LOGON='0'
where usr_login = 'chellappan.sampath';

The column value 1 means User forced to reset password on next login.
update usr set USR_CHANGE_PWD_AT_NEXT_LOGON='1'
where usr_login = 'chellappan.sampath';

Thursday, May 14, 2015

Oracle Schema Version Registry

Most of the Oracle Fusion Middleware components require existence of schemas in database prior to install. These schemas created and loaded using RCU.

You can run query to get list of schema created though RCU:
select * from schema_version_registry;

Enabling logging in OIM 11G

Any custom applications such as, event handlers, schedule task, connectors, etc., to debug in the OIM 11g Server, we need to enable the logging.

Pre-Requisite

You need to add the logging configuration code in java class.
import java.util.logging.Level;
import java.util.logging.Logger;

private Logger logger=Logger.getLogger("blog.chella"); //Class name is blog.chella

Configuration of logs in logging.xml

Go to the $DOMAIN_HOME/config/fmwconfig/servers/OIM_SERVER directory and edit the logging.xml file.

Include log_handler inside log_handlers
<log_handlers>
    <log_handler name='bloghandler' level='FINEST' class='oracle.core.ojdl.logging.ODLHandlerFactory'>
        <property name='logreader:' value='off'/>
        <property name='path' value=/opt/chella/oimlogs'/>
        <property name='format' value='ODL-Text'/>
        <property name='useThreadName' value='true'/>
        <property name='locale' value='en'/>
        <property name='maxFileSize' value='5242880'/>
        <property name='maxLogSize' value='52428800'/>
        <property name='encoding' value='UTF-8'/>
    </log_handler>
</log_handlers>

Include logger inside loggers
<loggers>
    <logger name="Logger-Name" level="LOG LEVEL" useParentHandlers="false">
        <handler name="blog.chella"/>
        <handler name="console-handler"/>
    </logger>
</loggers>

Log Level
ODL Msg:Level
Description
SEVERE.intValue()+100
INCIDENT_ERROR:1
Serious problem caused by bug in product
SEVERE
ERROR:1
A serious problem but is not caused by a bug in the product.
WARNING
WARNING:1
A potential problem
INFO
NOTIFICATION:1
A major lifecycle event
CONFIG
NOTIFICATION:16
A finer level of granularity for reporting normal events.
FINE
TRACE:1
Trace or debug information for events
FINER
TRACE:16
Detailed trace or debug information
FINEST
TRACE:32
Very detailed trace or debug information

The FINEST log level will give the more detailed info. If you want to debug your connectors, schedule task, event handlers, etc, you can use FINEST log level.


Note: Make sure you have disabled FINEST level in production.