Repository navigation
Conversation
- Add auth.pass.change.enabled, auth.pass.reset.enabled and auth.pass.reset.expiryHours to ConfigurationName, reusing the existing auth.pass.enabled constant as-is. -Seed all four settings under the application key in SYSTEM_Defaults.json. - Add PasswordEligibilityRule, a static predicate over stored password and netid only. - Add PasswordValidator - Add CredentialNotificationService.notifyPasswordChanged - Add the packaged SYSTEM_Password_Changed.email template
Add reset token service, reset initiation and redemption endpoints, reset request email template, and reset-password client surfaces.
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.
Description
Resolves:
Changes:
[ ] Major
[X] Minor
[ ] Patch
Vireo currently has no way for a locally registered user to change their password, and no way for an administrator to help a user who has forgotten one. This PR adds both, behind settings that default to off, so existing installations see no behavior change until an administrator opts in.
User-facing
/reset-passwordpage where the user chooses a new password and is then sent to sign in.auth.pass.enabled(master, default true),auth.pass.change.enabled(default false),auth.pass.reset.enabled(default false), andauth.pass.reset.expiryHours(default 24). The expiry field is validated to a positive integer on both client and server.SYSTEM Password Reset RequestandSYSTEM Password Changed, written in the same house style as the existing templates. A password-changed notification is sent after any successful change or reset.Approach
PasswordControllerexposesPOST /password/change(ROLE_STUDENT, acts only on the authenticated user),POST /password/reset(ROLE_MANAGER), andPOST /password/reset/redeem(anonymous, like/auth/register). Every handler checks availability, then eligibility, then input, and writes nothing if any check fails. No response ever carries a password, hash, or token.ResetTokenServicebuildsbase64url(email|binding|issuedAt).base64url(HMAC-SHA256)using the existingapp.security.secret, wherebindingis an HMAC of the stored password hash. Changing the password re-salts the hash, which invalidates that token and every sibling token for the account, giving single use without a token table. Expiry is read from settings at verification time.PasswordValidatorcentralizes the new-password rules and is also used by the existing registration path inAuthController; every existing registration outcome is preserved and covered by tests.PasswordEligibilityRuleis the single definition of "Vireo-managed account" used by the controller, theUsermodel (@Transient isPasswordEligible), and the/user/credentialsresponse the client reads.Compatibility
SYSTEM_Defaults.json; templates load throughSystemDataLoader.Testing
Type of Change
AI Usage Disclosure
AI Tool(s) Used Including Version:
Nature of Use:
Additional Description:
The pattern we use for feature development is using spec-driven development where a set of requirements, design, and tasks MD files are generated. These ground the agent in these steering files and are use throughout the development.