Overview
A typical request: a platform team runs Keycloak on Kubernetes with PostgreSQL as the identity provider for internal applications and a message broker, several minors behind the current release. AceMQ delivers a written review and an upgrade path, scope and process, not a past result.
Challenge
Keycloak's upgrade guide says its database schema is not compatible with the old server after an upgrade and that database changes cannot be rolled back, so the only rollback is a restored backup that no one has tested. The team also cannot say what happens to token issuance for the broker when the database is slow or fails over.
Environment
Keycloak deployed with the Keycloak Operator on Kubernetes, a PostgreSQL primary with replicas, an ingress or load balancer in front and a message broker that authenticates clients with OAuth 2.0 tokens.
Approach
AceMQ reviews the topology against Keycloak's high-availability guide, the database settings and backup evidence, the Operator update approval and the token lifetimes the broker clients use. It then restores a backup to a copy, upgrades the copy through each minor on the path, reads the breaking changes for each against the team's realms, and tests token issuance and a broker connection against the result.
Solution
- Topology review against Keycloak's high-availability guide: single-cluster or multi-cluster, database replication and the load balancer
- Test restore of the database backup onto a copy, with the result recorded
- Breaking-changes list for every minor on the path from the current version to the target
- Rehearsal of the upgrade on the restored copy with the real clients and the broker pointed at it
- Token lifetime check against the broker's behavior when a token expires
- Operator update approval set to manual, and a runbook for patch releases and for minor upgrades
Outcome
The team receives a written review with ranked findings, a restore that has been proven on a copy, an upgrade path with its breaking changes and a rehearsal record, and a runbook for the next release. The team decides whether to run the upgrade itself, add 24/7 cover or move Keycloak to a managed service.