workfloworchestrator / orchestrator-core

The workflow orchestrator core repository
Apache License 2.0
36 stars 14 forks source link

[Bug]: "Authorize" button not shown anymore on /api/docs #670

Open Mark90 opened 1 month ago

Mark90 commented 1 month ago

The "Authorize" button used to be on the /api/docs page in the top-right. This allowed to test endpoints with JWT or Basic auth.

This button has disappeared now, this may be a side effect of the recent AuthN/AuthZ refactor.

When comparing the /api/openapi.json, the following top-level key is missing

 "securitySchemes": {
   "OIDCUser": {
     "type": "http",
     "scheme": "bearer"
   }
 }

Also these keys are missing on each individual endpoint

 "security": [
   {
     "OIDCUser": []
   }
 ],
 "parameters": [
   {
     "name": "token",
     "in": "query",
     "required": false,
     "schema": {
       "anyOf": [
         {
           "type": "string"
         },
         {
           "type": "null"
         }
       ],
       "title": "Token"
     }
   }
 ],

Affected versions: 2.3.0rc1-

pboers1988 commented 1 month ago

This change has happend as the Depends function no longer returns a HTTPBearer subclass