From 6b6728356aa258ba8c2dab8156db7724c6e66550 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Tue, 17 Dec 2019 15:35:38 +0300 Subject: [PATCH] Container access control type definitions --- container/service.pb.go | Bin 59764 -> 61029 bytes container/service.proto | 3 +++ container/types.go | 13 +++++++++++++ container/types.pb.go | Bin 11990 -> 23152 bytes container/types.proto | 14 ++++++++++++++ 5 files changed, 30 insertions(+) diff --git a/container/service.pb.go b/container/service.pb.go index d9febc0e85a9d343fc30293765ae6c0f77e2f52d..cac8764ceb0852ab8a131580f2bb9ec3f847dcc5 100644 GIT binary patch delta 3700 zcmYk9J&Rpc6oyHn!5LF%VMNFz<5UJmIrpA(&qs)0Op(S$5NvZkA)+&JW&&4G5BUQY zUKD?Za0?3y|AU2>C`raoOH(%Vpvia`DtJ|MmxcJ=W^!_VX?~P|1zj5=tiOq{w z_O7wNyYuDl&dGT8=;Y|U!1l*0mv3IIv(3+|v$;Fm&(`G_*CCHtWa~u{e~d$1 zbHAJTy+mlJI9+kdTDI|f#abd$E6?3&$z4vD8YtPCYaCc*@jT;3UdHdDj;of{q(@8b zEaK_Hm0QYWdejj@iIWu<7Pz$Rr#rLwa3en2*d420M-^2m5D~h3Ynlfa<$~Lgc{K;OLcYBc_5LQ1>ao^d0uDWCSn;{ zC#d5gCK& zlSCtyd!p^(stw=fzra%~Q-1>@F$B@h%lR4H-nJcB>B2n{k1;rd9344;HQ0AH^q?AQ z7z@B1+IUQZLU6URtoR->>`NINZYx1SRf>oD4Jy)jL0zbfXH*hBhlc&V$AS$)6}c){ z8`HygJ7B*f#VxDHttjb|+#k_u-%m{zO|}EaZ|cg#mZl#dslmZMflEFRLNoJAzIDKt zvD2bEy-Nt%ggQrU6H+V#+ZFK)_-K2dCer`|oB;)jWYto`vr`7p7uK7ZF$TQwv9ki6 zfz_E6=4ecVufjW47e%LY` zxfM|rfUZX&lYu?T3%v}ti8OO+djOZJ5;q)wmELojn2A2?T{5JkBO^)Dgdp0Kh6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qVstGf>qnMmmL9ZiP zODt8>lQ^d$wCIBfcBmijj)-9<8?7nkBnQ!g)ns~zVPox#kX_HSS4Wa(e>zZ#g+lk_ z&`$TegLVk*2p*OAARCX3bK)p*&|26#GR^s-loG_O*g&8vP$ealp~Ou?r>a`;M+EKI zJ-LuW2E-mSGZ%UQp(6AZ_JxV&yMnyBsj+c#iZkJB!A?DcKW^Yhr)LCdn0gu8j-3J^ zxynsJJ7ZMrL}wb?CcX$3&u&=w!-n42F4K{PF!F~Z(wSlEdt)YhO37g*FQaOSJPMOT zXjBX-u|X}gR6Fn&vc2HeEa00f9cJRR_s^(si0djNI3Y*ERpV-+$LPE*pzR=PZC}tt zE(q2^*tg;n;i{BuN5_@2@~%6tNa)F4K{ue)l0?aRdCANm4|L{#T7~><&JT7Js{^zm zONk;nzw}ms4!I4qhO-O4j4m@dl zoK(G1kBvxX*srvY>2Bewv$fLAR*Ir$gmarRNJ)AN#c)hGQB8my=>3sz-(o*>3+=}r z_P7^iw9o$t9kwND9o`w{H6&HKedu^QrzpyFWZET$<{+Hr3~-z=Y$A}11_T>KGWNR# zI3F0;JMbJ9K9ar0A1|34g4c!Z>#N!aFzN|>#OmZa3r$oOBQD`cjI~mRip1Az+{L(IBCx@nR9;Zz6czwtG!HYkER)+ral|Q9I3XcnmGT5KtsNuEN+9n z7jlhm?GJB}Etm6)JtikHSX}z;>}4@oi}CW})yJPx7|S5CPjc;}ukUWJZ(jZJ>GhxG a?@umYfA{<4muF9}_ita{Umt!LzWf)C$53Pd diff --git a/container/service.proto b/container/service.proto index 8a3f56c0..9bd02c94 100644 --- a/container/service.proto +++ b/container/service.proto @@ -41,6 +41,9 @@ message PutRequest { // Rules define storage policy for the object inside the container. netmap.PlacementRule rules = 4 [(gogoproto.nullable) = false]; + // Container ACL. + AccessGroup Group = 5 [(gogoproto.nullable) = false]; + // RequestMetaHeader contains information about request meta headers (should be embedded into message) service.RequestMetaHeader Meta = 98 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; // RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) diff --git a/container/types.go b/container/types.go index 9269f300..d5d5a77d 100644 --- a/container/types.go +++ b/container/types.go @@ -11,6 +11,19 @@ import ( "github.com/pkg/errors" ) +// AccessMode is a container access mode type. +type AccessMode uint32 + +const ( + // AccessModeRead is a read access mode. + AccessModeRead AccessMode = 1 << iota + // AccessModeWrite is a write access mode. + AccessModeWrite +) + +// AccessModeReadWrite is a read/write container access mode. +const AccessModeReadWrite = AccessModeRead | AccessModeWrite + var ( _ internal.Custom = (*Container)(nil) diff --git a/container/types.pb.go b/container/types.pb.go index 7bf9a03651924c5d814922abf4dc886e4ee45d13..6671670f05dd7cf29c9619232886f2f262d19410 100644 GIT binary patch literal 23152 zcmeHPZExGgvi>anioFJUu5=>Hda-2LO$y{RsS%)ViZ(eYVECpKxl(u{lDZ`2*iG}_ z@60p1)Ka2ktB!*v*Zx3L;M=`=v(5_tq9;1lv9FaVlBqmV z*TO6YGUbt3qj@;f`*|2?>eSRb;ixko+0wNf?K$M!U{I?1JR!!q3%* zdW~4Td{1Hi;+c5hy*HcbTzNsj{%_Z7_O1Q@JJh2%KG_>z=Q?Y3Tgg0c#a^VJ7?>77 z`YnHv?VCOIpDc+__6*?O?-1ZuZw9Y;6k8mKlO$D(IQ-v*GtN{PDBqj;iy0h4 zf&uIGYZ81-q~1~_hN_T<@vJZmVkG(ABe#Y5wb)KmNJhybrg)zy@|-8(=X)^)kRshu zN-80RCq-G2FH|E)bQb@2j-dfv;^cjk1TKg#!Z;rux?=uWVf;wkCQ0O zbu`bfjpV;9W+X0LE~0UknkTc+zlIDfV>14aCa+VdhbEK?sYyJcAep57^UU*gq~n~Q zx{`{|50`=hZAD5vvnDO#^6B?K5}O}Giu~2Tr@l|o#vz<0GeE5Qbg*Q}04p5%5i|Vl zx8L6Ul)R4L>1!SQNG3|X8F`AM{lmv4*WV=!_btjIPPLy*AcY_us*1NMwCVi2$K0@CE~9+ z1dVJAh$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%4_P^-rT_o{ diff --git a/container/types.proto b/container/types.proto index a601edd0..a1429ce0 100644 --- a/container/types.proto +++ b/container/types.proto @@ -17,4 +17,18 @@ message Container { uint64 Capacity = 3; // Rules define storage policy for the object inside the container. netmap.PlacementRule Rules = 4 [(gogoproto.nullable) = false]; + // Container ACL. + AccessControlList List = 5 [(gogoproto.nullable) = false]; +} + +message AccessGroup { + // Group access mode. + uint32 M = 1; + // Group members. + repeated bytes G = 2 [(gogoproto.customtype) = "OwnerID", (gogoproto.nullable) = false]; +} + +message AccessControlList { + // List of access groups. + repeated AccessGroup List = 1 [(gogoproto.nullable) = false]; }