diff --git a/Docker & Kubernetes/Docker/Docker Compose/Keycloak.md b/Docker & Kubernetes/Docker/Docker Compose/Keycloak.md index 7ff25c8..d92b71a 100644 --- a/Docker & Kubernetes/Docker/Docker Compose/Keycloak.md +++ b/Docker & Kubernetes/Docker/Docker Compose/Keycloak.md @@ -118,12 +118,17 @@ http: X-Forwarded-Port: "443" ``` -## Traefik Keycloak Plugin +# Traefik Keycloak Middleware At this point, we need to add the official Keycloak plugin to Traefik's main configuration. In this example, it will be assumed you need to configure this in Portainer/Docker Compose, and not via a static yml/toml file. Assume you follow the [Docker Compose based Traefik Deployment](https://docs.bunny-lab.io/Docker%20%2526%20Kubernetes/Docker/Docker%20Compose/Traefik/). +## Install Keycloak Plugin If you do not already have the following added to the end of your `command:` section of the docker-compose.yml file in Portainer, go ahead and add it: ``` yml # Keycloak plugin configuration - "--experimental.plugins.keycloakopenid.moduleName=github.com/Gwojda/keycloakopenid" - "--experimental.plugins.keycloakopenid.version=v0.1.34" -``` \ No newline at end of file +``` + +## Add Middleware to Traefik Dynamic Configuration +You will want to ensure the following exists in the dynamically-loaded config file folder, you can name the file whatever you want, but it will be a one-all middleware for any services you want to have communicating as a specific OAuth2 `Client ID`. For example, you might want to have some services exist in a particular realm of Keycloak, or to have different client rules apply to certain services. If this is the case, you can create multiple middlewares in this single yaml file, each handling a different service / realm. +