Commit graph

1198 commits

Author SHA1 Message Date
Leonard Lyubich
d8cc00b54c Update to neofs-api v0.7.4 2020-05-08 10:49:23 +03:00
Leonard Lyubich
2abcfb7219
Merge pull request #74 from nspcc-dev/service-package-refactoring
Service package refactoring
2020-05-07 15:32:08 +03:00
Leonard Lyubich
65d7c39e1a service: fix comments 2020-05-06 15:32:13 +03:00
Leonard Lyubich
4aac4d093d object: implement signing payload methods on SearchRequest message 2020-05-06 15:09:31 +03:00
Leonard Lyubich
84671cd4aa object: implement signing payload methods on GetRangeHashRequest message 2020-05-06 14:58:29 +03:00
Leonard Lyubich
e784206032 object: implement signing payload methods on GetRangeRequest message 2020-05-06 14:38:39 +03:00
Leonard Lyubich
fc0da3c8fc object: implement signing payload methods on DeleteRequest message 2020-05-06 14:15:07 +03:00
Leonard Lyubich
68f83f5470 object: implement signing payload methods on HeadRequest message 2020-05-06 13:56:59 +03:00
Leonard Lyubich
439221cea8 object: implement signing payload methods on GetRequest message 2020-05-06 13:33:03 +03:00
Leonard Lyubich
78f435a905 object: implement signing payload methods on PutRequest message 2020-05-06 13:16:15 +03:00
Leonard Lyubich
082edf7456 service: implement sign-verify methods on RequestVerificationHeader 2020-05-06 12:50:15 +03:00
Leonard Lyubich
52d3c82776 service: implement sign/verify function for data with session token 2020-05-06 11:44:55 +03:00
Leonard Lyubich
fc2c78ae89 service: use new function for token signing and verification 2020-05-05 14:49:35 +03:00
Leonard Lyubich
74144f207a service: implement functions for verification of signatures 2020-05-05 13:16:21 +03:00
Leonard Lyubich
f3e6caf7e7 service: implement a function for creating and storing a signature 2020-05-04 19:33:18 +03:00
Leonard Lyubich
0ffb1bd61d service: implement a function for signing data 2020-05-04 18:52:56 +03:00
Leonard Lyubich
eb94cf7549 service: refactor MetaHeader interface 2020-05-04 14:37:14 +03:00
Leonard Lyubich
c38a8eddc8 service: use value container interfaces 2020-05-04 14:05:06 +03:00
Leonard Lyubich
8270245455 service: transfer public types to a separate file 2020-05-04 14:00:25 +03:00
Leonard Lyubich
b785eb710a service: transfer TTL code to a separate file 2020-05-04 13:38:27 +03:00
Leonard Lyubich
fc177c4ce3 service: change constant errors
This commit:

  * moves defined errors to a separate file;

  * renames ErrEmptyToken to ErrNilToken;

  * merges ErrZeroTTL and ErrIncorrectTTL into single ErrInvalidTTL.
2020-05-04 13:06:36 +03:00
Leonard Lyubich
e3cab218dc
Merge pull request #73 from nspcc-dev/session-private-token-expiration
session: support the expiration of private tokens
2020-04-29 14:54:43 +03:00
Leonard Lyubich
4fa7360cd1 session: support the expiration of private tokens
All sessions in NeoFS has limited in epochs lifetime. There is a need
to limit the lifetime of private session tokens.

This commmit:

  * extends PrivateToken interface with Expired method;

  * defines EpochLifetimeStore interface with RemoveExpired method
    and embeds it to PrivateTokenStore interface;

  * adds epoch value parameter to private token constructor.
2020-04-29 14:11:19 +03:00
Leonard Lyubich
8cbdb9183f
Merge pull request #72 from nspcc-dev/session-refactor
Session package refactoring
2020-04-29 13:14:17 +03:00
Leonard Lyubich
ffd4338eb3 session: fix NewPrivateToken function doc 2020-04-29 12:59:58 +03:00
Leonard Lyubich
608f578105 session: removes unused errors 2020-04-29 12:50:52 +03:00
Leonard Lyubich
79142ada04 session: replace used type aliases to separate file 2020-04-29 12:49:27 +03:00
Leonard Lyubich
f0867036fb session: remove trivial defaultCurve function 2020-04-29 12:46:05 +03:00
Leonard Lyubich
701bbafcf1 session: change KeyStore documentation 2020-04-29 12:44:35 +03:00
Leonard Lyubich
22265a9f03 session: refactor token store
This commit:

  * changes the set and signatures of TokenStore interface methods;

  * adds unit test for map storage.
