Container access control type definitions

This commit is contained in:
Leonard Lyubich 2019-12-17 15:35:38 +03:00
parent 805ef243ee
commit 6b6728356a
5 changed files with 30 additions and 0 deletions

Binary file not shown.

View file

@ -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)

View file

@ -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)

Binary file not shown.

View file

@ -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];
}