Description
- As title, the KeyCloak 23.x version is outdated and it should upgrade to the latest version.
- Upgrading KeyCloak version steps are as follows:
- Modifiying the
docker-compose-http.yml file. The reference is as follows:
services:
keycloak:
image: quay.io/keycloak/keycloak:26.3.2 # Use the desired Keycloak 26 version
container_name: keycloak
ports:
- "8080:8080" # Map Keycloak's default port
environment:
KC_DB: postgres
KC_DB_URL_HOST: postgres_db
KC_DB_URL_DATABASE: keycloak
KC_DB_USERNAME: keycloak
KC_DB_PASSWORD: password
KC_HOSTNAME: nifi.peterli.website # Adjust as needed for your environment
KC_HOSTNAME_STRICT: "false" # Set to "true" for production with proper hostname
KC_PROXY_HEADERS: "xforwarded" # Important if behind a reverse proxy
KC_HTTP_ENABLED: "false" # Enable HTTP for development, use HTTPS in production
KC_BOOTSTRAP_ADMIN_USERNAME: admin
KC_BOOTSTRAP_ADMIN_PASSWORD: admin
command: start-dev # Use 'start' for production
volumes:
- ./keycloak_data:/opt/keycloak/data
depends_on:
- postgres_db
networks:
- keycloak-net
postgres_db:
image: postgres:16 # Use a compatible PostgreSQL version
container_name: postgres_db
environment:
POSTGRES_DB: keycloak
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: password
volumes:
- ./postgres_data:/var/lib/postgresql/data
networks:
- keycloak-net
networks:
keycloak-net:
driver: bridge
- Modifying the https://github.com/peter279k/fmsa/blob/master/api_gateway/app/modules.py#L28 file and change the logic of
KeyCloakAdmin class.
- Supporting the password and client_credentials grant types
- Adding or modifying the
admin_login method.
- Adding or modifying the
create_realm method.
- Adding or modifying the
create_client method.
- Adding or modifying the
create_user method.
- Don't forget adding some unit tests for this issue.
Description
docker-compose-http.ymlfile. The reference is as follows:KeyCloakAdminclass.admin_loginmethod.create_realmmethod.create_clientmethod.create_usermethod.