QID 570095
QID 570095: Security Not Defined in securitySchemes in open API 3.0
Security implemented in the API is defined under the keyword securitySchemes. An API can have multiple authentication and authorization schemes. All of them should be defined under component.securitySchemes. Swagger file was analyzed and determined that security definition has been used that is not defined as a part of $components.securitySchemes
Swagger file is not compatible with specification and will result in an error.
Solution
Review the security keywords in your end points and ensure the reference made are defined under component.securitySchemes. For example:
components: securitySchemes: BearerAuth: type: http scheme: bearer BasicAuth: type: http scheme: basic paths: /users: get: summary: "Get all the users on the system" security: - BasicAuth - BearerAuth
Vendor References
CVEs related to QID 570095
Software Advisories
| Advisory ID | Software | Component | Link |
|---|