-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Encrypt TOTP keys #103
Encrypt TOTP keys #103
Conversation
Tested on a sandbox, and confirmed the TOTP key is encrypted, and you can log in once it has been encrypted. |
… valid per user ID.
…actor into add/encrypted-totp
I've updated this to include the User ID as part of the encryption, such that user_meta for one user is invalid for another. I've updated the unit tests to test that the key is stored in a format different than the key (ie. encrypted) but left the validation of the encryption functions to the Encryption library PR. |
…thods are available." This reverts commit 3d89b20.
…ored non-encrypted to encrypted.
Fixes #101
Depends upon WordPress/wporg-mu-plugins#390
Made possible by WordPress/two-factor#546
NOTE: if you test this on a sandbox (and then remove this), you will be unable to login with TOTP again without deactivating TOTP.
Testing Instructions:
two-factor
with Add a filter to filter the classname used for a provider two-factor#546 mergedWPORG_ENCRYPTION_KEY
and optionallyWPORG_TWO_FACTOR_ENCRYPTION_KEY
, with a value from\WordPressdotorg\MU_Plugins\Encryption\generate_encryption_key()
_two_factor_totp_key
value. Validate that it appears plaintext._two_factor_totp_key
value. Validate that it appears to be encrypted (Long, and prefixed with$t1$
).TODO: