Add controller-led worker auth flow (#2413)
This adds an action to the API that allows pulling out an activation token that can be given to a worker in its config (directly or via env or file). The worker can pass this along with its normal request in place of its normal nonce and the server will automatically accept it. Co-authored-by: Irena Rindos <irenarindos@users.noreply.github.com>
This commit is contained in:
1 parent
a1be125f5b
commit
01fb949d0b
55 files changed
+2728
-625
No files matched your search
@@ -3961,6 +3961,33 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v1/workers:create:controller-led": {
|
||||
"post": {
|
||||
"summary": "Creates a single Worker.",
|
||||
"operationId": "WorkerService_CreateControllerLed",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controller.api.resources.workers.v1.Worker"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "item",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controller.api.resources.workers.v1.Worker"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"controller.api.services.v1.WorkerService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v1/workers:create:worker-led": {
|
||||
"post": {
|
||||
"summary": "Creates a single Worker.",
|
||||
@@ -5790,6 +5817,11 @@
|
||||
"type": "string",
|
||||
"title": "worker_generated_auth_token is input only. Supports the worker led node\nenrollment flow where this credentials token is produced by a worker. This\ntoken is a base58 encoded types.FetchNodeCredentialsRequest from\nhttps://github.com/hashicorp/nodeenrollment"
|
||||
},
|
||||
"controller_generated_activation_token": {
|
||||
"type": "string",
|
||||
"description": "Output only. An activation token that can be given to a worker to correlate\nit to the created resource.",
|
||||
"readOnly": true
|
||||
},
|
||||
"active_connection_count": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
@@ -5966,6 +5998,17 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"controller.api.services.v1.CreateControllerLedResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"uri": {
|
||||
"type": "string"
|
||||
},
|
||||
"item": {
|
||||
"$ref": "#/definitions/controller.api.resources.workers.v1.Worker"
|
||||
}
|
||||
}
|
||||
},
|
||||
"controller.api.services.v1.CreateCredentialLibraryResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
Reference in new issue
Block a user