[GH-ISSUE #93] Create a password restrictions module set #73

Open
opened 2026-02-25 21:34:03 +03:00 by kerem · 16 comments
Owner

Originally created by @jasonmunro on GitHub (Jun 28, 2016).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/93

Originally assigned to: @Danelif on GitHub.

Some random thoughts of features worth supporting. This module set will only apply for sites using the built in user authentication and not pass-through to a mail service.

  • passphrase
    • examples
    • min length 50
    • min words 3
    • min caps 1
    • min puncuation 1
    • 2000 char max
  • standard min password requirements (nist)
    • min length 10
    • min caps 1
    • min symbols 1
  • password expiration
    • forced reset password on expiration
    • saved password history
Originally created by @jasonmunro on GitHub (Jun 28, 2016). Original GitHub issue: https://github.com/cypht-org/cypht/issues/93 Originally assigned to: @Danelif on GitHub. Some random thoughts of features worth supporting. This module set will only apply for sites using the built in user authentication and not pass-through to a mail service. - passphrase - examples - min length 50 - min words 3 - min caps 1 - min puncuation 1 - 2000 char max - standard min password requirements (nist) - min length 10 - min caps 1 - min symbols 1 - password expiration - forced reset password on expiration - saved password history
Author
Owner

@dumblob commented on GitHub (Jun 28, 2016):

Good idea.

I must though disagree on several points from the proposal (yes, even NIST has it wrong :(). E.g. min caps 1 min puncuation 1 min symbols 1 are not useful (why is it so is explained under the linked sources on the zxcvbn gihub page I'm referring to below - e.g. remembering and writing symbols and lowercase/UPPERCASE is harder then having the password by 1 or 2 characters longer to achieve way higher security, because people then don't write down their passwords on papers glued to their LCDs, but rather remember them).

For a good strength estimator please see https://github.com/aybabtme/zxcvbn and the literature and explanations linked from that page.

The rest of the proposal (including expiration) is a decent one, thanks!

<!-- gh-comment-id:229198632 --> @dumblob commented on GitHub (Jun 28, 2016): Good idea. I must though disagree on several points from the proposal (yes, even NIST has it wrong :(). E.g. `min caps 1` `min puncuation 1` `min symbols 1` are not useful (why is it so is explained under the linked sources on the zxcvbn gihub page I'm referring to below - e.g. remembering and writing symbols and lowercase/UPPERCASE is harder then having the password by 1 or 2 characters longer to achieve way higher security, because people then don't write down their passwords on papers glued to their LCDs, but rather remember them). For a good strength estimator please see https://github.com/aybabtme/zxcvbn and the literature and explanations linked from that page. The rest of the proposal (including expiration) is a decent one, thanks!
Author
Owner

@jasonmunro commented on GitHub (Jun 28, 2016):

Thanks for the feedback. It's all about entropy here. Unencumbered by facts, I'm not surprised having a larger overall minimum might outweigh forcing a larger character set. Honestly I like the pass-phrase approach the best. Max entropy, and a phrase that doesn't require a post-it :) Regardless, I plan on making each of these a knob a site can tune to whatever they want.

<!-- gh-comment-id:229201692 --> @jasonmunro commented on GitHub (Jun 28, 2016): Thanks for the feedback. It's all about entropy here. Unencumbered by facts, I'm not surprised having a larger overall minimum might outweigh forcing a larger character set. Honestly I like the pass-phrase approach the best. Max entropy, and a phrase that doesn't require a post-it :) Regardless, I plan on making each of these a knob a site can tune to whatever they want.
Author
Owner

@dumblob commented on GitHub (Jun 29, 2016):

Regardless, I plan on making each of these a knob a site can tune to whatever they want.

If it's not much more work, then it's undoubtedly the best solution.

<!-- gh-comment-id:229268212 --> @dumblob commented on GitHub (Jun 29, 2016): > Regardless, I plan on making each of these a knob a site can tune to whatever they want. If it's not much more work, then it's undoubtedly the best solution.
Author
Owner

@marclaporte commented on GitHub (May 7, 2024):

@Danelif please advise.

<!-- gh-comment-id:2097138718 --> @marclaporte commented on GitHub (May 7, 2024): @Danelif please advise.
Author
Owner

@marclaporte commented on GitHub (May 7, 2024):

If we do this, we should re-use an existing lib.

<!-- gh-comment-id:2097144571 --> @marclaporte commented on GitHub (May 7, 2024): If we do this, we should re-use an existing lib.
Author
Owner

@Danelif commented on GitHub (May 7, 2024):

We might consider using the PasswordPolicy library. This library allows to define password policies (e.g. minimum length, required character types) and then hash and verify passwords against those policies. More information on this library https://github.com/web-token/jwt-password-policy

<!-- gh-comment-id:2097614128 --> @Danelif commented on GitHub (May 7, 2024): We might consider using the PasswordPolicy library. This library allows to define password policies (e.g. minimum length, required character types) and then hash and verify passwords against those policies. More information on this library https://github.com/web-token/jwt-password-policy
Author
Owner

@marclaporte commented on GitHub (May 7, 2024):

https://github.com/web-token/jwt-password-policy gives me "page not found"

<!-- gh-comment-id:2098993368 --> @marclaporte commented on GitHub (May 7, 2024): https://github.com/web-token/jwt-password-policy gives me "page not found"
Author
Owner

@Danelif commented on GitHub (May 7, 2024):

https://github.com/ircmaxell/password-policy

<!-- gh-comment-id:2099002330 --> @Danelif commented on GitHub (May 7, 2024): https://github.com/ircmaxell/password-policy
Author
Owner

@marclaporte commented on GitHub (May 7, 2024):

https://github.com/ircmaxell/password-policy

Last commit 8 years ago

<!-- gh-comment-id:2099019312 --> @marclaporte commented on GitHub (May 7, 2024): > https://github.com/ircmaxell/password-policy Last commit 8 years ago
Author
Owner

@IrAlfred commented on GitHub (Sep 26, 2025):

Hello @Danelif
Any update here ?

<!-- gh-comment-id:3339547360 --> @IrAlfred commented on GitHub (Sep 26, 2025): Hello @Danelif Any update here ?
Author
Owner

@Danelif commented on GitHub (Sep 26, 2025):

@marclaporte @IrAlfred what about this https://github.com/bjeavons/zxcvbn-php

Last commit is 7months old

If agreed, we can start its integration

<!-- gh-comment-id:3339696336 --> @Danelif commented on GitHub (Sep 26, 2025): @marclaporte @IrAlfred what about this https://github.com/bjeavons/zxcvbn-php Last commit is 7months old If agreed, we can start its integration
Author
Owner

@IrAlfred commented on GitHub (Sep 26, 2025):

@Danelif This is a good start.

To ensure we select the most effective solution, I recommend conducting a comparative analysis of available password validation libraries. This would involve evaluating key criteria such as security features, customization options, performance, and maintenance status to identify the optimal package for Cypht's specific requirements.

You can do this on a wiki page

<!-- gh-comment-id:3339861551 --> @IrAlfred commented on GitHub (Sep 26, 2025): @Danelif This is a good start. To ensure we select the most effective solution, I recommend conducting a comparative analysis of available password validation libraries. This would involve evaluating key criteria such as security features, customization options, performance, and maintenance status to identify the optimal package for Cypht's specific requirements. You can do this on a wiki page
Author
Owner

@Danelif commented on GitHub (Sep 26, 2025):

@IrAlfred Got it
I put this on my TODOs

<!-- gh-comment-id:3339930902 --> @Danelif commented on GitHub (Sep 26, 2025): @IrAlfred Got it I put this on my TODOs
Author
Owner

@marclaporte commented on GitHub (Sep 26, 2025):

Was done here: https://dev.tiki.org/Password-Strength-Implementation-Review

We should use the same for Cypht and Tiki

Tracked internally on https://avan.tech/item112169

<!-- gh-comment-id:3339948019 --> @marclaporte commented on GitHub (Sep 26, 2025): Was done here: https://dev.tiki.org/Password-Strength-Implementation-Review We should use the same for Cypht and Tiki Tracked internally on https://avan.tech/item112169
Author
Owner

@Danelif commented on GitHub (Sep 26, 2025):

Thank you @marclaporte
I will review and start implementation on Cypht and later in Tiki

<!-- gh-comment-id:3340026558 --> @Danelif commented on GitHub (Sep 26, 2025): Thank you @marclaporte I will review and start implementation on Cypht and later in Tiki
Author
Owner

@marclaporte commented on GitHub (Sep 27, 2025):

As discussed: let's put this on pause. Let's do in Tiki first.

<!-- gh-comment-id:3341037521 --> @marclaporte commented on GitHub (Sep 27, 2025): As discussed: let's put this on pause. Let's do in Tiki first.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cypht#73
No description provided.