forked from apache/celeborn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CELEBORN-1493] Check admin privileges for http mutative requests
### What changes were proposed in this pull request? If authentication enabled, check admin privileges for http mutative requests. Likes: ``` POST /api/v1/workers/exclude POST /api/v1/workers/events POST /api/v1/workers/exit ``` ### Why are the changes needed? For security requirement. ### Does this PR introduce _any_ user-facing change? Yes, after this pr, if http authentication enabled, for all mutative http requests, it will check the admin privileges. Before this PR, if an API is not defined and the method is `POST/PUT/DELETE/PATCH`, the response status code is `404`. After this PR, if the admin privileges check failed, the response status code will be `403`. ### How was this patch tested? UT. Closes apache#2601 from turboFei/admin_check. Authored-by: Fei Wang <fwang12@ebay.com> Signed-off-by: Shuang <lvshuang.xjs@alibaba-inc.com>
- Loading branch information
Showing
5 changed files
with
78 additions
and
2 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
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
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