Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

selective key restore #8781

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
}
},
"schema": {
"$ref": "#/definitions/FullRestoreOperation"
"$ref": "#/definitions/RestoreOperation"
}
},
"default": {
Expand Down Expand Up @@ -177,7 +177,7 @@
"200": {
"description": "OK - Returns the full restore status",
"schema": {
"$ref": "#/definitions/FullRestoreOperation"
"$ref": "#/definitions/RestoreOperation"
}
},
"default": {
Expand All @@ -193,6 +193,64 @@
}
}
}
},
"/restore/key/{keyName}": {
"put": {
"tags": [
"SelectiveKeyRestore"
],
"operationId": "SelectiveKeyRestoreOperation",
"description": "Restores all key versions of a given key using user supplied SAS token pointing to a previously stored Azure Blob storage backup folder",
"parameters": [
{
"name": "keyName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the key to be restored from the user supplied backup"
},
{
"name": "restoreBlobDetails",
"in": "body",
"schema": {
"$ref": "#/definitions/RestoreOperationParameters"
},
"description": "The Azure blob SAS token pointing to a folder where the previous successful full backup was stored"
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"202": {
"description": "Started selective key restore operation from the previously stored backup",
"headers": {
"Retry-After": {
"description": "The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation.",
"type": "integer"
},
"Azure-AsyncOperation": {
"description": "The URI to poll for completion status.",
"type": "string"
}
},
"schema": {
"$ref": "#/definitions/RestoreOperation"
}
},
"default": {
"description": "Key Vault error response describing why the operation failed.",
"schema": {
"$ref": "common.json#/definitions/KeyVaultError"
}
}
},
"x-ms-examples": {
"Create full restore from backup": {
"$ref": "./examples/SelectiveRestore-example.json"
}
}
}
}
},
"definitions": {
Expand Down Expand Up @@ -262,7 +320,7 @@
},
"description": "Full backup operation"
},
"FullRestoreOperation": {
"RestoreOperation": {
"properties": {
"status": {
"type": "string",
Expand Down Expand Up @@ -303,4 +361,4 @@
"description": "Client API version."
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"parameters": {
"keyName": "hsm-mail-key",
"restoreBlobDetails": {
"sasTokenParameters": {
"storageResourceUri": "https://myaccount.blob.core.windows.net/sascontainer/sasContainer",
"token": "se=2018-02-01T00%3A00Z&spr=https&sv=2017-04-17&sr=b&sig=XXFNfuMCH112BxhemJ7PWn0xGfImMXT6LfbXWvtRUk%3D"
},
"folderToRestore": "1490790332"
},
"api-version": "7.2-preview"
},
"responses": {
"202": {
"headers": {
"Retry-After": 5,
"Azure-AsyncOperation": "https://myvault.vault.azure.net/restore/45aacd568a23b0s49a2803861e8dd3ase21f/pending"
},
"body": {
"status": "InProgress",
"statusDetails": "Selective Key restore is in progress",
"jobId": "45aacd568a23b0s49a2803861e8dd3ase21f",
"startTime": 1490790000,
"endTime": 0
}
}
}
}