forked from TrueCloudLab/frostfs-api
[#40] service: Add session token context
Replace object address field with the oneof-list of session contexts. Break the connection of the session with the object. Extend the ability to open sessions for other needs without losing backward compatibility. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
c65920d2ce
commit
5809f0bfbf
2 changed files with 10 additions and 7 deletions
|
@ -147,10 +147,10 @@ User token granting rights for object manipulation
|
|||
| 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. |
|
||||
| verb | [Token.Info.Verb](#service.Token.Info.Verb) | | Verb is a type of request for which the token is issued |
|
||||
| address | [refs.Address](#refs.Address) | | Address is an object address for which token is issued |
|
||||
| lifetime | [TokenLifetime](#service.TokenLifetime) | | Lifetime is a lifetime of the session |
|
||||
| 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 |
|
||||
| object_address | [refs.Address](#refs.Address) | | object_address represents the object session context. |
|
||||
|
||||
|
||||
<a name="service.TokenLifetime"></a>
|
||||
|
|
|
@ -58,17 +58,20 @@ message Token {
|
|||
// Verb is a type of request for which the token is issued
|
||||
Verb verb = 3;
|
||||
|
||||
// Address is an object address for which token is issued
|
||||
refs.Address address = 4;
|
||||
|
||||
// Lifetime is a lifetime of the session
|
||||
TokenLifetime lifetime = 5;
|
||||
TokenLifetime lifetime = 4;
|
||||
|
||||
// SessionKey is a public key of session key
|
||||
bytes session_key = 6;
|
||||
bytes session_key = 5;
|
||||
|
||||
// OwnerKey is a public key of the token owner
|
||||
bytes owner_key = 7;
|
||||
bytes owner_key = 6;
|
||||
|
||||
// Carries context of the session.
|
||||
oneof context {
|
||||
// object_address represents the object session context.
|
||||
refs.Address object_address = 7;
|
||||
}
|
||||
}
|
||||
|
||||
// token_info is a grouped information about token
|
||||
|
|
Loading…
Reference in a new issue