ape: Move common APE check logic to separate package #1362

Merged
fyrchik merged 1 commit from aarifullin/frostfs-node:feat/ape/object_tree_refactor into master 2024-09-10 12:40:34 +00:00
Member
  • Tree and object service have the same log for checking APE. So, this check should be moved to common package.
* Tree and object service have the same log for checking APE. So, this check should be moved to common package.
aarifullin added the
refactoring
label 2024-09-10 08:26:17 +00:00
aarifullin added 1 commit 2024-09-10 08:26:18 +00:00
[#XX] ape: Move common APE check logic to separate package
Some checks failed
DCO action / DCO (pull_request) Failing after 49s
Vulncheck / Vulncheck (pull_request) Successful in 1m59s
Pre-commit hooks / Pre-commit (pull_request) Successful in 2m14s
Tests and linters / gopls check (pull_request) Successful in 2m44s
Build / Build Components (pull_request) Successful in 2m58s
Tests and linters / Run gofumpt (pull_request) Successful in 2m46s
Tests and linters / Staticcheck (pull_request) Successful in 3m12s
Tests and linters / Lint (pull_request) Successful in 3m56s
Tests and linters / Tests (pull_request) Successful in 5m36s
Tests and linters / Tests with -race (pull_request) Successful in 5m42s
e096626b1b
* Tree and object service have the same log for checking APE. So,
  this check should be moved to common package.

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
aarifullin force-pushed feat/ape/object_tree_refactor from e096626b1b to 6e8ea93af1 2024-09-10 08:27:26 +00:00 Compare
fyrchik requested changes 2024-09-10 08:28:20 +00:00
Dismissed
@ -149,2 +87,2 @@
// it to chain router.
func (c *checkerImpl) CheckAPE(ctx context.Context, prm Prm) error {
// PrepareAndCheck prepares an APE-request and checks if it is permitted by policies.
func (c *checkerImpl) PrepareAndCheck(ctx context.Context, prm Prm) error {
Owner

Did we have any problem with the old name?
The changes in security function should be minimal.

Did we have any problem with the old name? The changes in security function should be minimal.
Author
Member

This is not a problem, but here is some name duplication that's not obvious. Anyway, I returned this name back and introduced CheckCore interface with the same method

This is not a problem, but here is some name duplication that's not obvious. Anyway, I returned this name back and introduced `CheckCore` interface with the same method
aarifullin force-pushed feat/ape/object_tree_refactor from 6e8ea93af1 to dce78c92a6 2024-09-10 08:55:17 +00:00 Compare
aarifullin changed title from WIP: [#XX] ape: Move common APE check logic to separate package to ape: Move common APE check logic to separate package 2024-09-10 08:56:03 +00:00
aarifullin requested review from storage-core-committers 2024-09-10 08:56:17 +00:00
aarifullin requested review from storage-core-developers 2024-09-10 08:56:19 +00:00
fyrchik reviewed 2024-09-10 09:28:41 +00:00
@ -7,1 +5,3 @@
type Checker interface {
// CheckAPE checks if a request or a response is permitted creating an ape request and passing
// it to chain router.
type ObjectServiceAPE interface {
Owner

Again, why introduce unnecessary changes?

Again, why introduce unnecessary changes?
Author
Member

Okay, the name has been returned back

Okay, the name has been returned back
fyrchik marked this conversation as resolved
aarifullin force-pushed feat/ape/object_tree_refactor from dce78c92a6 to 92b29d06bb 2024-09-10 10:09:22 +00:00 Compare
aarifullin force-pushed feat/ape/object_tree_refactor from 92b29d06bb to e705e68310 2024-09-10 10:10:25 +00:00 Compare
fyrchik approved these changes 2024-09-10 10:58:40 +00:00
acid-ant approved these changes 2024-09-10 11:15:05 +00:00
dstepanov-yadro approved these changes 2024-09-10 12:08:37 +00:00
fyrchik merged commit a812932984 into master 2024-09-10 12:40:34 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-developers
No milestone
No project
No assignees
4 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#1362
No description provided.