Wednesday, January 4, 2012

OIM 11.1.1.3 password decrypt

It is often useful to decrypt passwords for debugging purposes.. below is the code that does just that. After getting OIMClient instantiated and login run  XLClientSecurityAssociation.setClientHandle(oimClient);

then run the following code:
tcDataProvider dbProvider = new tcDataBaseClient();
        String query = "select USR_LOGIN,USR_PASSWORD from USR where USR_LOGIN='XELSYSADM'";
        tcDataSet dataSet = new tcDataSet();
        dataSet.setQuery(dbProvider, query);
            dataSet.executeQuery();
        System.out.println("Password:: "+dataSet.getString("USR_PASSWORD"));