Cut off a lost device
Revoke a lost or stolen device so it can reach nothing, then restore it if it's found or remove it if it isn't.
API
Maya reports her laptop stolen. You want maya-laptop cut off from the realm now, before you know whether it’ll turn
up. Revoking it closes its connection everywhere at once, and leaves you free to restore it later or remove it for
good. It doesn’t lock or wipe the laptop.
Before you start
Section titled “Before you start”- You hold
MODIFYon the realm’s endpoint settings (RealmOwnerhas it; see Who can call), with your session in$CVYUH_SESSION(Call the API). It’s all done through the API. - You know the device’s name, here
maya-laptop.
Revoke it
Section titled “Revoke it”-
Find the device. List the realm’s devices and pick the one whose
uidismaya-laptop:Terminal window curl https://foobar.cvyuh.com/api/v0/endpoint/ppm/v1 \-H "Cookie: x-cvyuh-token=$CVYUH_SESSION"Keep its
id, the device id. If you don’t know the name: when Maya has approved the laptop for AI governance, her user id is in itsusers, which holds only the users who approved it, not everyone who signs in. -
Revoke it, with a reason you’ll recognize later:
Terminal window curl -X PUT https://foobar.cvyuh.com/api/v0/endpoint/ppm/v1/<device id>/revocation \-H "Cookie: x-cvyuh-token=$CVYUH_SESSION" \-H "Content-Type: application/json" \-d '{"reason": "Reported stolen"}'The realm answers
204. Every stream the device holds is closed, and it can open no new one. -
Deal with Maya’s own access separately. Revoking the device doesn’t end her sessions elsewhere. If her credentials were on the laptop too, revoke her tokens as well; see the gateway’s Revocation.
Check it worked
Section titled “Check it worked”Ask whether it’s connected:
curl https://foobar.cvyuh.com/api/v0/endpoint/ppm/v1/<device id>/connected \ -H "Cookie: x-cvyuh-token=$CVYUH_SESSION"It answers { "connected": false }. Read the record (the same address without /connected): its status is
revoked, with you in revokedBy.
Undo it
Section titled “Undo it”If the laptop is found, restore it, and it reconnects on its own:
curl -X DELETE https://foobar.cvyuh.com/api/v0/endpoint/ppm/v1/<device id>/revocation \ -H "Cookie: x-cvyuh-token=$CVYUH_SESSION"If it’s gone for good, remove it instead, so every part of the realm forgets it:
curl -X DELETE https://foobar.cvyuh.com/api/v0/endpoint/ppm/v1/<device id> \ -H "Cookie: x-cvyuh-token=$CVYUH_SESSION"The realm answers 202; reading the record answers 404 once the removal has finished.
Related
Section titled “Related”- Device revocation: what a revoke does, and what it doesn’t.
- Device removal: what each part forgets.
- Handle an alert on a device: block an address or disable a local account instead, while the device stays connected.