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
Change-Id: I23722d0ffabce0034548a5fa919980d02bacd91a
(cherry picked from commit dfea81a4bf6aa62f56d101f8a0cb168a02338d5c)
Reviewed: https:/ /review. opendev. org/c/openstack /neutron/ +/944199 /opendev. org/openstack/ neutron/ commit/ 93dd241d22c4fbb 24776ceee7b9f24 7a4fddbee7
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/2024.1
commit 93dd241d22c4fbb 24776ceee7b9f24 7a4fddbee7
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 f56d101f8a0cb16 8a02338d5c)
Change-Id: I23722d0ffabce0
(cherry picked from commit dfea81a4bf6aa62