Plugin: Password Complexity Policy
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- postgresql, typescript
- Domain
- authentication, backend, security
Research direction
Start by reading the existing plugin mechanism and authentication flows for registration, password changes, and resets; the issue does not name specific files or tests. Then map where policy configuration and validation would integrate across those flows and the admin panel. Done means the listed policy rules can be configured and enforced at every specified entry point, with structured errors and tests covering each rule and flow.
Written by the indexing model from the issue text.
Description
Feature Description
Add a new SonicJS plugin that allows admins to define and enforce password complexity requirements across all user accounts.
Motivation
Currently SonicJS has no built-in mechanism to mandate password strength. Organizations with compliance requirements (SOC 2, HIPAA, internal security policies) need the ability to enforce minimum password complexity to reduce the risk of account compromise.
Proposed Solution
A new plugin (e.g. @sonicjs/plugin-password-policy) that integrates with the existing auth flow and exposes admin-configurable rules:
Admin Configuration (via CMS admin panel or config)
- Minimum length — e.g. 12 characters
- Character classes — require uppercase, lowercase, digits, special characters (individually toggleable)
- Maximum length — optional cap
- Disallow common passwords — block passwords from a known-weak list (e.g.
rockyoutop N) - Disallow username in password — prevent trivial user-specific passwords
- Password history — prevent reuse of last N passwords
- Expiry / rotation — optional max password age with forced reset
Enforcement Points
- Registration — reject non-compliant passwords at signup
- Password change / reset — enforce policy on all password updates
- Admin-initiated reset — when an admin resets a user's password, enforce policy on the new value
- Existing accounts — optional: flag non-compliant accounts and prompt on next login
API / Integration
- Exposes a
validatePassword(password, policy)utility for use in custom forms/APIs - Returns structured errors (e.g.
{ rule: 'minLength', required: 12, actual: 8 }) for clean UI feedback - Policy config stored in D1 (admin-editable at runtime) with sensible defaults
UI
- Admin panel section to view/edit the active policy
- Inline validation feedback on password input fields
Alternatives Considered
- Enforcing policy only at the application level (no admin control) — too rigid for multi-tenant or configurable deployments
- Relying entirely on the identity provider — SonicJS needs to own this for self-hosted setups
Acceptance Criteria
- Plugin installable via standard SonicJS plugin mechanism
- Admin can configure policy rules without a code deploy
- Policy enforced on registration, password change, and reset flows
- Structured validation errors returned for UI rendering
- Defaults are secure-but-reasonable out of the box
- Tests cover each rule and enforcement point
- Dominant language
- TypeScript
- Stars
- 1.8k
- Forks
- 219
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 67
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SonicJs-Org/sonicjs
-
bug(admin/users): server error returns bare alert HTML causing black-shape visual artifactPossibly taken @lane711 claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
SonicJs-Org/sonicjs#1211 ·
Maintainers usually reply within 1 day
-
area: api bug priority: P2
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
SonicJs-Org/sonicjs#1200 ·
Maintainers usually reply within 1 day
-
ResendProvider cannot send on Workers: unbound `fetch` stored as an instance property throws "Illegal invocation"Possibly taken @lane711 claimed this 23 days ago. Openarea: email bug priority: P1
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SonicJs-Org/sonicjs#1099 ·
Maintainers usually reply within 1 day
-
Email plugin settings are never read: loadDbEmailSettings queries a v2 `plugins` table that does not exist in v3Possibly taken @lane711 claimed this 23 days ago. Openarea: email bug priority: P1
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
SonicJs-Org/sonicjs#1098 ·
Maintainers usually reply within 1 day
-
area: documentation bug documentation priority: P2
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SonicJs-Org/sonicjs#1012 ·
Maintainers usually reply within 1 day
All issues in SonicJs-Org/sonicjs
Similar issues
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 78/100
lingdojo/kana-dojo#34344 · 1 comment · 5 reactions ·
Maintainers usually reply within 1 day
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
bug priority:low
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Konfirm-xyz/konfirm-frontend#369 ·
Maintainers usually reply within 1 day