1
votes

In Hybris 6 - How can we import encoded password from csv file to our database through impex by using password encoder: pbkdf2 so that password will store in database as same as in impex. But we can login into site with normal password?

I have tried to put hash value in impex and written ;@password[translator=de.hybris.platform.impex.jalo.translators.UserPasswordTranslator] as attribute in impex. When I have tried to login with normal password, it is giving number format exception with encoded value.

Please help me, how can I import encoded password?

1
Do passwords come from an existing hybris installation?alain.janinm
Password will come through csv file ,which we are importing.Password is already in encoded format in csv filePriyanka Gupta

1 Answers

0
votes

I guess the correct way to import encoded password would be :

insert_update Employee;encodedPassword;passwordEncoding;
;<your_encoded hash>;pbkdf2

But I fear you'll have trouble to authenticate if the provider of the password is different from the entity that will check passwords.

You can take a look at this post where you can find a PBKDF2 implementation in Java. Maybe you'll have to customize hybris behaviour to validate your passwords.