From 56da7d8dae873ca54859e082751984b1873b7887 Mon Sep 17 00:00:00 2001 From: Alex Kanitz Date: Sun, 5 Nov 2023 15:46:48 +0100 Subject: [PATCH] auth: add bearer auth security scheme (#163) --- pro_tes/api/security_schemes.yaml | 6 ++++++ pro_tes/config.yaml | 3 +++ 2 files changed, 9 insertions(+) create mode 100644 pro_tes/api/security_schemes.yaml diff --git a/pro_tes/api/security_schemes.yaml b/pro_tes/api/security_schemes.yaml new file mode 100644 index 0000000..072eac9 --- /dev/null +++ b/pro_tes/api/security_schemes.yaml @@ -0,0 +1,6 @@ +components: + securitySchemes: + bearerAuth: + type: http + scheme: bearer + bearerFormat: JWT diff --git a/pro_tes/config.yaml b/pro_tes/config.yaml index 884fe31..78ea53c 100644 --- a/pro_tes/config.yaml +++ b/pro_tes/config.yaml @@ -55,8 +55,11 @@ api: - path: - api/9e9c5aa.task_execution_service.openapi.yaml - api/additional_logs.yaml + - api/security_schemes.yaml add_operation_fields: x-openapi-router-controller: ga4gh.tes.server + security: + - bearerAuth: [] add_security_fields: x-bearerInfoFunc: foca.security.auth.validate_token disable_auth: True