Fixing weak password requirements
The complexity of a user's credentials or password determines the likelihood of a successful dictionary attack. If the password is not complicated enough, it will be a matter of minutes before an adversary guesses the credentials to use to authenticate in an ASP.NET Core web application using automation.
In this recipe, we will change the password properties of ASP.NET Identity to implement a much stronger password policy.
Getting ready
Using Visual Studio Code, open the sample Online Banking app folder at \Chapter03\weak-password-policy\before\OnlineBankingApp
.
Testing for a weak password policy
Follow these steps:
- Navigate to Terminal | New Terminal in the menu or simply press Ctrl + Shift + ' in Visual Studio Code.
- Type the following command in the Terminal to build and run the sample app:
dotnet run
- Open a browser and go to
http://localhost:5000/Identity/Account/Register
. - The browser will display the...