-
Notifications
You must be signed in to change notification settings - Fork 970
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
feat: add levenshtein distance check for password validation #231
Conversation
maxBreachesThreshold: 0, | ||
hashes: map[string]int64{}, | ||
ignoreNetworkErrors: true, | ||
minIdentifierPasswordDist: 5, |
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.
Can we make this configurable in the config file, and also document this in ? :)
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.
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.
I think, this thing has been implemented. Right?
func (s *DefaultPasswordValidator) Validate(ctx context.Context, identifier, password string) error { passwordPolicyConfig := s.reg.Config(ctx).PasswordPolicyConfig() if len(password) < int(passwordPolicyConfig.MinPasswordLength) {
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.
You mean the configuration? Does not look like the values come from the config rn:
if dist < s.minIdentifierPasswordDist || lcs > s.maxIdentifierPasswordSubstrThreshold { |
Related issue
closes #184
Proposed changes
Checklist
vulnerability, I confirm that I got green light (please contact security@ory.sh) from the maintainers to push the changes.
Further comments