lockbox-datastore icon indicating copy to clipboard operation
lockbox-datastore copied to clipboard

Cloud storage of saved credentials so that they can be accessed from any supported platforms (a single database of credentials for each user)

Open devinreams opened this issue 8 years ago • 4 comments

When I access Lockbox from another machine or Firefox browser instance, I want to log into my account and access all my previously saved entries, that are backed up securely in the cloud so that I have one consistent database of credentials.

Acceptance criteria

  • Once Lockbox is linked to FxA, should synchronize with remote cloud storage and populate saved entries from cloud
  • Once Lockbox is linked to FxA, should start a sync operation and combine new entries (prior to FxA link) with existing saved entries from cloud
  • Duplicate entries from combining new entries with remote datastore is acceptable. No resolution for duplicate entries at this time.
  • Sync operation should happen automatically
    • every 30 seconds while app is running
    • when an entry is modified
  • Should have manual option to request a sync 'right now'

Todo

  • [X] mozilla-lockbox/mozilla-lockbox.github.io#23 (Document sync design)
  • [X] mozilla-lockbox/lockbox-extension#149 (implement proper sign out)
  • [x] mozilla-lockbox/lockbox-extension#487 (validate and refresh OAuth tokens)
  • [x] mozilla-lockbox/lockbox-datastore#64 (improvements to error reporting)
  • [x] mozilla-lockbox/lockbox-datastore#78 (indexeddb enhancements)
  • [ ] mozilla-lockbox/lockbox-extension#650 (build-time pref for config choice)
  • [ ] mozilla-lockbox/lockbox-datastore#79 (public API stubs/skeletons)
  • [ ] mozilla-lockbox/lockbox-extension#489 (provision staging kinto)
  • [ ] mozilla/lockbox/lockbox-extension#639 (provision production kinto)
  • [ ] mozilla-lockbox/lockbox-datastore#80 (basic kinto support)
  • [ ] mozilla-lockbox/lockbox-datastore#81 (conflict resolution)
  • [ ] mozilla-lockbox/lockbox-extension#492 (integrate sync into extension)
  • [ ] mozilla-lockbox/lockbox-extension#493 (button/meu/etc to manually trigger sync in the extension)
  • [ ] mozilla-lockbox/lockbox-extension#494 (async error reporting)
  • [ ] mozilla-lockbox/lockbox-ios#141 (integrate sync into ios application)

devinreams avatar Oct 30 '17 20:10 devinreams

Likely a sub-task of https://github.com/mozilla-lockbox/lockbox-extension/issues/209 when we get that far

devinreams avatar Nov 01 '17 19:11 devinreams

@linuxwolf I've a few questions for how we think of the sync logic here:

  • If a user saves credentials to a Lockbox instance, without attaching a FxA, how are these handled? Option to combine those with existing data store?
  • How often should sync run to ensure the 'latest' is captured and stored?
  • Do we/should we provide an option to manually sync?

sandysage avatar Jan 02 '18 19:01 sandysage

If a user saves credentials to a Lockbox instance, without attaching a FxA, how are these handled? Option to combine those with existing data store?

This question isn't describing the problem enough, but I surmise it comes from something like the following scenario:

  • User has installed Lockbox, and linked it with FxA on another device (e.g., work computer)
  • User installs Lockbox on another device (e.g., home computer), and starts adding some entries
  • User links the home computer Lockbox to their FxA

In this case, once the home computer Lockbox is linked to FxA and can synchronize with remote cloud storage, it starts a sync operation, and combines entries. This might result in duplicate entries if the user added the same credentials at work and at home before syncing. Resolving duplicates is something that will need to be addressed carefully, but to start keeping the duplicate entries seems the least impactful.

How often should sync run to ensure the 'latest' is captured and stored?

That is an open question still, and can be continually tuned as we move along. A document on about sync is still pending, which will describe frequency in detail, but to start I propose:

  • sync every 30 seconds while app is running
  • sync when an entry is modified

Do we/should we provide an option to manually sync?

This question is too light on details; is this "disable any syncing until the user specifically asks?" and/or "provide a way for users to request a sync 'right now'?"

I think the latter is important for users to feel more confident they can get their data when they want it.

I think the former may have some use, but we'd have to consider why users would want to do this, and when/if to support those reasons.

linuxwolf avatar Jan 03 '18 16:01 linuxwolf

In this case, once the home computer Lockbox is linked to FxA and can synchronize with remote cloud storage, it starts a sync operation, and combines entries.

🙌 This is the case I had in mind. And this seems like the best approach.

This might result in duplicate entries if the user added the same credentials at work and at home before syncing.

Sure. Let's see how much of an issue this presents early on. I see some of this becoming more critical when we have importing. But in the meantime, I agree that we can proceed with keeping duplicate entries.

but to start I propose: sync every 30 seconds while app is running & sync when an entry is modified

Awesome-sauce!

This question is too light on details; is this "disable any syncing until the user specifically asks?" and/or "provide a way for users to request a sync 'right now'?"

Mea culpa. I was referencing the latter. I agree that it's probably important for users to have that ability to control their access.

I think the former may have some use, but we'd have to consider why users would want to do this, and when/if to support those reasons.

Yup! Sounds good.

I'm going to update the description with these decisions.

sandysage avatar Jan 03 '18 16:01 sandysage