Object sessions for `PUT` and `SEARCH` ops are spread to the whole
container due to op semantics. Sometimes it is convenient to spread the
session to all objects of the container for other operations. Thus,
object sessions for the whole container can be unified.
Modify docs of `ObjectSessionContext.address` field:
* require `container_id` field to be correctly set;
* require `object_id` field to be correctly field if set;
* allow `object_id` field to be unset and make this case equivalent to
the container-global session.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
FilePath attribute is already used by S3 and HTTP protocol gateways.
Also seen in [Gaspump](https://github.com/configwizard/gaspump-api/).
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
Clients need an easy way of getting network map to get connection
endpoints form Node's attributes.
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
To avoid ambiguity, let's use the common well-known attribute to control
both Object and Storage Group expirations.
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
Remove `UNSPECIFIED` value from `SignatureScheme` enum. Make
`ECDSA_SHA512` to be default signature scheme (zero value).
Define `SignatureRFC6979` type for RFC-6979 signatures. Use it in
`Container` service.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Add `OBJECT_ALREADY_REMOVED` value to `Object` enumeration. Return this
status from object GET/HEAD/RANGE operations.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
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>