- package com.oimacademy.password;
- import Thor.API.Security.XLClientSecurityAssociation;
- import com.oimacademy.connection.OIMConnection;
- import com.thortech.xl.dataaccess.tcDataBaseClient;
- import com.thortech.xl.dataaccess.tcDataProvider;
- import com.thortech.xl.dataaccess.tcDataSet;
- import com.thortech.xl.dataaccess.tcDataSetException;
- import java.util.Hashtable;
- import java.util.logging.Level;
- import java.util.logging.Logger;
- /**
- * This class gets the OIM Client and uses that to establish a
- * connection to the OIM Schema. You can query the USR table and
- * get the password in plain text.
- * NOTE: The administrator credential must be used for the OIM Client.
- */
- public class DecryptedOIMPassword
- {
- public static void main(String[] args)
- {
- tcDataProvider dbProvider = null;
- try
- {
- XLClientSecurityAssociation.setClientHandle(OIMConnection.getConnection());//Needed for database client
- dbProvider = new tcDataBaseClient(); //Connection to OIM Schema
- tcDataSet dataSet = new tcDataSet(); //Stores the result set of an executed query
- String query = "SELECT * FROM USR"; //Query Users table
- //String query = "SELECT * FROM PCQ"; //Query Users Challenge Question
- dataSet.setQuery(dbProvider, query); //Set query and database provider
- dataSet.executeQuery(); //execute query and store results into dataSet object
- int records = dataSet.getTotalRowCount(); //Get total records from result set
- for(int i = 0; i < records; i++)
- {
- dataSet.goToRow(i); //move pointer to next record
- String plainTextPassword = dataSet.getString("USR_PASSWORD");
- String userLogin = dataSet.getString("USR_LOGIN");
- String userStatus = dataSet.getString("USR_STATUS");
- System.out.printf("User Login: %s\nStatus: %s\nPassword: %s\n\n", userLogin, userStatus, plainTextPassword);
- //Getting user challenge questions and answers
- //String usrKey = dataSet.getString("USR_KEY");
- //String question = dataSet.getString("PCQ_QUESTION");
- //String answer = dataSet.getString("PCQ_ANSWER");
- //System.out.printf("USR_KEY: %s\nQuestion: %s\nAnswer: %s\n", usrKey, question, answer);
- }
- }
- catch (tcDataSetException ex)
- {
- Logger.getLogger(DecryptedOIMPassword.class.getName()).log(Level.SEVERE, null, ex);
- }
- finally
- {
- //close connections
- try{dbProvider.close();} catch(Exception e){}
- try{XLClientSecurityAssociation.clearThreadLoginSession();} catch(Exception e){}
- }
- }//end main method
- }//end class
Oracle Identity Manager(OIM) is the Provisioning Solution from oracle. This page contains an index with references to all OIM related posts in the oracle identity manager Academy blog. The posts included herein are intended to provide oracle identity management customers and developers with technical information about best practices for implementing OIM based solutions.
OIM API to Decryption Password
Subscribe to:
Post Comments (Atom)
-
Connection Related API's : OIM DB Connection/ Data Source connection OIMClient API / OIMConnection API OIM Platform API to getSer...
-
Error : Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.springframewor...
-
In this post, we set the middle name as “MiddleName” if user does not provide middle name during user create operation. Below are high...
Hi,
ReplyDeletenice blog good for learning and resolving encryption type of issue, can you please list down jar files need to be added in project?
Thanks,