From a7782cf1f9b81091a9798a884097ca8a7ee8d0a4 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Sat, 3 Oct 2020 10:40:50 +0300 Subject: [PATCH] [#69] object/acl: Extended requestInfo structure Add container identifier field. Add send public key field. Signed-off-by: Leonard Lyubich --- pkg/services/object/acl/basic.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkg/services/object/acl/basic.go b/pkg/services/object/acl/basic.go index 0505117f..b0a9742d 100644 --- a/pkg/services/object/acl/basic.go +++ b/pkg/services/object/acl/basic.go @@ -43,6 +43,10 @@ type ( requestRole acl.Role operation acl.Operation // put, get, head, etc. owner *owner.ID // container owner + + cid *container.ID + + senderKey []byte } ) @@ -351,6 +355,12 @@ func (b Service) findRequestInfo( info.operation = verb info.owner = owner.NewIDFromV2(cnr.GetOwnerID()) + info.cid = cid + + // it is assumed that at the moment the key will be valid, + // otherwise the request would not pass validation + info.senderKey = req.vheader.GetBodySignature().GetKey() + return info, nil }