feat(labs): describe the lab task contract and the provisioner port
This commit is contained in:
1 parent
3de226b16c
commit
9fdaa62b9b
91 files changed
+19262
-155
No files matched your search
@@ -0,0 +1,46 @@
|
||||
parameters:
|
||||
- $ref: ../components/parameters.yml#/LabId
|
||||
post:
|
||||
operationId: CreateLabConsoleToken
|
||||
summary: Issue a short-lived console token for one node of a ready lab.
|
||||
description: |-
|
||||
The token lets the console gateway of the backend attach to the serial
|
||||
console of one node. It is random, single-use, bound to the lab and the
|
||||
node, and valid for at most 120 seconds; `labd` keeps only its SHA-256
|
||||
digest in memory, so a restart invalidates every unused token. The token
|
||||
is never a node password or an SSH key, and the response carries no node
|
||||
address.
|
||||
|
||||
Attaching: the gateway opens a WebSocket to `attach_path` on the same
|
||||
`labd` origin with the service bearer token and sends the console token
|
||||
in the `X-Lab-Console-Token` header. The WebSocket attach is described
|
||||
here as the planned interface; until it is implemented, `labd` answers
|
||||
the attach path with 501 and issuing a token changes nothing else.
|
||||
|
||||
A lab that is not `ready` answers 409 `state_conflict`; an unknown node
|
||||
answers 400 `validation_failed` with the pointer `/node`.
|
||||
tags:
|
||||
- consoles
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas.yml#/ConsoleTokenRequest
|
||||
responses:
|
||||
"201":
|
||||
description: The token was issued.
|
||||
headers:
|
||||
Cache-Control:
|
||||
description: The token must not be stored by any cache.
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- no-store
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas.yml#/ConsoleToken
|
||||
default:
|
||||
$ref: ../components/responses.yml#/Problem
|
||||
Reference in new issue
Block a user