Beta

Create a tenant

A new tenant starts with its own users, OAuth settings, audit history and logs. You are its first Tenant Admin.

Running SAML beside OpenID Connect

Most organizations that use SAML also use OpenID Connect, often for the same people. This lesson follows Cedar Inc. while its training service moves from one protocol to the other: how the two agreements line up, how accounts carry across without guessing, what a broker between them does, and when the old path can go.

A migration with two entrances

Cedar Inc.'s training service has used SAML for years. This year Cedar Inc. also adopts a new expense application that supports only OpenID Connect, and the training vendor announces that its next version will prefer OpenID Connect too. Cedar Inc.'s identity provider at https://login.cedar.example speaks both, so Avery keeps one sign-in while the applications behind it use different protocols, and each application moves on its own schedule.

The two protocols solve the same problem, telling an application who has signed in, with different messages. SAML sends a signed XML assertion through the browser to the application's assertion consumer service (ACS), as How SAML sign-in works showed. OpenID Connect, introduced in From delegated access to sign-in, sends an authorization code through the browser and returns a signed JSON ID token over the back channel. An ID token is not an assertion, and neither one is an OAuth access token. Each application validates the result its own protocol defines.

For a while the training service has two entrances: the SAML one Avery has always used, and a new OpenID Connect one. Both lead to the same training records, which is what makes the move delicate.

Keep the two agreements explicit

Many SAML ideas have an OpenID Connect counterpart, which helps when you plan a migration, as long as you remember they are counterparts rather than copies. Each row below names a job both protocols do and the value each uses for it:

The same jobs in the training service's two agreements with Cedar Inc.
QuestionSAMLOpenID Connect
Who is the provider?Entity ID, such as https://login.cedar.exampleIssuer, the iss claim
Who is the application?SP entity ID, checked as AudienceClient ID, checked as aud
Where do results go?Registered ACS URLRegistered redirect URI
Which person?NameID with its format and qualifierssub, unique within the issuer
When did they authenticate?AuthnInstantauth_time
How did they authenticate?AuthnContextClassRefacr and amr
Which request does this answer?InResponseTostate, and nonce inside the ID token
Where are keys and endpoints published?Metadata XMLDiscovery document and JWKS
How do sessions end together?Single LogoutRP-initiated, front-channel and back-channel logout

The table compares jobs, not values. Cedar Inc. may give Avery a different sub in OpenID Connect from her SAML NameID, especially if both are pairwise, so the training service cannot assume that sub equals cedar-training-742. Its SAML entity ID, https://training.example/saml, and its OpenID Connect client ID are different identifiers too. Each protocol's agreement is configured and validated on its own terms, with its own keys, its own return address and its own checks.

Map accounts without guessing the person

When the training vendor adds the OpenID Connect entrance, Avery's first sign-in through it arrives with a sub the training service has never seen. It must reach her existing account, the one linked to her SAML NameID, without creating a duplicate and without attaching to the wrong person.

The tempting shortcut is to match on email address. It is unsafe: an email claim is only a claim, two providers can state the same address, and an address can be reassigned. Two sound approaches exist. Cedar Inc. can supply a migration mapping from each SAML NameID to the matching sub, which it can produce because it issued both. Or the training service can link the two during a transition, by asking a person who signs in through the new entrance to also complete a sign-in through the old one, proving they control both.

Whichever route is used, the training service records each external identifier separately: (SAML issuer, NameID) and (OIDC issuer, sub), both pointing to one local account. It tests a returning person, a brand new person, someone whose email has changed, and two providers that state the same email. And it keeps rollback clean: turning off the new entrance must leave the SAML link and the account untouched.

When a broker sits between them

Sometimes the protocols meet in the middle. Cedar Inc. acquires Birch Ltd., whose staff sign in with a SAML identity provider, and Cedar Inc. wants them to use the OpenID Connect expense application without the application learning SAML. Cedar Inc. puts a federation broker in between. To Birch Ltd.'s identity provider, the broker is a SAML service provider. To the expense application, it is an OpenID Connect provider.

A broker validates the upstream SAML response and issues its own ID token. The expense application trusts the broker's signature, not Birch Ltd.'s, and a response that fails the broker's checks never becomes a code.

The broker does real work at each step. It validates Birch Ltd.'s SAML response exactly as any service provider would, with the checks from Validating a response, and a response that fails them ends the sign-in at the broker. It maps Birch Ltd.'s NameID to a subject of its own and chooses which attributes become claims. It applies Cedar Inc.'s policy, perhaps requiring multi-factor authentication for expense approvers. Then it issues a new ID token, signed with its own key, for the expense application as audience. The expense application trusts the broker's statement, not Birch Ltd.'s message, which never reaches it.

That translation is a place where meaning can slip. If Birch Ltd. sends a group called admins for its own IT staff, forwarding it unchanged could make them administrators in Cedar Inc.'s expense application. The broker maps upstream values to downstream ones deliberately, keeps a record of where each claim came from for support and audit, and does not hand applications the entire upstream assertion.

Retire the old path with evidence

Eventually the training service is fully on OpenID Connect and the SAML entrance can go. Before removing it, Cedar Inc. checks actual use: when did each SAML relationship last see a sign-in? One successful OpenID Connect sign-in does not prove every training site has moved. Logout needs the same care, since ending a session in one protocol does not end sessions created through the other.

The migration is finished when the intended people sign in through the new entrance and reach their own accounts, validation failures still refuse sign-in there, sessions end as expected, and a sign-in attempt through the retired SAML entrance is actually refused. Only then are the old SAML application, its ACS and its keys removed. Running both protocols for a while is a normal, supported state, and it is never a reason to relax either one's checks.

Check your understanding

Try these questions before moving on. If an answer isn't right, use the feedback and try again.

The training service adds an OpenID Connect entrance. Avery's first OIDC sign-in brings a new sub. How should it reach her existing SAML-linked account? 1 of 3
A broker accepts Birch Ltd.'s SAML sign-in and issues an ID token to the expense application. Whose signature does the expense application check? 2 of 3

Choose one answer.

Avery has signed in to the training service through its new OpenID Connect entrance without trouble. What should Cedar Inc. confirm before removing the SAML entrance? 3 of 3

Choose one answer.

Try it in the Lab

We value your privacy

We use cookies and similar technologies to enhance your browsing experience, and analytics to understand our traffic. By clicking "Allow all", you consent to optional analytics. Cookie Policy

Learn identity