Providers and relying parties
When Ava selects Continue with your photo account at the collage app, the same kinds of party take part as when she connected the printer to her photos. What changes is the job each one is doing. OpenID ConnectAn identity layer on top of OAuth 2.0 that lets an application sign people in with an account at another service. It adds the ID token, standard claims, and discovery to the OAuth exchange. gives those jobs their own names, which you will meet in specifications, provider documentation and configuration screens, and it settles which side decides what.
New names for familiar roles
Each OpenID Connect role is an OAuthA framework that lets a person give an application limited access to their resources at another service, using tokens instead of sharing their password. OAuth is about access; OpenID Connect adds sign-in. role with a second job. All domains and identifiers in these examples are fictional.
| OpenID Connect term | In the example | OAuth role it builds on |
|---|---|---|
| End-User | Ava, signing in to the collage app. | Resource owner |
| Relying Party | The collage app, which relies on the photo service's statement about who Ava is. | Client |
| OpenID Provider | The photo service's authorization server, which authenticates Ava and issues ID tokens. | Authorization server |
| UserInfo endpoint | An endpoint at the photo service that returns information about Ava to a client holding a suitable access token. | Protected resource |
The OpenID Provider is an authorization serverIn OAuth, the service that handles a person's sign-in and approval and decides which tokens to issue to a client. It may belong to the same company as the API, but its job is separate. that has taken on a second job. It still issues access tokens. It now also authenticates people on behalf of other applications and reports the result to them. Many organizations simply call it their identity provider, the general term from Trust across systems for a service that authenticates people for others. Specifications shorten the two main roles to OP and RP. This series mostly writes them out.
The relying party is still a client in the OAuth sense. The collage app's registration, client ID, redirect URIs and client authenticationChecking evidence that someone, or some application, controls an account, such as a password or a passkey. It establishes which account is being used, not what that account may do. all carry over unchanged, and nothing in its registration marks it as a relying party. Being one adds responsibilities on top: checking the ID tokenIn OpenID Connect, a signed JWT from the provider, addressed to one client, saying which account authenticated, when, and in answer to which request. It reports a sign-in and is not used to call APIs., connecting it to an account, and running a sessionThe ongoing connection between later requests and an earlier sign-in, so you are not asked for your password on every click. It is often tracked with a cookie holding an unpredictable session identifier. of its own.
The issuer
A relying party needs an exact name for the provider it trusts. In OpenID Connect, that name is the issuer identifier, an HTTPSHTTP protected by TLS, so traffic is encrypted and checked for changes while it travels. It protects the connection, but does not prove that the site at the other end is honest. URLA web address, such as https://photos.example/api/albums/42?limit=10. It names how to connect (https), the domain, the path to a particular page or resource, and any extra parameters after the question mark.:
https://auth.photos.exampleEvery ID tokenA piece of data issued by a trusted service that a client presents as a credential, for example to call an API or to report a sign-in. Some tokens carry readable claims; others are random strings that only the issuer can interpret. the photo service creates names this value in its iss claim, and the collage app compares it character for character with the issuer it has configured. A trailing slash makes a different string, so https://auth.photos.example/ is not the same issuer. The provider's other addresses, its endpoints and the location of its public keys, are published in a document the collage app finds from the issuer, as Provider discovery shows. Everything the collage app trusts about the photo service hangs from this one value.
An issuer is more specific than a company. A provider can run separate issuers for testing and production, and providers that serve many organizations often give each one its own issuer. Two issuers are two providers, even when the same company operates both, and a relying party configures each separately. You met the same idea in Correlating requests and responses, where the printer checked which authorizationDeciding whether a requested action is permitted, such as whether a signed-in account may delete a particular photo. Authentication says which account is asking; authorization decides what it can do. server had answered before using its response.
The issuer also gives the account identifier its meaning. The ID token names Ava's photo account in sub, and as Trust across systems explained, a subject identifier is unique only within the issuer that assigned it. Another provider could use the same value for someone else, so the collage app finds the account by the pair of iss and sub, never by sub alone.
What each side decides
The provider authenticates Ava. It decides how: perhaps her password and an authenticator appSomething a person controls and uses to prove control of an account, such as a memorized password, an app that generates one-time codes, or a security key. It counts only after it has been registered to that account., perhaps a passkeyA credential that your phone, computer or password manager creates for one website and keeps for you, unlocked with a fingerprint, face or PIN. Nothing you could type is sent, and it works only for the site it was made for, which helps it resist phishing., perhaps nothing new at all because she signed in this morning and its session is still valid. The collage app sends the same request each time, and the provider reports in the ID token what it did, including when Ava last authenticated. It also decides what to tell the collage app about her, which can depend on what she agrees to share.
No session yet
- Collage app sends
- The same request
- Provider asks for
- Her password
- auth_time
- Now
- iat
- Now
Session still valid
- Collage app sends
- The same request
- Provider asks for
- Nothing new
- auth_time
- Unchanged
- iat
- Now
Ask again
- Collage app sends
- The same request
- Provider asks for
- Her password
- auth_time
- Now
- iat
- Now
How to authenticate is the provider's decision; what the account may do is the collage app's.
The relying party decides everything that happens in its own application. It decides whether to accept the provider's answer at all, which collage account the answer refers to, and what that account may do. The photo service can say that the person in the browser is user-2048 and authenticated a minute ago. It cannot say whether that person may delete a poster other people are viewing. That remains the collage app's own authorization decision, as Deciding what someone can do described.
The arrangement looks a little different depending on who chooses the provider. When Ava selects Continue with your photo account, she is using a provider she already has, and the collage app simply offers it as a choice. At Lantern Studio, from JWT and SAML assertion grants, the organization makes the choice. Its designers sign in to the project portal through Lantern's own identity provider, because that is where Lantern manages their accounts. The roles are the same in both settings: Lantern's identity provider is an OpenID Provider, and the portal is a relying party.
Each provider a relying party accepts is a separate trust relationship, with its own issuer, registration and keys. If the collage app later accepts sign-ins from a second provider, it trusts that provider to speak only for its own accounts, never for accounts at the photo service.
Check your understanding
Try these questions before moving on. If an answer isn't right, use the feedback and try again.
Try it in the Lab
- Name the provider, the relying party and the issuer in your lab tenantMap the OpenID Connect roles onto Lab Photos and lab-collage, find one issuer in four places, and watch the provider decide how to authenticate Owen while the relying party sends the same request each time.