Discussion:
Password in clear text with LDAP browser but not with TDI
(too old to reply)
h***@yahoo.no
2010-04-20 10:23:06 UTC
Permalink
I am accessing an openLDAP server with Softerra LDAP Browser 2.6 and I
can see the userPassword field in clear text.

When I use the LDAP connector with TDI 7.0 FP1 I only see what seems
to me to be some form of obfuscation: [***@21aa21aa. The Java class when
I connect through the input map is shown as [B which I guess means
binary.


The value shown in TDI for userPassword is different for each
retrieval from LDAP for the same person.
I have added userPassword to the binary attributes field in the LDAP
connector's Connection tab.
If I enable LDAP Trace File on the LDAP Connector's connection tab the
password in cleartext is written to this LDAP trace file.
The target XML file contains the password with the obfuscation.

Any suggestions?
Deyan Popov
2010-04-23 13:04:06 UTC
Permalink
"[***@21aa21aa" is the text representation of a byte array. It contains
the memory address of the array, that is why you see a different value
each time.
Also the binary attributes list is for attributes which should be
treated as binary, i.e. you get a byte array.

Regards,
Deyan Popov
Hans
2010-04-27 06:51:16 UTC
Permalink
Post by Deyan Popov
the memory address of the array, that is why you see a different value
each time.
Any suggestions for some Javascript code to access this array? May
Javascript knowledge leaves a lot to be desired.
Deyan Popov
2010-04-27 14:11:39 UTC
Permalink
Try with a script like this:

var passByteArray = work.getObject("userPassword");
var passString = new java.lang.String(passByteArray, "UTF-8");
task.logmsg("passString="+passString);

As long as the password is a UTF-8 string, it should work fine.

Regards,
Deyan Popov
Hans
2010-04-30 12:22:11 UTC
Permalink
Post by Deyan Popov
var passByteArray = work.getObject("userPassword");
var passString = new java.lang.String(passByteArray, "UTF-8");
task.logmsg("passString="+passString);
Thanks, worked perfectly.
v***@gmail.com
2013-12-20 14:57:36 UTC
Permalink
Post by Deyan Popov
var passByteArray = work.getObject("userPassword");
var passString = new java.lang.String(passByteArray, "UTF-8");
task.logmsg("passString="+passString);
As long as the password is a UTF-8 string, it should work fine.
Regards,
Deyan Popov
Hello,

I just saw this TDI script We have a similar requirement in our project. It helped me, in the same way is it possible to get the "pwdHistory" value in plain text currently it is showing as - pwdHistory=20131218091444Z#2.5.4.35#32#{AES256}DE54UkEPVjmOeMr+QYxaIQ==

If possible kindly let me know how to do it. Thanks

Loading...