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.
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.
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.
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 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.
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:
Direction
Initiation
Example
SP-initiated
The user opens the application first, then is redirected to the IdP
Opening an internal portal, then being redirected to the SSO login page
IdP-initiated
The user logs in at the IdP first, then selects an application
Logging in at the SSO dashboard, then choosing an application
You'll encounter both patterns frequently when configuring Keycloak and integrating applications.
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.
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.
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.