QID 570061
QID 570061: Basic Auth Is Not Preferred Authentication
Authentication configuration is an important part of API design. Basic authentication is not considered a secure authentication mechanism. Based on analysis of the swagger file it is determined that basic authentication is the security scheme configured on the API.
API with basic authentication is not compliance to swagger specification and will result in an error.
Solution
Security scheme should be modified to use a more secure authentication method, such as OAuth 2.0.
Current security definition might look something like :
securityDefinitions:
basicAuth:
type: basic
paths:
/something:
get:
# To apply Basic auth to an individual operation:
security:
- basicAuth: []
responses:
200:
description: OK (successfully authenticated)
Change the above to oauth 2.0:
securitySchemes:
OAuth2:
type: oauth2
flows:
Vendor References
CVEs related to QID 570061
Software Advisories
| Advisory ID | Software | Component | Link |
|---|