[#367] Add check of AccessBox attributes #367
Labels
No labels
P0
P1
P2
P3
good first issue
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-s3-gw#367
Loading…
Reference in a new issue
No description provided.
Delete branch "mbiryukova/frostfs-s3-gw:feature/check_accessbox_attrs"
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?
Signed-off-by: Marina Biryukova m.biryukova@yadro.com
6496dc760d
to6a76dd222a
[#xxx] Add check of AccessBox attributesto [#367] Add check of AccessBox attributes@ -70,6 +72,7 @@ func Auth(center Center, log *zap.Logger) Func {
ctx = SetClientTime(ctx, box.ClientTime)
}
ctx = SetAuthHeaders(ctx, box.AuthHeaders)
ctx = SetAccessBoxAttrs(ctx, box.Attributes)
Can we set whole
box
rather than each field separately?@ -405,0 +405,4 @@
attrs, err := GetAccessBoxAttrs(ctx)
if err == nil {
for _, attr := range attrs {
res[fmt.Sprintf(s3.PropertyKeyFormatAccessBoxAttr, attr.Key())] = attr.Value()
It would be nice to add tests for that properties
@ -35,6 +35,8 @@ require (
google.golang.org/protobuf v1.33.0
)
replace git.frostfs.info/TrueCloudLab/policy-engine v0.0.0-20240412102212-530248de754c => git.frostfs.info/mbiryukova/policy-engine v0.0.0-20240416071728-04a79f57ef1f
I suppose this means that we are blocked by TrueCloudLab/policy-engine#70
Now we can use appropriate dependency
@ -93,3 +94,1 @@
defer res.Payload.Close()
return io.ReadAll(res.Payload)
return res.Head.Payload(), res.Head.Attributes(), err
Probably we can return
res.Head
6a76dd222a
toa82f7dbacb
a82f7dbacb
tob48d78d259
LGTM, (see last comment)
b48d78d259
to22d0c7e5e6
22d0c7e5e6
tob279bdffe4