Beta

Create a tenant

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

Device trust and posture

A device's posture is only useful when it comes from a source the service trusts, is tied to the request it arrives with, and is fresh enough. A rule must also decide what happens when the evidence is missing, which is the case attackers arrange.

What a device can tell you

All names, domains, and identifiers in these examples are fictional. Context, devices, and risk made the case for asking device management, not the browser, whether a laptop is managed, and for proving that answer with a key the device holds. This lesson looks inside that answer. What exactly does device management know about Omar's laptop, how can a server be sure the answer is about this laptop and not a copy of it, and what should a policy do on the many days when there is no answer at all?

Device posture is the set of facts about a device's state that a policy can use. For Omar's newsroom laptop, laptop-0417, device management can report several, and each is a separate fact with its own way of being wrong:

Posture facts about laptop-0417 and how each is known
FactHow it is knownHow it can mislead
Enrolled in device managementThe management service issued the laptop a certificate when it was set upEnrollment is a past event. A laptop enrolled last year may not have checked in for months.
Operating system up to dateThe management agent on the laptop reports its versionThe report comes from software on the device, so malware with enough control can make it say anything.
Disk encrypted, screen lock onThe agent reports the settings it enforcesTrue when reported, and only as fresh as the last report.
Key held in hardwareAn attestation signed by the security chipProves where a key lives, not that the operating system around it is healthy.
Not reported lostThe management service's own recordsChanges the moment someone reports the loss, long after any token was issued.

Management systems usually fold these into one word, compliant, meaning the device met every requirement of the organization's device policy at its last check. That word is convenient for a rule, but the Gazette's decision service also keeps the time of the check and which version of the device policy was applied, because "compliant under last year's policy, as of three weeks ago" is not the evidence the download rule needs.

Attestation: evidence the device cannot simply claim

Most of the facts in the table are reports from software running on the laptop. If that software is compromised, the reports are too. Attestation adds evidence from a part of the device that ordinary software cannot rewrite: a security chip, such as a TPM in a laptop or a secure element in a phone.

When device management enrolls laptop-0417, it asks the security chip to create a new key pair. The private key never leaves the chip. The chip then signs a statement about that key with its own attestation key, whose certificate chains up to the chip's manufacturer. The statement says, in effect: this public key was generated inside genuine hardware of this model, and its private key cannot be exported. The management service checks the signature chain against the manufacturer's root, checks that the statement answers a fresh challenge it sent, so an old statement cannot be replayed, and only then issues the laptop a certificate for that key.

Some platforms can also attest to how the device started, such as whether its boot process was the expected one, and some management services include their own signed compliance statement. What attestation does not prove is just as important. It says nothing about who is using the laptop, whether the browser is infected now, or whether the screen lock is on. It proves that a particular key lives in particular hardware, and the rest of the posture still comes from reports and records. The same distinction appears in passkeys, where an authenticator's attestation describes the authenticator model, not the person or the computer it is plugged into.

Binding the evidence to each request

Suppose device management confirms at 08:10 that laptop-0417 is compliant, and the authorization server records that in Omar's access token. If the token is an ordinary bearer token, anyone who copies it, from a browser extension, a proxy log or malware on another machine, can present it from anywhere, and the photo API will believe the request came from a compliant laptop. The posture was checked once, and the token carried that check away from the device it described.

The fix is to make the token usable only together with the device's hardware key, so that every request proves the key is present. This is proof of possession, and there are two standard ways to do it:

  • Mutual TLS (RFC 8705). The laptop connects with its device certificate. The authorization server binds the token to that certificate by putting its thumbprint in the token's cnf claim as x5t#S256, and the photo API accepts the token only over a connection authenticated with the same certificate.
  • DPoP (RFC 9449). The client signs a short proof for every request with its private key. The token's cnf claim holds the key's thumbprint as jkt, and the API checks that each proof was signed with that key, for this method and URL, just now.

Here is the relevant part of Omar's token when the photo desk app uses DPoP with the laptop's hardware key, and the header and payload of the proof sent with one download:

Access token payload (excerpt)
{
  "sub": "user-1187",
  "aud": "https://api.photos.example",
  "scope": "photos.read photos.download",
  "cnf": { "jkt": "0ZcOCORZNYy-DWpqq30jZyJGHTN0d2HglBV3uiguA4I" }
}

DPoP proof header
{
  "typ": "dpop+jwt",
  "alg": "ES256",
  "jwk": { "kty": "EC", "crv": "P-256",
           "x": "l8tFrhx-34tV3hRICRDY9zCkDlpBhF42UQUfWVAWBFs",
           "y": "9VE4jf_Ok_o64zbTTlcuNJajHmt6v9TDVrU0CdvGRDA" }
}

DPoP proof payload
{
  "htm": "GET",
  "htu": "https://api.photos.example/photos/9001/original",
  "iat": 1781449200,
  "jti": "e1j3V_bKic8-LAEB",
  "ath": "fUHyO2r2Z3DZ53EsNrWBb0xWXoaNy59IiKCAqksmQEo"
}

The API computes the thumbprint of the jwk in the proof and compares it with cnf.jkt in the token. It checks that htm and htu match this request, that iat is recent and jti has not been seen before, and that ath is the hash of the token presented with it. A copied token is useless without the private key, and the private key is in the laptop's chip.

Binding on its own proves only that the same key is present. It becomes posture evidence when the authorization server knows something about that key, because device management attested it and recorded it as belonging to laptop-0417, and it checked that device's current state before issuing the token. Then "the request was signed with this key" means "the request came from this laptop", and the laptop's compliance applies to every request, not just the sign-in. The later lessons on DPoP and certificate-bound access tokens cover both mechanisms in depth.

Missing evidence is a normal case

On any given day, many requests arrive with no posture at all. Lena, the freelancer, works from her own laptop, which the Gazette does not manage. A new hire's laptop is still enrolling. The device management service is down for an upgrade. None of these is evidence of danger, but none is evidence of compliance either, and the rule has to say what happens.

The trap is in how the rule is written. "Deny when the device is unmanaged" reads like a safe rule, but if the device attribute is missing, "unmanaged" is not true, the deny does not match, and the request is allowed. "Deny unless the device is known to be managed" treats missing evidence as not enough, which is almost always what a device condition means. For Lena, the Gazette pairs that strict rule with a second route, the passkey step-up from Conditional access policies, so missing posture leads to a different requirement rather than a dead end.

Collect only the posture the decision needs. The download rule needs to know whether laptop-0417 was compliant, and when. It does not need the list of applications installed on the laptop, its browsing history, or its location, and none of that belongs in an access token or a log. On a personal device such as Lena's, a full management agent may be unwelcome or inappropriate, which is another reason to offer a route that does not depend on it.

Posture also changes after it has been checked. A laptop reported lost at 14:00 was compliant at 08:10, and a token issued at 08:10 still says so. Short token lifetimes limit how long that stale answer lasts. For anything faster, device management has to tell the services that depend on it, which is the subject of Continuous access evaluation.

Check your understanding

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

A token issued to a compliant laptop is copied to another machine. Which design stops the copy from passing the device condition? 1 of 3

Choose one answer.

A rule says: deny the download when device.managed is false. A request arrives with no device information. What happens? 2 of 3

Choose one answer.

The photo desk app on Omar's laptop sends a field saying the laptop is managed and up to date. Why should the decision service not rely on it? 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