12 Securing web applications with ASP.NET Core Identity

 

This chapter covers

  • Using ASP.NET Core Identity for authentication and authorization
  • Using scaffolding to tweak the ASP.NET Core Identity UI
  • Configuring password options
  • Implementing two-factor authentication
  • Allowing users to log into an application with a third-party account

At the end of 2011, Microsoft released the MS11-100 security advisory (which basically means number 100 in 2011, which is quite a lot, actually). The title of the document, available at http://mng.bz/pOXK, sounds pretty dramatic: “Vulnerabilities in .NET Framework Could Allow Elevation of Privilege.” And, indeed, it was dramatic. In early October of that year, security researchers found a security vulnerability in the built-in ASP.NET user management features. Basically, it was possible to log into an application as an arbitrary user.

The security researchers’ writeup (http://mng.bz/44RR) is an interesting read. According to their description of events, six weeks after reporting the vulnerability, they asked Microsoft for a status update; according to the case manager, an update was expected in February or March, so 4 to 6 months after reporting the issue.

12.1 ASP.NET Core Identity setup

12.2 ASP.NET Core Identity fundamentals

12.3 Advanced ASP.NET Core Identity features

12.3.1 Password options

12.3.2 Cookie options

12.3.3 Locking out users

12.3.4 Working with claims

12.3.5 Two-factor authentication

12.3.6 Authenticating with external providers

Summary