eACL -> APE converter #800
No reviewers
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 milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#800
Loading…
Reference in a new issue
No description provided.
Delete branch "dstepanov-yadro/frostfs-node:feat/eacl_ape_converter"
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?
Closes TrueCloudLab/policy-engine#10
Added converter and unit tests.
58c0ae8e62
to8043f01890
8043f01890
to193811da22
193811da22
to504e524371
504e524371
toabab227a9b
abab227a9b
to536bdef019
native
(frostfs-node
) objects toAPE
-objects #16536bdef019
tod65f3a46d5
d65f3a46d5
tob5497e44d2
b5497e44d2
todaeae06d6b
daeae06d6b
to28c6578506
28c6578506
to2bf4fbec31
2bf4fbec31
to91eb9cb960
WIP: eACL -> APE converterto eACL -> APE converter91eb9cb960
to6476b81a87
@ -0,0 +150,4 @@
cond.Op = policyengine.CondStringEquals
} else if filter.Matcher() == eacl.MatchStringNotEqual {
cond.Op = policyengine.CondStringNotEquals
}
The converter ignores
else { /**/ }
forfilter.From()
andfilter.Matcher()
and it means that invalid/incorrect filteris converted to valid:
Either we need to reject appending the
cond
to the result or we need to introducepolicyengine.ObjectUnknown/policyengine.CondUnknown
fixed
6476b81a87
to2fbea9fd91
@ -0,0 +9,4 @@
NativeRangeObject = "RangeObject"
NativeHashObject = "HashObject"
NativeResourceFormatAllContainers = "native::object/%s"
Could you, please, add explanatory comment for this format?
I am talking about
native:[optonal_something?]:
Moved to
police-engine
repository2fbea9fd91
to00e2a6a854
00e2a6a854
to9f7646fcc4
Brilliant
@ -134,7 +138,6 @@ const (
var typeToCondObject = map[string]policyengine.ObjectType{
ObjectResource: policyengine.ObjectResource,
ObjectRequest: policyengine.ObjectRequest,
ObjectActor: policyengine.ObjectActor,
Also remove the constant
ObjectActor
?Done
@ -21,3 +21,2 @@
Status: policyengine.Allow,
Action: []string{"native:PutObject"},
Resource: []string{"native:::object/*"},
Actions: policyengine.Actions{Names: []string{"PutObject"}},
Why not use constants here?
Fixed
@ -0,0 +87,4 @@
var pubKeyCondition policyengine.Condition
pubKeyCondition.Object = policyengine.ObjectRequest
pubKeyCondition.Key = nativeschema.PropertyKeyActorPublicKey
pubKeyCondition.Value = string(binKey)
Will we store binary non-UTF-8 data in
Value
field here?Replaced with hex
Wanted some discussion here -- matching binary data is a valid usecase (all ids are in base58 now, public key in hex, but could be in binary).
There is another problem with public key -- it can have 2 formats in hex (short = 0x02|0x03 + 32 bytes or long = 0x04 + 64 bytes), both denote the same entity.
Looks ok now (in practice 0x04 encoding is rare), but maybe we could extend operations in policy engine, having this in mind.
9f7646fcc4
toee0fa8d718
ee0fa8d718
tofd9128d051