From bf45321c860ce57f864e9a37f6f0960e16783dcb Mon Sep 17 00:00:00 2001 From: Erwan Rouchet <rouchet@teklia.com> Date: Wed, 17 Jul 2019 13:15:20 +0000 Subject: [PATCH] Update schema for Ponos JWT auth --- arkindex/schema.yml | 92 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 87 insertions(+), 5 deletions(-) diff --git a/arkindex/schema.yml b/arkindex/schema.yml index f6d62de..9fd7822 100644 --- a/arkindex/schema.yml +++ b/arkindex/schema.yml @@ -1,7 +1,7 @@ components: securitySchemes: agentAuth: - scheme: Agent + scheme: Bearer type: http sessionAuth: in: cookie @@ -6310,6 +6310,11 @@ paths: type: integer cpu_frequency: type: integer + derivation: + type: string + writeOnly: true + farm: + type: string gpu_count: type: integer gpu_names: @@ -6317,10 +6322,15 @@ paths: type: string hostname: type: string - token: + public_key: type: string + writeOnly: true + tags: + type: array required: - - token + - farm + - public_key + - derivation - hostname - cpu_cores - cpu_frequency @@ -6332,10 +6342,15 @@ paths: application/json: schema: properties: + access_token: + readOnly: true + type: string cpu_cores: type: integer cpu_frequency: type: integer + farm: + type: string gpu_count: type: integer gpu_names: @@ -6346,10 +6361,13 @@ paths: id: readOnly: true type: string - token: + refresh_token: + readOnly: true type: string + tags: + type: array required: - - token + - farm - hostname - cpu_cores - cpu_frequency @@ -6387,6 +6405,58 @@ paths: - agentAuth: [] tags: - ponos + /ponos/v1/agent/refresh/: + post: + operationId: RefreshAgentToken + description: Refresh a Ponos agent token when it expires + parameters: [] + requestBody: + content: + application/json: + schema: + properties: + refresh: + type: string + required: + - refresh + x-name: body + responses: + '200': + content: + application/json: + schema: + properties: + refresh: + type: string + required: + - refresh + security: + - agentAuth: [] + tags: + - ponos + /ponos/v1/public-key/: + get: + description: Get the server's public key. + operationId: GetPublicKey + parameters: [] + responses: + '200': + content: + application/x-pem-file: + example: '-----BEGIN PUBLIC KEY----- + + MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEmK2L6lwGzSVZwFSo0eR1z4XV6jJwjeWK + + YCiPKdMcQnn6u5J016k9U8xZm6XyFnmgvkhnC3wreGBTFzwLCLZCD+F3vo5x8ivz + + aTgNWsA3WFlqjSIEGz+PAVHSNMobBaJm + + -----END PUBLIC KEY-----' + schema: + type: string + security: [] + tags: + - ponos /ponos/v1/task/{id}/: get: description: Retrieve a Ponos task status @@ -6433,6 +6503,8 @@ paths: - completed - failed - error + tags: + type: array url: readOnly: true type: string @@ -6469,6 +6541,8 @@ paths: - completed - failed - error + tags: + type: array x-name: body responses: '200': @@ -6505,6 +6579,8 @@ paths: - completed - failed - error + tags: + type: array url: readOnly: true type: string @@ -6542,6 +6618,8 @@ paths: - completed - failed - error + tags: + type: array required: - state - logs @@ -6582,6 +6660,8 @@ paths: - completed - failed - error + tags: + type: array url: readOnly: true type: string @@ -6724,6 +6804,8 @@ paths: - completed - failed - error + tags: + type: array url: readOnly: true type: string -- GitLab