damsel/proto/cds.thrift

335 lines
11 KiB
Thrift
Raw Normal View History

include "base.thrift"
include "domain.thrift"
namespace java com.rbkmoney.damsel.cds
CDS-71: Redone Keyring (#435) * CDS-76: Change rotate to use keyshare (#413) * CDS-76: Change rotate to use keyshare * CDS-76: Add extra exceptions (#414) * CDS-75: Keyring init (#415) * CDS-75: Change Keyring.Init and add Keyring.Validate * CDS-75: fixed missed exception * CDS-75: add exception for double init and method to cancel it * CDS-75: Rename `Init` to `StartInit` Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-75: introduce InvalidStatus exception, remove PublicKey and refactor * CDS-75: fix typos and add comment * CDS-75: void instead of Success Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-75: add Unlocked/Locked and OperationAborted * CDS-75: add OperationAborted to relevant methods * CDS-75: change relevant methods to use InvalidStatus * CDS-75: add comments to `EncryptedMasterKeyShare` * CDS-75: divide Status into Status and Activity * CDS-75: changes due to realization * CDS-75: add InvalidActivity exception to ValidateInit (#417) * CDS-75: fix Status typo (#418) * CDS-75: Add ShareholderId to all MasterKeyShare methods (#420) * CDS-75: Add ShareholderId to all MasterKeyShare methods * CDS-75: added missing ValidateInit * CDS-75: Add VerificationFailed exception (#421) * CDS-76: Refactor Unlock and Rotate to be similar to Init (#423) * CDS-76: Add missing Activity enums (#424) * CDS-25: Add methods for re-keying (#419) * CDS-25: Add methods for re-initialization * CDS-25: add relevant comments * CDS-25: change to rekey and make GetState universal * CDS-25: rename `StartReKey` to `StartRekey` Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-25: change GetShate to GetStates to get all states * CDS-25: Add detailed status * CDS-25: use ShareholderId instead * CDS-25: typo fix * CDS-25: rename GetStates tp GetState Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-25: typos fixes * CDS-25: add requiredness and make ShareSubmitters a map * CDS-25: Add missing params and exception (#429) * CDS-84: Make lifetime optional (#432) * CDS-71: fix typo * CDS-71: rename SignedMasterKeyShare and clarify what is confirm and validate * CDS-71: clarification that SignedMasterKeyShare is JWS
2019-04-26 15:54:35 +00:00
/** Часть мастер-ключа в виде JWS */
typedef binary SignedMasterKeyShare;
2016-06-10 15:53:11 +00:00
CDS-71: Redone Keyring (#435) * CDS-76: Change rotate to use keyshare (#413) * CDS-76: Change rotate to use keyshare * CDS-76: Add extra exceptions (#414) * CDS-75: Keyring init (#415) * CDS-75: Change Keyring.Init and add Keyring.Validate * CDS-75: fixed missed exception * CDS-75: add exception for double init and method to cancel it * CDS-75: Rename `Init` to `StartInit` Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-75: introduce InvalidStatus exception, remove PublicKey and refactor * CDS-75: fix typos and add comment * CDS-75: void instead of Success Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-75: add Unlocked/Locked and OperationAborted * CDS-75: add OperationAborted to relevant methods * CDS-75: change relevant methods to use InvalidStatus * CDS-75: add comments to `EncryptedMasterKeyShare` * CDS-75: divide Status into Status and Activity * CDS-75: changes due to realization * CDS-75: add InvalidActivity exception to ValidateInit (#417) * CDS-75: fix Status typo (#418) * CDS-75: Add ShareholderId to all MasterKeyShare methods (#420) * CDS-75: Add ShareholderId to all MasterKeyShare methods * CDS-75: added missing ValidateInit * CDS-75: Add VerificationFailed exception (#421) * CDS-76: Refactor Unlock and Rotate to be similar to Init (#423) * CDS-76: Add missing Activity enums (#424) * CDS-25: Add methods for re-keying (#419) * CDS-25: Add methods for re-initialization * CDS-25: add relevant comments * CDS-25: change to rekey and make GetState universal * CDS-25: rename `StartReKey` to `StartRekey` Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-25: change GetShate to GetStates to get all states * CDS-25: Add detailed status * CDS-25: use ShareholderId instead * CDS-25: typo fix * CDS-25: rename GetStates tp GetState Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-25: typos fixes * CDS-25: add requiredness and make ShareSubmitters a map * CDS-25: Add missing params and exception (#429) * CDS-84: Make lifetime optional (#432) * CDS-71: fix typo * CDS-71: rename SignedMasterKeyShare and clarify what is confirm and validate * CDS-71: clarification that SignedMasterKeyShare is JWS
2019-04-26 15:54:35 +00:00
typedef string ShareholderId;
/** Зашифрованная часть мастер-ключа и кому он предназначается */
struct EncryptedMasterKeyShare {
// Уникальный ID, для однозначного определения владения
1: required ShareholderId id
// Неуникальный идентификатор с ФИО/email/etc владельца
2: required string owner
// Зашифрованный MasterKeyShare
3: required binary encrypted_share
}
typedef list<EncryptedMasterKeyShare> EncryptedMasterKeyShares;
2016-06-10 15:53:11 +00:00
/** Дата экспирации */
struct ExpDate {
2016-06-10 15:53:11 +00:00
/** Месяц 1..12 */
1: required i8 month
2016-06-10 15:53:11 +00:00
/** Год 2015..∞ */
2: required i16 year
}
2016-06-10 15:53:11 +00:00
/** Открытые карточные данные (в отличие от domain.BankCard) */
struct CardData {
2016-06-10 15:53:11 +00:00
/** Номер карточки без пробелов [0-9]{14,19} */
1: required string pan
2: required ExpDate exp_date
2016-06-10 15:53:11 +00:00
/** Имя держателя */
3: optional string cardholder_name
/** Deprecated */
2016-06-10 15:53:11 +00:00
/** Код верификации [0-9]{3,4} */
4: optional string cvv
}
struct PutCardDataResult {
1: required domain.BankCard bank_card
2: required domain.PaymentSessionID session_id
}
struct PutCardResult {
1: required domain.BankCard bank_card
}
/** Код проверки подлинности банковской карты */
struct CardSecurityCode {
/** Код верификации [0-9]{3,4} */
1: required string value
}
/** Данные, необходимые для авторизации по 3DS протоколу */
struct Auth3DS {
/** Криптограмма для проверки подлинности */
1: required string cryptogram
/** Тип транзакции */
2: optional string eci
}
/** Данные, необходимые для проверки подлинности банковской карты */
union AuthData {
1: CardSecurityCode card_security_code
2: Auth3DS auth_3ds
}
/** Данные сессии */
struct SessionData {
1: required AuthData auth_data
}
CDS-71: Redone Keyring (#435) * CDS-76: Change rotate to use keyshare (#413) * CDS-76: Change rotate to use keyshare * CDS-76: Add extra exceptions (#414) * CDS-75: Keyring init (#415) * CDS-75: Change Keyring.Init and add Keyring.Validate * CDS-75: fixed missed exception * CDS-75: add exception for double init and method to cancel it * CDS-75: Rename `Init` to `StartInit` Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-75: introduce InvalidStatus exception, remove PublicKey and refactor * CDS-75: fix typos and add comment * CDS-75: void instead of Success Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-75: add Unlocked/Locked and OperationAborted * CDS-75: add OperationAborted to relevant methods * CDS-75: change relevant methods to use InvalidStatus * CDS-75: add comments to `EncryptedMasterKeyShare` * CDS-75: divide Status into Status and Activity * CDS-75: changes due to realization * CDS-75: add InvalidActivity exception to ValidateInit (#417) * CDS-75: fix Status typo (#418) * CDS-75: Add ShareholderId to all MasterKeyShare methods (#420) * CDS-75: Add ShareholderId to all MasterKeyShare methods * CDS-75: added missing ValidateInit * CDS-75: Add VerificationFailed exception (#421) * CDS-76: Refactor Unlock and Rotate to be similar to Init (#423) * CDS-76: Add missing Activity enums (#424) * CDS-25: Add methods for re-keying (#419) * CDS-25: Add methods for re-initialization * CDS-25: add relevant comments * CDS-25: change to rekey and make GetState universal * CDS-25: rename `StartReKey` to `StartRekey` Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-25: change GetShate to GetStates to get all states * CDS-25: Add detailed status * CDS-25: use ShareholderId instead * CDS-25: typo fix * CDS-25: rename GetStates tp GetState Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-25: typos fixes * CDS-25: add requiredness and make ShareSubmitters a map * CDS-25: Add missing params and exception (#429) * CDS-84: Make lifetime optional (#432) * CDS-71: fix typo * CDS-71: rename SignedMasterKeyShare and clarify what is confirm and validate * CDS-71: clarification that SignedMasterKeyShare is JWS
2019-04-26 15:54:35 +00:00
struct Success {}
CDS-71: Redone Keyring (#435) * CDS-76: Change rotate to use keyshare (#413) * CDS-76: Change rotate to use keyshare * CDS-76: Add extra exceptions (#414) * CDS-75: Keyring init (#415) * CDS-75: Change Keyring.Init and add Keyring.Validate * CDS-75: fixed missed exception * CDS-75: add exception for double init and method to cancel it * CDS-75: Rename `Init` to `StartInit` Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-75: introduce InvalidStatus exception, remove PublicKey and refactor * CDS-75: fix typos and add comment * CDS-75: void instead of Success Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-75: add Unlocked/Locked and OperationAborted * CDS-75: add OperationAborted to relevant methods * CDS-75: change relevant methods to use InvalidStatus * CDS-75: add comments to `EncryptedMasterKeyShare` * CDS-75: divide Status into Status and Activity * CDS-75: changes due to realization * CDS-75: add InvalidActivity exception to ValidateInit (#417) * CDS-75: fix Status typo (#418) * CDS-75: Add ShareholderId to all MasterKeyShare methods (#420) * CDS-75: Add ShareholderId to all MasterKeyShare methods * CDS-75: added missing ValidateInit * CDS-75: Add VerificationFailed exception (#421) * CDS-76: Refactor Unlock and Rotate to be similar to Init (#423) * CDS-76: Add missing Activity enums (#424) * CDS-25: Add methods for re-keying (#419) * CDS-25: Add methods for re-initialization * CDS-25: add relevant comments * CDS-25: change to rekey and make GetState universal * CDS-25: rename `StartReKey` to `StartRekey` Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-25: change GetShate to GetStates to get all states * CDS-25: Add detailed status * CDS-25: use ShareholderId instead * CDS-25: typo fix * CDS-25: rename GetStates tp GetState Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-25: typos fixes * CDS-25: add requiredness and make ShareSubmitters a map * CDS-25: Add missing params and exception (#429) * CDS-84: Make lifetime optional (#432) * CDS-71: fix typo * CDS-71: rename SignedMasterKeyShare and clarify what is confirm and validate * CDS-71: clarification that SignedMasterKeyShare is JWS
2019-04-26 15:54:35 +00:00
union KeyringOperationStatus {
/** Успешно. */
CDS-71: Redone Keyring (#435) * CDS-76: Change rotate to use keyshare (#413) * CDS-76: Change rotate to use keyshare * CDS-76: Add extra exceptions (#414) * CDS-75: Keyring init (#415) * CDS-75: Change Keyring.Init and add Keyring.Validate * CDS-75: fixed missed exception * CDS-75: add exception for double init and method to cancel it * CDS-75: Rename `Init` to `StartInit` Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-75: introduce InvalidStatus exception, remove PublicKey and refactor * CDS-75: fix typos and add comment * CDS-75: void instead of Success Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-75: add Unlocked/Locked and OperationAborted * CDS-75: add OperationAborted to relevant methods * CDS-75: change relevant methods to use InvalidStatus * CDS-75: add comments to `EncryptedMasterKeyShare` * CDS-75: divide Status into Status and Activity * CDS-75: changes due to realization * CDS-75: add InvalidActivity exception to ValidateInit (#417) * CDS-75: fix Status typo (#418) * CDS-75: Add ShareholderId to all MasterKeyShare methods (#420) * CDS-75: Add ShareholderId to all MasterKeyShare methods * CDS-75: added missing ValidateInit * CDS-75: Add VerificationFailed exception (#421) * CDS-76: Refactor Unlock and Rotate to be similar to Init (#423) * CDS-76: Add missing Activity enums (#424) * CDS-25: Add methods for re-keying (#419) * CDS-25: Add methods for re-initialization * CDS-25: add relevant comments * CDS-25: change to rekey and make GetState universal * CDS-25: rename `StartReKey` to `StartRekey` Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-25: change GetShate to GetStates to get all states * CDS-25: Add detailed status * CDS-25: use ShareholderId instead * CDS-25: typo fix * CDS-25: rename GetStates tp GetState Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-25: typos fixes * CDS-25: add requiredness and make ShareSubmitters a map * CDS-25: Add missing params and exception (#429) * CDS-84: Make lifetime optional (#432) * CDS-71: fix typo * CDS-71: rename SignedMasterKeyShare and clarify what is confirm and validate * CDS-71: clarification that SignedMasterKeyShare is JWS
2019-04-26 15:54:35 +00:00
1: Success success
/** Сколько частей ключа нужно еще ввести, чтобы провести манипуляцию над Keyring. */
2: i16 more_keys_needed
}
CDS-71: Redone Keyring (#435) * CDS-76: Change rotate to use keyshare (#413) * CDS-76: Change rotate to use keyshare * CDS-76: Add extra exceptions (#414) * CDS-75: Keyring init (#415) * CDS-75: Change Keyring.Init and add Keyring.Validate * CDS-75: fixed missed exception * CDS-75: add exception for double init and method to cancel it * CDS-75: Rename `Init` to `StartInit` Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-75: introduce InvalidStatus exception, remove PublicKey and refactor * CDS-75: fix typos and add comment * CDS-75: void instead of Success Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-75: add Unlocked/Locked and OperationAborted * CDS-75: add OperationAborted to relevant methods * CDS-75: change relevant methods to use InvalidStatus * CDS-75: add comments to `EncryptedMasterKeyShare` * CDS-75: divide Status into Status and Activity * CDS-75: changes due to realization * CDS-75: add InvalidActivity exception to ValidateInit (#417) * CDS-75: fix Status typo (#418) * CDS-75: Add ShareholderId to all MasterKeyShare methods (#420) * CDS-75: Add ShareholderId to all MasterKeyShare methods * CDS-75: added missing ValidateInit * CDS-75: Add VerificationFailed exception (#421) * CDS-76: Refactor Unlock and Rotate to be similar to Init (#423) * CDS-76: Add missing Activity enums (#424) * CDS-25: Add methods for re-keying (#419) * CDS-25: Add methods for re-initialization * CDS-25: add relevant comments * CDS-25: change to rekey and make GetState universal * CDS-25: rename `StartReKey` to `StartRekey` Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-25: change GetShate to GetStates to get all states * CDS-25: Add detailed status * CDS-25: use ShareholderId instead * CDS-25: typo fix * CDS-25: rename GetStates tp GetState Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-25: typos fixes * CDS-25: add requiredness and make ShareSubmitters a map * CDS-25: Add missing params and exception (#429) * CDS-84: Make lifetime optional (#432) * CDS-71: fix typo * CDS-71: rename SignedMasterKeyShare and clarify what is confirm and validate * CDS-71: clarification that SignedMasterKeyShare is JWS
2019-04-26 15:54:35 +00:00
enum Initialization {
uninitialized
validation
}
enum Rekeying {
uninitialized
confirmation
postconfirmation
validation
}
enum Rotation {
uninitialized
validation
}
enum Unlock {
uninitialized
validation
}
enum Status {
// Global machine status
not_initialized
unlocked
locked
}
union Activity {
1: Initialization initialization
2: Rekeying rekeying
3: Rotation rotation
4: Unlock unlock
}
typedef list<Activity> Activities;
typedef i16 ShareId
typedef map<ShareId, ShareholderId> ShareSubmitters;
typedef i32 Seconds;
struct RotationState {
1: required Rotation phase
2: optional Seconds lifetime
3: required ShareSubmitters confirmation_shares
}
struct InitializationState {
1: required Initialization phase
2: optional Seconds lifetime
3: required ShareSubmitters validation_shares
}
struct UnlockState {
1: required Unlock phase
2: optional Seconds lifetime
3: required ShareSubmitters confirmation_shares
}
struct RekeyingState {
1: required Rekeying phase
2: optional Seconds lifetime
3: required ShareSubmitters confirmation_shares
4: required ShareSubmitters validation_shares
}
struct ActivitiesState {
1: required InitializationState initialization
2: required RotationState rotation
3: required UnlockState unlock
4: required RekeyingState rekeying
}
struct KeyringState {
1: required Status status
2: required ActivitiesState activities
}
exception InvalidStatus {
1: required Status status
}
exception InvalidActivity {
1: required Activity activity
}
exception InvalidCardData {
1: optional string reason
}
exception CardDataNotFound {}
exception SessionDataNotFound {}
CDS-71: Redone Keyring (#435) * CDS-76: Change rotate to use keyshare (#413) * CDS-76: Change rotate to use keyshare * CDS-76: Add extra exceptions (#414) * CDS-75: Keyring init (#415) * CDS-75: Change Keyring.Init and add Keyring.Validate * CDS-75: fixed missed exception * CDS-75: add exception for double init and method to cancel it * CDS-75: Rename `Init` to `StartInit` Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-75: introduce InvalidStatus exception, remove PublicKey and refactor * CDS-75: fix typos and add comment * CDS-75: void instead of Success Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-75: add Unlocked/Locked and OperationAborted * CDS-75: add OperationAborted to relevant methods * CDS-75: change relevant methods to use InvalidStatus * CDS-75: add comments to `EncryptedMasterKeyShare` * CDS-75: divide Status into Status and Activity * CDS-75: changes due to realization * CDS-75: add InvalidActivity exception to ValidateInit (#417) * CDS-75: fix Status typo (#418) * CDS-75: Add ShareholderId to all MasterKeyShare methods (#420) * CDS-75: Add ShareholderId to all MasterKeyShare methods * CDS-75: added missing ValidateInit * CDS-75: Add VerificationFailed exception (#421) * CDS-76: Refactor Unlock and Rotate to be similar to Init (#423) * CDS-76: Add missing Activity enums (#424) * CDS-25: Add methods for re-keying (#419) * CDS-25: Add methods for re-initialization * CDS-25: add relevant comments * CDS-25: change to rekey and make GetState universal * CDS-25: rename `StartReKey` to `StartRekey` Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-25: change GetShate to GetStates to get all states * CDS-25: Add detailed status * CDS-25: use ShareholderId instead * CDS-25: typo fix * CDS-25: rename GetStates tp GetState Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-25: typos fixes * CDS-25: add requiredness and make ShareSubmitters a map * CDS-25: Add missing params and exception (#429) * CDS-84: Make lifetime optional (#432) * CDS-71: fix typo * CDS-71: rename SignedMasterKeyShare and clarify what is confirm and validate * CDS-71: clarification that SignedMasterKeyShare is JWS
2019-04-26 15:54:35 +00:00
exception InvalidArguments {
1: optional string reason
}
CDS-71: Redone Keyring (#435) * CDS-76: Change rotate to use keyshare (#413) * CDS-76: Change rotate to use keyshare * CDS-76: Add extra exceptions (#414) * CDS-75: Keyring init (#415) * CDS-75: Change Keyring.Init and add Keyring.Validate * CDS-75: fixed missed exception * CDS-75: add exception for double init and method to cancel it * CDS-75: Rename `Init` to `StartInit` Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-75: introduce InvalidStatus exception, remove PublicKey and refactor * CDS-75: fix typos and add comment * CDS-75: void instead of Success Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-75: add Unlocked/Locked and OperationAborted * CDS-75: add OperationAborted to relevant methods * CDS-75: change relevant methods to use InvalidStatus * CDS-75: add comments to `EncryptedMasterKeyShare` * CDS-75: divide Status into Status and Activity * CDS-75: changes due to realization * CDS-75: add InvalidActivity exception to ValidateInit (#417) * CDS-75: fix Status typo (#418) * CDS-75: Add ShareholderId to all MasterKeyShare methods (#420) * CDS-75: Add ShareholderId to all MasterKeyShare methods * CDS-75: added missing ValidateInit * CDS-75: Add VerificationFailed exception (#421) * CDS-76: Refactor Unlock and Rotate to be similar to Init (#423) * CDS-76: Add missing Activity enums (#424) * CDS-25: Add methods for re-keying (#419) * CDS-25: Add methods for re-initialization * CDS-25: add relevant comments * CDS-25: change to rekey and make GetState universal * CDS-25: rename `StartReKey` to `StartRekey` Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-25: change GetShate to GetStates to get all states * CDS-25: Add detailed status * CDS-25: use ShareholderId instead * CDS-25: typo fix * CDS-25: rename GetStates tp GetState Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-25: typos fixes * CDS-25: add requiredness and make ShareSubmitters a map * CDS-25: Add missing params and exception (#429) * CDS-84: Make lifetime optional (#432) * CDS-71: fix typo * CDS-71: rename SignedMasterKeyShare and clarify what is confirm and validate * CDS-71: clarification that SignedMasterKeyShare is JWS
2019-04-26 15:54:35 +00:00
exception OperationAborted {
1: optional string reason
}
CDS-71: Redone Keyring (#435) * CDS-76: Change rotate to use keyshare (#413) * CDS-76: Change rotate to use keyshare * CDS-76: Add extra exceptions (#414) * CDS-75: Keyring init (#415) * CDS-75: Change Keyring.Init and add Keyring.Validate * CDS-75: fixed missed exception * CDS-75: add exception for double init and method to cancel it * CDS-75: Rename `Init` to `StartInit` Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-75: introduce InvalidStatus exception, remove PublicKey and refactor * CDS-75: fix typos and add comment * CDS-75: void instead of Success Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-75: add Unlocked/Locked and OperationAborted * CDS-75: add OperationAborted to relevant methods * CDS-75: change relevant methods to use InvalidStatus * CDS-75: add comments to `EncryptedMasterKeyShare` * CDS-75: divide Status into Status and Activity * CDS-75: changes due to realization * CDS-75: add InvalidActivity exception to ValidateInit (#417) * CDS-75: fix Status typo (#418) * CDS-75: Add ShareholderId to all MasterKeyShare methods (#420) * CDS-75: Add ShareholderId to all MasterKeyShare methods * CDS-75: added missing ValidateInit * CDS-75: Add VerificationFailed exception (#421) * CDS-76: Refactor Unlock and Rotate to be similar to Init (#423) * CDS-76: Add missing Activity enums (#424) * CDS-25: Add methods for re-keying (#419) * CDS-25: Add methods for re-initialization * CDS-25: add relevant comments * CDS-25: change to rekey and make GetState universal * CDS-25: rename `StartReKey` to `StartRekey` Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-25: change GetShate to GetStates to get all states * CDS-25: Add detailed status * CDS-25: use ShareholderId instead * CDS-25: typo fix * CDS-25: rename GetStates tp GetState Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-25: typos fixes * CDS-25: add requiredness and make ShareSubmitters a map * CDS-25: Add missing params and exception (#429) * CDS-84: Make lifetime optional (#432) * CDS-71: fix typo * CDS-71: rename SignedMasterKeyShare and clarify what is confirm and validate * CDS-71: clarification that SignedMasterKeyShare is JWS
2019-04-26 15:54:35 +00:00
exception VerificationFailed {}
2016-06-10 15:53:11 +00:00
/** Интерфейс для администраторов */
service Keyring {
CDS-71: Redone Keyring (#435) * CDS-76: Change rotate to use keyshare (#413) * CDS-76: Change rotate to use keyshare * CDS-76: Add extra exceptions (#414) * CDS-75: Keyring init (#415) * CDS-75: Change Keyring.Init and add Keyring.Validate * CDS-75: fixed missed exception * CDS-75: add exception for double init and method to cancel it * CDS-75: Rename `Init` to `StartInit` Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-75: introduce InvalidStatus exception, remove PublicKey and refactor * CDS-75: fix typos and add comment * CDS-75: void instead of Success Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-75: add Unlocked/Locked and OperationAborted * CDS-75: add OperationAborted to relevant methods * CDS-75: change relevant methods to use InvalidStatus * CDS-75: add comments to `EncryptedMasterKeyShare` * CDS-75: divide Status into Status and Activity * CDS-75: changes due to realization * CDS-75: add InvalidActivity exception to ValidateInit (#417) * CDS-75: fix Status typo (#418) * CDS-75: Add ShareholderId to all MasterKeyShare methods (#420) * CDS-75: Add ShareholderId to all MasterKeyShare methods * CDS-75: added missing ValidateInit * CDS-75: Add VerificationFailed exception (#421) * CDS-76: Refactor Unlock and Rotate to be similar to Init (#423) * CDS-76: Add missing Activity enums (#424) * CDS-25: Add methods for re-keying (#419) * CDS-25: Add methods for re-initialization * CDS-25: add relevant comments * CDS-25: change to rekey and make GetState universal * CDS-25: rename `StartReKey` to `StartRekey` Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-25: change GetShate to GetStates to get all states * CDS-25: Add detailed status * CDS-25: use ShareholderId instead * CDS-25: typo fix * CDS-25: rename GetStates tp GetState Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-25: typos fixes * CDS-25: add requiredness and make ShareSubmitters a map * CDS-25: Add missing params and exception (#429) * CDS-84: Make lifetime optional (#432) * CDS-71: fix typo * CDS-71: rename SignedMasterKeyShare and clarify what is confirm and validate * CDS-71: clarification that SignedMasterKeyShare is JWS
2019-04-26 15:54:35 +00:00
/** Создать новый кейринг при начальном состоянии
2016-06-10 15:53:11 +00:00
* threshold - минимально необходимое количество ключей для восстановления мастер ключа
*/
CDS-71: Redone Keyring (#435) * CDS-76: Change rotate to use keyshare (#413) * CDS-76: Change rotate to use keyshare * CDS-76: Add extra exceptions (#414) * CDS-75: Keyring init (#415) * CDS-75: Change Keyring.Init and add Keyring.Validate * CDS-75: fixed missed exception * CDS-75: add exception for double init and method to cancel it * CDS-75: Rename `Init` to `StartInit` Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-75: introduce InvalidStatus exception, remove PublicKey and refactor * CDS-75: fix typos and add comment * CDS-75: void instead of Success Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-75: add Unlocked/Locked and OperationAborted * CDS-75: add OperationAborted to relevant methods * CDS-75: change relevant methods to use InvalidStatus * CDS-75: add comments to `EncryptedMasterKeyShare` * CDS-75: divide Status into Status and Activity * CDS-75: changes due to realization * CDS-75: add InvalidActivity exception to ValidateInit (#417) * CDS-75: fix Status typo (#418) * CDS-75: Add ShareholderId to all MasterKeyShare methods (#420) * CDS-75: Add ShareholderId to all MasterKeyShare methods * CDS-75: added missing ValidateInit * CDS-75: Add VerificationFailed exception (#421) * CDS-76: Refactor Unlock and Rotate to be similar to Init (#423) * CDS-76: Add missing Activity enums (#424) * CDS-25: Add methods for re-keying (#419) * CDS-25: Add methods for re-initialization * CDS-25: add relevant comments * CDS-25: change to rekey and make GetState universal * CDS-25: rename `StartReKey` to `StartRekey` Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-25: change GetShate to GetStates to get all states * CDS-25: Add detailed status * CDS-25: use ShareholderId instead * CDS-25: typo fix * CDS-25: rename GetStates tp GetState Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-25: typos fixes * CDS-25: add requiredness and make ShareSubmitters a map * CDS-25: Add missing params and exception (#429) * CDS-84: Make lifetime optional (#432) * CDS-71: fix typo * CDS-71: rename SignedMasterKeyShare and clarify what is confirm and validate * CDS-71: clarification that SignedMasterKeyShare is JWS
2019-04-26 15:54:35 +00:00
EncryptedMasterKeyShares StartInit (1: i16 threshold)
throws (1: InvalidStatus invalid_status,
2: InvalidActivity invalid_activity,
3: InvalidArguments invalid_args)
/** Валидирует и завершает операцию над Keyring
* Вызывается после Init и Rekey (CDS-25)
* key_share - SignedMasterKeyShare в виде JWS
*/
KeyringOperationStatus ValidateInit (1: ShareholderId shareholder_id,
2: SignedMasterKeyShare key_share)
throws (1: InvalidStatus invalid_status,
2: InvalidActivity invalid_activity,
3: VerificationFailed verification_failed,
// Исключения ниже переводят машину в состояние `uninitialized`
4: OperationAborted operation_aborted)
/** Отменяет Init не прошедший валидацию и дает возможность запустить его заново */
void CancelInit () throws (1: InvalidStatus invalid_status)
/** Создать новый masterkey при наличии уже имеющегося
* threshold - минимально необходимое количество ключей для восстановления мастер ключа
*/
void StartRekey (1: i16 threshold)
throws (1: InvalidStatus invalid_status,
2: InvalidActivity invalid_activity,
3: InvalidArguments invalid_args)
/** Подтвердить операцию создания нового masterkey
* key_share - старый masterkey share в количестве threshold
*/
KeyringOperationStatus ConfirmRekey (1: ShareholderId shareholder_id,
2: SignedMasterKeyShare key_share)
throws (1: InvalidStatus invalid_status,
2: InvalidActivity invalid_activity,
3: VerificationFailed verification_failed,
4: OperationAborted operation_aborted)
/** Начать валидацию операции и получить Зашифрованные masterkey share */
EncryptedMasterKeyShares StartRekeyValidation ()
throws (1: InvalidStatus invalid_status,
2: InvalidActivity invalid_activity)
/** Провалидировать расшифрованными фрагментами нового ключа
* key_share - новый masterkey share в количестве num
*/
KeyringOperationStatus ValidateRekey (1: ShareholderId shareholder_id,
2: SignedMasterKeyShare key_share)
throws (1: InvalidStatus invalid_status,
2: InvalidActivity invalid_activity,
3: VerificationFailed verification_failed,
4: OperationAborted operation_aborted)
/** Отменить операцию создания нового masterkey */
void CancelRekey () throws (1: InvalidStatus invalid_status)
/** Получить состояние операций */
KeyringState GetState ()
/** Начинает процесс блокировки */
void StartUnlock ()
throws (1: InvalidStatus invalid_status,
2: InvalidActivity invalid_activity)
2016-06-10 15:53:11 +00:00
/** Предоставить часть мастер-ключа для расшифровки кейринга.
* Необходимо вызвать с разными частами мастер столько раз, сколько было указано в качестве
* параметра threshold при создании кейринга
*/
CDS-71: Redone Keyring (#435) * CDS-76: Change rotate to use keyshare (#413) * CDS-76: Change rotate to use keyshare * CDS-76: Add extra exceptions (#414) * CDS-75: Keyring init (#415) * CDS-75: Change Keyring.Init and add Keyring.Validate * CDS-75: fixed missed exception * CDS-75: add exception for double init and method to cancel it * CDS-75: Rename `Init` to `StartInit` Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-75: introduce InvalidStatus exception, remove PublicKey and refactor * CDS-75: fix typos and add comment * CDS-75: void instead of Success Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-75: add Unlocked/Locked and OperationAborted * CDS-75: add OperationAborted to relevant methods * CDS-75: change relevant methods to use InvalidStatus * CDS-75: add comments to `EncryptedMasterKeyShare` * CDS-75: divide Status into Status and Activity * CDS-75: changes due to realization * CDS-75: add InvalidActivity exception to ValidateInit (#417) * CDS-75: fix Status typo (#418) * CDS-75: Add ShareholderId to all MasterKeyShare methods (#420) * CDS-75: Add ShareholderId to all MasterKeyShare methods * CDS-75: added missing ValidateInit * CDS-75: Add VerificationFailed exception (#421) * CDS-76: Refactor Unlock and Rotate to be similar to Init (#423) * CDS-76: Add missing Activity enums (#424) * CDS-25: Add methods for re-keying (#419) * CDS-25: Add methods for re-initialization * CDS-25: add relevant comments * CDS-25: change to rekey and make GetState universal * CDS-25: rename `StartReKey` to `StartRekey` Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-25: change GetShate to GetStates to get all states * CDS-25: Add detailed status * CDS-25: use ShareholderId instead * CDS-25: typo fix * CDS-25: rename GetStates tp GetState Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-25: typos fixes * CDS-25: add requiredness and make ShareSubmitters a map * CDS-25: Add missing params and exception (#429) * CDS-84: Make lifetime optional (#432) * CDS-71: fix typo * CDS-71: rename SignedMasterKeyShare and clarify what is confirm and validate * CDS-71: clarification that SignedMasterKeyShare is JWS
2019-04-26 15:54:35 +00:00
KeyringOperationStatus ConfirmUnlock (1: ShareholderId shareholder_id,
2: SignedMasterKeyShare key_share)
throws (1: InvalidStatus invalid_status,
2: InvalidActivity invalid_activity,
3: VerificationFailed verification_failed,
4: OperationAborted operation_aborted)
/** Отменяет процесс блокировки */
void CancelUnlock () throws (1: InvalidStatus invalid_status)
2016-06-10 15:53:11 +00:00
/** Зашифровать кейринг */
CDS-71: Redone Keyring (#435) * CDS-76: Change rotate to use keyshare (#413) * CDS-76: Change rotate to use keyshare * CDS-76: Add extra exceptions (#414) * CDS-75: Keyring init (#415) * CDS-75: Change Keyring.Init and add Keyring.Validate * CDS-75: fixed missed exception * CDS-75: add exception for double init and method to cancel it * CDS-75: Rename `Init` to `StartInit` Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-75: introduce InvalidStatus exception, remove PublicKey and refactor * CDS-75: fix typos and add comment * CDS-75: void instead of Success Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-75: add Unlocked/Locked and OperationAborted * CDS-75: add OperationAborted to relevant methods * CDS-75: change relevant methods to use InvalidStatus * CDS-75: add comments to `EncryptedMasterKeyShare` * CDS-75: divide Status into Status and Activity * CDS-75: changes due to realization * CDS-75: add InvalidActivity exception to ValidateInit (#417) * CDS-75: fix Status typo (#418) * CDS-75: Add ShareholderId to all MasterKeyShare methods (#420) * CDS-75: Add ShareholderId to all MasterKeyShare methods * CDS-75: added missing ValidateInit * CDS-75: Add VerificationFailed exception (#421) * CDS-76: Refactor Unlock and Rotate to be similar to Init (#423) * CDS-76: Add missing Activity enums (#424) * CDS-25: Add methods for re-keying (#419) * CDS-25: Add methods for re-initialization * CDS-25: add relevant comments * CDS-25: change to rekey and make GetState universal * CDS-25: rename `StartReKey` to `StartRekey` Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-25: change GetShate to GetStates to get all states * CDS-25: Add detailed status * CDS-25: use ShareholderId instead * CDS-25: typo fix * CDS-25: rename GetStates tp GetState Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-25: typos fixes * CDS-25: add requiredness and make ShareSubmitters a map * CDS-25: Add missing params and exception (#429) * CDS-84: Make lifetime optional (#432) * CDS-71: fix typo * CDS-71: rename SignedMasterKeyShare and clarify what is confirm and validate * CDS-71: clarification that SignedMasterKeyShare is JWS
2019-04-26 15:54:35 +00:00
void Lock () throws (1: InvalidStatus invalid_status)
/** Начать процесс добавления нового ключа в кейринг */
void StartRotate ()
throws (1: InvalidStatus invalid_status,
2: InvalidActivity invalid_activity)
CDS-71: Redone Keyring (#435) * CDS-76: Change rotate to use keyshare (#413) * CDS-76: Change rotate to use keyshare * CDS-76: Add extra exceptions (#414) * CDS-75: Keyring init (#415) * CDS-75: Change Keyring.Init and add Keyring.Validate * CDS-75: fixed missed exception * CDS-75: add exception for double init and method to cancel it * CDS-75: Rename `Init` to `StartInit` Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-75: introduce InvalidStatus exception, remove PublicKey and refactor * CDS-75: fix typos and add comment * CDS-75: void instead of Success Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-75: add Unlocked/Locked and OperationAborted * CDS-75: add OperationAborted to relevant methods * CDS-75: change relevant methods to use InvalidStatus * CDS-75: add comments to `EncryptedMasterKeyShare` * CDS-75: divide Status into Status and Activity * CDS-75: changes due to realization * CDS-75: add InvalidActivity exception to ValidateInit (#417) * CDS-75: fix Status typo (#418) * CDS-75: Add ShareholderId to all MasterKeyShare methods (#420) * CDS-75: Add ShareholderId to all MasterKeyShare methods * CDS-75: added missing ValidateInit * CDS-75: Add VerificationFailed exception (#421) * CDS-76: Refactor Unlock and Rotate to be similar to Init (#423) * CDS-76: Add missing Activity enums (#424) * CDS-25: Add methods for re-keying (#419) * CDS-25: Add methods for re-initialization * CDS-25: add relevant comments * CDS-25: change to rekey and make GetState universal * CDS-25: rename `StartReKey` to `StartRekey` Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-25: change GetShate to GetStates to get all states * CDS-25: Add detailed status * CDS-25: use ShareholderId instead * CDS-25: typo fix * CDS-25: rename GetStates tp GetState Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-25: typos fixes * CDS-25: add requiredness and make ShareSubmitters a map * CDS-25: Add missing params and exception (#429) * CDS-84: Make lifetime optional (#432) * CDS-71: fix typo * CDS-71: rename SignedMasterKeyShare and clarify what is confirm and validate * CDS-71: clarification that SignedMasterKeyShare is JWS
2019-04-26 15:54:35 +00:00
/* Предоставить часть мастер-ключа для зашифровки нового инстанса кейринга.
* См. `Unlock`
*/
KeyringOperationStatus ConfirmRotate (1: ShareholderId shareholder_id,
2: SignedMasterKeyShare key_share)
throws (1: InvalidStatus invalid_status,
2: InvalidActivity invalid_activity,
3: VerificationFailed verification_failed,
4: OperationAborted operation_aborted)
CDS-71: Redone Keyring (#435) * CDS-76: Change rotate to use keyshare (#413) * CDS-76: Change rotate to use keyshare * CDS-76: Add extra exceptions (#414) * CDS-75: Keyring init (#415) * CDS-75: Change Keyring.Init and add Keyring.Validate * CDS-75: fixed missed exception * CDS-75: add exception for double init and method to cancel it * CDS-75: Rename `Init` to `StartInit` Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-75: introduce InvalidStatus exception, remove PublicKey and refactor * CDS-75: fix typos and add comment * CDS-75: void instead of Success Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-75: add Unlocked/Locked and OperationAborted * CDS-75: add OperationAborted to relevant methods * CDS-75: change relevant methods to use InvalidStatus * CDS-75: add comments to `EncryptedMasterKeyShare` * CDS-75: divide Status into Status and Activity * CDS-75: changes due to realization * CDS-75: add InvalidActivity exception to ValidateInit (#417) * CDS-75: fix Status typo (#418) * CDS-75: Add ShareholderId to all MasterKeyShare methods (#420) * CDS-75: Add ShareholderId to all MasterKeyShare methods * CDS-75: added missing ValidateInit * CDS-75: Add VerificationFailed exception (#421) * CDS-76: Refactor Unlock and Rotate to be similar to Init (#423) * CDS-76: Add missing Activity enums (#424) * CDS-25: Add methods for re-keying (#419) * CDS-25: Add methods for re-initialization * CDS-25: add relevant comments * CDS-25: change to rekey and make GetState universal * CDS-25: rename `StartReKey` to `StartRekey` Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-25: change GetShate to GetStates to get all states * CDS-25: Add detailed status * CDS-25: use ShareholderId instead * CDS-25: typo fix * CDS-25: rename GetStates tp GetState Co-Authored-By: ndiezel0 <ndiezel0@gmail.com> * CDS-25: typos fixes * CDS-25: add requiredness and make ShareSubmitters a map * CDS-25: Add missing params and exception (#429) * CDS-84: Make lifetime optional (#432) * CDS-71: fix typo * CDS-71: rename SignedMasterKeyShare and clarify what is confirm and validate * CDS-71: clarification that SignedMasterKeyShare is JWS
2019-04-26 15:54:35 +00:00
/** Отменяет процесс добавления нового ключа в кейринг */
void CancelRotate () throws (1: InvalidStatus invalid_status)
}
/**
* Интерфейс для приложений
*
* При недоступности (отсутствии или залоченности) кейринга сервис сигнализирует об этом с помощью
* woody-ошибки `Resource Unavailable`.
*/
service Storage {
2016-06-10 15:53:11 +00:00
/** Получить карточные данные без CVV */
CardData GetCardData (1: domain.Token token)
throws (1: CardDataNotFound not_found)
2016-06-10 15:53:11 +00:00
/** Получить карточные данные c CVV */
CardData GetSessionCardData (1: domain.Token token, 2: domain.PaymentSessionID session_id)
throws (1: CardDataNotFound not_found)
/** Получить данные сессии */
SessionData GetSessionData (1: domain.PaymentSessionID session_id)
throws (1: SessionDataNotFound not_found)
/** Сохранить карточные и сессионные данные */
PutCardDataResult PutCardData (1: CardData card_data, 2: SessionData session_data)
throws (
1: InvalidCardData invalid
)
2016-06-10 15:53:11 +00:00
/** Сохранить карточные данные */
PutCardResult PutCard (1: CardData card_data)
throws (
1: InvalidCardData invalid
)
/** Сохранить сессионные данные */
void PutSession (1: domain.PaymentSessionID session_id, 2: SessionData session_data)
}