2 Managing Infrastructure Components With Containers and Integrations
This chapter covers
- The fundamentals of Docker containers.
- Integrating a Keycloak Docker container with .NET Aspire to enable SSO security.
- Understanding .NET Aspire integrations and their benefits over raw Docker containers.
- Adding a pre-built .NET Aspire integration for Redis to an application.
- Building a custom .NET Aspire integration library from scratch.
In a real-life enterprise-grade application, services need to be connected to various infrastructure components, such as databases, message brokers, etc.. In this chapter, we will discuss two ways infrastructure components can be wired up in a .NET Aspire application:
- By using Docker containers
- Via the .NET Aspire integration libraries
Most enterprise-grade systems require security, and the e-commerce application we are building is no exception. In fact, security is very important in these kinds of applications. You absolutely don’t want anyone to steal your credit card data or make purchases on your behalf! This is why, in this chapter, we will focus on security and build a system that will allow our users to be able to register, log in, and gain the necessary permissions to access appropriate areas of our app.