This patch fixes default policies for the Security Group Rules API so
that user of the project who isn't owner of the SG but only sees it
as shared one, can't now create or delete rules in such SG.
Additionally this patch lowers numer of retries when parent object's id
is looked up in the DB by the OwnerCheck policy rule to just one. If it
will fail twice with NotFound exception, then there is no need to repeat
it more times.
Reviewed: https:/ /review. opendev. org/c/openstack /neutron/ +/944022 /opendev. org/openstack/ neutron/ commit/ dfea81a4bf6aa62 f56d101f8a0cb16 8a02338d5c
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit dfea81a4bf6aa62 f56d101f8a0cb16 8a02338d5c
Author: Slawek Kaplonski <email address hidden>
Date: Tue Mar 11 11:48:57 2025 +0100
[S-RBAC] Fix policies for the SG rules API
This patch fixes default policies for the Security Group Rules API so
that user of the project who isn't owner of the SG but only sees it
as shared one, can't now create or delete rules in such SG.
Additionally this patch lowers numer of retries when parent object's id
is looked up in the DB by the OwnerCheck policy rule to just one. If it
will fail twice with NotFound exception, then there is no need to repeat
it more times.
Closes-bug: #2101150 034548a5fa91998 0d02bacd91a
Change-Id: I23722d0ffabce0