Beta

Create a tenant

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

Consent, rights, and deletion

Approving an application, asking for a copy of your data and asking for it to be deleted are different requests, and each has to do exactly what it says. This lesson follows Ava as she disconnects the printer and then closes her photo account, with Cora beside her: what an approval agrees to, which requests to trust, why ending access is not deleting data, and how to tell someone what actually happened.

Agreement has a particular purpose

When Ava connected the printer to her photo account, the photo service showed her a consent screen. The printer wanted to sign her in and read her photos, openid photos.read, and she approved. Her friend Cora connected the printer to her own photo account the same afternoon, in her own browser, and approved the same request.

Each approval is a narrow agreement between one person and one application, for the access shown on the screen, and the photo service records it as a grant. Ava's approval says the printer may learn who she is when she signs in and may read her photos. It does not agree to every other use the printer or the photo service might make of her data. Cora's approval is a separate grant, and nothing Ava decides changes it. Grants, scopes, and consent introduced this kind of approval.

The word consent also has a legal meaning, and it is easy to confuse with the screen. The photo service processes Ava's data for several reasons: to run the account she signed up for under its terms, to keep that account secure, and perhaps to meet legal obligations. Under the EU GDPR, for example, Article 6 lists six lawful bases for processing: the person's consent, a contract with them, a legal obligation, protecting someone's vital interests, a task in the public interest, and the organization's legitimate interests. Running Ava's account rests on the contract, not on consent. Where consent is the basis, it has conditions of its own. It must be freely given, specific to a purpose, informed, and an unambiguous indication of the person's wishes by a clear action, so a pre-ticked box or silence does not count. It must not be bundled into terms the person has to accept for a service that does not need it. The organization must be able to show that it was given, and withdrawing it must be as easy as giving it. An OAuth consent screen does not decide which basis applies to which processing, and neither does a checkbox on a sign-up form.

Whatever the basis, withdrawing an approval has to do something. On 9 October Ava decides she has finished with the printer and removes it from her list of connected applications at the photo service. The photo service ends her grant and the tokens issued under it. The next time the printer uses her access token, the photo service refuses it:

GET /userinfo HTTP/1.1
Host: auth.photos.example
Authorization: Bearer demo-ava-access-token

HTTP/1.1 401 Unauthorized
WWW-Authenticate: Bearer error="invalid_token",
  error_description="The access token is not active"

A minute later, the same request with Cora's token still works:

GET /userinfo HTTP/1.1
Host: auth.photos.example
Authorization: Bearer demo-cora-access-token

HTTP/1.1 200 OK
Content-Type: application/json

{
  "sub": "user-3204"
}

All people, hosts, tokens and identifiers in these examples are fictional.

The effect is immediate because the photo service checks the grant's current state when it answers. An API that validated self-contained tokens locally, without asking, would keep accepting Ava's token until it expired, which is one reason such tokens are short-lived. Token revocation describes what ending a grant reaches.

A right needs a trustworthy request

Withdrawing an approval is one thing a person can ask for. Within the GDPR's scope, people also have the right of access to a copy of their data and information about how it is used, rectification of data that is wrong, erasure, restriction of processing while a dispute is settled, portability of data they provided in a format another service can read, and to object to processing based on legitimate interests or used for direct marketing. They can also ask not to be subject to decisions made solely by automated means where those decisions significantly affect them. The organization must answer without undue delay and within one month of receiving the request, a period it can extend by two further months for complex or numerous requests, provided it tells the person within the first month.

Each request is only as good as the reason to believe it comes from someone entitled to make it, and an organization may ask for reasonable confirmation of identity before acting. Here are three deletion requests the photo service receives in the same week.

Illustrative deletion requests and the photo service's decisions
RequestWho is askingWhere the data isDecision
Delete my account and its dataAva, signed in to her own accountAt the photo serviceAct on it, and keep only records that have their own justified purpose.
Please delete Cora's accountAn unsigned email from an unknown addressAt the photo serviceRefuse. The message proves no authority over Cora's account.
Delete the photos I had printedAva, signed in to her own accountA copy at the print lab, which printed her last orderRecord it as unresolved at the print lab and follow it up. Do not report it as deleted.

