forked from TrueCloudLab/frostfs-api
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>
This commit is contained in:
parent
79baf3b637
commit
b169954806
2 changed files with 28 additions and 28 deletions
|
@ -7,10 +7,10 @@ option csharp_namespace = "NeoFS.API.v2.Acl";
|
||||||
|
|
||||||
import "refs/types.proto";
|
import "refs/types.proto";
|
||||||
|
|
||||||
// Target of the access control rule in access control list.
|
// Target role of the access control rule in access control list.
|
||||||
enum Target {
|
enum Role {
|
||||||
// Unspecified target, default value.
|
// Unspecified role, default value.
|
||||||
TARGET_UNSPECIFIED= 0;
|
ROLE_UNSPECIFIED= 0;
|
||||||
|
|
||||||
// User target rule is applied if sender is the owner of the container.
|
// User target rule is applied if sender is the owner of the container.
|
||||||
USER = 1;
|
USER = 1;
|
||||||
|
@ -94,10 +94,10 @@ message EACLRecord {
|
||||||
// Action carries ACL target action.
|
// Action carries ACL target action.
|
||||||
Action action = 2 [json_name = "Action"];
|
Action action = 2 [json_name = "Action"];
|
||||||
|
|
||||||
// FilterInfo groups information about filter.
|
// Filter definition
|
||||||
message FilterInfo {
|
message Filter {
|
||||||
// Header carries type of header.
|
// Header carries type of header.
|
||||||
HeaderType header = 1 [json_name = "HeaderType"];
|
HeaderType header_type = 1 [json_name = "HeaderType"];
|
||||||
|
|
||||||
// MatchType carries type of match.
|
// MatchType carries type of match.
|
||||||
MatchType match_type = 2 [json_name = "MatchType"];
|
MatchType match_type = 2 [json_name = "MatchType"];
|
||||||
|
@ -110,18 +110,18 @@ message EACLRecord {
|
||||||
}
|
}
|
||||||
|
|
||||||
// filters carries set of filters.
|
// filters carries set of filters.
|
||||||
repeated FilterInfo filters = 3 [json_name="Filters"];
|
repeated Filter filters = 3 [json_name="Filters"];
|
||||||
|
|
||||||
// TargetInfo groups information about extended ACL target.
|
// Information about extended ACL target.
|
||||||
message TargetInfo {
|
message Target {
|
||||||
// target carries target of ACL rule.
|
// target carries target of ACL rule.
|
||||||
Target target = 1 [json_name="Role"];
|
Role role = 1 [json_name="Role"];
|
||||||
|
|
||||||
// key_list carries public keys of ACL target.
|
// key_list carries public keys of ACL target.
|
||||||
repeated bytes key_list = 2 [json_name="Keys"];
|
repeated bytes key_list = 2 [json_name="Keys"];
|
||||||
}
|
}
|
||||||
// targets carries information about extended ACL target list.
|
// targets carries information about extended ACL target list.
|
||||||
repeated TargetInfo targets = 4 [json_name="Targets"];
|
repeated Target targets = 4 [json_name="Targets"];
|
||||||
}
|
}
|
||||||
|
|
||||||
// EACLRecord carries the information about extended ACL rules.
|
// EACLRecord carries the information about extended ACL rules.
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
- [BearerToken.Body](#neo.fs.v2.acl.BearerToken.Body)
|
- [BearerToken.Body](#neo.fs.v2.acl.BearerToken.Body)
|
||||||
- [BearerToken.Body.TokenLifetime](#neo.fs.v2.acl.BearerToken.Body.TokenLifetime)
|
- [BearerToken.Body.TokenLifetime](#neo.fs.v2.acl.BearerToken.Body.TokenLifetime)
|
||||||
- [EACLRecord](#neo.fs.v2.acl.EACLRecord)
|
- [EACLRecord](#neo.fs.v2.acl.EACLRecord)
|
||||||
- [EACLRecord.FilterInfo](#neo.fs.v2.acl.EACLRecord.FilterInfo)
|
- [EACLRecord.Filter](#neo.fs.v2.acl.EACLRecord.Filter)
|
||||||
- [EACLRecord.TargetInfo](#neo.fs.v2.acl.EACLRecord.TargetInfo)
|
- [EACLRecord.Target](#neo.fs.v2.acl.EACLRecord.Target)
|
||||||
- [EACLTable](#neo.fs.v2.acl.EACLTable)
|
- [EACLTable](#neo.fs.v2.acl.EACLTable)
|
||||||
|
|
||||||
|
|
||||||
|
@ -76,33 +76,33 @@ EACLRecord groups information about extended ACL rule.
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| operation | [Operation](#neo.fs.v2.acl.Operation) | | Operation carries type of operation. |
|
| operation | [Operation](#neo.fs.v2.acl.Operation) | | Operation carries type of operation. |
|
||||||
| action | [Action](#neo.fs.v2.acl.Action) | | Action carries ACL target action. |
|
| action | [Action](#neo.fs.v2.acl.Action) | | Action carries ACL target action. |
|
||||||
| filters | [EACLRecord.FilterInfo](#neo.fs.v2.acl.EACLRecord.FilterInfo) | repeated | filters carries set of filters. |
|
| filters | [EACLRecord.Filter](#neo.fs.v2.acl.EACLRecord.Filter) | repeated | filters carries set of filters. |
|
||||||
| targets | [EACLRecord.TargetInfo](#neo.fs.v2.acl.EACLRecord.TargetInfo) | repeated | targets carries information about extended ACL target list. |
|
| targets | [EACLRecord.Target](#neo.fs.v2.acl.EACLRecord.Target) | repeated | targets carries information about extended ACL target list. |
|
||||||
|
|
||||||
|
|
||||||
<a name="neo.fs.v2.acl.EACLRecord.FilterInfo"></a>
|
<a name="neo.fs.v2.acl.EACLRecord.Filter"></a>
|
||||||
|
|
||||||
### Message EACLRecord.FilterInfo
|
### Message EACLRecord.Filter
|
||||||
FilterInfo groups information about filter.
|
Filter definition
|
||||||
|
|
||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| header | [HeaderType](#neo.fs.v2.acl.HeaderType) | | Header carries type of header. |
|
| header_type | [HeaderType](#neo.fs.v2.acl.HeaderType) | | Header carries type of header. |
|
||||||
| match_type | [MatchType](#neo.fs.v2.acl.MatchType) | | MatchType carries type of match. |
|
| match_type | [MatchType](#neo.fs.v2.acl.MatchType) | | MatchType carries type of match. |
|
||||||
| header_name | [string](#string) | | header_name carries name of filtering header. |
|
| header_name | [string](#string) | | header_name carries name of filtering header. |
|
||||||
| header_val | [string](#string) | | header_val carries value of filtering header. |
|
| header_val | [string](#string) | | header_val carries value of filtering header. |
|
||||||
|
|
||||||
|
|
||||||
<a name="neo.fs.v2.acl.EACLRecord.TargetInfo"></a>
|
<a name="neo.fs.v2.acl.EACLRecord.Target"></a>
|
||||||
|
|
||||||
### Message EACLRecord.TargetInfo
|
### Message EACLRecord.Target
|
||||||
TargetInfo groups information about extended ACL target.
|
Information about extended ACL target.
|
||||||
|
|
||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| target | [Target](#neo.fs.v2.acl.Target) | | target carries target of ACL rule. |
|
| role | [Role](#neo.fs.v2.acl.Role) | | target carries target of ACL rule. |
|
||||||
| key_list | [bytes](#bytes) | repeated | key_list carries public keys of ACL target. |
|
| key_list | [bytes](#bytes) | repeated | key_list carries public keys of ACL target. |
|
||||||
|
|
||||||
|
|
||||||
|
@ -178,14 +178,14 @@ Operation is an enumeration of operation types.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="neo.fs.v2.acl.Target"></a>
|
<a name="neo.fs.v2.acl.Role"></a>
|
||||||
|
|
||||||
### Target
|
### Role
|
||||||
Target of the access control rule in access control list.
|
Target role of the access control rule in access control list.
|
||||||
|
|
||||||
| Name | Number | Description |
|
| Name | Number | Description |
|
||||||
| ---- | ------ | ----------- |
|
| ---- | ------ | ----------- |
|
||||||
| TARGET_UNSPECIFIED | 0 | Unspecified target, default value. |
|
| ROLE_UNSPECIFIED | 0 | Unspecified role, default value. |
|
||||||
| USER | 1 | User target rule is applied if sender is the owner of the container. |
|
| USER | 1 | User target rule is applied if sender is the owner of the container. |
|
||||||
| SYSTEM | 2 | System target rule is applied if sender is the storage node within the container or inner ring node. |
|
| SYSTEM | 2 | System target rule is applied if sender is the storage node within the container or inner ring node. |
|
||||||
| OTHERS | 3 | Others target rule is applied if sender is not user or system target. |
|
| OTHERS | 3 | Others target rule is applied if sender is not user or system target. |
|
||||||
|
|
Loading…
Reference in a new issue