Xavier Montagutelli
2010-08-27 16:28:07 UTC
Hello list,
I want to synchronise Active Directory from a LDAP directory. It works great,
thank you for LSC !
I want to store in LDAP the initial user password, encrypted with AES in a
dedicated attribute. In lsc.properties, I have :
lsc.security.encryption.keyfile = /path/to/secret-key-file
lsc.security.encryption.algorithm = AES
lsc.security.encryption.strength = 256
lsc.syncoptions.ldap2ad_user.unicodePwd.create_value =
AD.getUnicodePwd(SecurityUtils.decrypt(srcBean.getAttributeValueById("attributeForPwd")))
The attribute "attributeForPwd" is created from a perl script, with the
Crypt::OpenSSL::AES module. The SecurityUtils.decrypt raises an exception,
without any message.
I am not a Java expert, I don't know how the bouncycastle.org security
provider used by SecurityUtils works. In perl, I just do :
use Crypt::OpenSSL::AES;
...
open (CLE, "</path/to/secret-key-file");
my $cle = <CLE>;
close (CLE);
...
my $aes = Crypt::OpenSSL::AES->new($cle);
$pass_crypt = $aes->encrypt(sprintf("%16s", $pass));
(Note 1 : the jey is 32 bytes long.
Note 2 : I add extra spaces to the password, I still have to remove then in
the javascript code)
Is it compatible with SecurityUtils.decrypt ? Do I have to use something else
to crypt the password (CBC ??) ?
Any hint would be valuable ! Thank you.
--
Xavier Montagutelli Tel : +33 (0)5 55 45 77 20
Service Commun Informatique Fax : +33 (0)5 55 45 75 95
Universite de Limoges
123, avenue Albert Thomas
87060 Limoges cedex
_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org
lsc-users mailing list
lsc-***@lists.lsc-project.org
http://lists.lsc-project.org/listinfo/lsc-users
I want to synchronise Active Directory from a LDAP directory. It works great,
thank you for LSC !
I want to store in LDAP the initial user password, encrypted with AES in a
dedicated attribute. In lsc.properties, I have :
lsc.security.encryption.keyfile = /path/to/secret-key-file
lsc.security.encryption.algorithm = AES
lsc.security.encryption.strength = 256
lsc.syncoptions.ldap2ad_user.unicodePwd.create_value =
AD.getUnicodePwd(SecurityUtils.decrypt(srcBean.getAttributeValueById("attributeForPwd")))
The attribute "attributeForPwd" is created from a perl script, with the
Crypt::OpenSSL::AES module. The SecurityUtils.decrypt raises an exception,
without any message.
I am not a Java expert, I don't know how the bouncycastle.org security
provider used by SecurityUtils works. In perl, I just do :
use Crypt::OpenSSL::AES;
...
open (CLE, "</path/to/secret-key-file");
my $cle = <CLE>;
close (CLE);
...
my $aes = Crypt::OpenSSL::AES->new($cle);
$pass_crypt = $aes->encrypt(sprintf("%16s", $pass));
(Note 1 : the jey is 32 bytes long.
Note 2 : I add extra spaces to the password, I still have to remove then in
the javascript code)
Is it compatible with SecurityUtils.decrypt ? Do I have to use something else
to crypt the password (CBC ??) ?
Any hint would be valuable ! Thank you.
--
Xavier Montagutelli Tel : +33 (0)5 55 45 77 20
Service Commun Informatique Fax : +33 (0)5 55 45 75 95
Universite de Limoges
123, avenue Albert Thomas
87060 Limoges cedex
_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org
lsc-users mailing list
lsc-***@lists.lsc-project.org
http://lists.lsc-project.org/listinfo/lsc-users