Commit graph

979 commits

Author SHA1 Message Date
Leonard Lyubich
70c29ca3e5 [#194] pkg/container: Implement container nonce getter/setter as UUID
Implement NonceUUID/SetNonceUUID methods on container structure. Change
implementation of Nonce/SetNonce methods and mark them deprecated.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-24 12:54:53 +03:00
Leonard Lyubich
3550e128bb [#236] Fix SDK minor version number
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-24 10:35:33 +03:00
Leonard Lyubich
9480742d7b Update changelog for v1.21.1
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-18 16:29:16 +03:00
Leonard Lyubich
adb681878b Recompile protobuf files from neofs-api v2.1.1
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-18 16:29:16 +03:00
Leonard Lyubich
5395988efc [#208] pkg/client: Add function to get container and verify ID
GetContainer method reads container structure by identifier from the
network. In some cases it is required to additionally check the
correspondence of the container structure to the identifier as a hash from
the binary representation. To do this, a new function
GetVerifiedContainerStructure is defined to execute the check after
receiving the container.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-17 14:52:04 +03:00
Leonard Lyubich
84839b09c2 [#208] pkg/container: Define standard error for mismatch identifiers
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-17 14:52:04 +03:00
Leonard Lyubich
7d1a795d76 Update changelog and readme for v1.21.0
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-11 17:50:26 +03:00
Leonard Lyubich
2aa51d3add v2/object: Fix NPE in SplitInfo.GetObject
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-11 14:48:27 +03:00
Leonard Lyubich
1bc91466aa sdk/client: Fix setter of objectAddressWriter structure value
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-11 11:19:45 +03:00
Leonard Lyubich
803c91b3eb [#226] sdk/client: Add tombstone address to the return of DeleteObject
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-10 18:26:23 +03:00
Leonard Lyubich
4567986682 [#226] v2/object: Add tombstone field to DeleteResponseBody
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-10 18:26:23 +03:00
Leonard Lyubich
c064760f5d [#226] sdk/object: Implement Tombstone type with field access and encoding
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-10 18:26:23 +03:00
Leonard Lyubich
6037a26a35 [#226] v2/tombstone: Implement unified message structure with methods
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-10 18:26:23 +03:00
Leonard Lyubich
2f3e5742d3 [#226] v2/grpc: Re-compile protobuf definitions
Add compiled tombstone message. Extend Object.DeleteResponse.Body with
tombstone address field.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-10 18:26:23 +03:00
Alex Vanin
139660c6ff [#225] pkg/client: Update object methods
- Support errors with SplitInfo in head and range methods.
- Support raw flat in range method.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-08 10:23:27 +03:00
Alex Vanin
ded06674ac [#225] v2/object: Support more SplitInfo structures
- SplitInfo structure in object.HeadResponse
- SplitInfo structure in object.GetRangeResponse
- Raw flag in object.GetRangeRequest

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-08 10:23:27 +03:00
Alex Vanin
42cd897b25 [#225] v2/object: Update GRPC files from neofs-api
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-08 10:23:27 +03:00
Alex Vanin
28aad71860 [#225] Do not use wrappers on oneof object.HeadResponse types
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-08 10:23:27 +03:00
Alex Vanin
6db6b569e0 [#223] pkg/client: Add getters for object params
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-03 18:07:42 +03:00
Alex Vanin
1fe0307711 [#223] pkg/object: Work with SplitInfoError via pointer
Closes #221

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-03 18:07:42 +03:00
Alex Vanin
b683dbe7e6 [#218] pkg/object: Add marshal operations for SplitInfo
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-03 16:09:38 +03:00
Alex Vanin
664ebfd8a7 [#218] pkg/client: Add raw flag for object.Head
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-03 16:09:38 +03:00
Alex Vanin
582cdd4ba3 [#218] pkg/client: Add raw flag for object.Get
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-03 16:09:38 +03:00
Alex Vanin
e11b1728be [#218] pkg/object: Define custom error for SplitInfo
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-03 16:09:38 +03:00
Alex Vanin
1fdeca84e1 [#218] Support SplitInfo structure
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-03 16:09:38 +03:00
Evgenii Stratonikov
707a0bcb35 [#220] netmap: process REP X policies correctly
For `REP X` select X nodes from the default filter
and fail if it cannot be done.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2020-12-03 15:39:49 +03:00
Evgenii Stratonikov
576841e0e0 [#215] netmap: add test with multiple replicas
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2020-12-01 13:33:11 +03:00
Evgenii Stratonikov
4e0a11b71a [#156] netmap: Use default value for CBF if unset
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2020-12-01 13:33:11 +03:00
Evgenii Stratonikov
4e65fa41b8 [#213] netmap: Do not append not twice if selector is unnamed
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2020-12-01 13:33:11 +03:00
Evgenii Stratonikov
ea6b6adfe0 [#157] netmap: Fallback to using minimal backup factor
Use CBF=1 when strict policy can't be satisfied.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2020-12-01 13:33:11 +03:00
Leonard Lyubich
c01024b553 [#217] pkg/eacl: Change interface for working with keys on Target and Record
In previous implementation Target provided Keys/SetKeys methods which
allowed working with ECDSA keys. There was also a bug in the NewTargetFromV2
function when the binary key differed in format from the ECDSA key. New
BinaryKeys/SetBinaryKeys methods work with binary keys. To work with ECDSA
keys added functions TargetECDSAKeys/SetTargetECDSAKeys. Old methods are
left and marked deprecated.

Type Record provided an interface for adding a Target by Role and a list of
ECDSA keys. New SetTargets method allows to set the list of Target's,
AddTarget function allows to add a single Target. AddFormedTarget works like
old AddTarget method, which is now deprecated.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-01 10:11:32 +03:00
Alex Vanin
2a94fdc5e7 [#209] Support nil value in SplitID
SplitID is not set on non-split and virtual
objects, so we should support this state in
library.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-11-26 13:26:34 +03:00
Alex Vanin
3d08d8140f [#209] object: Support splitID search attribute
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-11-26 11:56:30 +03:00
Alex Vanin
79c76e87e4 [#209] object: Remove childfree search attribute
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-11-26 11:56:30 +03:00
Alex Vanin
6b0bd42f25 [#209] pkg/object: Support splitID field in SDK library
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-11-26 11:56:30 +03:00
Alex Vanin
b9778464b9 [#209] v2/object: Add splitID to unified structure
* Add getters/setters
* Support stable marshaling
* Support converters

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-11-26 11:56:30 +03:00
Alex Vanin
d441193952 [#209] v2/object: Recompile GRPC files and add SplitID setter
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-11-26 11:56:30 +03:00
Leonard Lyubich
ee0484acd9 Update changelog for v1.20.3
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-25 15:57:33 +03:00
Leonard Lyubich
8c99d9d54c [#207] sdk/client: Implement GetEACLWithSignature method
GetEACL method of Client receives eACL table with signature, verifies the
signature and return the table. In some cases we need to receive table and
signature regardless of their correctness. New method GetEACLWithSignature
provides such an opportunity.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-24 15:16:42 +03:00
Leonard Lyubich
3ebfef9f94 [#207] sdk/client: Fix signature verification in GetEACL method
Extended ACL tables should be signed with RFC-6979 standard. Fix Client
.GetEACL implementation to verify eACL signature with SignRFC6979 option.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-24 15:16:42 +03:00
Leonard Lyubich
5ee500bb43 [#205] sdk/client: Support option to set dial timeout
There is a need to set dial timeout in SDK client that is used in case of
internal connection opening. Add DialTimeout option constructor to support
this feature.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-23 14:15:42 +03:00
Leonard Lyubich
03ac6bedb4 [#205] v2/client: Replace WithGRPCDialContext option with WithDialTimeout
There is a need to set dial timeout in v2 client that is used in case of
internal connection opening. Add DialTimeout option constructor to support
this feature. Remove unused and no longer needed WithGRPCDialContext
function.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-23 14:15:42 +03:00
Leonard Lyubich
20ede88fe7 [#204] sdk/object: Add SearchFilters method to filter by object ID
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-20 10:41:17 +03:00
Alex Vanin
fe6677f30f Update readme badges and changelog
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-11-17 17:14:00 +03:00
Alex Vanin
43d5b9d858 Update changelog for v1.20.1
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-11-17 16:23:44 +03:00
Alex Vanin
9ceba98198 [#202] pkg/client: Fix signature check in object header getter
According to API object.Head response contains signature of
object ID rather than signature of object header itself.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-11-17 16:23:44 +03:00
Alex Vanin
dd19eb7eca Fix changelog and add compatibility matrix in readme file
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-11-17 11:43:39 +03:00
Leonard Lyubich
87a216dd96 Update changelog for v2.0.0
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-16 18:51:14 +03:00
Leonard Lyubich
0620a3b1eb [#199] sdk/client: Correct linter's remarks
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-16 18:51:14 +03:00
Leonard Lyubich
00ce980d82 [#199] sdk/token: Correct linter's remarks
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-16 18:51:14 +03:00