Password protection and rules
Password rules
Clerk refers to the National Institute of Standards and Technology (NIST) guidelines to determine the character rules for passwords:
NIST Special Publication 800-63B
While these rules might seem lax independently, NIST's additional compromised password protection guidelines do more to prevent the use of unsafe passwords.
Also, bear in mind, that passwords are not a requirement for using Clerk. Applications can be configured to use a passwordless strategy that relies on your users being sent instead.
Reject compromised passwords
Attackers take email and password pairs leaked in other sites' data breaches and try them on your application, an attack called credential stuffing. With Reject compromised passwords enabled, Clerk checks passwords against known breach data, so a leaked password can't be set on your application, and a user who signs in with one has to replace it. It's enabled by default for new applications.
Clerk follows the National Institute of Standards and Technology (NIST) guidelines for compromised passwords:
When processing requests to establish and change memorized secrets, verifiers SHALL compare the prospective secrets against a list that contains values known to be commonly-used, expected, or compromised. NIST Special Publication 800-63B
Clerk contracts with HaveIBeenPwned to compare passwords against its corpus of over 10 billion compromised credentials. Passwords are checked:
- When a user sets or changes a password. A compromised password is rejected, and the user has to choose another.
- When a user signs in with a password. If their correct password has been found in breach data, they're asked to reset it.
What happens at sign-in
When a user signs in with a correct password that has been found in breach data, they're asked to reset it before the sign-in completes. The reset uses the same flow as "forgot password": the user verifies with a sent to their email address or phone number, then sets a new password. If the user has no way to reset their password, the sign-in continues as normal.
Checking at sign-in catches passwords that:
- Were added to the breach database after the user set them.
- Were set while this setting was disabled.
- Were imported when the user was migrated to Clerk.
If you've built a , your flow needs to handle this case. See Handle compromised passwords.
You can also mark a user's password as compromised yourself. See Manually set a password as compromised.
Related protections
- Device Trust asks for a second factor when a correct password is used on a device Clerk doesn't recognize, which also covers leaked passwords that aren't in breach data.
- Lock accounts after failed sign-ins covers attackers who guess at a password and get it wrong.
Enable or disable it
- In the Clerk Dashboard, navigate to the User & authentication page.
- Select the Password tab and on the right side, select Update password requirements. You can enable or disable Reject compromised passwords.
Password strength
Clerk uses zxcvbn-ts for estimating the strength of passwords and leverages the Open Web Application Security Project (OWASP) guidelines to determine its handling of password strength:
For users that set an average/weak password that complies with your organization's policies but could be stronger - Clerk also provides a gentle recommendation to use a stronger password.
Clerk provides a way to manually set a password as compromised. This is useful for blocking passwords in the case that:
- The password has recently been added to the compromised password database.
- The user was able to set a compromised password because protection was off at the time.
To manually set a user's password as compromised:
- In the Clerk Dashboard, navigate to the Users page and select the user you want to mark as compromised. You'll be redirected to the user's settings.
- In the Password section, if a password is set, open the three-dot menu and select Set password as compromised. A modal will open asking you to confirm the action. Complete the instructions.
Feedback
Last updated on