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

feat: add script to copy stores and uploads to a new space #392

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

travis
Copy link
Contributor

@travis travis commented Jun 14, 2024

There are many ways a user might lose control of a space. Because we can't fake the crypto our system is built upon, the simplest solution to this is to have them create a new space that they do control and then ask us to copy the contents of the old space into the new.

Of course this doesn't require copying bits around - we just need to update some indices in DynamoDB. This script finds all entries in the store and upload tables for a space and creates new entries for each of those items in the new space. This should result in the new space being functionally identical to the old

This is a somewhat sensitive operation - we should only do this when we trust the customer a great deal - the contents of a particular space may be sensitive and this is a potential attack vector to discover them.

This has not been tested extensively, though I have run it in my development AWS env and it seems to work - we should do some validation that using this results in a new space that is functionally identical to the old.

@alanshaw particularly interested in your thoughts on whether this will mess up billing at all?

There are many ways a user might lose control of a space. Because we can't fake the crypto our system is built upon, the simplest solution to this is to have them create a new space that they do control and then ask us to copy the contents of the old space into the new.

Of course this doesn't require copying bits around - we just need to update some indices in DynamoDB. This script finds all entries in the store and upload tables for a space and creates new entries for each of those items in the new space. This should result in the new space being functionally identical to the old

This is a somewhat sensitive operation - we should only do this when we trust the customer a great deal - the contents of a particular space may be sensitive and this is a potential attack vector to discover them.
Copy link

seed-deploy bot commented Jun 14, 2024

View stack outputs

also clean up and test
@travis travis marked this pull request as ready for review June 21, 2024 22:00
@travis
Copy link
Contributor Author

travis commented Jun 21, 2024

ok this is in good shape - my one remaining concern is how this will interact with billing - @hannahhoward maybe you have some insight since you've been in that code in the past few days?

@travis travis changed the title wip: add script to copy stores and uploads to a new space feat: add script to copy stores and uploads to a new space Jun 21, 2024
combined with the `copy-stores-and-uploads` command this enables space forks
we already record the "snapshot date" and the "recorded date" separately, so this works even better than I thought it would!
@juliangruber
Copy link

ok this is in good shape - my one remaining concern is how this will interact with billing - @hannahhoward maybe you have some insight since you've been in that code in the past few days?

I was wondering about this as well, and was thinking that capabilities would need to be removed from the old account? But then I was wondering who pays for a file, if there are multiple accounts with access?

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.

None yet

2 participants