daniel-frak / keycloak-user-migration

A Keycloak plugin for migrating users from legacy systems
MIT License
301 stars 135 forks source link

migration via rest doesnt show up in user federation #158

Closed warioishere closed 5 months ago

warioishere commented 6 months ago

Hello people,

I am trying to integrate this plugin in my current keycloak installation. But I cant get it to work and the migration via rest doesnt show up in the tab user federation.

This is my current docker dompose-compose.yml:

root@ldap-server:~/keycloak-docker-compose# cat docker-compose.yml
version: '3.9'

volumes:
  mariadb_data:
    driver: local

networks:
  local:
    ipam:
      config:
        - subnet: ${SUBNET:-172.16.0.0/29}

services:
  mariadb:
    image: mariadb:${MARIADB_VERSION:-latest}
    environment:
      MARIADB_ROOT_PASSWORD: ${MARIADB_ROOT_PASSWORD:-xyz}
      MARIADB_DATABASE: keycloak
      MARIADB_USER: keycloak
      MARIADB_PASSWORD: ${MARIADB_KEYCLOAK_PASSWORD:-xyz}
    mem_limit: 300m
    mem_reservation: 200m
    container_name: mariadb
    volumes:
      - mariadb_data:/var/lib/mysql
    restart: always
    networks:
      - local

  keycloak:
    image: quay.io/keycloak/keycloak:${KEYCLOAK_VERSION:-latest}
    environment:
      KC_DB: mariadb
      KC_DB_SCHEMA: keycloak
      KC_DB_USERNAME: keycloak
      KC_DB_PASSWORD: ${MARIADB_KEYCLOAK_PASSWORD:-xyz}
      KC_DB_URL_HOST: mariadb
      KEYCLOAK_ADMIN: xyz
      KEYCLOAK_ADMIN_PASSWORD: xyz
      KC_PROXY: edge
      KC_HOSTNAME_STRICT: false
      KC_HOSTNAME_URL: https://${KEYCLOAK_DOMAIN}
    mem_limit: 500m
    mem_reservation: 400m
    command: start
    container_name: keycloak
    volumes:
      - ./keycloak/themes:/opt/keycloak/themes
      - ./keycloak-rest-provider-4.0.0.jar:/opt/jboss/keycloak/standalone/deployments/keycloak-rest-provider-4.0.0.jar
    restart: always
    networks:
      - local
    depends_on:
      - mariadb

  nginx:
    image: nginx:${NGINX_VERSION:-latest}
    environment:
      KEYCLOAK_DOMAIN: ${KEYCLOAK_DOMAIN}
    mem_limit: 50m
    mem_reservation: 20m
    container_name: nginx
    volumes:
      - ./nginx/templates:/etc/nginx/templates
      - ./certbot/conf:/etc/letsencrypt
      - ./certbot/www:/var/www/certbot
    ports:
      - "80:80"
      - "443:443"
    restart: always
    networks:
      - local

  certbot:
    image: certbot/certbot:${CERTBOT_VERSION:-latest}
    environment:
      CERTBOT_LETSENCRYPT_EMAIL: ${CERTBOT_LETSENCRYPT_EMAIL}
      KEYCLOAK_DOMAIN: ${KEYCLOAK_DOMAIN}
    mem_limit: 20m
    mem_reservation: 10m
    container_name: certbot
    volumes:
      - ./certbot/conf:/etc/letsencrypt
      - ./certbot/www:/var/www/certbot
    command: certonly --non-interactive --webroot -w /var/www/certbot --email ${CERTBOT_LETSENCRYPT_EMAIL} -d ${KEYCLOAK_DOMAIN} --agree-tos
    depends_on:
      - nginx

the docker logs doesnt show up any logs that the plugin is loaded.

the container has the jar file mounted:

bash-5.1# pwd
/opt/jboss/keycloak/standalone/deployments
bash-5.1# ls
keycloak-rest-provider-4.0.0.jar
bash-5.1# 

I tried to manually write a keycloak-rest-provider-4.0.0.jar.dodeploy file but it still doesnt work.

My keycloak still looks like this:

grafik

Additional Info:

Keycloak Server info:

Version 24.0.4

do you guys know what i am doing wrong?

warioishere commented 6 months ago

i build the plugin again with ./mvnw clean package and moved it into the container.

It still doesnt work. No List, no rest migration can be chosen

warioishere commented 5 months ago

the jar files should now be in /opt/keycloak/providers after I did the changes, it worked:

grafik