Note: This is a beta version and NOT ready for use in production.
Identity
- Add OpenIddict as a token server, selected with
IDENTITY_ENGINE=openiddict. IdentityServer4, which is no longer maintained, stays the default in this release; a future release will remove it. See Upgrading below. - Keep signed-in users signed in across the switch, in both directions
- Stop revealing whether an email is registered during sign in
- End password reset tokens at logout
- Use the async MongoDB grant store
- Minify email templates once instead of on every request
- Export Identity metrics to Prometheus on internal port 5068
Sync
- Delete inactive devices and their IDs in one transaction, and run the device cleanup job daily
- Expose sync, runtime and SignalR metrics to Prometheus
- Let the GC conserve memory by compacting the large object heap
- Upgrade the MongoDB driver to 3.12
Upgrading
Identity can now run on OpenIddict instead of IdentityServer4. Nobody is signed out by upgrading, switching, or switching back.
Switching
- Back up the
identitydatabase. - Add
IDENTITY_ENGINE: openiddictto theidentity-serverenvironment and restart it. - Back up again: the first start creates the
openiddict.keyscollection.
To switch back, remove IDENTITY_ENGINE and restart.
Keys
-
Keep the
openiddict.keyscollection andNOTESNOOK_API_SECRET: losing either signs everyone out. -
To change
NOTESNOOK_API_SECRET, start Identity once with the old value inNOTESNOOK_API_SECRET_PREVIOUS, then remove it. -
If a key may have leaked, replace them (this signs everyone out):
docker compose exec identity-server ./Streetwriters.Identity keys replace docker compose restart identity-server
Test drive
wget https://raw.githubusercontent.com/streetwriters/notesnook-sync-server/v1.0-beta.44/docker-compose.yml
wget https://raw.githubusercontent.com/streetwriters/notesnook-sync-server/v1.0-beta.44/.env
docker compose upMake sure everything is up and running:
docker psAll the above services must show (healthy) in the output.
Full Changelog: v1.0-beta.40...v1.0-beta.44