chapter eight

8 Application security in Aspire

 

This chapter covers

  • Understanding the fundamentals of application security
  • Getting an overview of single sign-on
  • Implementing OpenID Connect authentication in Aspire
  • Using OAuth authorization in Aspire
  • Securing the Aspire dashboard

We briefly viewed application security in chapter 2 by adding a Keycloak container to an Aspire instance. In this chapter, we’ll delve deeper into application security concepts. We’ll enforce authentication and authorization end to end so that they apply when the user interacts with the UI and when the frontend interacts with the backend API.

If you publish a web application and make it publicly accessible, you’ll want to make sure that only authorized users can access it—unless, of course, your application is a trivial website. Applications orchestrated by Aspire are no exceptions. Because Aspire is a platform for building complex distributed applications, chances are that you aren’t using it to build trivial websites. Therefore, knowing how to secure your orchestrated application is a must.

8.1 A brief introduction to single sign-on

8.2 Using service discovery in SSO

8.3 Enforcing UI authentication

8.3.1 Partially enforcing security

8.4 Enforcing API authentication

8.4.1 Passing a JWT to the API

8.5 Securing the Aspire dashboard

Summary