{ "swagger": "2.0", "info": { "title": "sckm.spec.proto", "version": "version not set" }, "tags": [ { "name": "KeyManagerService" } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "paths": { "/v1/decrypt": { "post": { "operationId": "KeyManagerService_Decrypt", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1DecryptResponse" } } }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1DecryptRequest" } } ], "tags": [ "KeyManagerService" ] } }, "/v1/encrypt": { "post": { "operationId": "KeyManagerService_Encrypt", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1EncryptResponse" } } }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1EncryptRequest" } } ], "tags": [ "KeyManagerService" ] } }, "/v1/keys": { "get": { "operationId": "KeyManagerService_ListCryptoKeys", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1ListCryptoKeysResponse" } } }, "parameters": [ { "name": "parentId", "description": "обязательное поле. Идентификатор пространства имен.", "in": "query", "required": false, "type": "string" }, { "name": "page.limit", "description": "обязательное поле. Максимальное кол-во записей в одном запросе. (Макс: 1000, по умолчанию: 100).", "in": "query", "required": false, "type": "integer", "format": "int32" }, { "name": "page.offset", "description": "обязательное поле. Сдвиг записей.", "in": "query", "required": false, "type": "integer", "format": "int32" } ], "tags": [ "KeyManagerService" ] }, "post": { "operationId": "KeyManagerService_CreateCryptoKey", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1CryptoKey" } } }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1CreateCryptoKeyRequest" } } ], "tags": [ "KeyManagerService" ] } }, "/v1/keys/{key.id}": { "patch": { "operationId": "KeyManagerService_UpdateCryptoKey", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1CryptoKey" } } }, "parameters": [ { "name": "key.id", "description": "идентификатор криптографического ключа.", "in": "path", "required": true, "type": "string" }, { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1UpdateCryptoKeyRequest" } } ], "tags": [ "KeyManagerService" ] } }, "/v1/keys/{keyId}": { "get": { "operationId": "KeyManagerService_GetCryptoKey", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1CryptoKey" } } }, "parameters": [ { "name": "keyId", "description": "обязательное поле. Идентификатор криптографического ключа.", "in": "path", "required": true, "type": "string" } ], "tags": [ "KeyManagerService" ] }, "delete": { "operationId": "KeyManagerService_DestroyCryptoKey", "responses": { "200": { "description": "A successful response.", "schema": { "properties": {} } } }, "parameters": [ { "name": "keyId", "description": "обязательное поле. Идентификатор криптографического ключа.", "in": "path", "required": true, "type": "string" } ], "tags": [ "KeyManagerService" ] } }, "/v1/keys/{keyId}/versions": { "get": { "operationId": "KeyManagerService_ListCryptoKeyVersions", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1ListCryptoKeyVersionsResponse" } } }, "parameters": [ { "name": "keyId", "description": "обязательное поле. Индентификатор криптографического ключа.", "in": "path", "required": true, "type": "string" }, { "name": "page.limit", "description": "обязательное поле. Максимальное кол-во записей в одном запросе. (Макс: 1000, по умолчанию: 100).", "in": "query", "required": false, "type": "integer", "format": "int32" }, { "name": "page.offset", "description": "обязательное поле. Сдвиг записей.", "in": "query", "required": false, "type": "integer", "format": "int32" } ], "tags": [ "KeyManagerService" ] }, "post": { "operationId": "KeyManagerService_CreateCryptoKeyVersion", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1CryptoKeyVersion" } } }, "parameters": [ { "name": "keyId", "description": "обязательное поле. Идентификатор криптографического ключа.", "in": "path", "required": true, "type": "string" }, { "name": "body", "in": "body", "required": true, "schema": { "type": "object", "properties": { "algorithm": { "$ref": "#/definitions/v1Algorithm", "description": "алгоритм шифрования. Если параметр не указан, то будет использован алгоритм по умолчанию, заданный в криптографическом ключе." } } } } ], "tags": [ "KeyManagerService" ] } }, "/v1/keys/{keyId}/versions/{keyVersionId}": { "get": { "operationId": "KeyManagerService_GetCryptoKeyVersion", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1CryptoKeyVersion" } } }, "parameters": [ { "name": "keyId", "description": "обязательное поле. Идентификатор криптографического ключа.", "in": "path", "required": true, "type": "string" }, { "name": "keyVersionId", "description": "обязательное поле. Идентификатор версии криптографического ключа.", "in": "path", "required": true, "type": "integer", "format": "int32" } ], "tags": [ "KeyManagerService" ] }, "delete": { "operationId": "KeyManagerService_DestroyCryptoKeyVersion", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1CryptoKeyVersion" } } }, "parameters": [ { "name": "keyId", "description": "обязательное поле. Идентификатор криптографического ключа.", "in": "path", "required": true, "type": "string" }, { "name": "keyVersionId", "description": "обязательное поле. Идентификатор версии криптографического ключа.", "in": "path", "required": true, "type": "integer", "format": "int32" } ], "tags": [ "KeyManagerService" ] } }, "/v1/keys/{keyId}/versions/{keyVersionId}/disable": { "post": { "operationId": "KeyManagerService_DisableCryptoKeyVersion", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1CryptoKeyVersion" } } }, "parameters": [ { "name": "keyId", "description": "обязательное поле. Идентификатор криптографического ключа.", "in": "path", "required": true, "type": "string" }, { "name": "keyVersionId", "description": "обязательное поле. Идентификатор версии криптографического ключа.", "in": "path", "required": true, "type": "integer", "format": "int32" } ], "tags": [ "KeyManagerService" ] } }, "/v1/keys/{keyId}/versions/{keyVersionId}/enable": { "post": { "operationId": "KeyManagerService_EnableCryptoKeyVersion", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1CryptoKeyVersion" } } }, "parameters": [ { "name": "keyId", "description": "обязательное поле. Идентификатор криптографического ключа.", "in": "path", "required": true, "type": "string" }, { "name": "keyVersionId", "description": "обязательное поле. Идентификатор версии криптографического ключа.", "in": "path", "required": true, "type": "integer", "format": "int32" } ], "tags": [ "KeyManagerService" ] } }, "/v1/keys/{keyId}/versions/{keyVersionId}/primary": { "patch": { "operationId": "KeyManagerService_UpdateCryptoKeyPrimaryVersion", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1CryptoKey" } } }, "parameters": [ { "name": "keyId", "description": "обязательное поле. Идентификатор криптографического ключа.", "in": "path", "required": true, "type": "string" }, { "name": "keyVersionId", "description": "обязательное поле. Идентификатор версии криптографического ключа.", "in": "path", "required": true, "type": "integer", "format": "int32" } ], "tags": [ "KeyManagerService" ] } }, "/v1/keys/{keyId}/versions/{keyVersionId}/restore": { "post": { "operationId": "KeyManagerService_RestoreCryptoKeyVersion", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1CryptoKeyVersion" } } }, "parameters": [ { "name": "keyId", "description": "обязательное поле. Идентификатор криптографического ключа.", "in": "path", "required": true, "type": "string" }, { "name": "keyVersionId", "description": "обязательное поле. Идентификатор версии криптографического ключа.", "in": "path", "required": true, "type": "integer", "format": "int32" } ], "tags": [ "KeyManagerService" ] } } }, "definitions": { "v1Algorithm": { "type": "string", "enum": [ "ALGORITHM_UNSPECIFIED", "AES_128", "AES_192", "AES_256" ], "default": "ALGORITHM_UNSPECIFIED", "description": "алгоритм шифрования. Если параметр не указан, то будет использован алгоритм по умолчанию, заданный в криптографическом ключе." }, "v1CreateCryptoKeyRequest": { "type": "object", "properties": { "parentId": { "type": "string", "description": "обязательное поле. Указывается идентификатор пространства имен." }, "name": { "type": "string", "description": "имя криптографического ключа." }, "description": { "type": "string", "description": "описание криптографического ключа." }, "labels": { "type": "array", "items": { "type": "string", "description": "ярлык криптографического ключа." }, "description": "ярлык криптографического ключа." }, "rotationPeriod": { "type": "string", "description": "период ротации." }, "defaultAlgorithm": { "$ref": "#/definitions/v1Algorithm", "description": "алгоритм по умолчанию. Будет использоваться при создании версии криптографического ключа." } } }, "v1CryptoKey": { "type": "object", "properties": { "id": { "type": "string", "description": "идентификатор криптографического ключа." }, "name": { "type": "string", "description": "наименование криптографического ключа." }, "description": { "type": "string", "description": "описание криптографического ключа." }, "owner": { "type": "string", "description": "идентификатор владельца ключа." }, "primary": { "$ref": "#/definitions/v1CryptoKeyVersion", "description": "основная версия ключа." }, "labels": { "type": "array", "items": { "type": "string", "description": "ярлык криптографического ключа." }, "description": "ярлык криптографического ключа." }, "rotationPeriod": { "type": "string", "description": "период ротации ключа." }, "nextRotationTime": { "type": "string", "format": "date-time", "description": "следующая дата ротации ключа." }, "defaultAlgorithm": { "$ref": "#/definitions/v1Algorithm", "description": "алгоритм по умолчанию." }, "createdAt": { "type": "string", "format": "date-time", "description": "дата создания ключа." } } }, "v1CryptoKeyVersion": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32", "description": "идентификатор версии криптографического ключа." }, "keyId": { "type": "string", "description": "идентификатор криптографического ключа." }, "state": { "$ref": "#/definitions/v1State", "description": "состояние версии криптографического ключа." }, "algorithm": { "$ref": "#/definitions/v1Algorithm", "description": "алгоритм версии криптографического ключа." }, "createdAt": { "type": "string", "format": "date-time", "description": "дата создания версии криптографического ключа." }, "destroyAt": { "type": "string", "format": "date-time", "description": "дата удаления версии криптографического ключа." } } }, "v1DecryptRequest": { "type": "object", "properties": { "keyId": { "type": "string", "description": "обязательное поле. Идентификатор криптографического ключа." }, "ciphertext": { "type": "string", "format": "byte", "description": "обязательное поле. Зашифрованные данные." }, "additionalAuthenticatedData": { "type": "string", "format": "byte", "description": "дополнительные данные для дешифрования." } } }, "v1DecryptResponse": { "type": "object", "properties": { "keyId": { "type": "string", "description": "обязательное поле. Идентификатор криптографического ключа." }, "keyVersionId": { "type": "integer", "format": "int32", "description": "идентификатор версии криптографического ключа." }, "plaintext": { "type": "string", "format": "byte", "description": "дешифрованные данные." } } }, "v1EncryptRequest": { "type": "object", "properties": { "keyId": { "type": "string", "description": "обязательное поле. Идентификатор криптографического ключа." }, "keyVersionId": { "type": "integer", "format": "int32", "description": "обязательное поле. Идентификатор версии криптографического ключа." }, "plaintext": { "type": "string", "format": "byte", "description": "обязательное поле. Незашифрованные данные." }, "additionalAuthenticatedData": { "type": "string", "format": "byte", "description": "дополнительные данные для шифрования." } } }, "v1EncryptResponse": { "type": "object", "properties": { "keyId": { "type": "string", "description": "идентификатор ключа." }, "keyVersionId": { "type": "integer", "format": "int32", "description": "идентификатор версии ключа." }, "ciphertext": { "type": "string", "format": "byte", "description": "зашифрованный текст." } } }, "v1ListCryptoKeyVersionsResponse": { "type": "object", "properties": { "versions": { "type": "array", "items": { "$ref": "#/definitions/v1CryptoKeyVersion", "description": "версии криптографического ключа." }, "description": "версии криптографического ключа." } } }, "v1ListCryptoKeysResponse": { "type": "object", "properties": { "keys": { "type": "array", "items": { "$ref": "#/definitions/v1CryptoKey" }, "description": "криптографические ключи." } } }, "v1Page": { "type": "object", "properties": { "limit": { "type": "integer", "format": "int32", "description": "обязательное поле. Максимальное кол-во записей в одном запросе. (Макс: 1000, по умолчанию: 100)." }, "offset": { "type": "integer", "format": "int32", "description": "обязательное поле. Сдвиг записей." } } }, "v1State": { "type": "string", "enum": [ "STATE_UNSPECIFIED", "ENABLED", "DISABLED", "DESTROYED_SCHEDULED", "DESTROYED" ], "default": "STATE_UNSPECIFIED", "description": "состояние версии криптографического ключа." }, "v1UpdateCryptoKeyRequest": { "type": "object", "properties": { "key": { "$ref": "#/definitions/v1CryptoKey", "description": "обязательное поле. Обновленный криптографический ключ." }, "updateMask": { "type": "string", "description": "обязательное поле. Маска обновления ключа." } } } } }