Summary
In this chapter, we explored various ways to secure microservices in the Micronaut framework. We began our journey by diving into a session authentication strategy, and then we explored token-based authentication using an external Keycloak identity server. Lastly, we worked on securing a microservice using OAuth with a cloud-based identity provider. Furthermore, we also worked on enabling SSL to make service communication secure over HTTPS.
This chapter provided you with a handy, focused skillset in safeguarding a microservice in the Micronaut framework using various authentication strategies, along with how to work with local or external (cloud) identity providers.
In the next chapter, we will explore how we can integrate different microservices using event-driven architecture.