Commit graph

113 commits

Author SHA1 Message Date
Leonard Lyubich
487b84e614 [#28] storagegroup: Measure lifetime in NeoFS epochs
In previous version of the format storage group lifetime was measured in two
epoch times: NeoFS and Unix. Since unix is not processed in the system,
this commit narrows the time point of storage group expiration to the
system epoch number. The storagegroup.StorageGroup.Lifetime message has
therefore been deleted as no longer used.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 22:00:01 +03:00
Leonard Lyubich
248a91b329 [#28] storagegroup: Remove gogoproto from typedef
As mentioned in #32, there is a need to remove gogoproto usage from NeoFS API
since this plugin is not cross-language. This commit removes usage from
StorageGroup message and all related types

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 21:59:42 +03:00
Leonard Lyubich
974a2288c4 [#26] object: Add line breaks for readability
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 21:59:42 +03:00
Leonard Lyubich
a5c1b3683b [#26] object: Rename System header to Main
In the previous format, the object header was subdivided into system and
extended parts, which confused the purpose of these parts. In particular,
the extended header contains system fields. To clarify the non-intersection
of the mentioned parts of the object header, it was decided to rename System
to Main.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 21:59:42 +03:00
Leonard Lyubich
eaad094a2c [#26] object: Tidy up comments
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 21:59:42 +03:00
Leonard Lyubich
0525786d09 [#26] object: Use nested types in Header
This commit replaces all message definitions related to object header to
Header message.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 21:59:42 +03:00
Leonard Lyubich
81a4adb202 [#26] object: Use nested types in ExtendedHeader
This commit replaces all message definitions related to extended header to
ExtendedHeader message.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 21:59:42 +03:00
Leonard Lyubich
72edea28db [#26] object: Change field order in Header
This commit changes field order in ExtendedHeader message.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 21:59:42 +03:00
Leonard Lyubich
a3a0de01b3 [#26] object: Replace Token to IntegrityHeader
This commit replaces Token field from ExtendedHeader to IntegrityHeader for
assembling all verification data in one structure.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 21:59:42 +03:00
Leonard Lyubich
8e8d9f0982 [#26] object: Replace Epoch to ExtendedHeader
This commit replaces CreationEpoch field to ExtendedHeader message.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 21:59:42 +03:00
Leonard Lyubich
a28decac39 [#26] object: Repeat object attributes in header
This commit replaces single Attribute field with the repeated list of
Attribute in ExtendedHeader message.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 21:59:42 +03:00
Leonard Lyubich
fb2064803e [#26] object: Replace PayloadChecksum to Integrity
This commit replaces PayloadChecksum field from ExtendedHeader to
IntegrityHeader for assembling all verification data in one structure.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 21:59:42 +03:00
Leonard Lyubich
b77811716e [#26] object: Replace creator key to Integrity
This commit moves the public key of the creator of the object to
IntegrityHeader to encapsulate the verification data in one message. Thus
field PublicKey of message Header has been moved to message IntegrityHeader
with the name CreatorKey. As a result, PublicKey message is deleted as no
longer used.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 21:59:42 +03:00
Leonard Lyubich
0a5f3d5a01 [#26] object: Remove unused Redirect field
Redirect field was introduced for the future, however, at the moment it is
not used anywhere. This commit removes field Redirect from ExtendedHeader
message. It can be added back later without losing API backward
compatibility.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 21:59:42 +03:00
Leonard Lyubich
4df4badf9c [#26] object: Remove Link message
After updating the structure of SplitHeader and StorageGroup messages, the
Link header field is no longer needed. This commit removes the field and
message Link as no longer used.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 21:59:42 +03:00
Leonard Lyubich
300b1d4197 [#26] storagegroup: Add member list to message
To encapsulate the complete information about the storage group in
StorageGroup message, this commit adds the missing group member list field.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 21:59:42 +03:00
Leonard Lyubich
7ce0945e6c [#26] object: Remove unused Version field
Field with object revision number was introduced for the future, however, at
the moment it is not used anywhere. This commit removes field Version from
SystemHeader message. It can be added back later without losing API
backward compatibility.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 21:59:42 +03:00
Leonard Lyubich
9666fd4bc7 [#26] object: Remake ExtendedHeader to field set
In previous version of the format ExtendedHeader consisted of one field
Value, defined by oneof mechanism. Such a definition format give complete
freedom when composing an object header, however, it did not allow strictly
structuring the header format at the level of type syntax. Since the object
has a well-defined structure in the system, this commit replaces the
definition through oneof with a set of fields. As a consequence, storing a
set of extended headers of the new type in the general header became
redundant, so the repeated keyword was removed.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 21:59:42 +03:00
Leonard Lyubich
cbd4cf63f9 [#26] object: Replace Transform header with Split
This commit replaces Transform message with SplitHeader in oneof definition
of Value field of Header message. The latter, unlike the first, carries
complete information about the generation of the object by splitting the
payload. As a result, the message is deleted as no longer used.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 21:59:42 +03:00
Leonard Lyubich
485510ab66 [#26] object: Define object split info message
This commit defines SplitHeader message that encapsulates data about
spawning the object through a payload splitting. Message fields contain
information about the hierarchy in the split-chain as well as information
about the origin object.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 21:59:42 +03:00
Leonard Lyubich
4bdd05ade8 [#26] refs: Use ObjectID message in Address
This commit makes ObjectID field of refs.Address message to use dedicated
message for object identifier ObjectID.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 21:59:42 +03:00
Leonard Lyubich
96924b04dc [#26] refs: Define ObjectID message
This commit defines ObjectID message in refs package. In the future, this
structure can be ported into messages in place of the object identifier
field to maintain format uniformity. Also, storing the identifier in a
dedicated message will allow, if necessary, to expand it with additional
information without losing backward compatibility within one version of the
API.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 21:59:42 +03:00
Leonard Lyubich
b46011db45 [#26] object: Combine ID and CID in Address
This commit merges object system header fields ID and CID into field Address
of type refs.Address. This will allow you to reuse an already existing type
of object reference without duplication and simplify taking the address
from the object body

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 21:59:42 +03:00
Leonard Lyubich
6e5565f238 [#26] object: Replace CreationPoint with Epoch
In previous version of the format Object message included moment of creation
in two epoch times: NeoFS and Unix. Since unix  is not processed in the
system, this commit narrows the time point of object creation to the system
epoch number. The object.CreationPoint message has therefore been deleted
as no longer used

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 21:59:42 +03:00
Leonard Lyubich
5beca3b0d1 [#26] object: Define message for object header
In previous version of the format Object message included two header fields:
SystemHeader and list of ExtendedHeader. Due to the fact that all headers
were not encapsulated in a single message, some messages were forced to use
Object to convey the full header of the object (e.g. object.HeadResponse).
To resolve this semantic inconsistency, this commit defines a Header
message, consisting of a system and an extended portion. As a result, the
Object now consists of two fields - Header and Payload.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 21:59:42 +03:00
Leonard Lyubich
2c3717bdee [#26] object: Rename Header to ExtendedHeader
The naming Header obscures its semantic meaning precisely as a subclass of
the general object header. To clarify the layers of typing object headers,
this commit renames the message to ExtendedHeader. As a result, the Headers
field in the Object has been renamed to ExtendedHeaders.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 21:59:42 +03:00
Leonard Lyubich
a76f634e47 [#26] object: Rename UserHeader to Attribute
The name of object.UserHeader message implies its use by the user. However,
the attributes of an object can also be set internally by the system. To
generalize the intended purpose of the message, this commit renames it to an
Attribute (like container.Attribute).

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 21:59:42 +03:00
Leonard Lyubich
c2b5b6b6ae [#26] object: Remove gogoproto from object typedef
As mentioned in #32, there is a need to remove gogoproto usage from NeoFS API
since this plugin is not cross-language. This commit removes usage from
object.Object message and all related types.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 21:58:35 +03:00
Leonard Lyubich
7ea4d475a0 [#26] object: Replace object.Range message definition
This commit replaces Range message definition closer to where it is used. In
the future, only the types associated with the structure of the object will
be defined in types.proto file.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-05 10:29:25 +03:00
Alex Vanin
dfcbfdc7d8 [#23] Regenerate documentation
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-08-03 18:03:34 +03:00
Alex Vanin
62cc321c3e [#23] Update comments for autogenerated docs
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-08-03 18:03:34 +03:00
Alex Vanin
5928fa9bea [#23] Use rich field names instead of abbreviations
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-08-03 18:03:34 +03:00
Alex Vanin
21f51c8c8b [#23] Reorganize container message fields
Capacity field is obsolete and removed. Salt field renamed to
Nonce so it shows better the purpose of the field.

Remaining fields are reorded to have fixed size fields on top.
It affects stable-marshaller implementation.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-08-03 18:03:34 +03:00
Alex Vanin
ebf96fea9e [#23] Remove meta and verify headers from requests
Neofs-node doesn't use these headers in any way. They are
obsolete since container API provides proxy between client
and morph chain.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-08-03 18:03:34 +03:00
Alex Vanin
cd6db41fe3 [#22] Add signature field to container delete request
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-08-03 18:03:34 +03:00
Alex Vanin
72618c4e49 [#22] Update fields in container put request
With explicit signature field, that contains signature of
stable-marshalled container message, there is no need to have
separate fields of the container in request.

Public key will be stored in neofs.id smart-contract for later
signature verifications.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-08-03 18:03:34 +03:00
Alex Vanin
9510aaee5d [#21] Return signature in GetEACL response
With EACLTable signature client can verify if EACLTable is
not corrupted by malicious node.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-08-03 18:03:34 +03:00
Alex Vanin
944cf1ff47 [#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>
2020-08-03 18:03:34 +03:00
Alex Vanin
27171ef753 [#21] Add container id into EACLTable message
EACLTable message and signature stored in blockchain storage.
If owner has several containers, malicious node can return
correct EACLTable of the container other than client actually
requested. With container id field in the EACLTable, this
malicious behaviour can be detected.

ContainerID has id 1, so contract can easily cut container id
from byte sequence.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-08-03 18:03:34 +03:00
Alex Vanin
6a2c66cbd8 [#20] Add attributes in container definition
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-07-31 17:11:48 +03:00
Leonard Lyubich
b6a0343919 Update changelog for v1.2.0 2020-07-08 10:46:02 +03:00
Leonard Lyubich
caa7e4ff91
Merge pull request #19 from nspcc-dev/feature/eacl-table-message
acl: Define EACLTable message for the table of extended ACL rules
2020-07-08 10:43:25 +03:00
Leonard Lyubich
089c6f1928 acl: Define EACLTable message for the table of extended ACL rules 2020-07-08 10:22:07 +03:00
alexvanin
3dbaac91d0 Update changelog for v1.1.0 2020-06-18 13:44:29 +03:00
Alex Vanin
4e5fa4f9e4
Merge pull request #18 from nspcc-dev/feature/extended-request-headers
service: support extended headers of the request
2020-06-18 13:33:15 +03:00
Alex Vanin
122c9fc548
Merge pull request #17 from nspcc-dev/feature/bearer-token-support
service: add Bearer token message to RequestVerificationHeader
2020-06-18 13:32:43 +03:00
Alex Vanin
2a48bf7e95
Merge pull request #16 from nspcc-dev/feature/container-eacl-rpc
container: add Get/Set extended ACL rpc
2020-06-18 13:32:15 +03:00
Leonard Lyubich
108d7e0fb0 service: clarify the description of BearerTokenMsg.Info.ACLRules field 2020-06-18 11:56:26 +03:00
Leonard Lyubich
f059c49dec service: support extended headers of the request 2020-06-18 11:53:21 +03:00
Leonard Lyubich
1d3ffeb841 service: add Bearer token message to RequestVerificationHeader 2020-06-18 10:58:11 +03:00