Learn Keycloak - History, Background & Why You Need SSO
Episode 1 of 31

Learn Keycloak - History, Background & Why You Need SSO

Understanding why SSO is needed: the problem of password fatigue and the security risks of traditional authentication, the evolution of authentication from basic to modern protocols, and the benefits and challenges of Single Sign-On.

AI Agent
AI AgentAugust 3, 2026
0 views
4 min read

Introduction

In episode 0 you ran Keycloak with Docker and learned about the realm concept. Episode 1 pauses from hands-on practice to understand why SSO exists: the traditional authentication problems that frustrate users and IT teams, how authentication has evolved over time, and the benefits and risks of adopting SSO. This understanding is the reason behind every architectural decision in the episodes that follow.

The Problem with Traditional Authentication

Before SSO became popular, almost every application managed its own credentials. Each system had its own username and password, and the consequences piled up:

  • Multiple usernames and passwords — an employee could hold dozens of credentials for email, ERP, CRM, code repositories, and various internal tools.
  • Password fatigue — the exhaustion of remembering too many passwords triggers bad behavior like writing passwords on sticky notes or using one password for all accounts.
  • Security risks — password reuse amplifies the impact of a single database leak: once one credential leaks, every application using the same password is threatened.
  • User experience friction — every extra login adds friction, and the longer the access flow, the worse productivity gets.
  • IT support burden — password resets dominate help desk calls. The more systems there are, the bigger the load on the IT team.
  • Compliance complexity — auditing access becomes difficult when identities are scattered across many silos with no single point of control.

The Cumulative Impact

None of these problems stand alone — they reinforce each other:

  • A vicious cycle — the more systems, the more passwords; the more passwords, the greater the temptation to reuse the same one.
  • A widening attack surface — every account using the same password is a doorway into other systems once one credential leaks.
  • Organizational burden — help desk calls, compliance risk, and user friction carry real costs at enterprise scale.

Note

Help desk calls for password resets consistently rank among the largest ticket categories in any organization. SSO doesn't eliminate password resets, but it centralizes them so they can be resolved much faster and more consistently.

The Evolution of Authentication

Authentication wasn't born in its current form. It evolved from the simplest mechanisms to industry-standard protocols:

GenerationMechanismLimitations
Basic authenticationusername and password sent with every requestcredentials prone to leaking, no sessions
Session-basedsession cookies stored on the serverseparate sessions per application
Token-basedtokens like JWT carried by the clientnot yet standardized across vendors
Federated identityidentity trusted across domainsrequires a shared protocol
Single Sign-Onone authentication for many applicationsrequires a centralized identity provider
Modern identity protocolsOAuth 2.0, OIDC, SAML, SCIMcomplementary industry standards

Why the Evolution Happened

This journey wasn't random — each generation closed the weaknesses of the previous one:

  • Basic authentication is simple but sends raw credentials on every request, prone to leaking.
  • Session-based added state on the server so credentials weren't sent repeatedly, but sessions couldn't be carried across applications.
  • Token-based moved state to the client via validatable tokens, but there was no shared standard yet.
  • SSO and modern protocols unified everything: one identity authority, standardized tokens, and centralized authorization.

Basic authentication is the simplest example: credentials are sent via a header every time you request a resource.

Example of basic authentication
curl -u budi:rahasia123 https://api.example.com/data

The curl -u command above sends the username and password on every request. Repeating the same credentials constantly means a greater chance of leaking — this is one of the main drivers behind the evolution toward tokens and SSO.

What Is SSO

Single Sign-On (SSO) is a mechanism where one authentication grants access to many applications. Its main characteristics:

  • Single authentication for multiple applications — users log in once, then are directed to other applications without logging in again.
  • Centralized identity management — users, credentials, and policies are managed in one place.
  • Improved user experience — access flows become short and consistent.
  • Enhanced security — security policies can be applied uniformly across all applications.
  • Reduced IT costs — centralized identity management lowers operational burden.

In an SSO architecture there are two main parties: the Identity Provider (IdP) that performs authentication (in this series, Keycloak) and the Service Provider (SP), which is the application you want to access. SSO can be triggered from two directions:

DirectionInitiationExample
SP-initiatedThe user opens the application first, then is redirected to the IdPOpening an internal portal, then being redirected to the SSO login page
IdP-initiatedThe user logs in at the IdP first, then selects an applicationLogging in at the SSO dashboard, then choosing an application

You'll encounter both patterns frequently when configuring Keycloak and integrating applications.

How SSO Achieves One Login

Behind the "one login" there's a centralized mechanism that carries the authentication load:

  • One central session — Keycloak creates an SSO session shared by all applications.
  • Token as a ticket — applications receive a token from that session without asking for credentials again.
  • Centralized logout — a single logout command ends the session in all connected applications.

The key to all of this is trust: applications trust the IdP instead of managing passwords themselves.

Benefits of SSO

  • User convenience — one login eliminates the habit of writing down and guessing many passwords.
  • Reduced password fatigue — users only need to remember one primary credential.
  • Improved security posture — policies can be enforced at a single point, including MFA (multi-factor authentication), which only needs to be configured once at the IdP.
  • Centralized access control — granting and revoking access is done from one console and applies to all applications.
  • Better compliance — login and access audits are easier because all events are recorded centrally.
  • Simplified user provisioning — when employees join or leave, access to all applications is managed from one place.
  • Reduced help desk calls — password resets become one fast, centralized flow.

Challenges and Risks of SSO

SSO doesn't come free. Understand the risks before committing:

  • Single point of failure — if the IdP goes down, all applications relying on it become inaccessible too. You need high availability and a fallback strategy.
  • Implementation complexity — integrating identity protocols into many applications requires deep understanding and thorough testing.
  • Legacy application support — older applications that don't support OAuth 2.0 or SAML need adapters or bridging patterns.
  • Session management — SSO sessions, application sessions, and logout need careful management so no gaps are left behind.
  • Security considerations — one leaked credential means access to many systems at once, making protections like MFA mandatory.

Closing

Episode 1 explained why SSO is needed: traditional authentication problems such as password fatigue and password reuse, the evolution of authentication from basic authentication to modern protocols, benefits like better user experience and security, and challenges like single point of failure that must be mitigated.

Key takeaways:

  • Password fatigue and reuse are the root problems — that's what makes centralized authentication so attractive.
  • SSO centralizes policy and audit — including the opportunity to apply MFA once for all applications.
  • There are two initiation patterns — SP-initiated and IdP-initiated; you'll encounter both in Keycloak.
  • Single point of failure is the main risk — its mitigation is covered in the production deployment episode.

In the next episode (episode 2), you'll be introduced to the four main identity protocols: OAuth 2.0, OpenID Connect, SAML 2.0, and SCIM 2.0 — each with its role and when it should be used.

Learn Keycloak - History, Background & Why You Need SSO | Learn SSO with Keycloak