Skip to content
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

Password similarity policy is too strict #581

Closed
aeneasr opened this issue Jul 16, 2020 · 2 comments · Fixed by #585
Closed

Password similarity policy is too strict #581

aeneasr opened this issue Jul 16, 2020 · 2 comments · Fixed by #585
Assignees
Labels
feat New feature or request.

Comments

@aeneasr
Copy link
Member

aeneasr commented Jul 16, 2020

Describe the bug

In #577 we observe flaky tests because both the user id and the password are generated using UUID v4 and the password policy deemed them too similar.

Given that the entropy is really high, the password policy definitely returned a false positive here and should subsequently be improved (also with tests) to ensure that the false positive rate is reduced.

Reproducing the bug

Check the password policy against a combination of UUIDs

@aeneasr aeneasr added the feat New feature or request. label Jul 16, 2020
@aeneasr aeneasr added this to the v0.5.0-alpha.1 milestone Jul 16, 2020
@aeneasr aeneasr added this to To do in Maintainer's Board via automation Jul 16, 2020
aeneasr added a commit that referenced this issue Jul 16, 2020
Resolves an issue where the password was too similar to the user ID as both were generated using UUIDs (see #581). Closes #577
aeneasr added a commit that referenced this issue Jul 16, 2020
Resolves an issue where the password was too similar to the user ID as both were generated using UUIDs (see #581). Closes #577
@zepatrik
Copy link
Member

zepatrik commented Jul 17, 2020

Some examples of uuids being too similar:

a b
d4f6090b-5a84-4d4d-af5e-edfb9bb4ee8b 31f7cb9f-2184-4404-8d1b-8da3eb00ebbe
6b0e8fc2-6123-430f-8f10-5796f645b1aa 81cbaa10-5a47-4499-88ec-9fb920d71bc1
a3d7df25-0**5fb-**4808-bac3-69c57ec26b25 b8e8f28c-3ca0-4**5fb-**b653-16cf0846bbee

After debugging those a bit I found out the longest common substring check is causing these to fail, not the levenshtein distance.

@zepatrik
Copy link
Member

I will fix this by requiring the lcs to be propotionally less than 20% of the password length. Or are there any arguments for/against a specific threshold?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request.
Projects
Development

Successfully merging a pull request may close this issue.

2 participants