Chapter 1: Why Identity Is Hard — The Trust Problem Behind Every Login
This is Part 1 of a chapter-by-chapter walkthrough of my book OpenID: Modern Identity for Developers and Architects. Each post in this series previews the core ideas of one chapter — enough to change the way you think about identity, while leaving the implementation details and deeper frameworks in the book itself.
I wrote this book because identity is the one system every application depends on, and yet it is the one most teams get wrong in ways they only discover after shipping. Chapter 1 is where we confront that head-on: why identity is hard, even when we have decades of standards, dozens of vendors, and an entire industry claiming to have solved it.
The problem isn't logging in. The problem is everything around it.
If you ask a junior engineer what "identity" means, you'll usually get an answer about login screens and password hashes. That answer isn't wrong, but it is the small part of the iceberg. The hard part of identity is not authentication — it is the web of assumptions, boundaries, and trust relationships that authentication sits on top of.
A login form takes thirty minutes to build. A correct identity system takes years to understand. Chapter 1 is about why.
1.1 — The Password Era and Its Long Shadow
We still live in the afterimage of the password. Even with passkeys, SSO, and federation widely available, most breaches in the last decade traced back to something password-shaped: credential stuffing, reused secrets, phished OTPs, leaked admin accounts. The password era wasn't just a technology choice — it shaped how we reason about identity: as a secret the user holds and the server verifies.
That mental model is now actively harmful. It encourages us to think of identity as a one-time check at the front door, rather than a continuous claim that a session, a token, or a device is still trustworthy ten minutes from now. Chapter 1 walks through why the password era persists, where it still leaks into modern systems (hint: your "forgot password" flow is almost certainly the weakest part of your stack), and how OpenID Connect reframes the question.
1.2 — Centralized vs. Federated Identity
Every identity architecture sits somewhere on a spectrum between two extremes. On one end: centralized identity, where one system owns every user account — simple, tightly coupled, and painful to scale beyond a single product. On the other: federated identity, where users bring credentials from an external identity provider (Google, Microsoft, Okta, Apple, your corporate IdP) and your application trusts that provider's assertion.
Neither is "better." They optimize for different things. Federation reduces the attack surface for password storage but shifts risk to token handling and redirect flows. Centralization gives you total control but makes you responsible for every password reset email and every account takeover.
Most real architectures end up as a messy hybrid, and that messiness is where the interesting bugs live. The chapter maps out how to reason about this trade-off deliberately rather than by accident.
1.3 — Authentication vs. Authorization (The Distinction That Costs Companies Millions)
This is the one section of Chapter 1 I'd happily staple to the wall of every engineering team.
Authentication answers: Who is this?
Authorization answers: What are they allowed to do?
They are different systems, with different lifecycles, different failure modes, and different blast radii when they go wrong. Conflating them — building authorization logic on top of "is the user logged in" — is how privilege-escalation bugs happen. It's also why so many teams get OAuth 2.0 and OpenID Connect backwards: OAuth is about authorization, OIDC is about authentication, and building one thinking it's the other is a persistent source of real incidents.
if user.isLoggedIn(), you don't have authorization — you have a login gate pretending to be one. The difference is invisible until the day it isn't.1.4 — Trust on the Internet
Identity protocols are trust plumbing. Every token, every assertion, every signature chain is an answer to the question: why should I believe this claim? Chapter 1 introduces the layers of trust the rest of the book depends on — TLS, signing keys, audience validation, issuer verification — not as cryptography for its own sake, but as the answer to a social problem: how two systems that have never met can safely talk about a third party (the user).
The beautiful thing about OpenID Connect is that it makes this trust model explicit. The uncomfortable thing is that getting any single piece wrong — a mis-validated iss, a skipped aud check, a lenient clock-skew window — collapses the whole chain. We start mapping that terrain in this chapter, and return to it with sharper tools in Chapter 5 and Chapter 13.
1.5 — Real-World Identity Failures
I won't spoil the specific case studies here — a few of them are well-known, a few are not, and all of them were avoidable with the mental models this book teaches. But the pattern is worth naming up front: identity failures rarely happen because someone broke the crypto. They happen because someone misunderstood a boundary.
A developer trusts a token they shouldn't have trusted. An architect reuses a flow outside its intended threat model. A vendor ships a default that makes sense for one tenant and catastrophic for another. The failures cluster not around "weak algorithms" but around misplaced trust. That's the thesis of the book in a sentence, and it's why Chapter 1 starts here.
What Chapter 1 Sets Up
By the end of the first chapter you should be convinced of three things: (1) identity is a trust problem first and a technology problem second; (2) the password era's mental model is still contaminating modern architectures; and (3) authentication and authorization are different enough that you can't afford to treat them as one system. Everything else in the book — OpenID Connect flows, token hardening, federation design, zero trust, passkeys, AI agent identity — is built on top of these three foundations.
Next up — Chapter 2: From OpenID to OpenID Connect. We trace how we got here: the original OpenID spec, the rise of OAuth 2.0, and why OIDC ended up as the standard that quietly took over the internet. If Chapter 1 explains why identity is hard, Chapter 2 explains why the industry converged on this particular answer — and where SAML, OAuth, and OIDC each still fit today.
Sho Shimoda
I share and organize what I’ve learned and experienced.カテゴリー
タグ
検索ログ
Development & Technical Consulting
Working on a new product or exploring a technical idea? We help teams with system design, architecture reviews, requirements definition, proof-of-concept development, and full implementation. Whether you need a quick technical assessment or end-to-end support, feel free to reach out.
Contact Us