In order to secure our Petstore application, we will use Keycloak. Keycloak is an open source, single sign-on (SSO) identity management server, which supports, among others, OIDC-based security.
Keycloak is equipped with a convenient, web-based UI, which enables us to configure all aspect of its behavior using the graphical interface. Furthermore, services that we will write have to be integrated with Keycloak as well. In order to make this integration easy, Keycloak provides a bunch of adapters, which are components that can be installed into any given type of service. In the following example, we will discuss how to use both of those tools.
Before we start, let's outline the functionality that we will be adding to the pet store application.