skip to content

mobile and app automation · lesson 3 of 5 · sources checked 2026-11-20

platform attestation

This lesson explains what a platform verdict proves, what it does not prove, and how a server checks one before it trusts it.

status of this lesson: from a public source

purpose

A platform verdict comes from a key that the client code cannot read. Thus no change to a browser or to app code can make a valid one. But a valid verdict proves only a genuine device or app, so a server that trusts it too far makes a new weak point.

objectives

  1. Explain what Play Integrity, App Attest, and Private Access Tokens prove, and what they do not prove.
  2. Describe the server checks of a verdict: the signature, the request binding, the time window, and the second use.
  3. Explain why a browser in mobile emulation cannot make an attestation token.
  4. Select a tiered response from the device labels of a verdict.

new terms

Play Integrity
The Google API that returns signed device, app, and account verdicts.
App Attest
The Apple service that certifies an app key in secure hardware.
Private Access Token
A Privacy Pass token that an issuer signs after an Apple attester vouches for the device. An origin can redeem it in place of a challenge.
origin
The server that holds the real content of a site, behind any edge network.
challenge
A test that a site puts in front of a visitor before it serves the content.
mobile emulation
A desktop browser mode that copies the viewport, user agent, and touch of a phone.
verdict tier
One level of a platform verdict, for example basic, device, or strong integrity.
Privacy Pass
The IETF protocol family (RFC 9576, 9577, 9578) for tokens that prove a property of a client but do not identify it.
attester
The party that checks the device and vouches for it in Privacy Pass.
issuer
The party that signs the token in Privacy Pass.
redemption
The step where an origin checks a token and accepts it in place of a challenge.
CAPTCHA
A challenge that a human can pass and a program cannot pass easily.

how it works

platform attestation has three schemes in this module:

schemeplatformwhat the server gets
Play IntegrityAndroid appsSigned verdicts about the app, the device, and the account
App AttestApple appsA certified app key, and signed requests from that key
Private Access TokenApple devices, on the webA token that an origin can accept in place of a challenge

a wall, not a client setting

The key that signs an attestation stays in the device or on the servers of the platform. The client code cannot read it. Thus a tool that changes what a client states cannot make a valid token.

For example, a desktop browser in mobile emulation can send the user agent and the screen size of a phone. It has no key of a phone platform, so it has no token to send. In my model, attestation is a wall for such a client: the client has a valid token, or it has none.

what a play integrity verdict holds

Google documents the parts of a Play Integrity verdict Google (Android Developers), source 1:

  • requestDetails: the package name, the request hash or the nonce, and the time of the request.
  • appIntegrity: if Google Play recognizes the app and its signing certificate.
  • deviceIntegrity: device labels, for example MEETS_DEVICE_INTEGRITY. An empty value means signs of attack, a compromised system, or no physical device.
  • accountDetails: if the user installed or updated the app from Google Play.
  • Optional device labels: MEETS_BASIC_INTEGRITY for a device that passes basic system checks, and MEETS_STRONG_INTEGRITY for a certified device with a recent security update.
  • Optional signals: recentDeviceActivity, a level for the token requests of the app on the device in the last hour, and deviceRecall (beta).

Each device label is a verdict tier. A server can give each tier its own response. For example, it can accept a device with the basic label only, with a limit.

claim of a company Google states that the API works best with other signals, as part of an anti-abuse strategy, and not as the only mechanism. By default, an app can make up to 10,000 requests each day across all installs Google (Android Developers), source 2.

what app attest certifies

Apple documents these facts about App Attest Apple, source 3: claim of a company

  • The app makes a hardware key. The private key stays in the Secure Enclave, and no process can read it.
  • Apple servers certify that the key belongs to a valid instance of the app.
  • The attestation holds the hash of a one-time value from the server, to reduce the risk of a second use.
  • Later, the app signs a sensitive request with that key.

claim of a company Apple advises a one-time value of at least 16 bytes from the server. It states that a compromised app can falsify the results of its own checks, so the server checks the attestation Apple, source 3.

private access tokens

A Private Access Token uses Privacy Pass. RFC 9576 gives four roles IETF RFC Editor, source 4:

  • The client asks an origin for access.
  • The attester checks the client and vouches for its properties.
  • The issuer gives tokens for the properties that the attester vouches for.
  • The origin uses the tokens to make its access decisions.

The same document states that an origin cannot link a redemption to the issuance and the attestation that made the token. For example, a site that gets a valid token learns that a trusted attester vouched for the device. It does not learn which device or which person.