2020-04-29 12:39:41 +03:00
Leonard Lyubich
dfc2dd8a78 session: replace PToken structure with PrivateToken interface
In previous implementation PToken contained the full Token structure.
Since private token is used for data signature only, storing unused
fields of a user token is impractical. To emphasize the purpose of
the private part of the session, it makes sense to provide the user
of the session package with its interface. The interface will only provide
the functionality of data signing with private session key.

This commit:

  * removes PToken structure from session package;

  * defines PrivateToken interface of private session part;

  * adds the implementation of PrivateToken on unexported struct;

  * provides the constructor that generates session key internally.
2020-04-29 11:52:05 +03:00
Leonard Lyubich
1e86e1112a
Merge pull request #71 from nspcc-dev/token-sign-verify
Implement Sign/Verify for SessionToken
2020-04-29 11:31:53 +03:00
Leonard Lyubich
cce6566f1e service: prevent NPE in VerifyTokenSignature function
This commit adds next changes to VerifyTokenSignature:

  * returns ErrEmptyToken on nil token argument;

  * returns ErrEmptyPublicKey on nil public key argument.
2020-04-29 10:57:07 +03:00
Leonard Lyubich
82ffde253b service: implement Sign/Verify functions for SessionToken 2020-04-28 19:03:15 +03:00
Evgeniy Kulikov
e47b775a86
Merge pull request #70 from nspcc-dev/use-token-getters-setters
service: access Token message fields through getters and setters
2020-04-28 18:49:10 +03:00
Leonard Lyubich
c6971d2004 service: access Token message fields through getters and setters 2020-04-28 18:40:21 +03:00
Evgeniy Kulikov
091f953ebf
Merge pull request #69 from nspcc-dev/new-fields-getters-setters
New fields getters setters
2020-04-28 17:42:53 +03:00
Leonard Lyubich
d327d836c4 service: define and implement Token field composing interface
This commit:

  * defines SessionToken interface of Token field getters/setters group;

  * implements SessionToken on Token message.
2020-04-28 17:09:01 +03:00
Leonard Lyubich
942bedb8ed service: implement Token field setter on RequestVerificationHeader
After recent changes Token field is presented in RequestVerificationHeader.
There is a need to provide an interface of field getter/setter.

This commit:

  * defines TokenHeader interface of token value container;

  * implements Token field setter on RequestVerificationHeader.
2020-04-28 17:02:47 +03:00
Leonard Lyubich
09f8ee52d0 service: implement Raw field setter on RequestMetaHeader struct
After recent changes Raw field is presented in RequestMetaHeader.
There is a need to provide an interface of field getter/setter.

This commit:

  * defines RawHeader interface of raw value container;

  * embeds RawHeader into MetaHeader interface;

  * implements Raw field setter on RequestMetaHeader.
2020-04-28 17:02:47 +03:00
Evgeniy Kulikov
72a71e6a94
Merge pull request #68 from nspcc-dev/stringify-object-method
object: Stringily method
2020-04-28 16:53:29 +03:00
Evgeniy Kulikov
5ae4e14bfa
object: test coverage for stringify method 2020-04-28 16:39:01 +03:00
Evgeniy Kulikov
4d535876d0
object: implement Stringify for Object 2020-04-28 16:39:01 +03:00
Evgeniy Kulikov
7a7deb0b01
proto: regenerate files 2020-04-28 16:30:47 +03:00
Evgeniy Kulikov
ba32395894
api: update to neofs-api v0.7.3 2020-04-28 16:29:54 +03:00
Evgeniy Kulikov
6c705e079f
Merge pull request #67 from nspcc-dev/update-to-neofs-api-0.7.2
Update to neofs api 0.7.2
2020-04-28 14:33:50 +03:00
Leonard Lyubich
4ac17201b7 Resolve update conflicts 2020-04-28 13:33:43 +03:00
Leonard Lyubich
24108f42c3 Regenerate docs 2020-04-28 12:51:27 +03:00
Leonard Lyubich
e63d112cb2 Update to neofs-api v0.7.2 2020-04-28 12:50:52 +03:00
Evgeniy Kulikov
0cf8e19f36
Merge tag 'v0.7.1' into develop
Release v0.7.1
2020-04-20 14:03:43 +03:00