Separating the consumption and authentication devices
Some screens are used by everyone who walks past them, and nobody should type a password into one. This lesson follows Ava at a poster kiosk in a print shop, where she approves the sign-in on her own phone instead, and introduces the 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. flow that makes that possible.
A kiosk you do not own
The collage company has put self-service poster kiosks in print shops. Ava walks up to one with a few minutes to spare, wanting to turn last weekend's photos from her photo account into a poster. The kiosk has a large touchscreen with a printer underneath, and every stranger who comes in after her will use it too. All domains, identifiers and values in these examples are fictional.
Ava would rather not type her photo service password into it. Someone could watch her type, the kiosk could have been tampered with, and 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. left open when she walks away would show her albums to the next customer. She does carry a device she trusts: her phone, already signed in to the photo service's app.
The kiosk asks for the email address of her photo account, and she types [email protected]. A moment later her phone shows a notification from the photo service: Poster kiosk wants to sign you in and view your photos. She opens it, checks the details, and approves with her fingerprint. The kiosk's screen changes to show her albums.
Nothing passed through a browser on the kiosk. There was no redirect to the photo service and no sign-in page on the touchscreen. The kiosk sent its request straight to the photo service, server to server, and the photo service contacted Ava on her phone. This is Client-Initiated Backchannel Authentication, usually shortened to CIBA. It is an OpenID Connect specification. The client starts the authentication, the provider carries it out somewhere else, and the client receives an 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. saying who approved, together with an access tokenA token that a client presents to an API to use access it has been granted, usually limited in what it allows and how long it lasts. It authorizes API calls; it does not tell the client who signed in. for the access it asked for.
"Backchannel" describes the route. Every sign-in so far used the browser as a front channel, carrying requests and responses between the relying partyAn application that accepts and relies on a sign-in from another service, the name used in OpenID Connect and for passkeys. SAML calls the same role a service provider. and the provider in redirects. Here the client and the provider talk directly, and the person is reached separately, on another device.
The kiosk is a registered client of the photo service in its own right, separate from the collage app Ava uses at home, with the client ID collage-kiosk. The collage company runs it, and the kiosk's software works through the company's servers, which hold the client's credentials. The screen in the shop never holds them, so the kiosk can be a confidential clientAn OAuth client, typically running on a backend, that can keep a credential such as a client secret or private key protected, and so can authenticate itself to the authorization server. even though it stands in a public place. That matters, because CIBA expects the client to authenticate whenever it asks for a sign-in, as Following a CIBA exchange shows.
Two devices, two jobs
CIBA names the two devices by what the person does with them. The consumption device is where they use the service, here the kiosk. The authentication device is where they sign in and approve, usually their phone. The specification is direct about one property of the consumption device: the person is not necessarily in control of it. It may belong to the client, like the kiosk, or sit in front of the client's staff.
The examples the specification gives all share that shape. A call center agent wants to confirm that a caller really is the account holder. A bank teller wants a customer at the counter to approve something on their own phone. A shopper approves, on their phone, a payment they are making at a checkout terminal. In each case the device the service runs on belongs to someone else, and the place where the person can safely prove who they are is a device they already carry.
The split decides what each party handles:
| Party | What it does in this example |
|---|---|
| Kiosk (consumption device) | Takes a hint about who Ava is, waits for the result, then uses the access token to show and print her photos. It never sees her password or the screen where she approves. |
| Ava's phone (authentication device) | Receives the request from the photo service, lets the photo service authenticate her, and shows her what she is approving. The kiosk's tokens never pass through it. |
| Photo service (OpenID Provider) | Authenticates the kiosk, finds Ava's account from the hint, reaches her phone, records her decision, and issues tokens to the kiosk. |
How the photo service reaches Ava's phone is its own choice. The specification only requires that it has some way to start an authentication out of band, meaning by a route outside the exchange with the kiosk. A notification to its own app, where she is already signed in, is the usual answer. However it reaches her, once she is authenticated the photo service asks for her decision just as its consent screen would during an ordinary sign-in.
When Ava finishes, the kiosk has to forget her. It ends its session and discards the tokens it received, and it has no reason to ask for offline_access or keep a refresh tokenA longer-lived credential that a client sends to the authorization server, never to an API, to get new access tokens without asking the person again.. The next customer should find no trace of her account.
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
- Set up a kiosk and the device Ava approves onSee the backchannel endpoint follow the flow policy, register a kiosk client with no redirect address, and open the Approvals page Ava answers on.