Security and Identity in ASP.NET Core
In Chapter 7, we discussed some more advanced topics of EF Core, such as DbContext
pooling, performance optimization, and concurrency control. At this point, you should have the skills to create a web API application that accesses the database using EF Core. However, the application is not secure. Without any authentication, anyone who knows the URL can access the API, potentially exposing sensitive data to the public. To ensure the security of the web API application, we must take additional steps.
Security is a broad topic, and it is a crucial aspect of any application. In this chapter, we will explore some of the security features that ASP.NET Core provides, including authentication, authorization, and some best practices for securing your web API application. We will cover the following topics:
- Getting started with authentication and authorization
- Delving deeper into authorization
- Managing users and roles
- New Identity...