Define `object.Lock` message which carries list of locked objects.
Require this message to be a payload of locked objects (`LOCK` type).
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Add `status.Object` section for object failures. Add `LOCKED` and
`LOCK_NON_REGULAR_OBJECT` codes to it. Return these codes from `Put` and
`Delete` RPCs of `ObjectService`.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
NeoFS introduces object LOCKs - a mechanism for locking an object from,
for example, deletion. Object locks are implemented and stored in the
container as objects, so there is a need to define a new type of system
objects.
Add `LOCK` value to `ObjectType` enum.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
`OBJECT_` prefix is needed because of possible conflicts with other
`NOT_FOUND` codes declared in the same file.
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
Add detail for `WRONG_MAGIC_NUMBER` status code which carries the
correct magic of the served network served. Clients will be able to fix
incorrect magic and re-send the request. ID is 0, binary format
is uint64 in big-endian.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
After the recent update of NeoFS V2 protocol all requests must carry
correct network magic.
Add `WRONG_MAGIC_NUMBER` code to `CommonFail` section.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
To prevent theoretical cross-network replay attack, we need to have
network magic in NeoFS requests.
Add `magic_number` numeric field to `session.RequestMetaHeader`
message.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Define `netmap.NetworkConfig` message which represents structure of
NeoFS network config stored in Netmap contract.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Service headers are ignored by NeoFS nodes but can be
used to save access-related information by services
built on top of NeoFS.
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
Default string presentations of enums in protobuf are the same
as definitions. In our case it is going to be UPPER_SNAKE_CASE
string constants. Default presentation is easier to maintain.
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
Container can be created within a session. The presence of a session token
in the GET response body allows you to reflect this fact.
Add `session_token` field of `session.SessionToken` type to
`container.GetResponse.Body` message.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Extended ACL can be set within a session. The presence of a session token in
the GET response body allows you to reflect this fact.
Add `session_token` field of `session.SessionToken` type to
`container.GetExtendedACLResponse.Body` message.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Extend `session.SessionToken.Body.context` oneof with `container` field of
type `ContainerServiceContext`. This field is going to be used for RPCs of
`container.ContainerService`.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
* Rename:
- SendLocalTrust → AnnounceLocalTrust
- SendIntermediateResult → AnnounceIntermediateResult
Those methods don't expect to Send anything, but to further announce
the trust information from the node.
* Change PeerID to explicitly use public key as a node identifier
* Minor comments reformat
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>