Commit graph

15 commits

Author SHA1 Message Date
Stanislav Bogatyrev
b169954806 acl: Fix naming mismatch
Field naming was different in protobuf and JSON notation.
Fixed to avoid confusion.

Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-09-02 15:03:03 +03:00
Stanislav Bogatyrev
79baf3b637 [#61] acl: Add version field to eACL Table
eACL Table is stored in SC storage, hence format version may be needed to
correctly process it in future.

Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-09-02 15:03:03 +03:00
Stanislav Bogatyrev
7d72061fb3 Move BearerToken type to acl package
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-08-18 18:31:36 +03:00
Stanislav Bogatyrev
7555e166b2 [#49] Minor reformat
- Trying to move enums to the package level
- Trying to keep all definitions in types.proto

Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-08-17 12:12:16 +03:00
Stanislav Bogatyrev
e63a482529 [#48] Add grpc suffix to go_package option
To simplify adding more transport level protocols to neofs-api-go in future, we
need to separate currently default gRPC.

Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-08-17 12:11:38 +03:00
Stanislav Bogatyrev
42e35fefff [#45] Fix linter errors
- Changed package names adding version
- Added documentation descriptions (sometimes useless) for all fields
- Changed enum format
- Made SessionToken and BearerToken field names more clear

Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-08-13 22:57:00 +03:00
Stanislav Bogatyrev
818ec7f0dc [#38] Change ObjectID format from UUID to Hash
NeoFS Object are now Content-addressed. It means the Object's address depends on
it's content. ObjectID is now calculated as hash of Header, which contains a
hash of payload. If either if Object's payload of Headers change, the ID will
also change.

Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-08-11 16:30:39 +03:00
Stanislav Bogatyrev
327c476ecf [#41] Reindent according to Google Style Guide
Just a minor change to follow 2-space indent declared in Google Style Guide

Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-08-11 12:08:37 +03:00
Stanislav Bogatyrev
e75ef53793 [#32] Rename fields according to Protobuf Style Guide
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-08-07 14:36:15 +03:00
Leonard Lyubich
fca07c84d6 acl: Tidy up the format
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 23:34:03 +03:00
Leonard Lyubich
d38377793a [#32] acl: Remove gogoproto from typedef
There is a need to remove gogoproto usage from NeoFS API since this plugin
is not cross-language. This commit removes usage from acl package.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 23:34:03 +03:00
Leonard Lyubich
fccd753a5d [#31] refs: Use ContainerID message in all services
Change the type of all fields for the container identifier to refs.ContainerID.
This will allow to follow a single format and not duplicate its description.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 22:00:01 +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
Leonard Lyubich
089c6f1928 acl: Define EACLTable message for the table of extended ACL rules 2020-07-08 10:22:07 +03:00
alexvanin
afd55ac90b acl: Define target of access control rules
Basic NeoFS ACL applies access rules to request sender. Request
senders are combined in groups that calls `targets`.

Basic ACL rules may be applied to these targets:

  1. User - request sender is the owner of the container,
     used in the request.

  2. System - request sender is the storage node
     within the container used in the request or
     inner ring node.

  3. Others - request sender is none of the above.

 Extended ACL rules may be applied for targets, provided with
 extra information.

  4. PubKey - request sender has provided public key.
2020-04-01 21:02:46 +03:00