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

fix: Require minimum length of 8 characters password #2009

Merged
merged 9 commits into from
Dec 6, 2021

Conversation

sawadashota
Copy link
Contributor

Related issue(s)

Kratos follows NIST Digital Identity Guidelines - 5.1.1.2 Memorized Secret Verifiers and password policy says

Passwords must have a minimum length of 8 characters and all characters (unicode, ASCII) must be allowed:

but currently Kratos requires 6 chars minimum. So I fixed to 8 chars.

Checklist

  • I have read the contributing guidelines.
  • I have referenced an issue containing the design document if my change
    introduces a new feature.
  • I am following the
    contributing code guidelines.
  • I have read the security policy.
  • I confirm that this pull request does not address a security
    vulnerability. If this pull request addresses a security. vulnerability, I
    confirm that I got green light (please contact
    [email protected]) from the maintainers to push
    the changes.
  • I have added tests that prove my fix is effective or that my feature
    works.
  • I have added or changed the documentation.

Further Comments

@sawadashota sawadashota marked this pull request as ready for review November 30, 2021 09:17
Copy link
Member

@aeneasr aeneasr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

I think you also need to adjust the e2e tests, as it appears that they are failing. Most likely because they expect a password length of 6!

@sawadashota
Copy link
Contributor Author

I fixed and some test cases are passed. Failed cases seem to be also fail at master branch.

Copy link
Member

@zepatrik zepatrik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opened #2018 to fix all CI issues, will merge this once everything is ✔️

@@ -222,7 +222,7 @@ context('2FA lookup secrets', () => {

it('should fail to set up totp if verify code is wrong', () => {
cy.visit(settings)
cy.get('input[name="totp_code"]').type('123456')
cy.get('input[name="totp_code"]').type('12345678')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this would not fail with this change, but doesn't matter.

Copy link
Member

@aeneasr aeneasr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you! 🙏

@zepatrik zepatrik merged commit bb5846e into ory:master Dec 6, 2021
@zepatrik
Copy link
Member

zepatrik commented Dec 6, 2021

Thanks again 👍

@sawadashota sawadashota deleted the fix_pw_len branch December 7, 2021 00:46
peturgeorgievv pushed a commit to senteca/kratos-fork that referenced this pull request Jun 30, 2023
Kratos follows [NIST Digital Identity Guidelines - 5.1.1.2 Memorized Secret Verifiers](https://pages.nist.gov/800-63-3/sp800-63b.html) and [password policy](https://www.ory.sh/kratos/docs/concepts/security#password-policy) says

> Passwords must have a minimum length of 8 characters and all characters (unicode, ASCII) must be allowed.

Signed-off-by: sawadashota <[email protected]>
Co-authored-by: Patrik <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants