Local override rule affects tree service RPC #1406
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#1406
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?
S3 Gateway creates containers and upload some nodes into tree service along with the objects. External service may restrict object upload by setting local override rule. Example of this rule presented in 'Steps to reproduce'. This rule allows object removal, so restriction may be lifted at some point.
Expected Behavior
object.Put
RPC is deniedobject.Delete
RPC is allowedtree.Remove
RPC is allowedCurrent Behavior
object.Put
RPC is deniedobject.Delete
RPC is allowedtree.Remove
RPC is denied with an errorSteps to Reproduce (for bugs)
Rule in JSON format:
Request body to set the rule
Context
Regression
Not sure, but this case had to be tested.
Your Environment
frostfs-node v0.38.5 or higher
frostfs-s3-gw v0.29.0 or higher
When
tree.Remove
prepares APE-request, it setsPutObject
verb but omits resource properties. Whenpolicy-engine
performs matching, it gets empty string by the key"$Object:objectType"
and the condition works out:"" != "TOMBSTONE"
.We could fix
policy-engine
- just ignore the condition check if the value is not presented but then we may get the opposite situation when empty value is actually a valid case.I'd suggest to introduce a backward-compatible flag for
Condition
:NotIgnoreEmpty
that could befalse
by default. IfNotIgnoreEmpty == true
, then this takes the described case for empty string in account