Repository navigation
feat(auth): password change, admin reset and break-glass reset (#117) - #122
Merged
Merged
Conversation
- POST /api/auth/password: change your own password; this session
stays, all others end; a wrong current password is 400 and counts
towards the lockout.
- POST /api/auth/users/{username}/password: a tenant_admin resets a
member of their own tenant; unlocks, ends that user's sessions and
writes a password_reset row to the tenant's audit log. A user who is
also in another tenant is refused (409).
- scripts/reset_password.py: operator reset by username; clears the
lockout and ends all sessions.
- Frontend: change-password dialog from the header key icon.
- Docs: ROLES.md, QUICKSTART, offline-install known limits, VCRM BR-36.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019YPoXzBSj89ZHgw7nfTmbB
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.
Fixes #117. Part of ART Milestone 2 follow-up (BR-36). Builds the full proposed scope, as confirmed by the product owner on 27 Oct 2026.
What changes
POST /api/auth/passwordPOST /api/auth/users/{username}/passwordtenant_adminonly (403 for other roles, 401 without a session). It sets the password, clears any lockout, ends all of that user's sessions, and writes apassword_resetrow to the tenant's audit log. A user in another tenant gets 404.scripts/reset_password.py --username <u>TE_NEW_PASSWORDor a prompt.Decisions for the product owner
audit_logonly has file columns until M3'saudit_events(ART M3: immutable source and append-only audit (BR-23, BR-24, BR-35) #107). So the row records the target infile_nameand the actor inmode(by <admin>). It's marked with aponytail:comment for M3 to replace.Docs
docs/ROLES.md: newreset_passwordrow, and a password reset note.docs/QUICKSTART.md: how to change or reset a password (PowerShell, withcd).docs/offline-install.md: the known limit "no self-service password change yet" is replaced with the change and reset steps.docs/VCRM.mdBR-36:Checks
main). Evals 26/26.tests/test_password_reset.pyhas 11 integration tests.tests/test_roles.pynow triesreset_passwordwith every role.tscexit 0, eslint clean on changed files, production build OK.make lint(flake8 + bandit): exit 0.tests/test_api_hardening.pylists the allowed audit actions, so it's updated to includepassword_reset.Done when
This PR is merged with CI green, and the evidence is attached to #117.
Generated by Claude Code