Re-attestation and step-up
Attesting isn't only for sign-in. Your server can challenge a device again at any moment, most often right before a sensitive action, to get a fresh verdict about the device in front of it now.
Why ask again
A verdict describes the device at the moment it answered. After that, a session cookie can be copied to another machine, or the device can reboot into a different setup, and an old verdict knows nothing about it. Asking again is how you find out. It's the same challenge and answer as always; only the timing and the ask change.
When to re-attest
| Moment | Ask | Why |
|---|---|---|
| Sign-in | identity | Tie the new session to the device you know. |
| Before a sensitive action | identity or posture | Moving money, changing a password or a second factor, exporting data: prove the device right now, not at sign-in. |
| During a long session | identity | Ask again at unpredictable points, and when a device wakes from sleep, so a stolen session can't count on a quiet stretch. |
| When risk changes | identity or posture | A new network or location, or behaviour that doesn't fit: ask before you trust it. |
An identity ask checks that it's the same device. A posture ask also checks how it booted, so save it for the actions where that matters, and give the key a posture policy.
How fresh is fresh
Evidence has to answer a live challenge, so a verdict is recent when you get it. A verdict's verdict.authTime says when the device answered, and verdict.expiresAt is five minutes after that. Root Herald has no setting for how old is too old; that's your call. Act on a verdict in the request that verified it rather than keeping a pass to honour later, and when an action needs certainty, challenge again at that moment.
Tie the step-up to the action
When the client asks for a sensitive action, hold the action and issue a challenge for it, naming the device you know in expectedDevices. Keep the nonce with the held action, so the verdict can only ever unlock that one action. When the evidence comes back, verify it with the same expectedDevices, check it meets the claim you need, and only then carry the action out.
app.post("/transfer", async (req, res) => {
const held = await holdTransfer(accountOf(req), req.body);
const deviceId = await deviceOf(accountOf(req));
const { nonce, challenge } = await rh.issueChallenge({
ask: ["posture"],
expectedDevices: [deviceId],
});
await attachNonce(held.id, nonce);
res.status(202).json({ id: held.id, nonce, challenge });
});
app.post("/transfer/:id/confirm", async (req, res) => {
const held = await heldTransfer(accountOf(req), req.params.id);
const deviceId = await deviceOf(accountOf(req));
const result = await rh.verify(req.body.evidence, {
nonce: held.nonce,
expectedDevices: [deviceId],
});
const met = result.assuranceClaimsMet ?? [];
if (
result.device.verdict !== "pass" ||
!met.includes("rootherald:assurance:secure-boot")
) {
return res.sendStatus(403);
}
await completeTransfer(held);
res.sendStatus(204);
});Keep it light
Answering a challenge never needs elevation. Still, each answer is a round trip to the device and to Root Herald, so ask at the moments above rather than on every request. To prove every request came from the device, sign them with a device-bound signing key instead, and re-attest per session or period for the boot state a signature cannot show.