-
Notifications
You must be signed in to change notification settings - Fork 1
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
Support clean-slate encryption & decryption (w/ zero-downtime) #24
Comments
Exactly what we need 👍 |
Hi @DmitryDrobotov , could you also look into implementing this for us? Thanks! :) |
@DmitryDrobotov Welcome back! 🎉 :) |
It is needed to be tested out, but I believe we're not (yet). I tested only the case with different encryption options.
yeap |
Thanks @nattfodd for the clarifications! 👍 |
(Comment ported from #35 ) Regarding unencrypted to encrypted, I suspect the following naming pairs make better sense?
So the database will:
Perhaps something like this is reasonable? |
Hi, just curious about the status of this. Is this being worked on? What else is needed? |
HI, @ribose-jeffreylau It's done basically |
Thanks @nattfodd ! Does that mean the following bit would serve to migrate from unencrypted to encrypted? (after having manually done steps 1 and 2 from #24 (comment)) : version 1
version(2) do
decode_with_previous_settings(migration,
key: '67c3800d1572d9d964a6ff3bd821ed02',
algorithm: 'aes-256-gcm'
)
end And the following would go from encrypted to unencrypted? version(2) do
decode_with_previous_settings(migration,
key: '67c3800d1572d9d964a6ff3bd821ed02',
algorithm: 'aes-256-gcm'
)
end
version 3 |
This basically means migrating a column from unencrypted to encrypted, and vice versa.
It would be invaluable for a project to be able to safely encrypt data from existing columns that are not yet encrypted, or to be able to e.g. declassify data. This feature would seem like a natural step.
In terms of zero-downtime, it means supporting things like:
^ Read from the old column, but write to both old and new columns. The new column (e.g.
ssn
) is written _un_encrypted.^ As above, but the new column (e.g.
encrypted_ssn
) is written _en_crypted.And from a Migration's perspective, it means something like:
The text was updated successfully, but these errors were encountered: