Skip to content
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

CLI to re-encrypt data in tfa_user_config table, closes #8 #20

Merged
merged 16 commits into from
Jul 19, 2024

Conversation

cjnewbs
Copy link
Contributor

@cjnewbs cjnewbs commented Jul 18, 2024

Fixes #8

Summary

Example output

The 2FA details can contain encrypted data within a json payload, which is also encrypted. So we navigate down and decrypt those values.

Running reencrypt-tfa-data
The latest encryption key is number 1, looking for old entries
Looking for encoded_config in tfa_user_config, identified by 'config_id'
########################################################################################################################
config_id: 1
ciphertext_old: 0:3:VYVmpwkM1mhg5qh0pX1fJg8kV9rWlWr7Q/aOl4CtbdHXaSOyPUJ7L92J8/JlwE86kAKiyAsXgztqBNqdbd6+Ct3z0vGAzguwe63rtjfhRffYzXwhugdTdDt4ov8lpfci66N86dSQddNdLJ+orrPgMNIf2daUFZMbPyviWkCnPGq/CA==
plaintext_old: {"google":{"secret":"0:3:k+zKqK36ipT7v9fff0bWTLBk1/OtYNHHizMUyZGAk2KyWcSFPFz+FKIdJQyy","active":true}}
plaintext_new: {"google":{"secret":"1:3:BW\/UG73qg8O9oqRqQJ3hqAW7YRuK1f+xoXFuxs46vaCytH3xqpsd8ADrqRsU","active":true}}
ciphertext_new: 1:3:ISY01PTteJ9wJkMjvEfbwNxtoMXeLz96y67yP5FkiDUAaznkz7/1J5yFQCsjs7LTuonEKrIZG8hIrPOf1qc/O6cajRcxdu3WzSe7qYMKErXIkhyvoKBmBTrnrVhgbQccsYp/FMBvhQPcUqiDXpShQVDPMFRT2q7Ray2KXjdvMdwRERs=
########################################################################################################################
Done

@cjnewbs cjnewbs requested a review from convenient July 18, 2024 14:10
@convenient convenient marked this pull request as ready for review July 19, 2024 07:47
@convenient convenient requested a review from AlexRapatij July 19, 2024 07:50
@convenient convenient merged commit be92414 into master Jul 19, 2024
1 check passed
@convenient convenient deleted the feature/2fa branch July 19, 2024 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Deal with tfa_ data
3 participants