CIAM 101: Authentication, Identity, SSO

Background
I began the build Logto because I noticed that Identity and Access Management (IAM) had become increasingly complex and expansive over time. The concept of IAM is even large enough to give rise to new concepts, such as WIAM (Workforce IAM) and CIAM (Customer IAM).
While WIAM and CIAM share the same foundation, they have distinct use cases: WIAM is typically used for internal users, while CIAM is used for external customers. Some examples:
- WIAM Your company has a unified identity system for employees, thus every one can use the same account to access company resources, such as software subscriptions, cloud computing services, etc.
- CIAM Your online bookstore requires a user identity system for customers and sellers. The sign-in experience is a critical part of onboarding, as it is located at the top of the conversion funnel.
Logto started with the CIAM for various reasons (we’ll have another article talking about this). During development, we realized that building a unified understanding across the team would be beneficial before taking our product to the next level. We hope this will also help you gain a better grasp of the IAM landscape.
Let’s get started!
The basics of CIAM
Regardless of their differences, WIAM and CIAM both have the same foundation: authentication and authorization. These two concepts are at the core of their features.
In this article, we'll focus on the fundamental concepts of CIAM and problems we may meet during or after the authentication flow. We’ll also discuss Single Sign-On (SSO) and its related scenarios.
Authentication and authorization
- Authentication (AuthN) answers the question “Which identity do you own?”
- Authorization (AuthZ) answers the question “What can you do?”
💡 Authentication is initially defined as "Who are you?". However, when discussing digital identities, it is more accurate to demonstrate authentication by "proving ownership of identity". (Credit to Calm-Card-2424)
If you discover something that does not fit into either of these two categories, it is likely not essential to the identity business.
- Examples for authentication
- Password sign-in, passwordless sign-in, social sign-in, etc.
- Machine-to-Machine authentication
- Examples for authorization
- Role-based Access Control
- Attribute-based Access Control
- Examples for exceptions
- Non-identity data
- Web hooks
Identity and Tenant
Identity typically represents either a user or a machine. Upon successful authentication, an ID Token is issued as an Identity.
In other words, the main purpose of authentication is to obtain an Identity.
A Tenant is a group of identities:
When we discuss "Multi-tenant", we are referring to multiple Logto instances that are identity-isolated from one another. In other words, multiple Logto instances.
Note it has two isolated identity systems, i.e. you cannot use the Identity of Tenant 1 in Tenant 2, even for the same identifier (email, phone, etc.). It's like your Costco membership not being valid at Whole Foods.
The definition of "Tenant" varies across CIAM products. Some refer to the term "Organization" in Logto, which will be introduced later.
App and Tenant
Just like Identity, an App also belongs to a Tenant. Several things to remember:
- There is typically no direct relationship between an App and an Identity.
- An Identity can represent an App, but there is no direct connection between them.
- Like users, apps are also Tenant-level.
- Apps are code, while users are human.
- The sole purpose of Apps are to complete authentication, i.e. to obtain an Identity.
Identity Provider (IdP) and Service Provider (SP)
The difference between these two providers is tricky but important.
- Identity Provider is a service that provides authentication (AuthN) and issues identities.
You can find various explanations about Service Provider from Google, though they may not be satisfactory. In my mind, Service Provider is a relative concept:
- Service Provider (or Relying Party in OIDC) is a service or client that initiates authentication (AuthN) and requests the result from Identity Providers.
Quiz
Consider a typical social sign-in scenario:
❓ How many Service Providers and Identity Providers in this graph?
Answer
Both have two. iOS App is a service provider to Logto, while Logto is an identity provider. Logto is
also a service provider to GitHub, while GitHub is an identity provider. Thus, Logto is a Service Provider
also a Identity Provider.
Case study: A tech solution company
You are a CTO of a tech solution company, you have over 100 business partners and you have delivered over 300 projects.
- Each project is either a web app or a mobile app with a backend service.
- For each business partner, you want to refactor the user system to provide SSO across its projects.
❓ How can Logto (or a CIAM product) help?
Answer
Create a Logto instance for each business partner. Each partner holds a Tenant. Projects are mapped to "Apps" in Logto.
Logto offers a universal sign-in experience (i.e. SSO) within a Tenant, so users don’t need to sign in again when accessing another app in the same Tenant if they already signed in.
What we talk about when we talk about SSO
We found the term “SSO” often causes confusion. We consider Single Sign-On(In) to be a behavior, not a business concept. Therefore, SSO does not equate to “SSO in WIAM”.
When we say “it needs SSO”, it can refer to one of the following cases:
SSO Case 1
👉🏽 In a big corp, employees use the same credentials to sign in to all company-licensed resources (e.g. email, IM, cloud services).
It is the typical WIAM scenario. In this case, only one Identity Provider is involved. We don’t care for now.
SSO Case 2
👉🏽 End-users use the same credentials to sign in to all services developed by the same company (e.g. GSuite).
Logto is currently focusing on the approach outlined above. Multiple external identity providers, such as a third-party social sign-in provider, may exist independently and without connection.
Despite this, Logto remains the single source of truth for Identities, simply "borrowing" them from other providers. In this case, Logto acts as both an Identity Provider (to GSuite apps) and a Service Provider (to external Identity Providers).
SSO Case 3
👉🏽 End-users can only use the specific Identity Provider within the corresponding email domain to complete authentication. For example, signing in to Figma with Google Workspace.
This is the most common use case for SSO in CIAM. Let’s take a closer look.
If we want to sign in to Figma using our @silverhand.io email, we can use either Social sign-in or SSO. The figures below illustrate the difference between the two:
Social sign-in
SSO
In words:
- After social sign-in, users are free to set a password or change the email address in Figma
- After SSO, users cannot set password or change any personal info including email address, since their Identities are managed by Google Workspace
In this case, Logto is both an Identity Provider and a Service Provider. It appears that SSO is more complex than a normal sign-in process. What are the benefits for the identity owner?
- Centralized control: Keep identity information and authentication processes in one place, and ensure user information is always up-to-date. There is no need to add and remove licenses across different applications for changes.
- Improved user experience: Identity owners who require SSO are usually corporations. Their employees can use the same credentials and shared session for cross-company applications, such as Figma, Zoom, Slack, etc.
- Enhanced security: You may have noticed that some corporations require specific sign-in methods, such as dynamic verification codes. Using SSO can ensure that every employee uses the same sign-in method combination for accessing all resources.
🤔 Smart like you must have noticed that this is actually SSO Case 1 from the SaaS perspective.
It’s time to discuss the "X" in the SSO graph. This represents the process of Figma connecting the email domain to a specific Identity Provider. But, how does it work?
SSO mapping
Since the request often comes from enterprise clients, we refer to the process of "SSO Case 3" from the previous section as "Enterprise SSO" for clarity.
We can easily devise a naive solution: create a mapping between email domains and SSO methods, then manually update it.
The action of process “X” is now clear: