keycloak-upgrade

Upgrade Keycloak server versions with custom Identity Provider SPI compatibility checks.

5|Updated Jun 22, 2026
One-click install
npx skills add https://github.com/A158Coke/WotbTools --skill keycloak-upgrade-a158coke
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: keycloak-upgrade
Source: https://github.com/A158Coke/WotbTools/tree/main/.agents/skills/keycloak-upgrade
Command: npx skills add https://github.com/A158Coke/WotbTools --skill keycloak-upgrade-a158coke

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Upgrading Keycloak is risky when custom Identity Provider SPIs depend on internal APIs that can break across versions, and Keycloak does not support downgrades once the database is migrated. This Skill provides a structured end-to-end process covering version synchronization, official migration guide review, SPI recompilation and testing, production rollout, and rollback planning. ## Core Features & Use Cases - Version Sync Verification: A script scans the Dockerfile image tag, both provider pom keycloak.version properties, and frontend keycloak-js to detect mismatches before upgrading. - SPI Compatibility Workflow: Step-by-step guidance for recompiling and testing custom Wargaming and QQ Identity Provider SPIs against the target Keycloak version, including known high-risk internal APIs. - Edge Case Checklist: Thirteen documented edge cases covering database migration, session loss, redirect URI wildcard tightening, OpenTofu realm reconciliation, and rollback procedures. - Use Case: When bumping Keycloak from 26.6.4 to 26.7, run the version check script, review the official upgrading guide against the project, rebuild both providers with JDK 21, smoke-test all four login flows, and execute a backup-first production upgrade with a rollback plan. ## Quick Start Ask the AI to plan and execute a Keycloak upgrade to a target version, starting with the version synchronization check and custom SPI compatibility assessment.

Frequently Asked Questions about keycloak-upgrade

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I upgrade Keycloak with custom Identity Provider SPIs?

Update the keycloak.version in all provider pom files together to match the Docker image tag, then recompile and run unit tests with JDK 21. Review the target version's official upgrading guide for broker SPI changes, fix any signature changes, and smoke-test each login flow before production rollout.

How to check Keycloak version consistency across a project?

Run the check_versions.py script, which scans the Dockerfile FROM tag, both provider pom keycloak.version properties, and frontend keycloak-js entries in package.json and package-lock.json. It exits with code 1 if the server-side versions disagree or differ from an expected version argument.

Can I downgrade Keycloak after a failed upgrade?

Keycloak does not support downgrades because startup runs automatic Liquibase database migrations that old images cannot read. Rollback requires restoring a database snapshot taken before the upgrade together with the previous image tag, so always back up the database first.

Does a Keycloak minor upgrade break custom SPI providers?

Minor releases since 26.0 guarantee backward compatibility only for fully supported APIs. Providers depending on keycloak-server-spi-private or keycloak-services use internal APIs that can change in any release, so recompilation and unit testing are mandatory after every upgrade.

Why do users get logged out after a Keycloak upgrade?

Keycloak stores sessions in memory by default, so restarting the server during an upgrade clears all active sessions and forces re-login. Schedule upgrades in low-traffic windows and announce the session invalidation in advance.