forked from TrueCloudLab/frostfs-api
[#21] Use EACLTable in EACL related requests
With EACLTable in requests and container id in EACLTable there is no need in extra messages such as ExtendedACLKey and ExtendedACLValue. Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
27171ef753
commit
944cf1ff47
1 changed files with 9 additions and 20 deletions
|
@ -3,6 +3,7 @@ package container;
|
||||||
option go_package = "github.com/nspcc-dev/neofs-api-go/container";
|
option go_package = "github.com/nspcc-dev/neofs-api-go/container";
|
||||||
option csharp_namespace = "NeoFS.API.Container";
|
option csharp_namespace = "NeoFS.API.Container";
|
||||||
|
|
||||||
|
import "acl/types.proto";
|
||||||
import "service/meta.proto";
|
import "service/meta.proto";
|
||||||
import "service/verify.proto";
|
import "service/verify.proto";
|
||||||
import "container/types.proto";
|
import "container/types.proto";
|
||||||
|
@ -106,23 +107,11 @@ message ListResponse {
|
||||||
repeated bytes CID = 1 [(gogoproto.customtype) = "CID", (gogoproto.nullable) = false];
|
repeated bytes CID = 1 [(gogoproto.customtype) = "CID", (gogoproto.nullable) = false];
|
||||||
}
|
}
|
||||||
|
|
||||||
message ExtendedACLKey {
|
|
||||||
// ID (container id) is a SHA256 hash of the container structure
|
|
||||||
bytes ID = 1 [(gogoproto.customtype) = "CID", (gogoproto.nullable) = false];
|
|
||||||
}
|
|
||||||
|
|
||||||
message ExtendedACLValue {
|
|
||||||
// EACL carries binary representation of the table of extended ACL rules
|
|
||||||
bytes EACL = 1;
|
|
||||||
// Signature carries EACL field signature
|
|
||||||
bytes Signature = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
message SetExtendedACLRequest {
|
message SetExtendedACLRequest {
|
||||||
// Key carries key to extended ACL information
|
// EACL to set for the container.
|
||||||
ExtendedACLKey Key = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
acl.EACLTable EACL = 1;
|
||||||
// Value carries extended ACL information
|
// Signature of stable-marshalled Extended ACL according to RFC-6979.
|
||||||
ExtendedACLValue Value = 2 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
bytes Signature = 2;
|
||||||
// RequestMetaHeader contains information about request meta headers (should be embedded into message)
|
// RequestMetaHeader contains information about request meta headers (should be embedded into message)
|
||||||
service.RequestMetaHeader Meta = 98 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
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)
|
// RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)
|
||||||
|
@ -132,8 +121,8 @@ message SetExtendedACLRequest {
|
||||||
message SetExtendedACLResponse {}
|
message SetExtendedACLResponse {}
|
||||||
|
|
||||||
message GetExtendedACLRequest {
|
message GetExtendedACLRequest {
|
||||||
// Key carries key to extended ACL information
|
// ContainerID of the container that has Extended ACL.
|
||||||
ExtendedACLKey Key = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
bytes ContainerID = 1;
|
||||||
// RequestMetaHeader contains information about request meta headers (should be embedded into message)
|
// RequestMetaHeader contains information about request meta headers (should be embedded into message)
|
||||||
service.RequestMetaHeader Meta = 98 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
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)
|
// RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)
|
||||||
|
@ -141,6 +130,6 @@ message GetExtendedACLRequest {
|
||||||
}
|
}
|
||||||
|
|
||||||
message GetExtendedACLResponse {
|
message GetExtendedACLResponse {
|
||||||
// ACL carries extended ACL information
|
// EACL that has been requested if it was set up.
|
||||||
ExtendedACLValue ACL = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
acl.EACLTable EACL = 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue