engine: Add user and group targets #64

Merged
fyrchik merged 1 commit from fyrchik/policy-engine:fix-user-chains into master 2024-04-12 13:49:57 +00:00
Owner

Policies can be attached to a specific user. One way to handle this is to encode user in the rule condition. This is far from optimal, as it scales badly with the increase in the number of users.

Another option is to store user rules separately: the goal of this PR.

On a side-note, may be the best way to handle this is to make RequestTarget an interface which can return a list of targets in the order the are applied. With this, no changes would've been needed to support separate user/group rules.

Policies can be attached to a specific user. One way to handle this is to encode user in the rule condition. This is far from optimal, as it scales badly with the increase in the number of users. Another option is to store user rules separately: the goal of this PR. On a side-note, may be the best way to handle this is to make `RequestTarget` an interface which can return a list of targets in the order the are applied. With this, no changes would've been needed to support separate user/group rules.
fyrchik force-pushed fix-user-chains from 64c47aa1d0 to 6bdab34caa 2024-04-09 15:19:49 +00:00 Compare
fyrchik requested review from alexvanin 2024-04-10 12:47:39 +00:00
fyrchik requested review from dkirillov 2024-04-10 12:47:40 +00:00
fyrchik requested review from aarifullin 2024-04-10 12:47:49 +00:00
fyrchik requested review from storage-core-committers 2024-04-10 12:47:50 +00:00
fyrchik requested review from storage-core-developers 2024-04-10 12:47:50 +00:00
fyrchik requested review from storage-services-committers 2024-04-10 12:47:50 +00:00
fyrchik requested review from storage-services-developers 2024-04-10 12:47:51 +00:00
dkirillov approved these changes 2024-04-11 06:58:40 +00:00
Owner

We should update pkg/engine/inmemory and pkg/morph/policy packages to support new targets.

We should update `pkg/engine/inmemory` and `pkg/morph/policy` packages to support new targets.
fyrchik force-pushed fix-user-chains from 6bdab34caa to 0cd259dd3f 2024-04-11 10:41:59 +00:00 Compare
Author
Owner

@alexvanin fixed

@alexvanin fixed
alexvanin approved these changes 2024-04-11 10:43:10 +00:00
fyrchik force-pushed fix-user-chains from 0cd259dd3f to 6a495fccaa 2024-04-11 12:06:19 +00:00 Compare
fyrchik force-pushed fix-user-chains from 6a495fccaa to 0e69e48511 2024-04-12 13:07:42 +00:00 Compare
fyrchik changed title from WIP: engine: Add user and group targets to engine: Add user and group targets 2024-04-12 13:07:57 +00:00
alexvanin approved these changes 2024-04-12 13:13:01 +00:00
acid-ant approved these changes 2024-04-12 13:20:09 +00:00
dkirillov approved these changes 2024-04-12 13:42:40 +00:00
fyrchik merged commit 0e69e48511 into master 2024-04-12 13:49:57 +00:00
fyrchik deleted branch fix-user-chains 2024-04-12 16:31:38 +00:00
Sign in to join this conversation.
No description provided.