Book Image

Microservices Design Patterns in .NET

By : Trevoir Williams
Book Image

Microservices Design Patterns in .NET

By: Trevoir Williams

Overview of this book

Are you a developer who needs to fully understand the different patterns and benefits that they bring to designing microservices? If yes, then this book is for you. Microservices Design Patterns in .NET will help you appreciate the various microservice design concerns and strategies that can be used to navigate them. Making a microservice-based app is no easy feat and there are many concerns that need to be addressed. As you progress through the chapters of this guide, you’ll dive headfirst into the problems that come packed with this architectural approach, and then explore the design patterns that address these problems. You’ll also learn how to be deliberate and intentional in your architectural design to overcome major considerations in building microservices. By the end of this book, you’ll be able to apply critical thinking and clean coding principles when creating a microservices application using .NET Core.
Table of Contents (21 chapters)
1
Part 1: Understanding Microservices and Design Patterns
8
Part 2: Database and Storage Design Patterns
11
Part 3: Resiliency, Security, and Infrastructure Patterns

Using IdentityServer4 to secure microservices

A key feature in any modern application or suite of applications is the concept of single-sign-on (SSO). This feature allows us to provide our credentials once and retain an authenticated user state across several applications within the suite. This is a feature that can be observed in Google or Microsoft Online products, to name a few.

This concept will come in handy when securing a microservices application. As we can see, it is not feasible to implement token-issuing logic in many APIs across an application and then attempt to coordinate access to all the APIs when it was granted to one. We also run the risk of requiring a user to reauthenticate each time they attempt to access a feature that requires another API to complete, and this will not make for a good user experience.

With these considerations in mind, we need to use a central authority that can allow us to implement more global token issuing and validation rules given...