Service: Recovery
| This API is not yet officially released nor maintained. |
Recovery of a device whose admin password is lost, without logging in.
There are two ways, each taken on one Recover stream:
Support recovery: Blickfeld support turns the recovery code into a support token, with which the stream sets a new password for an admin account. The configuration is kept. Not available once AccessControl/ProhibitSupportAccess was called. Factory reset recovery: the device is tapped three times to prove physical access, after which the factory reset is confirmed on the same stream. A token handed out after the taps downloads the diagnostics report before. Not available while disabled with AccessControl/SetFactoryResetRecovery.
| Method | Request | Response |
|---|---|---|
RecoveryRecoverRequestStream |
RecoveryRecoverResponseStream |
GetOptions
Get the recovery options of the device.
Response
Response with the recovery options of the device
| Field | Type | Default | Unit |
|---|---|---|---|
support_recovery_available |
bool |
- |
- |
Whether an admin account can be recovered by Blickfeld support. |
|||
recovery_code |
string |
- |
- |
Code to hand to Blickfeld support: |
|||
factory_reset_recovery_available |
bool |
- |
- |
Whether a factory reset recovery can be requested. |
|||
Recover
Recover the device step by step.
The first request is support or start_factory_reset. A support recovery answers STATE_ADMIN_RECOVERED and
ends. A factory reset recovery answers on every change of its state, and takes confirm_factory_reset once the
device has been tapped. Closing the stream before cancels it.
A factory reset recovery that waits for the device to be tapped is replaced by a new one. Starting one fails with
FAILED_PRECONDITION while the device of another has been tapped already.
Request Stream
A step of a recovery
| Field | Type | Default | Unit |
|---|---|---|---|
support |
- |
- |
|
support recovery |
|||
start_factory_reset |
- |
- |
|
start of a factory reset recovery |
|||
confirm_factory_reset |
- |
- |
|
confirmation of the factory reset recovery started on this stream |
|||
Support
Set a new password for an admin account
| Field | Type | Default | Unit |
|---|---|---|---|
token |
string |
- |
- |
Support token issued by Blickfeld support for the recovery code. A support recovery ends the session it was issued in, so it recovers once. |
|||
name |
optional string |
- |
- |
Name of the admin account to recover, |
|||
new_password |
string |
- |
- |
the new password |
|||
Response Stream
State of a recovery
| Field | Type | Default | Unit |
|---|---|---|---|
state |
- |
- |
|
current state |
|||
time_left |
uint32 |
- |
s |
time left for the factory reset recovery to reach STATE_CONFIRMED when this message was sent, unset once it ended |
|||
token |
string |
- |
- |
Token for Diagnostics Report/Generate, nothing else. Set from STATE_PHYSICALLY_CONFIRMED until the factory reset recovery ends. |
|||
State
States of a recovery
| Name | Value | Description |
|---|---|---|
STATE_UNSPECIFIED |
0 |
not set |
STATE_REQUESTED |
1 |
waiting for the device to be tapped three times |
STATE_PHYSICALLY_CONFIRMED |
2 |
waiting for confirm_factory_reset |
STATE_CONFIRMED |
3 |
the factory reset has been started, the device reboots |
STATE_EXPIRED |
4 |
the deadline passed |
STATE_CANCELLED |
5 |
cancelled, or replaced by a newer request |
STATE_ADMIN_RECOVERED |
6 |
the admin account has a new password |