Repository navigation
Conversation
…ey from outside the database - Curators and admins can add a code from an authenticator app to their login, with ten recovery codes. Settings can require it. An admin turns it off for someone who lost their phone; reset-two-factor on the server does it for the last admin. The secret and the codes are encrypted in the database. - The Data Protection keys are encrypted with AES-256-GCM using COMMONAGE_LOGIN_KEY from .env. The first start with a key removes those stored readable. Without one, admins on a server see a notice; update.sh adds one to .env. - The backup test checks that no login key in the database can be read, and that old logins survive the restore. - QRCoder draws the QR code as SVG in the page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Seb H. <138793908+SebHenn@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The first half of M18 "Accounts and system": logins with an authenticator app, and the login keys in the database encrypted with a key from outside it. The system page and how long things are kept follow in a second pull request.
Authenticator apps
docker compose run --rm web reset-two-factor <email>on the server.ProtectedUserStore), not kept in plain text as Identity does by default.Login keys
COMMONAGE_LOGIN_KEYfrom.env, which is not in the database or the backups.scripts/update.shadds a key to.envwhen it updates an archive that has none, after the backup, and says to keep a copy of.env..env.exampleand compose pass it on. operations.md says what happens when it is lost, and security.md now has a table of where each secret is kept.Please decide or look at
.envnext to the database password. Someone on the server itself has both anyway. The point is the backups, which are copied elsewhere. Losing.envnow costs everyone their logins and their authenticator apps, so the docs ask for a copy kept apart from the backups.Checked
update.shadds exactly one key and that no readable key is left afterwards.reset-two-factorgets the admin back in.codecolour and the grey Copy button too faint on the green box, so the codes now sit in a plain bordered box. It also found that the activity log, whose entries got longer, scrolled sideways on a phone without a way for the keyboard to reach it.Not checked
otpauth://address with the key shown beside it, but no app has tried.update.shon a real server. The update test runs it end to end in CI.🤖 Generated with Claude Code