Le 20/01/2016 10:01, BÖSCH Christian a écrit :

On 20 Jan 2016, at 09:30 , Clément OUDOT <[email protected] <mailto:[email protected]>> wrote:



Le 20/01/2016 08:18, BÖSCH Christian a écrit :
Hi,

I want to set passwords, therefore I use this dataset:

  <dataset>
<name>userPassword</name>
<policy>FORCE</policy>
<forceValues>
<string><![CDATA[
  var upass = "";
  var clear = srcBean.getDatasetFirstValueById(“clearTextPwd");
  upass = SecurityUtils.hash(SecurityUtils.HASH_SHA1, clear);
  upass;
]]></string>
</forceValues>
</dataset>

After running I get ‘invalid credentials’ from the ldap server.
What’s wrong with that?


Hello Christian,

you need to concat '{SHA}' in front of the hash before returning the value from the dataset :

    upass = '{SHA}' + SecurityUtils.hash(SecurityUtils.HASH_SHA1, clear);

Thanks Clément.
Is it also possible to generate a SSHA hash?



Sadly not, we need to add this feature in SecurityUtils class.

--
Clément OUDOT
Consultant en logiciels libres, Expert infrastructure et sécurité
Savoir-faire Linux
87, rue de Turbigo - 75003 PARIS

_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org

lsc-users mailing list
[email protected]
http://lists.lsc-project.org/listinfo/lsc-users

Reply via email to