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

Automatically migrate unencrypted databases on request #121

Merged
merged 18 commits into from
Jan 23, 2024

Conversation

ThetaSinner
Copy link
Member

@ThetaSinner ThetaSinner commented Jan 23, 2024

This is similar to the change I made here.

I know that Lair databases are meant to be encrypted but the lair_keystore crate exposes the option to disable database encryption by not using default features, so it would be good if there was a way to migrate if you end up being forcibly switched by something that has embedded Lair and changed it's defaults. Looking at you Holochain :)

@ThetaSinner
Copy link
Member Author

Waiting for a new version of sodoken holochain/sodoken#22

Copy link
Collaborator

@neonphog neonphog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. It's too bad sqlcipher didn't do a vacuum into integration VACUUM INTO bla AS ENCRYPTED KEY bla.

@ThetaSinner
Copy link
Member Author

That would be more streamlined!

I've got the build for windows working by fetching the libsodium lib from vcpkg instead of the libsodium website. That should be a more reliable source. This only fixes our CI and anybody else building on Windows might run into the same issue but I suspect it's repeated downloads that get blocked rather than individuals. I didn't see this problem locally until I rebuilt a bunch of times

Copy link
Collaborator

@neonphog neonphog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I'm happy with this solution. Thanks @ThetaSinner !

@ThetaSinner ThetaSinner merged commit 97fe682 into main Jan 23, 2024
14 checks passed
@ThetaSinner ThetaSinner deleted the migrate-unencrypted-dbs-to-encrypted branch January 23, 2024 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants