mirror of
https://github.com/nspcc-dev/neofs-s3-gw.git
synced 2026-03-01 04:29:15 +00:00
Consider ACL filter optimizations #279
Labels
No labels
I2
I2
I3
I4
S2
S3
S4
S4
U0
U1
U2
U2
U3
U4
U4
auth-mate
blocked
bug
config
dependencies
discussion
documentation
enhancement
epic
feature
go
good first issue
help wanted
performance
question
security
test
tree-service
tree-service
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nspcc-dev/neofs-s3-gw#279
Loading…
Add table
Add a link
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?
Originally created by @alexvanin on GitHub (Jul 5, 2022).
Part one: simplify
eacl->astdecoding by usingsystemfiltersUse system filters to define grantees and permissions, like
These values may be used during encoding and decoding of rules
Part two: reduce number of records in
eaclSome EACL records may not produce behaviour changes, but they required for decoding
ast. We can try to remove such records and replace then by storing extra information in system filters of EACL records.@alexvanin commented on GitHub (Jul 21, 2022):
In https://github.com/nspcc-dev/neofs-s3-gw/pull/605 a tried to fix some issues but acl parse order kicked me in the guts. Here I briefly describe what I tried.
bucketACLToTable upgrade
I want to use AST to provide correct bucket ACL, so I come up with something like this
To make it work, remove mandatory full control grant from
nspcc-dev/neofs-s3-gw@7ba7e7dc4d/api/handler/acl.go (L468-L475)It works very well when creating buckets with canned ACL without grants. However when grant appears, it turns out that DENY record is going to be placed above grant rule, which is incorrect.
This happens because DENY rules appear on the second loop after processing grants. If they go before grants, then there will be useless DENY rules in eACL.
Public object table record
After #605 private objects have correct eACL field order: owner rules above others rules.
However public objects produce reversed order. It doesn't affect access control, but it looks odd.
To fix that we can set owner related record as last statement. But I am not sure if the change in the order is safe.
@alexvanin commented on GitHub (Nov 3, 2022):
All optimization will make more sense after https://github.com/nspcc-dev/neofs-api/issues/241