View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0035286 | mantisbt | api rest | public | 2025-02-01 04:53 | 2026-01-17 12:14 |
| Reporter | dregad | Assigned To | |||
| Priority | normal | Severity | feature | Reproducibility | have not tried |
| Status | confirmed | Resolution | open | ||
| Summary | 0035286: REST API: follow Standards for Authorization header | ||||
| Description | Our implementation of API tokens in Authorization header is not compliant with the standard defined by RFC-9110, which requires that an authentication scheme is specified before the actual credentials, while we expect just We need to
See MDN reference on Authorization header and Authentication schemes for more practical information on the standard. | ||||
| Additional Information | Follows discussion in PR https://github.com/mantisbt/mantisbt/pull/2071
| ||||
| Tags | No tags attached. | ||||
|
And need to remember to follow the recommendations from RFC 6750. |
|
|
Using office scripting fetch() (to make REST API calls) is doing a CORS (cross origin resource share) preflight OPTIONS request. That request does not contain the Authorization header, as the server should respond what kind of authorization is allowed. Upon such preflight OPTIONS request, Mantis API will respond with a 401 Api token required. Due to the 401 response, the fetch() call will not continue to make the GET request. When the Authorization is changed to match the standard, IMHO the OPTIONS request should be changed to allow the OPTIONS request without api token. |
|