Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Request for new functionality
View staffing
Description
Issue summary:
We don't validate if all the
security
keys, from either top level or a specific path, are present under thesecurityDefinitions
definitionIf one path has multiple
security
, one of which is not undersecurityDefinitions
, unauthenticated requests will pass the ESPv2 container and counted as validWe also don't check this when using the
--validate-only
flag (as this uses the same revision creation flow, just doesn't deploy the revision I understand)This can cause pretty issues where protected endpoints may be accessed without authentication
Expected behaviour
I would expect the endpoints API to validate that the security revisions are there and are valid (I checked open source tools that also didn't warn about this)
However for example the Swagger editor returns this error when I submit my spec there:
security
key is not there, the fallback should not be allowing the request to go through as normal (not sure if this could be WAI for openapi, but previously validating that these scenarios don't happen would resolve this issue)Reproduction Steps:
security
key contains a definition nameddoesntexist
, which is not defined