Introduce apeSvc at the same level with aclSvc #798

Closed
opened 2023-11-09 13:21:14 +00:00 by aarifullin · 2 comments
Member

The PR #770 has introduced the usage of the access policy engine for Object.Put method in frostfs-node.

It's incorrect that apeChecker is the part of ACL service - it is a temporary solution.

It is suggested to implement the pair for aclSvc - apeSvc in pkg/services/object/ape/v2.

Please, note, that common service uses aclSvc for its nextHandler and it needs the second handler for a while (after all methods start using only APE checking the first handler will be removed)

  1. Implement apeSvc along with aclSvc
  2. Initialize the service in cmd/frostfs-node/object.go
  3. Pass it commonSvc
  4. commonSvc should use apeSvc middleware for Put method
The PR [#770](https://git.frostfs.info/TrueCloudLab/frostfs-node/pulls/770) has introduced the usage of the access policy engine for `Object.Put` method in `frostfs-node`. It's incorrect that `apeChecker` is the part of [ACL service](https://git.frostfs.info/TrueCloudLab/frostfs-node/src/commit/78cfb6aea8/pkg/services/object/acl/v2/service.go#L86) - it is a temporary solution. It is suggested to implement _the pair_ for `aclSvc` - `apeSvc` in `pkg/services/object/ape/v2`. Please, note, that [common service](https://git.frostfs.info/TrueCloudLab/frostfs-node/src/commit/78cfb6aea8/pkg/services/object/common.go#L26) uses `aclSvc` for its [nextHandler](https://git.frostfs.info/TrueCloudLab/frostfs-node/src/commit/78cfb6aea8/cmd/frostfs-node/object.go#L193) and it needs the second handler for a while (after all methods start using only APE checking the first handler will be removed) 1. Implement `apeSvc` along with `aclSvc` 2. Initialize the service in `cmd/frostfs-node/object.go` 3. Pass it `commonSvc` 4. `commonSvc` should use `apeSvc` middleware for `Put` method
aarifullin added the
discussion
label 2023-11-09 13:21:14 +00:00
fyrchik added the
frostfs-node
refactoring
labels 2023-11-14 13:18:38 +00:00
Owner

I think we should replace or rename acl service instead. The goal of APE is to check access rules, acl service is exactly about that.

I think we should replace or rename acl service instead. The goal of APE is to check access rules, acl service is exactly about that.
Author
Member

The issue won't be solved: we don't need to create new service (check the comment above)

The issue won't be solved: we don't need to create new service (check the comment above)
fyrchik added this to the v0.38.0 milestone 2023-12-22 07:27:35 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#798
No description provided.