Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disallow admin triggering of internal endpoints (#1030)
* Disallow admin triggering of internal endpoints Stop simply relying on the presence of the X-AppEngine-QueueName as an indicator that an endpoint has been triggered internally, as this allows admins to trigger a remote execution vulnerability. We now supplement this check by ensuring that there is no authenticated user. Since only an admin user can set these headers, this means that the header must have been set by an internal request. Tested: In addition to the new unit test, verified on Crash that: - Internal requests are still getting authenticated via the internal auth mechanism. - Admin requests with the X-AppEngine-QueueName header are rejected as "unauthorized." * Reformatted.
- Loading branch information
Showing
2 changed files
with
24 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters