-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Validator] Make API endpoint for NotCompromisedPasswordValidator configurable #31060
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Validator] Make API endpoint for NotCompromisedPasswordValidator configurable #31060
Conversation
I'll create the Doc PR if the rest is ok. |
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Validator/Constraints/NotCompromisedPasswordValidator.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
Outdated
Show resolved
Hide resolved
Thank you very much for your fast review and constructive feedback, @stof. I've integrated the changes you requested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
Show resolved
Hide resolved
src/Symfony/Component/Validator/Constraints/NotCompromisedPasswordValidator.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
Outdated
Show resolved
Hide resolved
What do you all think of |
Would also be possible, however I think NotCompromisedPasswordValidator is better concerning the responsiblity of the validator. It uses a blacklist of hashes for known compromised passwords. |
An initial prototype of my HIBP-compatible password compromisation check server, based on a simple program to chunk the source data in buckets and some Apache 2.4 rewrite rules, is available here: https://github.com/xelan/sphynx Feedback is welcome 😄 |
The requested changes concerning constant naming and documentation are incorporated. I'm still not sure about the section configuration |
Well, I think in this case, having the info on the field is important to explain what will be the effect of disabling the validator (it won't prevent you to use the constraint, but will disable the validation) |
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Validator/Constraints/NotCompromisedPasswordValidator.php
Outdated
Show resolved
Hide resolved
Adapted, thanks for the feedback 😄 |
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(with one minor comment)
src/Symfony/Component/Validator/Constraints/NotCompromisedPasswordValidator.php
Outdated
Show resolved
Hide resolved
Thank you @xelan. |
…rdValidator configurable (xelan) This PR was squashed before being merged into the 4.3-dev branch (closes #31060). Discussion ---------- [Validator] Make API endpoint for NotCompromisedPasswordValidator configurable | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | yes, but acceptable [1] | Deprecations? | no [1] | Tests pass? | yes | Fixed tickets | #30871, #31054 | License | MIT | Doc PR | symfony/symfony-docs#... (TODO) Makes the API endpoint for the `NotCompromisedPasswordValidator` configurable. The endpoint includes the placeholder which will be replaced with the first digits of the password hash for k-anonymity. The endpoint can either be set via constructor injection of the validator if the component is used standalone, or via the framework configuration of symfony/framework-bundle. [1] As discussed in #31054, the validator is not in a stable release yet, therefore the BC break is considered acceptable. No deprecation / BC layer is necessary. Commits ------- f6a80c2 [Validator] Make API endpoint for NotCompromisedPasswordValidator configurable
…ssword constraint (javiereguiluz) This PR was squashed before being merged into the master branch (closes #11527). Discussion ---------- Updated the configuration reference for NotCompromisedPassword constraint Documents the changes made in symfony/symfony#31060 Commits ------- f5b081e Updated the configuration reference for NotCompromisedPassword constraint
… (ogizanagi) This PR was merged into the 4.3 branch. Discussion ---------- Fix `validation.not_compromised_password` option default Reflecting symfony/symfony#31060 changes in the docs. Commits ------- 35925da Fix `validation.not_compromised_password` option default
Makes the API endpoint for the
NotCompromisedPasswordValidator
configurable. The endpoint includes the placeholder which will be replaced with the first digits of the password hash for k-anonymity.The endpoint can either be set via constructor injection of the validator if the component is used standalone, or via the framework configuration of symfony/framework-bundle.
[1] As discussed in #31054, the validator is not in a stable release yet, therefore the BC break is considered acceptable. No deprecation / BC layer is necessary.