note-taking/docs/migrations/passwords.md

27 lines
1.4 KiB
Markdown
Raw Normal View History

# Password migrations
After [issue #1](https://git.sofiaritz.com/sofia/note-taking/issues/1), the migration of old "databases" was required.
Right now, this isn't very useful because the only user is (probably) me, but this serves as an exercise for the future.
## Password systems
Currently, there are two password systems _on-the-wild_:
1. `PasswordSystem::V0`. The system used before [issue #1](https://git.sofiaritz.com/sofia/note-taking/issues/1)
2. `PasswordSystem::V1`. The system used after [issue #1](https://git.sofiaritz.com/sofia/note-taking/issues/1)
(with the KDF)
## Support
Only the latest and previous password system are going to be supported at any point in time.
### Example
1. `v1` uses `PasswordSystem::V1` and supports migration from `PasswordSystem::V0`
2. `v2` is released with the `PasswordSystem::V2` and migration from `PasswordSystem::V1`, those who are still on the
`PasswordSystem::V0` are redirected to the latest `v1` release.
## Currently supported systems
- `v0.*`: `PasswordSystem::V1` and migration from `PasswordSystem::V0`
- `v1.*`:
- If a new system is used: `PasswordSystem::V2` and migration from `PasswordSystem::V1`
- If no new system is used: `PasswordSystem::V1`
- `v2.*`:
- If a new system is used: `PasswordSystem::V3` and migration from `PasswordSystem::V2`
- If no new system is used: `PasswordSystem::V2` and migration from `PasswordSystem::V1`