Service: Setup
| This API is not yet officially released nor maintained. |
Setting up a device which has no admin account yet: as delivered without one, or after a factory reset.
The admin account is created on a Claim stream, by a client which proves to have the device at hand, by one of:
tapping the device three times, after `wait_for_taps` on the same stream the initial password on the label of the device, sent with the admin account
A device which offers neither, e.g. QbOS without an initial password, takes a client on one of its own subnets.
| Method | Request | Response |
|---|---|---|
SetupClaimRequestStream |
SetupClaimResponseStream |
GetOptions
Get whether the device waits to be set up, and what this client has to prove.
Response
Response with what setting up the device takes
| Field | Type | Default | Unit |
|---|---|---|---|
needs_setup |
bool |
- |
- |
Whether the device has no admin account and waits to be set up. |
|||
proof_required |
bool |
- |
- |
Whether this client has to prove to have the device at hand: always, unless the device offers no proof and the client is on one of its subnets. |
|||
taps_available |
bool |
- |
- |
Whether tapping the device three times proves it. |
|||
label_password_available |
bool |
- |
- |
Whether the initial password on the label of the device proves it. |
|||
Claim
Set the device up step by step. Only permitted over a secure channel.
A request is wait_for_taps or admin. wait_for_taps answers STATE_WAITING_FOR_TAPS, then STATE_TAPPED once
the device has been tapped, or STATE_EXPIRED. It is refused while another stream waits for the taps or has been
tapped. admin creates the admin account and answers STATE_SET_UP with a token of it, which ends the stream.
A refused step is answered with refusal on the stream, which stays open for the next step.
Request Stream
A step of setting the device up
| Field | Type | Default | Unit |
|---|---|---|---|
wait_for_taps |
- |
- |
|
wait for the taps |
|||
admin |
- |
- |
|
create the admin account |
|||
Admin
Create the admin account
| Field | Type | Default | Unit |
|---|---|---|---|
name |
optional string |
- |
- |
Name of the admin account, |
|||
password |
string |
- |
- |
its password |
|||
label_password |
optional string |
- |
- |
The initial password on the label of the device, if that is the proof. |
|||
Response Stream
State of setting the device up
| Field | Type | Default | Unit |
|---|---|---|---|
state |
- |
- |
|
current state |
|||
time_left |
uint32 |
- |
s |
time left in STATE_WAITING_FOR_TAPS or STATE_TAPPED when this message was sent |
|||
token |
string |
- |
- |
Token of the admin account, set in STATE_SET_UP. |
|||
refusal |
- |
- |
|
Set if the last step was refused. The state is the one the claim kept. |
|||
Refusal
Why a step was refused
| Field | Type | Default | Unit |
|---|---|---|---|
code |
uint32 |
- |
- |
gRPC status code: PERMISSION_DENIED without a proof, INVALID_ARGUMENT for the admin account, FAILED_PRECONDITION when the step can not be taken now |
|||
message |
string |
- |
- |
what to tell the user |
|||
State
States of a claim
| Name | Value | Description |
|---|---|---|
STATE_UNSPECIFIED |
0 |
not set |
STATE_WAITING_FOR_TAPS |
1 |
waiting for the device to be tapped three times |
STATE_TAPPED |
2 |
the device has been tapped, waiting for the admin account |
STATE_EXPIRED |
3 |
the deadline passed |
STATE_SET_UP |
4 |
the admin account has been created |