a-mikh opened a new pull request, #173: URL: https://github.com/apache/fineract-loan-origination/pull/173
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!-- Commits must be signed to merge; see docs/development/gpg-commit-signing.adoc. --> ## Description <!-- What changed and why. Link the GitHub issue this PR resolves. --> Adds a shared password policy for customer and staff registration: - Requires at least 12 Unicode code points. - Rejects passwords present in the bundled common-password blocklist. - Rejects passwords containing the username or, when provided, the full email address, regardless of case. - Returns all applicable password-policy violations in the existing LOS error response format. The blocklist is loaded once during validator initialization and stored in an immutable set. Its source and MIT license are included in `META-INF/licenses`. Validation runs before password hashing and persistence. Bean Validation failures and malformed JSON return HTTP 400 responses without exposing plaintext passwords. Tests cover validation rules, boundary values, Unicode length, missing inputs, both registration paths, and safe error responses. Closes #138 ## Verification <!-- List what you ran locally and the result. Write "Not applicable" with a reason if a check does not apply. --> - [x] `./mvnw spotless:apply` - [x] `./mvnw clean verify` - [x] `./mvnw apache-rat:check` - Frontend checks: Not applicable — no frontend changes. ## Checklist - [x] This PR is one logical change, not a code dump. - [x] I added or updated tests, or explained why tests are not needed. - [x] New project-authored files carry the ASF license header. The third-party blocklist includes its upstream license and provenance in `META-INF/licenses`. - Docs and `AGENTS.md`: Not applicable — no changes to documented commands, paths, or architecture rules. - [x] All commits are signed. - [x] I followed the [AI Policy](https://github.com/apache/fineract/blob/develop/CONTRIBUTING.md#ai-policy) and the [ASF Generative Tooling Guidance](https://www.apache.org/legal/generative-tooling.html). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
