Community mailing list archives

community@mail.odoo.com

Re: Migrate encrypted user passwords from v6 to v9

by
Serpent Consulting Services Pvt. Ltd., Jay Vora
- 11/08/2016 06:40:00
Yassine,

We too has issdes, so we let the auth_crypt do the duties, but we gave reset password option to users. We could even have made scripts to set a common password upon first day on goLive of migrated DB, then let users change it as per the choice(this is usual strategy in most applications when they are in migration, guess dropbox, atlassian asked the same)

It's always a good practice to keep changing passwords frequently, so our end users had no issues as they knew they are shifting to a new system.

Thanks.

On Tue, Nov 8, 2016 at 4:52 PM, Yassine Teimi <yteimi01@gmail.com> wrote:
Yes,

v6.1 used base_crypt, but I'm talking about data migration not code migration.

How did you deal with encrypted password migration from v6 to v9 ? (functionnally/technically).

Thanks.

2016-11-08 10:57 GMT+00:00 Jay Vora <vora.jay@serpentcs.com>:
For Passwords, we kept auth_crypt only.
If I am not wrong, the 6.1 setup did not have the module installed for them.

On Tue, Nov 8, 2016 at 4:17 PM, Yassine Teimi <yteimi01@gmail.com> wrote:
HI Jay,

Including encrypted passwords ?

2016-11-08 10:38 GMT+00:00 Jay Vora <vora.jay@serpentcs.com>:
Hello,

We've done the 6.x to 9.0 migration by our own way of scripting, not openupgrade.

Thanks. 

On Tue, Nov 8, 2016 at 3:47 PM, Graeme Gellatly <gdgellatly@gmail.com> wrote:

It's is entirely possible, just no one has written the script.


On Tue, 8 Nov 2016 10:05 PM Yassine Teimi <yteimi01@gmail.com> wrote:
Hi Holger, Thanks for the answer,

I'm wondering if moving password column to password_crypt even if the two odoo versions (6 and 9) are using different hash modules, will work properly.

Did you try moving it from v6 directly on v9 using OpenUpgrade ?

As much as I know, OpenUpgrade migrates data from version 'n' to version 'n+1', so it's impossible for openupgrade to migrates from 6 to 9 directly.

Can you confirm that ?

Thanks a lot.


2016-11-07 22:47 GMT+00:00 Holger Brunn <hbrunn@therp.nl>:
> What is the proper way to migrate passwords from v6 to v9 ?

https://github.com/odoo/odoo/blob/6.0/addons/base_crypt/crypt.py#L72 looks a 
lot like it generates hashes that passlib used in https://github.com/OCA/OCB/
blob/9.0/addons/auth_crypt/auth_crypt.py#L62 might just understand. Did you 
ever try to simply move the password column to password_crypt? This might just 
work. I even think I remember to have done exactly that: https://github.com/
OCA/OpenUpgrade/blob/7.0/addons/auth_crypt/migrations/7.0.1.1/pre-
migration.py#L31

[The rest is quite academic, because the above is your solution. But given I 
wrote this text already, I won't delete it] If not, you'll have to take the 
hash apart (separate magic and salt from the hash, split by the dollar sign) 
and craft one passlib understands. If this is not possible (which I doubt), 
you'd have to keep the old hashes in some separate column, and for every login 
check if there exists an old hash, verify it with the v6 code, and write a new 
hash v9 style. Don't forget to clear out the old hash column then.
But still, my guess would be that renaming the column suffices.

-- 
Therp - Maatwerk in open ontwikkeling

Holger Brunn - Ontwerp en implementatie

mail: holger@therp.nl
web: http://therp.nl


_______________________________________________




--

Cordialement

Yassine TEIMI

Consultant & Odoo Project Manager
TEL : +212 6-87 71 41 18

_______________________________________________

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe




--

The Splendid journey of 4 years in Numbers
---
Regards,
----------------------------------------------------------------------------------------------------------------------------
Jay Vora
Managing Director


 
Direct: +91-9879354457
Office: +91-9033472982
Skype: jaynvora
Twitter : jaynvora
   
-------------------------------------------------------------------------------------------------
Visit our website : http://www.serpentcs.com
Please consider the environment before printing this email

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe




--

Cordialement

Yassine TEIMI

Consultant & Odoo Project Manager
TEL : +212 6-87 71 41 18

_______________________________________________




--

The Splendid journey of 4 years in Numbers
---
Regards,
----------------------------------------------------------------------------------------------------------------------------
Jay Vora
Managing Director


 
Direct: +91-9879354457
Office: +91-9033472982
Skype: jaynvora
Twitter : jaynvora
   
-------------------------------------------------------------------------------------------------
Visit our website : http://www.serpentcs.com
Please consider the environment before printing this email

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe




--

Cordialement

Yassine TEIMI

Consultant & Odoo Project Manager
TEL : +212 6-87 71 41 18

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe




--

The Splendid journey of 4 years in Numbers
---
Regards,
----------------------------------------------------------------------------------------------------------------------------
Jay Vora
Managing Director


 
Direct: +91-9879354457
Office: +91-9033472982
Skype: jaynvora
Twitter : jaynvora
   
-------------------------------------------------------------------------------------------------
Visit our website : http://www.serpentcs.com
Please consider the environment before printing this email