Closed
Description
If a particular endpoint spec contains multiple security handlers with both AND and OR conditions according to the "Using Multiple Authentication Types" section on this link: https://swagger.io/docs/specification/authentication/, then the behaviour of the API is not as expected.
For e.g. take following scenario:
paths:
/health_check:
get:
security:
- Handler1ThatReturnTrue: []
Handler2ThatReturnFalse: []
- Handler3ThatReturnTrue: []
Handler4ThatReturnTrue: []
The Above one will fail authorization.
If you change the above scenario to:
paths:
/health_check:
get:
security:
- Handler1ThatReturnTrue: []
Handler2ThatReturnTrue: []
- Handler3ThatReturnTrue: []
Handler4ThatReturnFalse: []
This scenario will pass authorization.
Somehow when you use both AND and OR combinations of security handlers, then only the first combination is respected. Can you please check and provide a fix or a workaround for this issue?
Metadata
Metadata
Assignees
Labels
No labels