Posts

Showing posts from July, 2018

Steps to Register and un-register the plugin in OIM

Image
Steps to Register and un-register the plugin in OIM Plugin is zip file should have below structure Copy the plugin(Zip file) to server location 1) go to the path /opt/apps/oracle/ Oracle/Middleware/Oracle_IDM /server/plugins copy the zip file in this path through winSCP. 2) login to putty and go the path    cd /opt/apps/oracle/ Oracle/Middleware/Oracle_IDM/ server/plugin_utility 3) Run below command ant -f pluginregistration.xml register (for un-register ---    ant -f pluginregistration.xml  unregister ) provide xelsysadm user name and password hostname: t3://HOSTNAME:14000 plugin file path: Example:(in WinScp select file and Ctl+alt+C will give complete path)  /opt/apps/oracle/Oracle/Middleware/Oracle_IDM/server/plugins/UpdateTCADRemovalDate.zip 4)Go to the path cd /opt/apps/oracle /Oracle/Middleware/Oracle_IDM/ server/bin  and purge it by typing below command ./PurgeCache.sh All provide xels...

Custom Column in Request Track page in OIM using Backing Bean

Image
In this post lets understand how to create custom column in Request track page End result looks like below: Create backing bean using ADF Project and deploy to oim server via starter pack( create a jar of your ADF project and copy the jar to starter pack and deploy to server. reference link Deployment of starter pack ) #{backingBeanScope.RequesterUserNameInRequestTrackPage.requesterUserName} Backing bean code is as below : the below code returns you the requester user login /** * Class   : RequesterUserNameInRequestTrackPage *  Description: This class loads the requester user loginin Requester track page  * @author Ravi Kumar * Created on @date 25th July , 2018 * All rights reserved. */ /**  * Revision History-- Rev.No--- modified by--- Date--- Modified Description --- Comments if any  * ----------------------------------------------------------------------------------------------  *   * ----------...

User Login Search from user key in OIM using UserManager API

    @SuppressWarnings({ "unchecked", "rawtypes" })     public String getUserLogin(String userKey) {           String methodName = "getUserLogin";           logger.setMethodStartLog(className, methodName);           logger.debug(className, methodName, "userKey: "+userKey);           String userLogin = null;              SearchCriteria sc = new SearchCriteria("usr_key", userKey,Operator.EQUAL);            try {               Set retAttrs = new HashSet();               retAttrs.add("User Login");// add whatever fields you want get                     UserManager usrMgr = Platform.getService(UserManager.class);      //UserManager usrMgr = OIMClientFactory.g...

Submit OIM Request using API code

package com.ravikumar.ghr; import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer; import org.apache.log4j.Logger; import oracle.iam.platform.OIMClient; import oracle.iam.request.api.RequestService; import oracle.iam.request.vo.Beneficiary; import oracle.iam.request.vo.RequestBeneficiaryEntity; import oracle.iam.request.vo.RequestConstants; import oracle.iam.request.vo.RequestData; import ts.idm.common.utils.CustomOIMClient; import ts.idm.selfservicebulkrolemembershipoperations.model.RoleMembershipBean; public class CustomRequest { public static boolean submitCustomRequest(String requesterUserLogin,String beneficiaryUserKey, String roleName, String roleKey) { Logger logger = Logger.getLogger(CustomRequest.class); logger.debug("-------- processMembershipOperation started ---------"); logger.debug("requesterUserLogin: " + requesterUserLogin); logger.info("requesterUserLogin: " + requesterUserLogin...

Getting USR_KEY using User login

public static String getUserKey(String userLogin) { Logger logger = Logger.getLogger(UserDetail.class); logger.debug("---- getUserKey started ----"); logger.debug("userLogin: " + userLogin); String userKey = null; @SuppressWarnings("rawtypes") Map searchFilter = new HashMap<String, String>(); tcResultSet tcresultSet = null; tcUserOperationsIntf userOperationsIntf = null; OIMClient client = null; if (userLogin != null) { userLogin = userLogin.trim(); } searchFilter.put("Users.User ID", userLogin); try { CustomOIMClient c = new CustomOIMClient(); client = c.getAdminConnection();// check  post  to use local code for OIMClient connection logger.debug("Connected to OIM Client"); userOperationsIntf = client.getService(tcUserOperationsIntf.class); tcresultSet = userOperationsIntf.findAllUsers(searchFilter); if (tcresultSet != null) { userKey = tcresultSet.getStr...

Local OIM Client Connection code

public OIMClient getAdminConnection() { logger.debug("--- getAdminConnection started ----"); OIMClient oimClient = null; try { System.setProperty("java.security.auth.login.config", ABS_PATH_TO_authwl.conf_IN_DESIGN_CONSOLE); System.setProperty("APPSERVER_TYPE", "wls"); Hashtable<String, String> env = new Hashtable<String, String>(); env.put(OIMClient.JAVA_NAMING_FACTORY_INITIAL, "weblogic.jndi.WLInitialContextFactory"); env.put(OIMClient.JAVA_NAMING_PROVIDER_URL, "t3://HOSTNAME:14000"); oimClient = new OIMClient(env); logger.debug("Establishing OIM connection"); oimClient.login(ADMIN_USER_LOGIN, ADMINPASSWORD.toCharArray()); logger.debug("OIM connection established"); } catch (LoginException e) { e.printStackTrace(); } logger.debug("--- getAdminConnection completed ----"); return oimClient; }