From f59c01bafa3f46bce10e56dc223b974c66949b6e Mon Sep 17 00:00:00 2001 From: qinl-li <63257243+qinl-li@users.noreply.github.com> Date: Fri, 4 Dec 2020 16:33:53 -0800 Subject: [PATCH 01/19] Key rotation swagger change --- .../examples/GetKeyPolicy-example.json | 38 +++ .../examples/RotateKey-example.json | 64 +++++ .../examples/UpdateKeyPolicy-example.json | 62 +++++ .../preview/7.3-preview/keys.json | 240 ++++++++++++++++++ 4 files changed, 404 insertions(+) create mode 100644 specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/GetKeyPolicy-example.json create mode 100644 specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/RotateKey-example.json create mode 100644 specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/UpdateKeyPolicy-example.json diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/GetKeyPolicy-example.json b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/GetKeyPolicy-example.json new file mode 100644 index 000000000000..7771c781a6a1 --- /dev/null +++ b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/GetKeyPolicy-example.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "vaultBaseUrl": "https://myvault.vault.azure.net/", + "key-name": "key01", + "api-version": "7.3-preview" + }, + "responses": { + "200": { + "body": { + "id": "https://myvault.vault.azure.net/keys/key01/policy", + "lifetimeActions": [ + { + "trigger": { + "timeAfterCreation": "90D" + }, + "action": { + "type": "Rotate" + } + }, + { + "trigger": { + "timeBeforeExpiry": "30D" + }, + "action": { + "type": "Notify" + } + } + ], + "attributes": { + "rotationEnabled": true, + "rotationTime": "2Y", + "created": 1482188947, + "updated": 1482188948 + } + } + } + } +} diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/RotateKey-example.json b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/RotateKey-example.json new file mode 100644 index 000000000000..3b95fc6659be --- /dev/null +++ b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/RotateKey-example.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "vaultBaseUrl": "https://myvault.vault.azure.net/", + "key-name": "Key01", + "api-version": "7.3-preview" + }, + "responses": { + "200": { + "body": { + "key": { + "kid": "https://myvault.vault.azure.net/keys/CreateSoftKeyTest/78deebed173b48e48f55abf87ed4cf71", + "kty": "RSA", + "key_ops": [ + "encrypt", + "decrypt", + "sign", + "verify", + "wrapKey", + "unwrapKey" + ], + "n": "2HJAE5fU3Cw2Rt9hEuq-F6XjINKGa-zskfISVqopqUy60GOs2eyhxbWbJBeUXNor_gf-tXtNeuqeBgitLeVa640UDvnEjYTKWjCniTxZRaU7ewY8BfTSk-7KxoDdLsPSpX_MX4rwlAx-_1UGk5t4sQgTbm9T6Fm2oqFd37dsz5-Gj27UP2GTAShfJPFD7MqU_zIgOI0pfqsbNL5xTQVM29K6rX4jSPtylZV3uWJtkoQIQnrIHhk1d0SC0KwlBV3V7R_LVYjiXLyIXsFzSNYgQ68ZjAwt8iL7I8Osa-ehQLM13DVvLASaf7Jnu3sC3CWl3Gyirgded6cfMmswJzY87w", + "e": "AQAB" + }, + "attributes": { + "enabled": true, + "created": 1493942451, + "updated": 1493942451, + "recoveryLevel": "Recoverable+Purgeable" + }, + "tags": { + "purpose": "unit test", + "test name ": "CreateGetDeleteKeyTest" + }, + "policy": { + "id": "https://myvault.vault.azure.net/keys/key01/policy", + "lifetimeActions": [ + { + "trigger": { + "timeAfterCreation": "90D" + }, + "action": { + "type": "Rotate" + } + }, + { + "trigger": { + "timeBeforeExpiry": "30D" + }, + "action": { + "type": "Notify" + } + } + ], + "attributes": { + "rotationEnabled": true, + "rotationTime": "2Y", + "created": 1482188947, + "updated": 1482188948 + } + } + } + } + } +} diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/UpdateKeyPolicy-example.json b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/UpdateKeyPolicy-example.json new file mode 100644 index 000000000000..2aa749b5f29d --- /dev/null +++ b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/UpdateKeyPolicy-example.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "vaultBaseUrl": "https://myvault.vault.azure.net/", + "key-name": "updateKey01", + "api-version": "7.3-preview", + "keyPolicy": { + "lifetimeActions": [ + { + "trigger": { + "timeAfterCreation": "90D" + }, + "action": { + "type": "Rotate" + } + }, + { + "trigger": { + "timeBeforeExpiry": "30D" + }, + "action": { + "type": "Notify" + } + } + ], + "attributes": { + "rotationEnabled": true, + "rotationTime": "2Y" + } + } + }, + "responses": { + "200": { + "body": { + "id": "https://myvault.vault.azure.net/keys/updateKey01/policy", + "lifetimeActions": [ + { + "trigger": { + "timeAfterCreation": "90D" + }, + "action": { + "type": "Rotate" + } + }, + { + "trigger": { + "timeBeforeExpiry": "30D" + }, + "action": { + "type": "Notify" + } + } + ], + "attributes": { + "rotationEnabled": true, + "rotationTime": "2Y", + "created": 1482188947, + "updated": 1482188948 + } + } + } + } +} diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json index 830d485ca106..9465015f17af 100644 --- a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json +++ b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json @@ -79,6 +79,55 @@ } } }, + "/keys/{key-name}/roll": { + "put": { + "tags": [ + "Keys" + ], + "operationId": "RotateKey", + "summary": "Creates a new key version, stores it, then returns key parameters, attributes and policy to the client.", + "description": "The operation will rotate the key based on the key policy. It requires the keys/rotate permission.", + "parameters": [ + { + "name": "key-name", + "in": "path", + "required": true, + "type": "string", + "pattern": "^[0-9a-zA-Z-]+$", + "description": "The name for the new key. The system will generate the version name for the new key." + }, + { + "name": "force", + "in": "query", + "required": false, + "type": "boolean", + "description": "Key rotation will happen immediately when it is true. Otherwise, the api will compute current key policy to make key rotation decision. The value will be true if not specified." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "A key bundle containing the result of the rotate key request.", + "schema": { + "$ref": "#/definitions/KeyBundle" + } + }, + "default": { + "description": "Key Vault error response describing why the operation failed.", + "schema": { + "$ref": "common.json#/definitions/KeyVaultError" + } + } + }, + "x-ms-examples": { + "Create key": { + "$ref": "./examples/RotateKey-example.json" + } + } + } + }, "/keys/{key-name}": { "put": { "tags": [ @@ -1030,6 +1079,95 @@ } } } + }, + "/keys/{key-name}/policy": { + "get": { + "tags": [ + "Keys" + ], + "operationId": "GetKeyPolicy", + "summary": "Lists the policy for a key.", + "description": "The GetKeyPolicy operation returns the specified key policy resources in the specified key vault. This operation requires the keys/get permission.", + "parameters": [ + { + "name": "key-name", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the key in a given key vault." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The key policy.", + "schema": { + "$ref": "#/definitions/KeyPolicy" + } + }, + "default": { + "description": "Key Vault error response describing why the operation failed.", + "schema": { + "$ref": "common.json#/definitions/KeyVaultError" + } + } + }, + "x-ms-examples": { + "GetkeyPolicy": { + "$ref": "./examples/GetKeyPolicy-example.json" + } + } + }, + "patch": { + "tags": [ + "keys" + ], + "operationId": "UpdateKeyPolicy", + "summary": "Updates the policy for a key.", + "description": "Set specified members in the key policy. Leave others as null. This operation requires the keys/update permission.", + "parameters": [ + { + "name": "key-name", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the key in the given vault." + }, + { + "name": "keyPolicy", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/KeyPolicy" + }, + "description": "The policy for the key." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The policy for the key.", + "schema": { + "$ref": "#/definitions/KeyPolicy" + } + }, + "default": { + "description": "Key Vault error response describing why the operation failed.", + "schema": { + "$ref": "common.json#/definitions/KeyVaultError" + } + } + }, + "x-ms-examples": { + "UpdatekeyPolicy": { + "$ref": "./examples/UpdateKeyPolicy-example.json" + } + } + } } }, "definitions": { @@ -1355,6 +1493,10 @@ "readOnly": true, "description": "True if the key's lifetime is managed by key vault. If this is a key backing a certificate, then managed will be true." }, + "policy": { + "$ref": "#/definitions/KeyPolicy", + "description": "The policy for the key." + }, "release_policy": { "$ref": "#/definitions/KeyReleasePolicy", "description": "The policy rules under which the key can be exported." @@ -1565,6 +1707,10 @@ "modelAsString": true } }, + "policy": { + "x-ms-client-name": "keyPolicy", + "$ref": "#/definitions/KeyPolicy" + }, "release_policy": { "$ref": "#/definitions/KeyReleasePolicy", "description": "The policy rules under which the key can be exported." @@ -1930,6 +2076,100 @@ } }, "description": "The backup key result, containing the backup blob." + }, + "KeyPolicy": { + "properties": { + "id": { + "type": "string", + "description": "The key policy id.", + "readOnly": true + }, + "lifetimeActions": { + "type": "array", + "items": { + "$ref": "#/definitions/LifetimeActions" + }, + "description": "Actions that will be performed by Key Vault over the lifetime of a key." + }, + "attributes": { + "$ref": "#/definitions/KeyPolicyAttributes", + "description": "The key policy attributes." + } + }, + "description": "Management policy for a key." + }, + "LifetimeActions": { + "properties": { + "trigger": { + "$ref": "#/definitions/LifetimeActionsTrigger", + "description": "The condition that will execute the action." + }, + "action": { + "$ref": "#/definitions/LifetimeActionsType", + "description": "The action that will be executed." + } + }, + "description": "Action and its trigger that will be performed by Key Vault over the lifetime of a key." + }, + "LifetimeActionsTrigger": { + "properties": { + "timeAfterCreation": { + "type": "string", + "format": "string", + "minimum": 1, + "maximum": 99, + "description": "Days after creation to attempt rotate." + }, + "timeBeforeExpiry": { + "type": "string", + "format": "string", + "description": "Days before expiry to attempt rotate." + } + }, + "description": "A condition to be satisfied for an action to be executed." + }, + "LifetimeActionsType": { + "properties": { + "type": { + "type": "string", + "description": "The type of the action.", + "enum": [ + "Rotate", + "Notify" + ], + "x-ms-enum": { + "name": "ActionType", + "modelAsString": false + } + } + }, + "description": "The action that will be executed." + }, + "KeyPolicyAttributes": { + "properties": { + "rotationEnabled": { + "type": "boolean", + "description": "Determines whether key auto rotation is enabled." + }, + "rotationTime": { + "type": "string", + "format": "string", + "description": "Time to attempt rotate." + }, + "created": { + "type": "integer", + "format": "unixtime", + "readOnly": true, + "description": "The key policy created time in UTC." + }, + "updated": { + "type": "integer", + "format": "unixtime", + "readOnly": true, + "description": "The key policy's last updated time in UTC." + } + }, + "description": "The key policy attributs." } }, "parameters": { From de30be9a3a221a8d1f5ec8926be8bb9901d9c107 Mon Sep 17 00:00:00 2001 From: qinl-li <63257243+qinl-li@users.noreply.github.com> Date: Fri, 4 Dec 2020 16:51:01 -0800 Subject: [PATCH 02/19] Run PrettierCheck --- .../data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json index 9465015f17af..e4cd95237f5d 100644 --- a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json +++ b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json @@ -1710,7 +1710,7 @@ "policy": { "x-ms-client-name": "keyPolicy", "$ref": "#/definitions/KeyPolicy" - }, + }, "release_policy": { "$ref": "#/definitions/KeyReleasePolicy", "description": "The policy rules under which the key can be exported." From 66f75ea5f27ae74e215d6ab6c0279faa017bd943 Mon Sep 17 00:00:00 2001 From: qinl-li <63257243+qinl-li@users.noreply.github.com> Date: Fri, 4 Dec 2020 16:59:10 -0800 Subject: [PATCH 03/19] fixed spellcheck error --- .../Microsoft.KeyVault/preview/7.3-preview/keys.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json index e4cd95237f5d..6cf0170d5aac 100644 --- a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json +++ b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json @@ -122,7 +122,7 @@ } }, "x-ms-examples": { - "Create key": { + "Rotate key": { "$ref": "./examples/RotateKey-example.json" } } @@ -1115,7 +1115,7 @@ } }, "x-ms-examples": { - "GetkeyPolicy": { + "GetKeyPolicy": { "$ref": "./examples/GetKeyPolicy-example.json" } } @@ -1163,7 +1163,7 @@ } }, "x-ms-examples": { - "UpdatekeyPolicy": { + "UpdateKeyPolicy": { "$ref": "./examples/UpdateKeyPolicy-example.json" } } @@ -2169,7 +2169,7 @@ "description": "The key policy's last updated time in UTC." } }, - "description": "The key policy attributs." + "description": "The key policy attributes." } }, "parameters": { From 4ffab699bceab26672d354a397c7f4be3e5ee431 Mon Sep 17 00:00:00 2001 From: Jack Lichwa <52512203+jlichwa@users.noreply.github.com> Date: Fri, 4 Dec 2020 17:54:16 -0800 Subject: [PATCH 04/19] Update specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json Co-authored-by: Heath Stewart --- .../data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json index 6cf0170d5aac..e96e0365c4d7 100644 --- a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json +++ b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json @@ -94,7 +94,7 @@ "required": true, "type": "string", "pattern": "^[0-9a-zA-Z-]+$", - "description": "The name for the new key. The system will generate the version name for the new key." + "description": "The name for the new key. The system will generate the version for the new key." }, { "name": "force", From b7083d2e2f21c317aeeae031ad339cabf83fadc4 Mon Sep 17 00:00:00 2001 From: qinl-li <63257243+qinl-li@users.noreply.github.com> Date: Wed, 6 Jan 2021 18:10:33 -0800 Subject: [PATCH 05/19] Update based on comments --- .../preview/7.3-preview/keys.json | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json index e96e0365c4d7..ca381a3a86ec 100644 --- a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json +++ b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json @@ -1126,7 +1126,7 @@ ], "operationId": "UpdateKeyPolicy", "summary": "Updates the policy for a key.", - "description": "Set specified members in the key policy. Leave others as null. This operation requires the keys/update permission.", + "description": "Set specified members in the key policy. Leave others as undefined. This operation requires the keys/update permission.", "parameters": [ { "name": "key-name", @@ -2139,7 +2139,17 @@ ], "x-ms-enum": { "name": "ActionType", - "modelAsString": false + "modelAsString": false, + "values": [ + { + "value": "Rotate", + "description": "Rotate the key based on the key policy." + }, + { + "value": "Notify", + "description": "Trigger event grid events." + }, + ] } } }, @@ -2149,23 +2159,31 @@ "properties": { "rotationEnabled": { "type": "boolean", + "required": false, + "default": false, "description": "Determines whether key auto rotation is enabled." }, "rotationTime": { "type": "string", "format": "string", - "description": "Time to attempt rotate." + "required": false, + "default": null, + "description": "Time to attempt rotate. Format examples: 90 days: 90D, 3 months: 3M, 48 hours: 48H, 1 year and 10 days: 1Y10D" }, "created": { "type": "integer", "format": "unixtime", "readOnly": true, + "required": false, + "default": null, "description": "The key policy created time in UTC." }, "updated": { "type": "integer", "format": "unixtime", "readOnly": true, + "required": false, + "default": null, "description": "The key policy's last updated time in UTC." } }, From ea0a2730312be97bb88264251b6c02d428e50ec9 Mon Sep 17 00:00:00 2001 From: qinl-li <63257243+qinl-li@users.noreply.github.com> Date: Wed, 6 Jan 2021 18:15:57 -0800 Subject: [PATCH 06/19] fix prettier failure --- .../data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json index ca381a3a86ec..4a962e0c0444 100644 --- a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json +++ b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json @@ -2148,7 +2148,7 @@ { "value": "Notify", "description": "Trigger event grid events." - }, + } ] } } From c51a6d72425e1c9aedf2035bc8cbc25d24bf88dc Mon Sep 17 00:00:00 2001 From: qinl-li <63257243+qinl-li@users.noreply.github.com> Date: Tue, 19 Jan 2021 12:02:20 -0800 Subject: [PATCH 07/19] Update Api names --- .../preview/7.3-preview/examples/GetKeyPolicy-example.json | 2 +- .../preview/7.3-preview/examples/RotateKey-example.json | 2 +- .../7.3-preview/examples/UpdateKeyPolicy-example.json | 2 +- .../Microsoft.KeyVault/preview/7.3-preview/keys.json | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/GetKeyPolicy-example.json b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/GetKeyPolicy-example.json index 7771c781a6a1..c530f23cdf4f 100644 --- a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/GetKeyPolicy-example.json +++ b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/GetKeyPolicy-example.json @@ -7,7 +7,7 @@ "responses": { "200": { "body": { - "id": "https://myvault.vault.azure.net/keys/key01/policy", + "id": "https://myvault.vault.azure.net/keys/key01/rotationpolicy", "lifetimeActions": [ { "trigger": { diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/RotateKey-example.json b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/RotateKey-example.json index 3b95fc6659be..97cab71f7427 100644 --- a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/RotateKey-example.json +++ b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/RotateKey-example.json @@ -32,7 +32,7 @@ "test name ": "CreateGetDeleteKeyTest" }, "policy": { - "id": "https://myvault.vault.azure.net/keys/key01/policy", + "id": "https://myvault.vault.azure.net/keys/key01/rotationpolicy", "lifetimeActions": [ { "trigger": { diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/UpdateKeyPolicy-example.json b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/UpdateKeyPolicy-example.json index 2aa749b5f29d..1921e6f57c9b 100644 --- a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/UpdateKeyPolicy-example.json +++ b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/UpdateKeyPolicy-example.json @@ -31,7 +31,7 @@ "responses": { "200": { "body": { - "id": "https://myvault.vault.azure.net/keys/updateKey01/policy", + "id": "https://myvault.vault.azure.net/keys/updateKey01/rotationpolicy", "lifetimeActions": [ { "trigger": { diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json index 4a962e0c0444..af4377626b63 100644 --- a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json +++ b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json @@ -79,7 +79,7 @@ } } }, - "/keys/{key-name}/roll": { + "/keys/{key-name}/rotate": { "put": { "tags": [ "Keys" @@ -1080,7 +1080,7 @@ } } }, - "/keys/{key-name}/policy": { + "/keys/{key-name}/rotationpolicy": { "get": { "tags": [ "Keys" @@ -1120,7 +1120,7 @@ } } }, - "patch": { + "put": { "tags": [ "keys" ], From ac7f8a293a92eed3c0fec93a6124633091596019 Mon Sep 17 00:00:00 2001 From: qinl-li <63257243+qinl-li@users.noreply.github.com> Date: Tue, 19 Jan 2021 12:09:54 -0800 Subject: [PATCH 08/19] Add custom words --- custom-words.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/custom-words.txt b/custom-words.txt index e5feb4011746..ce2c3d88c746 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -1491,6 +1491,7 @@ rolloverdetails rootfs rosettanetprocessconfigurations rotatediskencryptionkey +rotationpolicy routable routingendpointhealth rpki From ee46e4810e2cd61df29a49440268fdf4f1e01eb8 Mon Sep 17 00:00:00 2001 From: qinl-li <63257243+qinl-li@users.noreply.github.com> Date: Tue, 19 Jan 2021 13:29:52 -0800 Subject: [PATCH 09/19] Update to key rotation policy --- ...json => GetKeyRotationPolicy-example.json} | 0 ...n => UpdateKeyRotationPolicy-example.json} | 0 .../preview/7.3-preview/keys.json | 50 ++++++++----------- 3 files changed, 20 insertions(+), 30 deletions(-) rename specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/{GetKeyPolicy-example.json => GetKeyRotationPolicy-example.json} (100%) rename specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/{UpdateKeyPolicy-example.json => UpdateKeyRotationPolicy-example.json} (100%) diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/GetKeyPolicy-example.json b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/GetKeyRotationPolicy-example.json similarity index 100% rename from specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/GetKeyPolicy-example.json rename to specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/GetKeyRotationPolicy-example.json diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/UpdateKeyPolicy-example.json b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/UpdateKeyRotationPolicy-example.json similarity index 100% rename from specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/UpdateKeyPolicy-example.json rename to specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/UpdateKeyRotationPolicy-example.json diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json index af4377626b63..e62c9bf2cdb7 100644 --- a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json +++ b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json @@ -1085,9 +1085,9 @@ "tags": [ "Keys" ], - "operationId": "GetKeyPolicy", + "operationId": "GetKeyRotationPolicy", "summary": "Lists the policy for a key.", - "description": "The GetKeyPolicy operation returns the specified key policy resources in the specified key vault. This operation requires the keys/get permission.", + "description": "The GetKeyRotationPolicy operation returns the specified key policy resources in the specified key vault. This operation requires the keys/get permission.", "parameters": [ { "name": "key-name", @@ -1102,9 +1102,9 @@ ], "responses": { "200": { - "description": "The key policy.", + "description": "The key rotation policy.", "schema": { - "$ref": "#/definitions/KeyPolicy" + "$ref": "#/definitions/KeyRotationPolicy" } }, "default": { @@ -1115,8 +1115,8 @@ } }, "x-ms-examples": { - "GetKeyPolicy": { - "$ref": "./examples/GetKeyPolicy-example.json" + "GetKeyRotationPolicy": { + "$ref": "./examples/GetKeyRotationPolicy-example.json" } } }, @@ -1124,8 +1124,8 @@ "tags": [ "keys" ], - "operationId": "UpdateKeyPolicy", - "summary": "Updates the policy for a key.", + "operationId": "UpdateKeyRotationPolicy", + "summary": "Updates the rotation policy for a key.", "description": "Set specified members in the key policy. Leave others as undefined. This operation requires the keys/update permission.", "parameters": [ { @@ -1136,11 +1136,11 @@ "description": "The name of the key in the given vault." }, { - "name": "keyPolicy", + "name": "KeyRotationPolicy", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/KeyPolicy" + "$ref": "#/definitions/KeyRotationPolicy" }, "description": "The policy for the key." }, @@ -1152,7 +1152,7 @@ "200": { "description": "The policy for the key.", "schema": { - "$ref": "#/definitions/KeyPolicy" + "$ref": "#/definitions/KeyRotationPolicy" } }, "default": { @@ -1163,8 +1163,8 @@ } }, "x-ms-examples": { - "UpdateKeyPolicy": { - "$ref": "./examples/UpdateKeyPolicy-example.json" + "UpdateKeyRotationPolicy": { + "$ref": "./examples/UpdateKeyRotationPolicy-example.json" } } } @@ -1493,10 +1493,6 @@ "readOnly": true, "description": "True if the key's lifetime is managed by key vault. If this is a key backing a certificate, then managed will be true." }, - "policy": { - "$ref": "#/definitions/KeyPolicy", - "description": "The policy for the key." - }, "release_policy": { "$ref": "#/definitions/KeyReleasePolicy", "description": "The policy rules under which the key can be exported." @@ -1707,10 +1703,6 @@ "modelAsString": true } }, - "policy": { - "x-ms-client-name": "keyPolicy", - "$ref": "#/definitions/KeyPolicy" - }, "release_policy": { "$ref": "#/definitions/KeyReleasePolicy", "description": "The policy rules under which the key can be exported." @@ -2077,7 +2069,7 @@ }, "description": "The backup key result, containing the backup blob." }, - "KeyPolicy": { + "KeyRotationPolicy": { "properties": { "id": { "type": "string", @@ -2092,8 +2084,8 @@ "description": "Actions that will be performed by Key Vault over the lifetime of a key." }, "attributes": { - "$ref": "#/definitions/KeyPolicyAttributes", - "description": "The key policy attributes." + "$ref": "#/definitions/KeyRotationPolicyAttributes", + "description": "The key rotation policy attributes." } }, "description": "Management policy for a key." @@ -2155,7 +2147,7 @@ }, "description": "The action that will be executed." }, - "KeyPolicyAttributes": { + "KeyRotationPolicyAttributes": { "properties": { "rotationEnabled": { "type": "boolean", @@ -2174,20 +2166,18 @@ "type": "integer", "format": "unixtime", "readOnly": true, - "required": false, "default": null, - "description": "The key policy created time in UTC." + "description": "The key rotation policy created time in UTC." }, "updated": { "type": "integer", "format": "unixtime", "readOnly": true, - "required": false, "default": null, - "description": "The key policy's last updated time in UTC." + "description": "The key rotation policy's last updated time in UTC." } }, - "description": "The key policy attributes." + "description": "The key rotation policy attributes." } }, "parameters": { From b35771357ca84bac0b209afbb46e0c37b2e52931 Mon Sep 17 00:00:00 2001 From: qinl-li <63257243+qinl-li@users.noreply.github.com> Date: Tue, 19 Jan 2021 13:53:29 -0800 Subject: [PATCH 10/19] Remove key rotation policy from response --- .../examples/RotateKey-example.json | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/RotateKey-example.json b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/RotateKey-example.json index 97cab71f7427..9446ddf7bb9e 100644 --- a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/RotateKey-example.json +++ b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/RotateKey-example.json @@ -30,33 +30,6 @@ "tags": { "purpose": "unit test", "test name ": "CreateGetDeleteKeyTest" - }, - "policy": { - "id": "https://myvault.vault.azure.net/keys/key01/rotationpolicy", - "lifetimeActions": [ - { - "trigger": { - "timeAfterCreation": "90D" - }, - "action": { - "type": "Rotate" - } - }, - { - "trigger": { - "timeBeforeExpiry": "30D" - }, - "action": { - "type": "Notify" - } - } - ], - "attributes": { - "rotationEnabled": true, - "rotationTime": "2Y", - "created": 1482188947, - "updated": 1482188948 - } } } } From f489356f962f7274ee668c25e496bb6d983ea0b6 Mon Sep 17 00:00:00 2001 From: qinl-li <63257243+qinl-li@users.noreply.github.com> Date: Tue, 19 Jan 2021 14:16:41 -0800 Subject: [PATCH 11/19] Remove required --- .../data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json index e62c9bf2cdb7..89a704bd418b 100644 --- a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json +++ b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json @@ -2151,14 +2151,12 @@ "properties": { "rotationEnabled": { "type": "boolean", - "required": false, "default": false, "description": "Determines whether key auto rotation is enabled." }, "rotationTime": { "type": "string", "format": "string", - "required": false, "default": null, "description": "Time to attempt rotate. Format examples: 90 days: 90D, 3 months: 3M, 48 hours: 48H, 1 year and 10 days: 1Y10D" }, From b8863c1a248edbd0efeac4de5d13bd764b6d8d59 Mon Sep 17 00:00:00 2001 From: qinl-li <63257243+qinl-li@users.noreply.github.com> Date: Tue, 19 Jan 2021 16:18:55 -0800 Subject: [PATCH 12/19] fix validation error --- .../examples/UpdateKeyRotationPolicy-example.json | 2 +- .../Microsoft.KeyVault/preview/7.3-preview/keys.json | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/UpdateKeyRotationPolicy-example.json b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/UpdateKeyRotationPolicy-example.json index 1921e6f57c9b..12be5eeb2775 100644 --- a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/UpdateKeyRotationPolicy-example.json +++ b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/UpdateKeyRotationPolicy-example.json @@ -3,7 +3,7 @@ "vaultBaseUrl": "https://myvault.vault.azure.net/", "key-name": "updateKey01", "api-version": "7.3-preview", - "keyPolicy": { + "keyRotationPolicy": { "lifetimeActions": [ { "trigger": { diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json index 89a704bd418b..26ec78905148 100644 --- a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json +++ b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json @@ -1136,7 +1136,7 @@ "description": "The name of the key in the given vault." }, { - "name": "KeyRotationPolicy", + "name": "keyRotationPolicy", "in": "body", "required": true, "schema": { @@ -2107,14 +2107,10 @@ "properties": { "timeAfterCreation": { "type": "string", - "format": "string", - "minimum": 1, - "maximum": 99, "description": "Days after creation to attempt rotate." }, "timeBeforeExpiry": { "type": "string", - "format": "string", "description": "Days before expiry to attempt rotate." } }, @@ -2156,22 +2152,18 @@ }, "rotationTime": { "type": "string", - "format": "string", - "default": null, "description": "Time to attempt rotate. Format examples: 90 days: 90D, 3 months: 3M, 48 hours: 48H, 1 year and 10 days: 1Y10D" }, "created": { "type": "integer", "format": "unixtime", "readOnly": true, - "default": null, "description": "The key rotation policy created time in UTC." }, "updated": { "type": "integer", "format": "unixtime", "readOnly": true, - "default": null, "description": "The key rotation policy's last updated time in UTC." } }, From 34e3bffa04f1a75d311b18ae37b65f4e2e80ea8e Mon Sep 17 00:00:00 2001 From: qinl-li <63257243+qinl-li@users.noreply.github.com> Date: Mon, 25 Jan 2021 09:35:22 -0800 Subject: [PATCH 13/19] remove parameter force --- .../Microsoft.KeyVault/preview/7.3-preview/keys.json | 7 ------- 1 file changed, 7 deletions(-) diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json index 26ec78905148..86fbd795f431 100644 --- a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json +++ b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json @@ -96,13 +96,6 @@ "pattern": "^[0-9a-zA-Z-]+$", "description": "The name for the new key. The system will generate the version for the new key." }, - { - "name": "force", - "in": "query", - "required": false, - "type": "boolean", - "description": "Key rotation will happen immediately when it is true. Otherwise, the api will compute current key policy to make key rotation decision. The value will be true if not specified." - }, { "$ref": "#/parameters/ApiVersionParameter" } From f35688b7a469ede5b582eaef38566ee2788b67d5 Mon Sep 17 00:00:00 2001 From: qinl-li <63257243+qinl-li@users.noreply.github.com> Date: Mon, 25 Jan 2021 13:40:33 -0800 Subject: [PATCH 14/19] Rotate api should be post --- .../data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json index 86fbd795f431..c98523784521 100644 --- a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json +++ b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json @@ -80,7 +80,7 @@ } }, "/keys/{key-name}/rotate": { - "put": { + "post": { "tags": [ "Keys" ], From ff97f369a17eb6bc234346f69d7674a1d6387b3a Mon Sep 17 00:00:00 2001 From: qinl-li <63257243+qinl-li@users.noreply.github.com> Date: Fri, 29 Jan 2021 17:15:14 -0800 Subject: [PATCH 15/19] udpate description --- .../Microsoft.KeyVault/preview/7.3-preview/keys.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json index 9163a1df582f..6431a601ece5 100644 --- a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json +++ b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json @@ -2124,11 +2124,11 @@ "properties": { "timeAfterCreation": { "type": "string", - "description": "Days after creation to attempt rotate." + "description": "Time after creation to attempt rotate. It will be in ISO 8601 format." }, "timeBeforeExpiry": { "type": "string", - "description": "Days before expiry to attempt rotate." + "description": "Time before expiry to attempt rotate. It will be in ISO 8601 format." } }, "description": "A condition to be satisfied for an action to be executed." From fed091642e5635804c8988d4a3263603d676abc4 Mon Sep 17 00:00:00 2001 From: qinl-li <63257243+qinl-li@users.noreply.github.com> Date: Mon, 1 Feb 2021 23:46:07 -0800 Subject: [PATCH 16/19] Update UpdateKeyRotationPolicy-example --- .../examples/UpdateKeyRotationPolicy-example.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/UpdateKeyRotationPolicy-example.json b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/UpdateKeyRotationPolicy-example.json index 58a279dede9e..e15407b0c1f5 100644 --- a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/UpdateKeyRotationPolicy-example.json +++ b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/UpdateKeyRotationPolicy-example.json @@ -23,8 +23,7 @@ } ], "attributes": { - "rotationEnabled": true, - "rotationTime": "P2Y" + "expirationTime": "P2Y" } } }, @@ -51,7 +50,7 @@ } ], "attributes": { - "expirationTime": "2Y", + "expirationTime": "P2Y", "created": 1482188947, "updated": 1482188948 } From 539c966b7ca57a2ad4a6d77ca8be100434bd31ad Mon Sep 17 00:00:00 2001 From: qinl-li <63257243+qinl-li@users.noreply.github.com> Date: Fri, 5 Mar 2021 16:37:15 -0800 Subject: [PATCH 17/19] Update names --- .../examples/GetKeyRotationPolicy-example.json | 4 ++-- .../examples/UpdateKeyRotationPolicy-example.json | 6 +++--- .../preview/7.3-preview/keys.json | 14 +++++++------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/GetKeyRotationPolicy-example.json b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/GetKeyRotationPolicy-example.json index 72e2c2025621..735b8487e5cb 100644 --- a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/GetKeyRotationPolicy-example.json +++ b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/GetKeyRotationPolicy-example.json @@ -11,7 +11,7 @@ "lifetimeActions": [ { "trigger": { - "timeAfterCreation": "P90D" + "timeAfterCreate": "P90D" }, "action": { "type": "Rotate" @@ -27,7 +27,7 @@ } ], "attributes": { - "expirationTime": "P2Y", + "expiryTime": "P2Y", "created": 1482188947, "updated": 1482188948 } diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/UpdateKeyRotationPolicy-example.json b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/UpdateKeyRotationPolicy-example.json index e15407b0c1f5..9f782e193f08 100644 --- a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/UpdateKeyRotationPolicy-example.json +++ b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/UpdateKeyRotationPolicy-example.json @@ -7,7 +7,7 @@ "lifetimeActions": [ { "trigger": { - "timeAfterCreation": "P90D" + "timeAfterCreate": "P90D" }, "action": { "type": "Rotate" @@ -34,7 +34,7 @@ "lifetimeActions": [ { "trigger": { - "timeAfterCreation": "P90D" + "timeAfterCreate": "P90D" }, "action": { "type": "Rotate" @@ -50,7 +50,7 @@ } ], "attributes": { - "expirationTime": "P2Y", + "expiryTime": "P2Y", "created": 1482188947, "updated": 1482188948 } diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json index 6431a601ece5..3ac16ff81b35 100644 --- a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json +++ b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json @@ -94,7 +94,7 @@ "required": true, "type": "string", "pattern": "^[0-9a-zA-Z-]+$", - "description": "The name for the new key. The system will generate the version for the new key." + "description": "The name of key to be rotated. The system will generate a new version in the specified key." }, { "$ref": "#/parameters/ApiVersionParameter" @@ -2098,7 +2098,7 @@ "items": { "$ref": "#/definitions/LifetimeActions" }, - "description": "Actions that will be performed by Key Vault over the lifetime of a key." + "description": "Actions that will be performed by Key Vault over the lifetime of a key. For preview, lifetimeActions could only have two items at maximum: one for rotate, one for notify. Notification time would be default to 30 days before expiry and it is not configurable." }, "attributes": { "$ref": "#/definitions/KeyRotationPolicyAttributes", @@ -2122,13 +2122,13 @@ }, "LifetimeActionsTrigger": { "properties": { - "timeAfterCreation": { + "timeAfterCreate": { "type": "string", - "description": "Time after creation to attempt rotate. It will be in ISO 8601 format." + "description": "Time after creation to attempt rotate. It will be in ISO 8601 format. Example: 90 days : \"P90D\" " }, "timeBeforeExpiry": { "type": "string", - "description": "Time before expiry to attempt rotate. It will be in ISO 8601 format." + "description": "Time before expiry to attempt rotate. It will be in ISO 8601 format. Example: 90 days : \"P90D\"" } }, "description": "A condition to be satisfied for an action to be executed." @@ -2152,7 +2152,7 @@ }, { "value": "Notify", - "description": "Trigger event grid events." + "description": "Trigger event grid events. For preview, the notification time is not configurable and it is default to 30 days before expiry." } ] } @@ -2162,7 +2162,7 @@ }, "KeyRotationPolicyAttributes": { "properties": { - "expirationTime": { + "expiryTime": { "type": "string", "description": "The expiration time duration to be applied on the new key version. It will be in ISO 8601 Format. Examples: 90 days: P90D, 3 months: P3M, 48 hours: PT48H, 1 year and 10 days: P1Y10D" }, From 2b030017b66221c96b583da95c115dcc3b76bf5f Mon Sep 17 00:00:00 2001 From: qinl-li <63257243+qinl-li@users.noreply.github.com> Date: Thu, 27 May 2021 18:57:27 -0700 Subject: [PATCH 18/19] Microsoft.KeyVault-DP-7.3-preview-KeyAutoRotation --- .../examples/GetKeyRotationPolicy-example.json | 4 ++-- .../examples/UpdateKeyRotationPolicy-example.json | 8 ++++---- .../Microsoft.KeyVault/preview/7.3-preview/keys.json | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/GetKeyRotationPolicy-example.json b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/GetKeyRotationPolicy-example.json index 735b8487e5cb..a811e1a71e74 100644 --- a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/GetKeyRotationPolicy-example.json +++ b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/GetKeyRotationPolicy-example.json @@ -14,7 +14,7 @@ "timeAfterCreate": "P90D" }, "action": { - "type": "Rotate" + "type": "rotate" } }, { @@ -22,7 +22,7 @@ "timeBeforeExpiry": "P30D" }, "action": { - "type": "Notify" + "type": "notify" } } ], diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/UpdateKeyRotationPolicy-example.json b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/UpdateKeyRotationPolicy-example.json index 9f782e193f08..5de3b4d2eac9 100644 --- a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/UpdateKeyRotationPolicy-example.json +++ b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/examples/UpdateKeyRotationPolicy-example.json @@ -10,7 +10,7 @@ "timeAfterCreate": "P90D" }, "action": { - "type": "Rotate" + "type": "rotate" } }, { @@ -18,7 +18,7 @@ "timeBeforeExpiry": "P30D" }, "action": { - "type": "Notify" + "type": "notify" } } ], @@ -37,7 +37,7 @@ "timeAfterCreate": "P90D" }, "action": { - "type": "Rotate" + "type": "rotate" } }, { @@ -45,7 +45,7 @@ "timeBeforeExpiry": "P30D" }, "action": { - "type": "Notify" + "type": "notify" } } ], diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json index 3ac16ff81b35..06f56757377d 100644 --- a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json +++ b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json @@ -2098,7 +2098,7 @@ "items": { "$ref": "#/definitions/LifetimeActions" }, - "description": "Actions that will be performed by Key Vault over the lifetime of a key. For preview, lifetimeActions could only have two items at maximum: one for rotate, one for notify. Notification time would be default to 30 days before expiry and it is not configurable." + "description": "Actions that will be performed by Key Vault over the lifetime of a key. For preview, lifetimeActions can only have two items at maximum: one for rotate, one for notify. Notification time would be default to 30 days before expiry and it is not configurable." }, "attributes": { "$ref": "#/definitions/KeyRotationPolicyAttributes", @@ -2139,8 +2139,8 @@ "type": "string", "description": "The type of the action.", "enum": [ - "Rotate", - "Notify" + "rotate", + "notify" ], "x-ms-enum": { "name": "ActionType", @@ -2164,7 +2164,7 @@ "properties": { "expiryTime": { "type": "string", - "description": "The expiration time duration to be applied on the new key version. It will be in ISO 8601 Format. Examples: 90 days: P90D, 3 months: P3M, 48 hours: PT48H, 1 year and 10 days: P1Y10D" + "description": "The expiryTime will be applied on the new key version. It will be in ISO 8601 Format. Examples: 90 days: P90D, 3 months: P3M, 48 hours: PT48H, 1 year and 10 days: P1Y10D" }, "created": { "type": "integer", From ac4d106469703e0e02bb2b504e7414eeadcc26aa Mon Sep 17 00:00:00 2001 From: qinl-li <63257243+qinl-li@users.noreply.github.com> Date: Tue, 1 Jun 2021 09:29:08 -0700 Subject: [PATCH 19/19] Update --- .../Microsoft.KeyVault/preview/7.3-preview/keys.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json index 78837709147e..efc639d42e50 100644 --- a/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json +++ b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.3-preview/keys.json @@ -2252,11 +2252,11 @@ "modelAsString": false, "values": [ { - "value": "Rotate", + "value": "rotate", "description": "Rotate the key based on the key policy." }, { - "value": "Notify", + "value": "notify", "description": "Trigger event grid events. For preview, the notification time is not configurable and it is default to 30 days before expiry." } ] @@ -2269,7 +2269,7 @@ "properties": { "expiryTime": { "type": "string", - "description": "The expiryTime will be applied on the new key version. It will be in ISO 8601 Format. Examples: 90 days: P90D, 3 months: P3M, 48 hours: PT48H, 1 year and 10 days: P1Y10D" + "description": "The expiryTime will be applied on the new key version. It should be at least 28 days. It will be in ISO 8601 Format. Examples: 90 days: P90D, 3 months: P3M, 48 hours: PT48H, 1 year and 10 days: P1Y10D" }, "created": { "type": "integer",