Building a Keycloak Email Change Plugin
A custom Keycloak SPI plugin lets external systems learn about user email changes, which Keycloak doesn't natively notify on. It adds a RealmResourceProvider REST endpoint (update-user-email) that authorizes the caller, mints an action token and sends a confirmation email to the new address. A custom action token handler, adapted from UpdateEmailActionTokenHandler, then validates and applies the change, marks the email verified, clears pending email actions and optionally logs out other sessions. It also unlinks all federated social identities, since they were tied to the old email, and calls the backend to sync external data. Deployment needs a META-INF/services registration file and the plugin jar on the Keycloak instance.
Related posts
- Auth setup with Neon, Keycloak and Koyeb
Neon mediumAdept
Keycloak can use Neon serverless Postgres as its backing store, with the Keycloak server deployed as a container on Koyeb. The steps are: create a dedicated keycloak database and a scoped keycloak_admin role, then deploy Keycloak from a Koyeb template configured through KC_DB_URL, KC_DB_USERNAME, KC_DB_PASSWORD and KC_HOSTNAME. After that, import a sample realm and authenticate a Next.js app through NextAuth.js over OAuth. For production, build an optimized Keycloak image, configure connection pooling, and consider Neon branching and point-in-time restore for recovering Keycloak data.
- Managed Better Auth is now an OAuth provider, with MCP support
Neon mediumAdept
Neon's Managed Better Auth now supports the OAuth Provider plugin, turning an auth instance into an OAuth 2.1 authorization server that both companion apps and MCP clients can use to sign users in. Neon runs the discovery endpoints, JWKS, token issuance and refresh, and client onboarding via Client ID Metadata Documents or optional dynamic registration. You host the login and consent pages and the resource server, where the new @neon/oauth SDK checks token signature, issuer and audience, with adapters for Express, Hono, Next.js and node:http. OAuth configuration is per branch, and each branch gets its own issuer while sharing signing keys, so preview-branch tokens are rejected by production verifiers that pin the issuer.
- Enterprise-managed auth for MCP: Claude can now issue the identity assertion
Supabase mediumAdeptClaude can now act as the issuer of the signed ID-JAG (Identity Assertion JWT Authorization Grant) for the Supabase MCP server, enabling enterprise-managed authorization for organizations whose identity provider doesn't support the MCP Enterprise-Managed Authorization extension (previously effectively only Okta). Claude verifies Claude-org membership and account email before signing, and Supabase checks the signature against the registered issuer, a matching SSO identity, and admin approval before minting a short-lived member-bound access token. The tradeoffs are significant: Claude does not check IdP sign-in or MFA, disabling a user in the IdP no longer revokes access (remove them from both Supabase and Claude orgs), and registering Claude's issuer URL replaces the IdP's, breaking managed auth for other AI tools relying on it.
- Security Disclosure Recommendation: Redeploy Buckets and Reconnect GitHub After the Credential Reset
Railway mediumAdeptAfter a security disclosure, Railway invalidated and regenerated S3 access keys for every storage bucket and removed the GitHub tokens it held, including GHCR registry tokens stored on services. These resets show in the audit log under the Railway Staff actor type. Services pick up new bucket credentials only on redeploy because containers read variables at startup, so each service using a bucket needs a redeploy. Any pasted key values should be replaced with reference variables, and external tools need updating. Users must also reconnect their GitHub account and repo sources, revoke and recreate GHCR personal access tokens with read:packages, then check bucket files and audit logs for misuse during the exposure window.
- JSON Web Keys (JWK): Rotating Cryptographic Keys at Zalando
Zalando Engineering mediumAdeptZalando's OIDC identity provider rotates its JWT signing keys automatically on a schedule, using a phased process so clients are never disrupted. A new key pair is generated and its public key is published on the JWK endpoint, with a grace period so clients can refresh cached key sets. The new key is then promoted to active signer, while the retired key stays published until every token it signed has expired. Removal time is computed as retirement time plus maximum token lifetime plus a safety margin, using the key ID embedded in each JWT.