Tie together the database-driven session handling with the worker and add relevant CLI comands (#370)

This commit is contained in:
Jeff Mitchell authored and GitHub committed 2020-09-19 00:18:17 -04:00
1 parent fd8ceb6cc4
commit 07a7e9750a
57 files changed
+2548 -826

No files matched your search

+90 -3
View File
@@ -1999,6 +1999,39 @@
]
}
},
"/v1/targets/{id}:authorize": {
"post": {
"summary": "Authorizes a Session",
"operationId": "TargetService_AuthorizeSession",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/controller.api.resources.targets.v1.SessionAuthorization"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/controller.api.services.v1.AuthorizeSessionRequest"
}
}
],
"tags": [
"controller.api.services.v1.TargetService"
]
}
},
"/v1/targets/{id}:remove-host-sets": {
"post": {
"summary": "Removes Host Sets from the Target.",
@@ -2014,7 +2047,6 @@
"parameters": [
{
"name": "id",
"description": "This host set's id.",
"in": "path",
"required": true,
"type": "string"
@@ -2876,6 +2908,42 @@
}
}
},
"controller.api.resources.targets.v1.SessionAuthorization": {
"type": "object",
"properties": {
"session_id": {
"type": "string",
"description": "The ID of the session\nOutput only.",
"readOnly": true
},
"target_id": {
"type": "string",
"description": "The id of the target authorizing this session. This must be defined for\ncreation of this resource, but is otherwise read only.\nOutput only.",
"readOnly": true
},
"scope": {
"$ref": "#/definitions/controller.api.resources.scopes.v1.ScopeInfo",
"description": "Scope information for this resource\nOutput only.",
"readOnly": true
},
"created_time": {
"type": "string",
"format": "date-time",
"description": "The time this resource was created\nOutput only.",
"readOnly": true
},
"type": {
"type": "string",
"description": "Type of the session (e.g. tcp, ssh, etc.)\nOutput only.",
"readOnly": true
},
"authorization_token": {
"type": "string",
"description": "The marshaled SessionAuthorizationData message containing all information\nthat the proxy needs.\nOutput only.",
"readOnly": true
}
}
},
"controller.api.resources.targets.v1.Target": {
"type": "object",
"properties": {
@@ -3152,6 +3220,26 @@
}
}
},
"controller.api.services.v1.AuthorizeSessionRequest": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"host_id": {
"type": "string",
"description": "An optional parameter allowing specification of the particular host within\nthe target's host sets to connect to during this session."
}
}
},
"controller.api.services.v1.AuthorizeSessionResponse": {
"type": "object",
"properties": {
"item": {
"$ref": "#/definitions/controller.api.resources.targets.v1.SessionAuthorization"
}
}
},
"controller.api.services.v1.ChangePasswordRequest": {
"type": "object",
"properties": {
@@ -3643,8 +3731,7 @@
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "This host set's id."
"type": "string"
},
"version": {
"type": "integer",