neutron/neutron/pecan_wsgi
Slawek Kaplonski 1b82d4aa20 [API] Return 403 for POST requests when user is not authorized
In the policy_enforcement module if policy.enforce() will raise
PolicyNotAuthorized exception, there is additional check if user is
trying to modify own or someone else resource. In case when user is not
allowed to show resource even, error 404 is raised to "hide" any
information about requested resource.
But that was also the case for POST (create resource) requests and 404
error when user is trying e.g. create network is confusing.
So this patch modifies that logic and in case of "create_" actions it
will return 403 if user was not authorized to do such operation.

Closes-Bug: #1965294
Change-Id: I80b0616c335134a564361137b2a00ff86dcbdf1c
(cherry picked from commit 60bc6c7a99)
2022-04-13 06:01:26 +00:00
..
controllers Remove "six" library 2020-07-28 16:55:52 +00:00
hooks [API] Return 403 for POST requests when user is not authorized 2022-04-13 06:01:26 +00:00
__init__.py Rename 'newapi' to 'pecan_wsgi' 2015-09-02 15:53:34 +00:00
app.py Fixes minor typo in neutron 2018-01-18 14:27:59 +08:00
constants.py Pecan: implement DHCP notifications in NotifierHook 2016-02-15 10:50:28 +00:00
startup.py consume neutron-lib resources attr map 2018-03-09 13:37:28 -07:00