The first request arrives through Ava's own signed-in session, so the photo service already has good reason to believe it is her. Because closing an account cannot be undone, it asks her to sign in again before confirming, much as it would before a password change. What it does not do is ask for a scan of her passport. That would mean collecting a new and sensitive document just to process a deletion, when the authentication she already uses establishes that she controls the account.

The second request names an account and proves nothing. An email saying "delete this user" could come from Cora, from someone who has fallen out with her, or from someone curious to see whether the service will do it. The photo service can reply that Cora can make the request from her own account. It must not act on Cora's account on a stranger's word.

The third request comes from the right person about her own data, but some of that data is no longer only at the photo service.

Closing access and deleting data differ

When Ava removed the printer on 9 October, its access ended. Nothing it had already copied was deleted. The photos in her half-finished book are still on the printer's servers, and the print lab still has the files for the order it printed last month. Her photo account was still open, too. Ending an application's access, closing an account and erasing data are three separate operations, and each has its own result.

Disconnect the printer, 9 October

Access
Printer's grant ended
Account
Still open
Ava's data
Untouched
Print lab copy
Not deleted

Access ended, nothing deleted

Close the account, 12 October

Access
Every session ended
Account
Closed
Ava's data
Not yet removed
Print lab copy
Asked to delete it

Nobody can use the account

Erase the data, 14 October

Access
Already ended
Account
Closed
Ava's data
Removed, backups by 13 November
Print lab copy
Still open

Not reported as deleted

"Your data has been deleted" would be wrong in both directions.

Ava's three separate operations, each with its own result. None of them can report the print lab's copy as deleted.

Closing the account follows the same pattern. When the photo service processes Ava's first request, it can end her sessions and every remaining grant straight away, so nobody can use the account from that moment. Erasing the data behind it takes longer. Copies held by other applications, deliveries still in progress and backups each have their own lifecycle. The printer and the print lab are separate organizations with obligations of their own, so the photo service passes on Ava's third request, records it as unresolved, and follows it up, instead of reporting a deletion it cannot see. If the closure job is interrupted halfway, it resumes from what it recorded. It does not re-enable access that was already ended, and it does not delete records that belong to someone else on the way.

Erasure has limits as well. Within the GDPR's scope, Article 17 sets out when a person can have their data erased, and it lists exceptions, including data that must be kept to meet a legal obligation and data needed to establish, exercise or defend legal claims. That is not a reason to keep everything. Each record that stays needs its own justified purpose and an end date, and "security" does not cover keeping every request payload forever. Retaining and minimizing identity records looks at how those periods are set.

Explain the actual result

When the work is done, the photo service writes back to Ava. "Your data has been deleted" would be wrong in both directions: it would claim the print lab's copy, which the service cannot see, and hide the records it chose to keep. Instead, it says what actually happened:

Access ended:  The printer was disconnected on 9 October. Your account
               was closed on 12 October, and every session ended then.
Data removed:  Your albums, photos, profile and connected applications,
               on 14 October. Backups containing them expire by 13 November.
Records kept:  A record of the disconnection and of the closure, naming
               who acted and when, kept for one year. Invoices for your
               storage plan, kept for as long as tax rules require.
Still open:    We asked the print lab to delete the files from your
               September order. We will write again when it confirms.

The records it keeps are minimal accountability records: what happened, who did it, to which account, and when. They do not include her password hash, her tokens or a snapshot of her profile, because none of those is needed to show that the account was closed properly.

Cora's account is untouched. So is her history, including the album she shared with Ava last year, which was always Cora's and stays with her. A request from one person reaches that person's own data. It never reaches another person's account, another organization's records, or the security records the photo service keeps about other accounts. That holds for every kind of request, which is why withdrawal, a copy of the data, a correction and closure are each checked and authorized as separate operations. A clear page for making these requests helps people find them, but whether a request actually takes effect depends on checks made on the server, the scope each request is limited to, and lifecycle work that finishes reliably.

Check your understanding

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

Ava and Cora each approved the printer. Ava then removes the printer from her connected applications. What should happen to their access tokens? 1 of 3

Choose one answer.

An email from an unknown address asks the photo service to delete Cora's account. What should the service do? 2 of 3

Choose one answer.

The photo service has closed Ava's account and removed her photos. The print lab has not yet confirmed deleting its copy. What should the message to Ava say? 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