on ‎2018 Feb 13 1:15 PM
Hi, experts! I need to insert passwords already encoded in sha-256 in database without knowing the password of these users. I have found possible solutions in the forum but they have not worked for me. The dontOptimize = true on the user object has not made any changes.
I've tried Translators ConvertPlaintextToEncodedUserPasswordTranslator and UserPasswordTranslator, but I have not achieved anything.
My goal is to insert a large number of users from CSV with the encrypted password and then they can log in correctly
Thanks so much. Regards, Ismael
Request clarification before answering.
It goes without saying, you need to make sure the default encoding mechanism the system uses is sha-256, and that the hash created by the original system uses the same salt set up in your system. Besides, why are you using a translator? you should be importing the password hash
$passwordEncoding=sha256 INSERT_UPDATE Customer;uid;customerAccountNumber[unique=true];title(code);name;description;sessionLanguage(isocode);sessionCurrency(isocode);groups(uid);password;cashAccountCreated[default=true];whereUhearAboutUs;updateViaEmail;subscribeThrdParty;migratedCustomer;passwordEncoding[default=$passwordEncoding] ;"J2669322@company.co.uk";"J2669322";"mr";"EXTMKP ZLICMSQ";"Migrated Customer";"en";"EUR";"customergroup";"529793b114e5c09af7db193bf4675bb4acf1b27f00336e80edfa349dfd03c332";TRUE;"";TRUE;FALSE;TRUE
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I wonder if this will be possible to do at all? There are still some salts used in hybris side and i would assume from the other system as well? If you could figure out how the encryption is done in the other system you could probably implement own decryption on hybris side. But i would guess it does not work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For example, if I insert the example: the user fritz can not log in, instead the user with plain text password can log in.
INSERT Employee; uid[unique=true]; @password[translator=de.hybris.platform.impex.jalo.translators.UserPasswordTranslator]
; fritz ; md5:a7c15c415c37626de8fa648127ba1ae5
; max ; *:plainPassword
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, What exactly is not working? If I understand correct you have the encoded password, so something like "e3b0c44298fc1c149a..." and what happens if you try to add this to the password field?
The translators are only useful if you have the plaintext password and want to hash it before you store it in the database. https://help.hybris.com/6.6.0/hcd/8bdfb629866910148dbdea676bd0962c.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.