[#40] service: Rename Token to SessionToken
Rename Token message to SessionToken to clarify its purpose. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
fa7c269500
commit
b088391294
4 changed files with 17 additions and 17 deletions
|
@ -50,7 +50,7 @@ message Header {
|
||||||
// session_token carries token of the session within which the object was created.
|
// session_token carries token of the session within which the object was created.
|
||||||
// If session token is presented in object, it acts as the user's proof of the
|
// If session token is presented in object, it acts as the user's proof of the
|
||||||
// correctness of the creator_key.
|
// correctness of the creator_key.
|
||||||
service.Token session_token = 3;
|
service.SessionToken session_token = 3;
|
||||||
|
|
||||||
// creator_key carries public key of the object creator in a binary format.
|
// creator_key carries public key of the object creator in a binary format.
|
||||||
bytes creator_key = 4;
|
bytes creator_key = 4;
|
||||||
|
|
|
@ -443,7 +443,7 @@ Integrity groups evidence of the integrity of an object's structure.
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| payload_checksum | [bytes](#bytes) | | payload_checksum carries the checksum of object payload bytes. Changing any byte of the payload changes the checksum. It is calculated as a SHA-256 hash over payload bytes. |
|
| payload_checksum | [bytes](#bytes) | | payload_checksum carries the checksum of object payload bytes. Changing any byte of the payload changes the checksum. It is calculated as a SHA-256 hash over payload bytes. |
|
||||||
| header_checksum | [bytes](#bytes) | | header_checksum carries checksum of the object header structure. It covers all object attributes. Changing any field of the object except CreatorKey and ChecksumSignature changes the checksum. payload_checksum and header_checksum cannot be merged due to the need to verify the header in the absence of a payload (e.g. in object.Head rpc). It is calculated as a SHA-256 hash over marshaled object header with cut creator_key and checksum_signature. |
|
| header_checksum | [bytes](#bytes) | | header_checksum carries checksum of the object header structure. It covers all object attributes. Changing any field of the object except CreatorKey and ChecksumSignature changes the checksum. payload_checksum and header_checksum cannot be merged due to the need to verify the header in the absence of a payload (e.g. in object.Head rpc). It is calculated as a SHA-256 hash over marshaled object header with cut creator_key and checksum_signature. |
|
||||||
| session_token | [service.Token](#service.Token) | | session_token carries token of the session within which the object was created. If session token is presented in object, it acts as the user's proof of the correctness of the creator_key. |
|
| session_token | [service.SessionToken](#service.SessionToken) | | session_token carries token of the session within which the object was created. If session token is presented in object, it acts as the user's proof of the correctness of the creator_key. |
|
||||||
| creator_key | [bytes](#bytes) | | creator_key carries public key of the object creator in a binary format. |
|
| creator_key | [bytes](#bytes) | | creator_key carries public key of the object creator in a binary format. |
|
||||||
| checksum_signature | [bytes](#bytes) | | checksum_signature carries signature of the structure checksum by the object creator. |
|
| checksum_signature | [bytes](#bytes) | | checksum_signature carries signature of the structure checksum by the object creator. |
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
- [BearerTokenMsg.Info](#service.BearerTokenMsg.Info)
|
- [BearerTokenMsg.Info](#service.BearerTokenMsg.Info)
|
||||||
- [RequestVerificationHeader](#service.RequestVerificationHeader)
|
- [RequestVerificationHeader](#service.RequestVerificationHeader)
|
||||||
- [RequestVerificationHeader.Signature](#service.RequestVerificationHeader.Signature)
|
- [RequestVerificationHeader.Signature](#service.RequestVerificationHeader.Signature)
|
||||||
- [Token](#service.Token)
|
- [SessionToken](#service.SessionToken)
|
||||||
- [Token.Info](#service.Token.Info)
|
- [SessionToken.Info](#service.SessionToken.Info)
|
||||||
- [TokenLifetime](#service.TokenLifetime)
|
- [TokenLifetime](#service.TokenLifetime)
|
||||||
|
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ RequestVerificationHeader is a set of signatures of every NeoFS Node that proces
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| signatures | [RequestVerificationHeader.Signature](#service.RequestVerificationHeader.Signature) | repeated | Signatures is a set of signatures of every passed NeoFS Node |
|
| signatures | [RequestVerificationHeader.Signature](#service.RequestVerificationHeader.Signature) | repeated | Signatures is a set of signatures of every passed NeoFS Node |
|
||||||
| token | [Token](#service.Token) | | Token is a token of the session within which the request is sent |
|
| token | [SessionToken](#service.SessionToken) | | Token is a token of the session within which the request is sent |
|
||||||
| bearer | [BearerTokenMsg](#service.BearerTokenMsg) | | Bearer is a Bearer token of the request |
|
| bearer | [BearerTokenMsg](#service.BearerTokenMsg) | | Bearer is a Bearer token of the request |
|
||||||
|
|
||||||
|
|
||||||
|
@ -124,21 +124,21 @@ RequestVerificationHeader is a set of signatures of every NeoFS Node that proces
|
||||||
| sign | [bytes](#bytes) | | Sign is signature of the request or session key. |
|
| sign | [bytes](#bytes) | | Sign is signature of the request or session key. |
|
||||||
|
|
||||||
|
|
||||||
<a name="service.Token"></a>
|
<a name="service.SessionToken"></a>
|
||||||
|
|
||||||
### Message Token
|
### Message SessionToken
|
||||||
User token granting rights for object manipulation
|
Represents the NeoFS session token.
|
||||||
|
|
||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| token_info | [Token.Info](#service.Token.Info) | | token_info is a grouped information about token |
|
| token_info | [SessionToken.Info](#service.SessionToken.Info) | | token_info is a grouped information about token |
|
||||||
| signature | [bytes](#bytes) | | Signature is a signature of session token information |
|
| signature | [bytes](#bytes) | | Signature is a signature of session token information |
|
||||||
|
|
||||||
|
|
||||||
<a name="service.Token.Info"></a>
|
<a name="service.SessionToken.Info"></a>
|
||||||
|
|
||||||
### Message Token.Info
|
### Message SessionToken.Info
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ User token granting rights for object manipulation
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| id | [bytes](#bytes) | | ID is a token identifier. valid UUIDv4 represented in bytes |
|
| id | [bytes](#bytes) | | ID is a token identifier. valid UUIDv4 represented in bytes |
|
||||||
| owner_id | [refs.OwnerID](#refs.OwnerID) | | OwnerID carries identifier of the manipulation object owner. |
|
| owner_id | [refs.OwnerID](#refs.OwnerID) | | OwnerID carries identifier of the manipulation object owner. |
|
||||||
| verb | [Token.Info.Verb](#service.Token.Info.Verb) | | Verb is a type of request for which the token is issued |
|
| verb | [SessionToken.Info.Verb](#service.SessionToken.Info.Verb) | | Verb is a type of request for which the token is issued |
|
||||||
| lifetime | [TokenLifetime](#service.TokenLifetime) | | Lifetime is a lifetime of the session |
|
| lifetime | [TokenLifetime](#service.TokenLifetime) | | Lifetime is a lifetime of the session |
|
||||||
| session_key | [bytes](#bytes) | | SessionKey is a public key of session key |
|
| session_key | [bytes](#bytes) | | SessionKey is a public key of session key |
|
||||||
| owner_key | [bytes](#bytes) | | OwnerKey is a public key of the token owner |
|
| owner_key | [bytes](#bytes) | | OwnerKey is a public key of the token owner |
|
||||||
|
@ -167,9 +167,9 @@ TokenLifetime carries a group of lifetime parameters of the token
|
||||||
<!-- end messages -->
|
<!-- end messages -->
|
||||||
|
|
||||||
|
|
||||||
<a name="service.Token.Info.Verb"></a>
|
<a name="service.SessionToken.Info.Verb"></a>
|
||||||
|
|
||||||
### Token.Info.Verb
|
### SessionToken.Info.Verb
|
||||||
Verb is an enumeration of session request types
|
Verb is an enumeration of session request types
|
||||||
|
|
||||||
| Name | Number | Description |
|
| Name | Number | Description |
|
||||||
|
|
|
@ -22,14 +22,14 @@ message RequestVerificationHeader {
|
||||||
repeated Signature signatures = 1;
|
repeated Signature signatures = 1;
|
||||||
|
|
||||||
// Token is a token of the session within which the request is sent
|
// Token is a token of the session within which the request is sent
|
||||||
Token token = 2;
|
SessionToken token = 2;
|
||||||
|
|
||||||
// Bearer is a Bearer token of the request
|
// Bearer is a Bearer token of the request
|
||||||
BearerTokenMsg bearer = 3;
|
BearerTokenMsg bearer = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
// User token granting rights for object manipulation
|
// Represents the NeoFS session token.
|
||||||
message Token {
|
message SessionToken {
|
||||||
message Info {
|
message Info {
|
||||||
// ID is a token identifier. valid UUIDv4 represented in bytes
|
// ID is a token identifier. valid UUIDv4 represented in bytes
|
||||||
bytes id = 1;
|
bytes id = 1;
|
||||||
|
|
Loading…
Reference in a new issue