[#367] Add check of AccessBox attributes #367

Merged
alexvanin merged 1 commit from mbiryukova/frostfs-s3-gw:feature/check_accessbox_attrs into master 2024-04-19 06:25:27 +00:00
Member

Signed-off-by: Marina Biryukova m.biryukova@yadro.com

Signed-off-by: Marina Biryukova <m.biryukova@yadro.com>
mbiryukova self-assigned this 2024-04-16 08:49:09 +00:00
mbiryukova force-pushed feature/check_accessbox_attrs from 6496dc760d to 6a76dd222a 2024-04-16 08:49:45 +00:00 Compare
mbiryukova changed title from [#xxx] Add check of AccessBox attributes to [#367] Add check of AccessBox attributes 2024-04-16 08:53:48 +00:00
mbiryukova requested review from storage-services-committers 2024-04-16 08:56:54 +00:00
mbiryukova requested review from storage-services-developers 2024-04-16 08:56:54 +00:00
dkirillov reviewed 2024-04-16 09:21:20 +00:00
@ -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)
Member

Can we set whole box rather than each field separately?

Can we set whole `box` rather than each field separately?
dkirillov marked this conversation as resolved
@ -405,0 +405,4 @@
attrs, err := GetAccessBoxAttrs(ctx)
if err == nil {
for _, attr := range attrs {
res[fmt.Sprintf(s3.PropertyKeyFormatAccessBoxAttr, attr.Key())] = attr.Value()
Member

It would be nice to add tests for that properties

It would be nice to add tests for that properties
dkirillov marked this conversation as resolved
go.mod Outdated
@ -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
Member

I suppose this means that we are blocked by TrueCloudLab/policy-engine#70

I suppose this means that we are blocked by https://git.frostfs.info/TrueCloudLab/policy-engine/pulls/70
Member

Now we can use appropriate dependency

Now we can use appropriate dependency
dkirillov marked this conversation as resolved
@ -93,3 +94,1 @@
defer res.Payload.Close()
return io.ReadAll(res.Payload)
return res.Head.Payload(), res.Head.Attributes(), err
Member

Probably we can return res.Head

Probably we can return `res.Head`
dkirillov marked this conversation as resolved
mbiryukova force-pushed feature/check_accessbox_attrs from 6a76dd222a to a82f7dbacb 2024-04-16 12:26:21 +00:00 Compare
mbiryukova force-pushed feature/check_accessbox_attrs from a82f7dbacb to b48d78d259 2024-04-16 12:36:31 +00:00 Compare
dkirillov approved these changes 2024-04-17 06:50:30 +00:00
dkirillov left a comment
Member

LGTM, (see last comment)

LGTM, (see last comment)
mbiryukova force-pushed feature/check_accessbox_attrs from b48d78d259 to 22d0c7e5e6 2024-04-17 07:29:46 +00:00 Compare
mbiryukova force-pushed feature/check_accessbox_attrs from 22d0c7e5e6 to b279bdffe4 2024-04-17 09:29:21 +00:00 Compare
dkirillov approved these changes 2024-04-17 09:36:22 +00:00
alexvanin added this to the v0.30.0 milestone 2024-04-18 06:41:45 +00:00
alexvanin approved these changes 2024-04-19 06:25:21 +00:00
alexvanin merged commit e22ff52165 into master 2024-04-19 06:25:27 +00:00
alexvanin deleted branch feature/check_accessbox_attrs 2024-04-19 06:25:27 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-services-developers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-s3-gw#367
No description provided.