Factor out ACL middleware in object service #1052
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#1052
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Since APE was introduced in object service, ACL is getting irrelevant to check request permissions.
For the context: if a container is created with zero-filled basic acl (
--basic-acl 0
), then hard ape check is performed andacl/eacl
checks are skipped like here. Thus ACL/eACL checks can be disabled.Still passing a request through ACL middleware is very important at least because of findRequestInfo. The method perfoms useful calculations that are passed within RequestContext (see how it is initialized). The formed request context is used in the next middleware (APE).
These steps should be borrowed from findRequestInfo:
questionable: Get bearer. Note that bearer token may setimpersonate
flag that means it should be wiped. Bearer token was used to retrieve eACL tableThese values apart from bearer token are already passsed within RequestContext.
So, it makes sense to not entirely nuke out
ACL
middleware but rename it to likecommon
and refactor it:CheckBasicACL
,CheckEACL
etc.)findRequestInfo
method (see above)