Simple proxy pour valider l'accès d'un service via Keycloak https://github.com/oneconcern/keycloak-gatekeeper
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Grégory Lebreton 78f534f5ae maj typos 7 months ago
docs ajout illustrations config 7 months ago
keycloak-gatekeeper@41596cbaf6 push, missing gatekeeper config + KC illust 10 months ago
.gitmodules push, missing gatekeeper config + KC illust 10 months ago
README.md maj typos 7 months ago
docker-compose.yml ajout illustrations config 7 months ago
gatekeeper-config.yml push, missing gatekeeper config + KC illust 10 months ago

README.md

KEYCLOAK GATEKEEPER

Proxy pour service redirigeant vers Keycloak pour authentification

PRE REQUIS 📎

  • Docker / docker compose 🐳
  • Instance Keycloak

CONFIGURATION 🔧

GATEKEEPER

Config file (TO DO):

  • Renseigner gatekeeper-config.yml:
# TO DO

DOCKER COMPOSE

  • Renseigner les champs suivants:
      - "--discovery-url=https://<MON_KEYCLOAK>/auth/realms/<MON_REALM>/.well-known/openid-configuration"
      - "--client-id=<CLIENT_ID>"
      - "--client-secret=<CLIENT_SECRET>"
      # le port écouté doit être le même que celui mappé sur l'hôte
      - "--listen=0.0.0.0:8880"
      - "--upstream-url=http://<MON_SERVICE>:<PORT>"

⚠️ Le port renseigné dans "--upstream-url=http://<MON_SERVICE>:" doit correspondre au port exposé par le conteneur.

💀 Les port mappés pour le service gatekeeper doivent être les mêmes et doivent correspondre avec celui renseigné au niveau de "--listen=0.0.0.0:8880"

KEYCLOAK 🔑

  • Créer un client:

keycloak illustration

keycloak illustration

Le client secret se trouve dans l'inglet "credentials"

  • Créer une audience:

keycloak illustration 2

keycloak illustration

UTILISATION 🚀

  • Cloner le projet:
git clone --submodules https://git.legaragenumerique.fr/GARAGENUM/keycloak-gatekeeper
cd keycloak-gatekeeper
  • Lancer les conteneurs:
docker compose up -d

TO DO 📑

  • Injecter gatekeeper-config.yml via volumes
  • Keycloak client config illustrations
  • Illustration workflow