Has anyone successfully migrated users from Drupal 7 to Okta? I need to move about 10k users from Drupal 7 to the Okta directory. I have JSON file with the user accounts in it, and am using Node.js to do the processing. Our use case requires that users can continue to use their existing credentials.
After much Googling, Stack-Overflowing, reading Drupal code and the Okta API docs - I’m a bit stuck.
- I get the
pass
field from the Drupal user - I extract the
salt
andhash
from thepass
Here’s how I get the settings, salt and hash from the Drupal pass
:
const hashType = pass.substring(0,3)
const rounds = pass.substring(3,4)
const salt = pass.substring(4,12)
const hash = pass.substring(12)
I’m then calling /api/v1/users?activate=true
with
profile: { email: mail, login: username },
credentials: { password: { hash: { algorithm: 'SHA-512', salt: salt, saltOrder: 'PREFIX', value: hash }}}
which successfully creates the user, but on attempting sign in, gets rejected.
I’ve tried:
- switching the saltOrder to POSTFIX
- base64 decoding the hash
- base64 decoding then encoding the hash
- Every combination of the above
Please help, as I don’t know what else to try, and I can’t find any examples of Drupal user accounts being imported into Okta.
I believe I’m correctly following: Users | Okta Developer
And I’m using information from:
and
and
https://www.openwall.com/articles/PHP-Users-Passwords
I’d be grateful for any advice you can offer.