claim of a company In 2022, Apple stated that Private Access Tokens prove that HTTP requests come from legitimate devices, without a disclosure of who the person is. It also stated that a site can then show fewer CAPTCHAs Apple, source 5.

what a verdict does not prove

A verdict proves a genuine device or app at one time. It does not prove a human, a good purpose, or the same device at the next request. A good verdict from a real device can go to a different client. This attack class is a token relay.

claim of a company Google states that a cached verdict increases the risk that a bad actor uses a verdict from a good device in a different environment. It advises a standard request on demand in place of a cache Google (Android Developers), source 2.

Thus the server keeps its own checks. With request binding, the server ties each verdict to one request. A one-time value and a short time window stop a second use.

The rate of token requests and the behavior of the account carry the rest of the decision. For example, one device that asks for 60 tokens in one hour can be a sign of a token relay, also with good labels.

the two sides

automation sidedetection side
No browser patch makes an attestation token, because the client code cannot read the key. Attestation is a wall for such a client. A real device can give a good verdict, and that verdict can go to a different client.A verdict proves a genuine device or app, not a human. The server must still check the signature, the request binding, the time window, and the second use. The request rate and the behavior of the account stay necessary.

design decisions

optiongaincostwhen it is correct
Refuse each request without the strongest labelOnly the most trusted devices get through.Real users on devices without that label get refusals.Actions with a very high value only
Use a tiered response from the device labelsEach tier gets its own limit, and real users on lower tiers keep access.The server must keep a policy for each tier.An app API with real users on old and new devices
Ask for a new verdict for each sensitive actionA cached verdict cannot go to a different client.Each request adds time, and the daily limit of requests applies.Logins, payments, and account changes
Bind the verdict to the request with a hash or a one-time valueA verdict for one request fails on a different request.The app and the server must compute the same value.Each verdict check
Accept a Private Access Token in place of a challengeFewer challenges for users of supported devices.Other devices still get the challenge.Web pages with visitors on Apple devices

diagram

private access token flow

The origin learns that an attester vouched for the device, but it cannot link the token to that device.source: My model of the Private Access Token flow, from the roles of RFC 9576

code example

The example models the server check of a signed verdict for your own lab app. A lab key stands in for the platform key. It checks the signature, the one-time value (the nonce), the time window, and the labels.

The verdicts, the key, and the one-time values are synthetic. The fields do not copy the format of a real platform.

m13-x02-verdict-check.tstypescript

Check a signed verdict on the server of your own lab app. Verify the signature, check the one-time value and the time window, and refuse a second use.

// Synthetic model of a server check of a signed verdict for your own lab app.
// A lab key stands in for the platform key. No network, no device, no real token.
import { generateKeyPairSync, sign, verify } from "node:crypto";

type Verdict = { nonce: string; issuedAt: number; appVerdict: string; device: string[] };
type Token = { body: string; sig: Buffer };

const lab = generateKeyPairSync("ed25519");
const WINDOW_MS = 60_000;
const issued = new Set<string>(); // nonces that the server gave out and that are not used yet

function issueNonce(n: number): string {
  const nonce = `lab-nonce-${String(n).padStart(4, "0")}`;
  issued.add(nonce);
  return nonce;
}

function makeToken(v: Verdict): Token {
  const body = JSON.stringify(v);
  return { body, sig: sign(null, Buffer.from(body), lab.privateKey) };
}

function check(t: Token, now: number): string {
  if (!verify(null, Buffer.from(t.body), lab.publicKey, t.sig)) return "refuse: bad signature";
  const v = JSON.parse(t.body) as Verdict;
  if (!issued.has(v.nonce)) return "refuse: unknown or used nonce";
  issued.delete(v.nonce); // one use only
  if (now - v.issuedAt > WINDOW_MS) return "refuse: verdict too old";
  if (v.appVerdict !== "recognized") return "refuse: app not recognized";
  if (!v.device.includes("device")) return "limit: no device label";
  return "accept";
}

const now = Number(process.argv[2] ?? "1700000000000");
const good = makeToken({ nonce: issueNonce(1), issuedAt: now - 2_000, appVerdict: "recognized", device: ["basic", "device"] });
const tampered: Token = { body: good.body.replace("basic", "strong"), sig: good.sig };
const old = makeToken({ nonce: issueNonce(2), issuedAt: now - 120_000, appVerdict: "recognized", device: ["device"] });
const weak = makeToken({ nonce: issueNonce(3), issuedAt: now - 1_000, appVerdict: "recognized", device: ["basic"] });

