Containerized Keycloak in Development
How to set up an OpenID Connect compliant development environment with Docker?
Introduction
If are working in a SaaS business, you are likely to have some form of identity provider (IDP). Among other things, an IDP typically takes care of authenticating users from possibly multiple tenants and keeps track of roles that may be assigned to users.
Keycloak offers an OpenID Connect (OIDC) compliant implementation of an IDP. Being available as a docker image is another plus. As I will not cover Keycloak details here, please check out their site at https://www.keycloak.org/
In this article I will demonstrate how to set up a containerized development environment with Keycloak as a dependency. Most of the content will be about Docker configuration. In a future article I will provide a running example of how to make use of this development environment.
As always, all source code for this article is available under the MIT license at: https://github.com/RimuTec/keycloak-in-local-dev-2023
Prerequisites
The easiest path to replicating the code in this article is to install the following prerequisites:
- VS Code