orchestrator-core icon indicating copy to clipboard operation
orchestrator-core copied to clipboard

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

Open Mark90 opened this issue 1 year ago • 2 comments

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-

Mark90 avatar Jun 03 '24 09:06 Mark90

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

pboers1988 avatar Jun 12 '24 10:06 pboers1988

https://git.ia.surfsara.nl/netdev/automation/projects/orchestrator/-/issues/2079

Mark90 avatar Aug 14 '24 08:08 Mark90