const cases: [string, Token][] = [
  ["tampered body", tampered],
  ["fresh verdict", good],
  ["same verdict again", good],
  ["old verdict", old],
  ["basic label only", weak],
];
for (const [name, t] of cases) console.log(`${name}: ${check(t, now)}`);
console.log(`nonces not used: ${issued.size}`);

output

One result line for each of five synthetic verdicts, and the count of one-time values that are not used.

tampered body: refuse: bad signature
fresh verdict: accept
same verdict again: refuse: unknown or used nonce
old verdict: refuse: verdict too old
basic label only: limit: no device label
nonces not used: 0

I ran the code with the Node runtime and the flag --experimental-strip-types, with the argument 1700000000000 as the clock.

The changed body fails the signature check before its one-time value is used. The second use of the good verdict fails, because the first use removed its one-time value. The verdict with the basic label only gets a limit, not a refusal.

failure modes

problemcausecorrection
One verdict passes for many requests.The server does not bind the verdict to the request, or it keeps a cache.Bind each verdict to its request, and ask for a new verdict for each sensitive action.
Real users get refusals.The policy accepts only the strongest label.Use a tiered response, and give the lower tiers a limit, not a refusal.
The app trusts its own integrity result.The app checks the attestation on the device.Send the attestation to the server, and check it there.
A device with good labels sends many token requests in one hour.A real device makes verdicts for a different client.Read the request rate of the device, and limit it.
The service stops when the platform is down.The server refuses each request without a verdict.Before an outage, write a plan with a fallback limit.

check questions

  1. Explain what a valid platform verdict proves, and name two things that it does not prove.

    sample answer

    A valid verdict proves a genuine device or app at one time. It does not prove a human, a good purpose, or the same device at the next request.

  2. A site gets a valid Private Access Token. What does the origin learn?

    1. Which device sent the request
    2. The name of the person on the device
    3. That a trusted attester vouched for the device
    answer

    c. That a trusted attester vouched for the device

    The origin cannot link a redemption to the issuance and the attestation that made the token. It learns only that a trusted attester vouched for the device.

  3. Describe the checks that a server makes on a verdict before it trusts it.

    sample answer

    The server verifies the signature. It checks that the verdict is bound to this request. It checks that the one-time value is known and not used, and that the verdict is inside its time window. Then it reads the labels.

  4. Explain why a desktop browser in mobile emulation cannot send a valid attestation token.

    sample answer

    The key that signs an attestation stays in the device or on the servers of the platform, and the client code cannot read it. The browser can copy the user agent and the screen size of a phone, but it has no key of a phone platform.

  5. A verdict has the label MEETS_BASIC_INTEGRITY only. Your API has real users on old and new devices. Which response is correct?

    1. Accept the request with a limit
    2. Refuse each request without the strongest label
    3. Accept the request with no limit
    answer

    a. Accept the request with a limit

    A tiered response gives each tier its own limit. Real users on lower tiers keep access, and the server still limits the weakest tier.

exercise

exercise Do this task in your own lab, with synthetic data only. Do not send a request to a server.

  1. Save the code example in an empty folder of your lab.
  2. Remove the line that deletes the used one-time value.
  3. Run the code with Node, the flag --experimental-strip-types, and the argument 1700000000000.
  4. Record the result line of "same verdict again" and the last line.
  5. Put the line back, and run the code again.
  6. Write which check stops the second use, and why the order of the checks is important.
sample answer

This sample answer uses the synthetic verdicts of the code example.

Without the line, "same verdict again" gives "accept", and the last line gives 3 one-time values that are not used. With the line, the second use gives "refuse: unknown or used nonce", and the last line gives 0. The one-time value check stops the second use. The signature check comes first, so a changed verdict cannot use up a valid one-time value.

sources

  1. Play Integrity verdicts, Google (Android Developers), documentation, read 2026-11-20
  2. Play Integrity API overview, Google (Android Developers), documentation, read 2026-11-20
  3. Establish the integrity of an app (JSON data of the article), Apple, documentation, read 2026-11-20
  4. RFC 9576: The Privacy Pass Architecture (2024-06), IETF RFC Editor, informational, read 2026-11-20
  5. Private Access Tokens (developer news), Apple, documentation, read 2026-11-20
  6. My model of the server checks of a platform verdict, 2026-11 (not public).