Skip to main content
GR Patil
Phase Two

GR is the co-founder and CEO of Phase Two, and has been working on Keycloak for 10+ years, and running Phase Two for the past 6. A technology entrepreneur for 30 years, he was a founder at BrightRoll (sold to Yahoo! for $640M), an early engineer at Twitter, and founded or led several successful early-stage startups.

View all authors

How We Scaled Keycloak Event Storage with Logs, S3, and ClickHouse

· 12 min read
GR Patil
Phase Two

Every login, logout, failed password attempt, and admin change in Keycloak produces an event. That's exactly what you want for security auditing and product analytics — until you realize where Keycloak puts them: in the same relational database that your authentication path depends on. At scale, event storage becomes a problem you can't ignore. Here's how we solved it, and how the key piece — an MDC-logging EventStoreProvider — is open source so you can solve it too.

Introducing the Starter Cluster Tier — Phase Two Keycloak from $149/month

· 5 min read
GR Patil
Phase Two

Today we're launching a new way to run Phase Two: the Starter cluster tier, available at $149 per month. Starter bundles the same feature set as our existing dedicated clusters into a plan that's accessible for teams getting their use case off the ground or running development environments with lower SLA needs. It also includes a 30-day free trial, so you can validate your setup before committing.

Log into the dashboard and click Create Cluster to pick the new tier and provision yours.

Migrating from WorkOS to Keycloak: A Practical Walkthrough

· 10 min read
GR Patil
Phase Two

A few quarters ago you got handed a single-line ask: "we need enterprise SSO and directory sync by the end of the quarter." Maybe the deal was a Fortune-500 logo. Maybe it was a Series B requirement. Either way you found WorkOS, wired in their SDK in a long weekend, shipped the deal, and got the high five.

Then the renewal came in. The seat-based pricing, that sounded harmless when you had two customers using SSO, looks different when you have forty. Suddenly there's a line item on a board slide that scales linearly with your enterprise revenue — a parasite that eats into the very margin that the enterprise tier was supposed to fund. The CFO walks over and asks you to "fix it."

Here is the awkward truth nobody tells the engineer-on-the-spot: the WorkOS feature set has had a fully open-source equivalent for years. Keycloak handles SSO. Phase Two's organizations extension handles multi-tenant orgs. The identity provider wizard handles the same admin-portal flow your customers see in WorkOS today. The catch is that nobody wanted to spend the runway to migrate.

We've now built the tool that turns that "we'll deal with it later" debt into an afternoon of work. Why? Because WorkOS customers are starting to wake up to Keycloak, and they're coming to us in droves.

Experimental SCIM 2.0 provisioning for Organizations

· 5 min read
GR Patil
Phase Two

We're shipping experimental SCIM 2.0 provisioning for the Phase Two Organizations extension. Each organization in a realm can now act as its own SCIM 2.0 service provider, so an upstream IdP like Okta or Entra ID can push users into a specific tenant rather than into the realm as a whole.

This is the piece of the multi-tenant story that Keycloak's stock SCIM support doesn't address today, and it's been a heavily requested item from customers running Organizations in production.

Instant MCP authorization using Keycloak

· 11 min read
GR Patil
Phase Two

If you are exposing tools over MCP, you usually do not want every client on the network calling them anonymously. Even for a local prototype, you typically want a real login flow, consent, scoped access tokens, and a clean way to validate who is allowed to run what.

Keycloak is the easiest way to do that without inventing your own authorization layer. It already handles browser login, consent, token issuance, JWKS discovery, and OAuth metadata. Your MCP server just needs to behave like a protected resource and validate bearer tokens correctly.

In this guide, we will build a tiny calculator MCP server in Python, protect it with Keycloak, and connect to it from VS Code using Dynamic Client Registration (DCR). By the end, VS Code will open a browser to Keycloak, you will sign in, approve access to the mcp:run scope, and then call your MCP tools directly from chat.

Auth.it featured on Keycloak Friday Chat

· One min read
GR Patil
Phase Two

Phase Two has recently launched Auth.it, a modern authentication platform built for developers who want the power of Keycloak with the simplicity, polish, and developer experience of modern identity providers like WorkOS, Stytch, and Clerk — all at a fraction of the cost.

Last Friday, Niko Köbler (aka "Mr. Keycloak"), invited us to demonstrate Auth.it and explain how we built it on his livestream, Keycloak Friday Chat. If you're interested in an overview of the new platform, and would like to know the details of how it was implemented as a set of Keycloak extensions, please watch the recording of the livestream.

Why your startup should use Keycloak for SSO and User Management - Part 3: Customization

· 5 min read
GR Patil
Phase Two
note

In this series we are proposing Keycloak as a superior alternative to commercial identity offerings.

Part 3: Customizability for Tailored Solutions: Why Keycloak Stands Out

One size rarely fits all, especially in the world of enterprise software. Startups require flexibility to adapt and tailor IAM solutions to their unique business requirements. Keycloak shines in this aspect, offering extensive customization capabilities that empower startups to mold the platform according to their specific needs.

From branding and user interface customization to advanced authentication flows and authorization policies, Keycloak provides a comprehensive toolkit for startups to craft seamless and secure user experiences. Whether integrating with existing systems or building entirely new functionalities, Keycloak's flexibility ensures a perfect fit for any enterprise SaaS startup. Here’s how Keycloak’s flexibility stands apart from commercial, closed-source solutions, and why this is a key differentiator:

Why your startup should use Keycloak for SSO and User Management - Part 2: Data

· 4 min read
GR Patil
Phase Two
note

In this series we are proposing Keycloak as a superior alternative to commercial identity offerings.

Part 2 - Owning Your Data: Security, Privacy, and Control

In the age of data breaches and privacy concerns, owning and controlling your user data is not just a preference but a strategic imperative for organizations, particularly when it comes to Identity and Access Management (IAM) solutions. Let's explore the reasons why owning your data matters and the risks associated with entrusting it to a Software-as-a-Service (SaaS) solution.

Why your startup should use Keycloak for SSO and User Management - Part 1: Standards

· 4 min read
GR Patil
Phase Two
note

In this series we are proposing Keycloak as a superior alternative to commercial identity offerings.

Part 1: Standardized Protocols and Minimal Feature Set Differentiation

In the realm of Identity and Access Management (IAM) solutions, it's essential to recognize that many offerings, both commercial and open source, operate on standardized protocols such as OpenID Connect (OIDC), Security Assertion Markup Language (SAML), System for Cross-domain Identity Management (SCIM), Lightweight Directory Access Protocol (LDAP), and more. This adherence to standardized protocols often results in minimal differentiation at the feature set level across various options. Let's delve into this further:

Why your startup should use Keycloak for SSO and User Management

· 2 min read
GR Patil
Phase Two

In the ever-evolving landscape of Enterprise SaaS, navigating the complexities of identity and access management (IAM) can be a daunting task. As a startup striving for excellence in user experience and security, choosing the right IAM solution is paramount. Enter Keycloak, a powerful open-source IAM tool that not only meets but exceeds the demands of modern startups.