Beta

Create a tenant

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

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 Connect 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 session 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 token saying who approved, together with an access token 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 party 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 client 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:

What each party does during Ava's visit to the kiosk
PartyWhat 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 token. The next customer should find no trace of her account.

Compared with device authorization

The photo frame in Device authorization also split the work between two devices, so the two flows are easy to confuse. The difference is who goes to whom.

With the photo frame, Ava started on the frame, read a code from its screen, and went to the photo service herself, in her phone's browser, to type the code and approve. The frame never needed to know who she was. With the kiosk, she tells the kiosk who she is, and the kiosk asks the photo service to come to her. She never visits a verification page or types anything from the kiosk's screen. The request arrives on a device the photo service already knows is hers.

The photo frame and the poster kiosk compared
AspectDevice authorizationCIBA
Who startsThe device, which then shows a codeThe client, which names the person to the provider
How the person reaches the approvalThey open the verification page and enter the codeThe provider contacts their authentication device
What the client knows about the person beforehandNothingA hint that identifies them, such as an email address
Client authenticationOften none, as with the photo frameRequired with every request
How the result arrivesThe device polls the token endpointPolling, a notification, or delivery to the client, fixed at registration
What the result containsTokens for the access approvedAn ID token saying who approved, and an access token for the access requested

Each design's weak point follows from this. The risk with device authorization, as that lesson showed, is a code someone else started: an attacker sends Ava a code and a genuine link and hopes she approves. CIBA turns that around. The attacker does not have to send her anything, because the request arrives from the photo service itself, in its own app. Anyone at a kiosk can type her email address, and her phone will show a genuine request. Binding the authentication to the request covers the defenses CIBA provides.

The choice between them comes down to what the client can know. CIBA fits when the person has a trusted device with them but the screen in front of them is not theirs, and the client can learn who they are. Device authorization fits a device that nobody identifies in advance, such as a television in a living room, because it needs no hint at all. And when the device in front of Ava is her own and can open a browser, the authorization code flow keeps the sign-in and its result in one place.

Check your understanding

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

Both device authorization and CIBA use two devices. What is the main difference between them? 1 of 3

Choose one answer.

Why does the poster kiosk not show the photo service's sign-in page on its touchscreen? 2 of 3

Choose one answer.

The poster kiosk stands in a public shop. Why can it still be a confidential client of the photo service? 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