diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyAsyncClientTest.java b/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyAsyncClientTest.java index 7c635c1b67396..6f96aca3ce6ae 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyAsyncClientTest.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyAsyncClientTest.java @@ -139,21 +139,15 @@ public void setKeyNull(HttpClient httpClient, KeyServiceVersion serviceVersion) @MethodSource("getTestParameters") public void updateKey(HttpClient httpClient, KeyServiceVersion serviceVersion) { createKeyAsyncClient(httpClient, serviceVersion); - updateKeyRunner((original, updated) -> { - StepVerifier.create(client.createKey(original)) - .assertNext(response -> assertKeyEquals(original, response)) - .verifyComplete(); - - StepVerifier.create(client.getKey(original.getName()) - .flatMap(keyToUpdate -> - client.updateKeyProperties(keyToUpdate.getProperties().setExpiresOn(updated.getExpiresOn())))) - .assertNext(response -> { - assertNotNull(response); - assertEquals(original.getName(), response.getName()); - }).verifyComplete(); - - StepVerifier.create(client.getKey(original.getName())) - .assertNext(updatedKeyResponse -> assertKeyEquals(updated, updatedKeyResponse)) + updateKeyRunner((createKeyOptions, updateKeyOptions) -> { + StepVerifier.create(client.createKey(createKeyOptions) + .flatMap(createdKey -> { + assertKeyEquals(createKeyOptions, createdKey); + + return client.updateKeyProperties(createdKey.getProperties() + .setExpiresOn(updateKeyOptions.getExpiresOn())); + })) + .assertNext(updatedKey -> assertKeyEquals(updateKeyOptions, updatedKey)) .verifyComplete(); }); } @@ -165,21 +159,15 @@ public void updateKey(HttpClient httpClient, KeyServiceVersion serviceVersion) { @MethodSource("getTestParameters") public void updateDisabledKey(HttpClient httpClient, KeyServiceVersion serviceVersion) { createKeyAsyncClient(httpClient, serviceVersion); - updateDisabledKeyRunner((original, updated) -> { - StepVerifier.create(client.createKey(original)) - .assertNext(response -> assertKeyEquals(original, response)) - .verifyComplete(); + updateDisabledKeyRunner((createKeyOptions, updateKeyOptions) -> { + StepVerifier.create(client.createKey(createKeyOptions) + .flatMap(createdKey -> { + assertKeyEquals(createKeyOptions, createdKey); - StepVerifier.create(client.getKey(original.getName()) - .flatMap(keyToUpdate -> - client.updateKeyProperties(keyToUpdate.getProperties().setExpiresOn(updated.getExpiresOn())))) - .assertNext(response -> { - assertNotNull(response); - assertEquals(original.getName(), response.getName()); - }).verifyComplete(); - - StepVerifier.create(client.getKey(original.getName())) - .assertNext(updatedKeyResponse -> assertKeyEquals(updated, updatedKeyResponse)) + return client.updateKeyProperties(createdKey.getProperties() + .setExpiresOn(updateKeyOptions.getExpiresOn())); + })) + .assertNext(updatedKey -> assertKeyEquals(updateKeyOptions, updatedKey)) .verifyComplete(); }); } @@ -553,25 +541,6 @@ public void releaseKey(HttpClient httpClient, KeyServiceVersion serviceVersion) }); } - /** - * Tests that an RSA key with a public exponent can be created in the key vault. - */ - @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) - @MethodSource("getTestParameters") - public void createRsaKeyWithPublicExponent(HttpClient httpClient, KeyServiceVersion serviceVersion) { - createKeyAsyncClient(httpClient, serviceVersion); - createRsaKeyWithPublicExponentRunner((createRsaKeyOptions) -> - StepVerifier.create(client.createRsaKey(createRsaKeyOptions)) - .assertNext(rsaKey -> { - assertKeyEquals(createRsaKeyOptions, rsaKey); - // TODO: Investigate why the KV service sets the JWK's "e" parameter to "AQAB" instead of "Aw". - /*assertEquals(BigInteger.valueOf(createRsaKeyOptions.getPublicExponent()), - toBigInteger(rsaKey.getKey().getE()));*/ - assertEquals(createRsaKeyOptions.getKeySize(), rsaKey.getKey().getN().length * 8); - }) - .verifyComplete()); - } - /** * Tests that fetching the key rotation policy of a non-existent key throws. */ diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyClientManagedHsmTestBase.java b/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyClientManagedHsmTestBase.java index f9961395a866d..8f8e181e3cedd 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyClientManagedHsmTestBase.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyClientManagedHsmTestBase.java @@ -7,6 +7,9 @@ import org.junit.jupiter.api.Test; public interface KeyClientManagedHsmTestBase { + @Test + void createRsaKeyWithPublicExponent(HttpClient httpClient, KeyServiceVersion serviceVersion); + @Test void createOctKeyWithDefaultSize(HttpClient httpClient, KeyServiceVersion serviceVersion); diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyClientTest.java b/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyClientTest.java index 76a4517bae397..1232a991d34e9 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyClientTest.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyClientTest.java @@ -135,11 +135,15 @@ public void setKeyNull(HttpClient httpClient, KeyServiceVersion serviceVersion) @MethodSource("getTestParameters") public void updateKey(HttpClient httpClient, KeyServiceVersion serviceVersion) { createKeyClient(httpClient, serviceVersion); - updateKeyRunner((original, updated) -> { - assertKeyEquals(original, client.createKey(original)); - KeyVaultKey keyToUpdate = client.getKey(original.getName()); - client.updateKeyProperties(keyToUpdate.getProperties().setExpiresOn(updated.getExpiresOn())); - assertKeyEquals(updated, client.getKey(original.getName())); + updateKeyRunner((createKeyOptions, updateKeyOptions) -> { + KeyVaultKey createdKey = client.createKey(createKeyOptions); + + assertKeyEquals(createKeyOptions, createdKey); + + KeyVaultKey updatedKey = + client.updateKeyProperties(createdKey.getProperties().setExpiresOn(updateKeyOptions.getExpiresOn())); + + assertKeyEquals(updateKeyOptions, updatedKey); }); } @@ -150,11 +154,15 @@ public void updateKey(HttpClient httpClient, KeyServiceVersion serviceVersion) { @MethodSource("getTestParameters") public void updateDisabledKey(HttpClient httpClient, KeyServiceVersion serviceVersion) { createKeyClient(httpClient, serviceVersion); - updateDisabledKeyRunner((original, updated) -> { - assertKeyEquals(original, client.createKey(original)); - KeyVaultKey keyToUpdate = client.getKey(original.getName()); - client.updateKeyProperties(keyToUpdate.getProperties().setExpiresOn(updated.getExpiresOn())); - assertKeyEquals(updated, client.getKey(original.getName())); + updateDisabledKeyRunner((createKeyOptions, updateKeyOptions) -> { + KeyVaultKey createdKey = client.createKey(createKeyOptions); + + assertKeyEquals(createKeyOptions, createdKey); + + KeyVaultKey updatedKey = + client.updateKeyProperties(createdKey.getProperties().setExpiresOn(updateKeyOptions.getExpiresOn())); + + assertKeyEquals(updateKeyOptions, updatedKey); }); } @@ -466,24 +474,6 @@ public void listKeyVersions(HttpClient httpClient, KeyServiceVersion serviceVers }); } - /** - * Tests that an RSA key with a public exponent can be created in the key vault. - */ - @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) - @MethodSource("getTestParameters") - public void createRsaKeyWithPublicExponent(HttpClient httpClient, KeyServiceVersion serviceVersion) { - createKeyClient(httpClient, serviceVersion); - createRsaKeyWithPublicExponentRunner((createRsaKeyOptions) -> { - KeyVaultKey rsaKey = client.createRsaKey(createRsaKeyOptions); - - assertKeyEquals(createRsaKeyOptions, rsaKey); - // TODO: Investigate why the KV service sets the JWK's "e" parameter to "AQAB" instead of "Aw". - /*assertEquals(BigInteger.valueOf(createRsaKeyOptions.getPublicExponent()), - toBigInteger(rsaKey.getKey().getE()));*/ - assertEquals(createRsaKeyOptions.getKeySize(), rsaKey.getKey().getN().length * 8); - }); - } - /** * Tests that an existing key can be released. */ diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyClientTestBase.java b/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyClientTestBase.java index 2ee52407f3f35..717ef96559c5d 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyClientTestBase.java +++ b/sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/KeyClientTestBase.java @@ -449,9 +449,6 @@ void releaseKeyRunner(BiConsumer testRunner) { testRunner.accept(keyToRelease, attestationUrl); } - @Test - public abstract void createRsaKeyWithPublicExponent(HttpClient httpClient, KeyServiceVersion serviceVersion); - @Test public abstract void getKeyRotationPolicyOfNonExistentKey(HttpClient httpClient, KeyServiceVersion serviceVersion); diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyAsyncClientTest.createRsaKeyWithPublicExponent[1].json b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyAsyncClientTest.createRsaKeyWithPublicExponent[1].json deleted file mode 100644 index 7c5d56a3295a8..0000000000000 --- a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyAsyncClientTest.createRsaKeyWithPublicExponent[1].json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "POST", - "Uri" : "https://REDACTED.vault.azure.net/keys/testrsakey75546da/create?api-version=7.3-preview", - "Headers" : { - "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "content-length" : "753", - "X-Content-Type-Options" : "nosniff", - "Pragma" : "no-cache", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Tue, 05 Oct 2021 01:54:23 GMT", - "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", - "Cache-Control" : "no-cache", - "x-ms-keyvault-region" : "centralus", - "x-ms-keyvault-network-info" : "conn_type=Ipv4;addr=174.127.169.154;act_addr_fam=InterNetwork;", - "Expires" : "-1", - "x-ms-request-id" : "cfe3ca63-8536-4855-a93d-4e361ca04a2d", - "x-ms-keyvault-service-version" : "1.9.132.3", - "Body" : "{\"key\":{\"kid\":\"https://azure-kv-tests2.vault.azure.net/keys/testrsakey75546da/f4c1a07cedc14cb08c5b013efd1a03e1\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"vIMc6Lw2W-vxUngQMjdw5ddS9Zb-HH-Eyk-TFSWra1ZbBE6dMhB1IFCYnVgYJJ-h9ocv1_mzfLw7fsyWf7QKGgDhiWFjJsWBjqviteITtXRWuXxKBe_E79CM-4vn5FOY8aPqyY7xa2B178crQYpEtyN2Vv0r2O-Xd7e0YcRNkEvcWrzpZjnhZETljiu_pa3f1j798bFIYhao7KK84itSF8cuq81ltOc8WaDNhVmPOPwe140VRFk5pWijNjbFLQKZhJKvsxc3D6T5HtkD_nKK6kX9lJUmD7cBn2izRVsP_Zf5fBjts_BAnJgCwl8wZ7TWVNRgVYxUMgIXsEh-XP4D4Q\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"nbf\":949237199,\"exp\":2527113600,\"created\":1633398863,\"updated\":1633398863,\"recoveryLevel\":\"CustomizedRecoverable+Purgeable\",\"recoverableDays\":7},\"tags\":{\"foo\":\"baz\"}}", - "Content-Type" : "application/json; charset=utf-8", - "X-Powered-By" : "ASP.NET" - }, - "Exception" : null - } ], - "variables" : [ "testrsakey75546da" ] -} diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyAsyncClientTest.updateDisabledKey[1].json b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyAsyncClientTest.updateDisabledKey[1].json index 076d91d4143da..2a5169c2f7b5d 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyAsyncClientTest.updateDisabledKey[1].json +++ b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyAsyncClientTest.updateDisabledKey[1].json @@ -1,108 +1,56 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.vault.azure.net/keys/testkey255915b59/create?api-version=7.3-preview", + "Uri" : "https://REDACTED.vault.azure.net/keys/testkey2986032b8/create?api-version=7.3-preview", "Headers" : { "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)", "Content-Type" : "application/json" }, "Response" : { - "content-length" : "427", + "content-length" : "416", "X-Content-Type-Options" : "nosniff", "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 05 Oct 2021 01:54:23 GMT", + "Date" : "Thu, 07 Oct 2021 02:34:29 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", - "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-region" : "westus", "x-ms-keyvault-network-info" : "conn_type=Ipv4;addr=174.127.169.154;act_addr_fam=InterNetwork;", "Expires" : "-1", - "x-ms-request-id" : "c7ce2095-8533-40eb-ab05-99f3c5de455c", + "x-ms-request-id" : "7ee9176f-2381-4306-bda7-9107209f15ca", "x-ms-keyvault-service-version" : "1.9.132.3", - "Body" : "{\"key\":{\"kid\":\"https://azure-kv-tests2.vault.azure.net/keys/testkey255915b59/d209b2180d0642dbbb7ec4851278d211\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-256\",\"x\":\"FeuTrI_mDAqfvodEzI7cUTNCvHzN9tGm3EtyWamrg_Y\",\"y\":\"AZXc2oUKZigV7yM1WJRI4YskH1O1J-19iSAhAPmR37M\"},\"attributes\":{\"enabled\":false,\"exp\":2537049600,\"created\":1633398863,\"updated\":1633398863,\"recoveryLevel\":\"CustomizedRecoverable+Purgeable\",\"recoverableDays\":7}}", - "Content-Type" : "application/json; charset=utf-8", - "X-Powered-By" : "ASP.NET" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.vault.azure.net/keys/testkey255915b59/?api-version=7.3-preview", - "Headers" : { - "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "content-length" : "427", - "X-Content-Type-Options" : "nosniff", - "Pragma" : "no-cache", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Tue, 05 Oct 2021 01:54:23 GMT", - "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", - "Cache-Control" : "no-cache", - "x-ms-keyvault-region" : "centralus", - "x-ms-keyvault-network-info" : "conn_type=Ipv4;addr=174.127.169.154;act_addr_fam=InterNetwork;", - "Expires" : "-1", - "x-ms-request-id" : "96f60166-ee2f-4bf0-9b9a-646309e626eb", - "x-ms-keyvault-service-version" : "1.9.132.3", - "Body" : "{\"key\":{\"kid\":\"https://azure-kv-tests2.vault.azure.net/keys/testkey255915b59/d209b2180d0642dbbb7ec4851278d211\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-256\",\"x\":\"FeuTrI_mDAqfvodEzI7cUTNCvHzN9tGm3EtyWamrg_Y\",\"y\":\"AZXc2oUKZigV7yM1WJRI4YskH1O1J-19iSAhAPmR37M\"},\"attributes\":{\"enabled\":false,\"exp\":2537049600,\"created\":1633398863,\"updated\":1633398863,\"recoveryLevel\":\"CustomizedRecoverable+Purgeable\",\"recoverableDays\":7}}", + "Body" : "{\"key\":{\"kid\":\"https://azure-kv-tests2.vault.azure.net/keys/testkey2986032b8/c330063b2a144826bd258d8b6c88ec60\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-256\",\"x\":\"mN_5P7JFoIG_7odyRnwRKMZvKfHHfBTNJ3sud3tyZYI\",\"y\":\"QwyOK5MRqMOepjRnNGoq7LJi4VDoacXb-DK2xIxJPGI\"},\"attributes\":{\"enabled\":false,\"exp\":2537049600,\"created\":1633574070,\"updated\":1633574070,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", "Content-Type" : "application/json; charset=utf-8", "X-Powered-By" : "ASP.NET" }, "Exception" : null }, { "Method" : "PATCH", - "Uri" : "https://REDACTED.vault.azure.net/keys/testkey255915b59/d209b2180d0642dbbb7ec4851278d211?api-version=7.3-preview", - "Headers" : { - "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "content-length" : "427", - "X-Content-Type-Options" : "nosniff", - "Pragma" : "no-cache", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Tue, 05 Oct 2021 01:54:23 GMT", - "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", - "Cache-Control" : "no-cache", - "x-ms-keyvault-region" : "centralus", - "x-ms-keyvault-network-info" : "conn_type=Ipv4;addr=174.127.169.154;act_addr_fam=InterNetwork;", - "Expires" : "-1", - "x-ms-request-id" : "9a92ad6d-06b8-4c6a-b418-579843669ab8", - "x-ms-keyvault-service-version" : "1.9.132.3", - "Body" : "{\"key\":{\"kid\":\"https://azure-kv-tests2.vault.azure.net/keys/testkey255915b59/d209b2180d0642dbbb7ec4851278d211\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-256\",\"x\":\"FeuTrI_mDAqfvodEzI7cUTNCvHzN9tGm3EtyWamrg_Y\",\"y\":\"AZXc2oUKZigV7yM1WJRI4YskH1O1J-19iSAhAPmR37M\"},\"attributes\":{\"enabled\":false,\"exp\":2852668800,\"created\":1633398863,\"updated\":1633398864,\"recoveryLevel\":\"CustomizedRecoverable+Purgeable\",\"recoverableDays\":7}}", - "Content-Type" : "application/json; charset=utf-8", - "X-Powered-By" : "ASP.NET" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.vault.azure.net/keys/testkey255915b59/?api-version=7.3-preview", + "Uri" : "https://REDACTED.vault.azure.net/keys/testkey2986032b8/c330063b2a144826bd258d8b6c88ec60?api-version=7.3-preview", "Headers" : { "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)", "Content-Type" : "application/json" }, "Response" : { - "content-length" : "427", + "content-length" : "416", "X-Content-Type-Options" : "nosniff", "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 05 Oct 2021 01:54:24 GMT", + "Date" : "Thu, 07 Oct 2021 02:34:30 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", - "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-region" : "westus", "x-ms-keyvault-network-info" : "conn_type=Ipv4;addr=174.127.169.154;act_addr_fam=InterNetwork;", "Expires" : "-1", - "x-ms-request-id" : "5ebc167f-d928-4966-9e8f-4f45fd053987", + "x-ms-request-id" : "00bc1d35-3d76-4334-80f5-bb0135c71e62", "x-ms-keyvault-service-version" : "1.9.132.3", - "Body" : "{\"key\":{\"kid\":\"https://azure-kv-tests2.vault.azure.net/keys/testkey255915b59/d209b2180d0642dbbb7ec4851278d211\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-256\",\"x\":\"FeuTrI_mDAqfvodEzI7cUTNCvHzN9tGm3EtyWamrg_Y\",\"y\":\"AZXc2oUKZigV7yM1WJRI4YskH1O1J-19iSAhAPmR37M\"},\"attributes\":{\"enabled\":false,\"exp\":2852668800,\"created\":1633398863,\"updated\":1633398864,\"recoveryLevel\":\"CustomizedRecoverable+Purgeable\",\"recoverableDays\":7}}", + "Body" : "{\"key\":{\"kid\":\"https://azure-kv-tests2.vault.azure.net/keys/testkey2986032b8/c330063b2a144826bd258d8b6c88ec60\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-256\",\"x\":\"mN_5P7JFoIG_7odyRnwRKMZvKfHHfBTNJ3sud3tyZYI\",\"y\":\"QwyOK5MRqMOepjRnNGoq7LJi4VDoacXb-DK2xIxJPGI\"},\"attributes\":{\"enabled\":false,\"exp\":2852668800,\"created\":1633574070,\"updated\":1633574070,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", "Content-Type" : "application/json; charset=utf-8", "X-Powered-By" : "ASP.NET" }, "Exception" : null } ], - "variables" : [ "testkey255915b59" ] + "variables" : [ "testkey2986032b8" ] } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyAsyncClientTest.updateKey[1].json b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyAsyncClientTest.updateKey[1].json index 952fdfea3e92e..2b41dac4652ec 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyAsyncClientTest.updateKey[1].json +++ b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyAsyncClientTest.updateKey[1].json @@ -1,108 +1,56 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.vault.azure.net/keys/testkey1256627e8/create?api-version=7.3-preview", + "Uri" : "https://REDACTED.vault.azure.net/keys/testkey108695036/create?api-version=7.3-preview", "Headers" : { "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)", "Content-Type" : "application/json" }, "Response" : { - "content-length" : "778", + "content-length" : "767", "X-Content-Type-Options" : "nosniff", "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 05 Oct 2021 01:54:23 GMT", + "Date" : "Thu, 07 Oct 2021 02:34:21 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", - "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-region" : "westus", "x-ms-keyvault-network-info" : "conn_type=Ipv4;addr=174.127.169.154;act_addr_fam=InterNetwork;", "Expires" : "-1", - "x-ms-request-id" : "d34db8e6-ffd9-4f94-96dc-6aa02e1bba6b", + "x-ms-request-id" : "997dc34e-1f5d-4a53-87f0-2fe1393aa5e5", "x-ms-keyvault-service-version" : "1.9.132.3", - "Body" : "{\"key\":{\"kid\":\"https://azure-kv-tests2.vault.azure.net/keys/testkey1256627e8/54a29939fea446c49148d7f46e899dff\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"2bI0E42bE90AINcCnRYQ7sjfxt6FD2TjBM2M-RuKFv5mDubY_JLfKaQRy6da6bxu_wgeVhkKD97vNkpBLWcQzOsdZ4e58YVFgei8oVRUuGAF3ZmDo_6byuMB_P6XYC7t4Sg4wIpdkY9h3fLQKfDfDUGRp0PVVmdGkb1LdOMmXBzP_f-Bcbfgsgmytu0VVQI44RuDdbDFHcLrIeD1dKONIgge_GLqyMzUDAE_4W9-5fax7-G2nwQx4SZqkac005fv45GRZZgqSLGsoZ8yG7OGq4axdmhF2sdWclPsVi8wTA2eSYjBK8-hj-GN9jcXdiLlkl9yZLpuzVR3clMN9u1IPQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1633398863,\"updated\":1633398863,\"recoveryLevel\":\"CustomizedRecoverable+Purgeable\",\"recoverableDays\":7},\"tags\":{\"second tag\":\"second value\",\"first tag\":\"first value\"}}", - "Content-Type" : "application/json; charset=utf-8", - "X-Powered-By" : "ASP.NET" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.vault.azure.net/keys/testkey1256627e8/?api-version=7.3-preview", - "Headers" : { - "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "content-length" : "778", - "X-Content-Type-Options" : "nosniff", - "Pragma" : "no-cache", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Tue, 05 Oct 2021 01:54:23 GMT", - "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", - "Cache-Control" : "no-cache", - "x-ms-keyvault-region" : "centralus", - "x-ms-keyvault-network-info" : "conn_type=Ipv4;addr=174.127.169.154;act_addr_fam=InterNetwork;", - "Expires" : "-1", - "x-ms-request-id" : "575f6f63-0b52-4055-be4c-e8eb6cbe2a37", - "x-ms-keyvault-service-version" : "1.9.132.3", - "Body" : "{\"key\":{\"kid\":\"https://azure-kv-tests2.vault.azure.net/keys/testkey1256627e8/54a29939fea446c49148d7f46e899dff\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"2bI0E42bE90AINcCnRYQ7sjfxt6FD2TjBM2M-RuKFv5mDubY_JLfKaQRy6da6bxu_wgeVhkKD97vNkpBLWcQzOsdZ4e58YVFgei8oVRUuGAF3ZmDo_6byuMB_P6XYC7t4Sg4wIpdkY9h3fLQKfDfDUGRp0PVVmdGkb1LdOMmXBzP_f-Bcbfgsgmytu0VVQI44RuDdbDFHcLrIeD1dKONIgge_GLqyMzUDAE_4W9-5fax7-G2nwQx4SZqkac005fv45GRZZgqSLGsoZ8yG7OGq4axdmhF2sdWclPsVi8wTA2eSYjBK8-hj-GN9jcXdiLlkl9yZLpuzVR3clMN9u1IPQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1633398863,\"updated\":1633398863,\"recoveryLevel\":\"CustomizedRecoverable+Purgeable\",\"recoverableDays\":7},\"tags\":{\"second tag\":\"second value\",\"first tag\":\"first value\"}}", + "Body" : "{\"key\":{\"kid\":\"https://azure-kv-tests2.vault.azure.net/keys/testkey108695036/64c394a984a14bf68145fbaa0126f9e9\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"vwWI_a4e8dW2Me1QldMsNo7VzkaV8fIrwr5HcBeFk1DJq8VtmU9Z445tP9tePilj4ktjblI2NtWq4HlpowrDp-yqcOqVYQ3t3G3C72UYkjxDBmfwTI1adLR9vL14e9it3oRJ3aQRDKd_n0z-RIL-AIyo8TUrP6V3yszlJz9KWjIK4ezc7YNWNMV7tETVSQDArBd3xVmdDAb45FwzT6ZRQCLcQzpNFF65k4U2tr0Emi2YJhy7uYEAiyBt0UJh_WIs0a_BWorQuSXYJy-c_f_ECTgCxT4Ejamo6d2OVCc7WflPiV7kPfye1tSRq-gIEy0VZD_TS5IHScIC3_fStCoZEQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1633574061,\"updated\":1633574061,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90},\"tags\":{\"second tag\":\"second value\",\"first tag\":\"first value\"}}", "Content-Type" : "application/json; charset=utf-8", "X-Powered-By" : "ASP.NET" }, "Exception" : null }, { "Method" : "PATCH", - "Uri" : "https://REDACTED.vault.azure.net/keys/testkey1256627e8/54a29939fea446c49148d7f46e899dff?api-version=7.3-preview", - "Headers" : { - "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "content-length" : "778", - "X-Content-Type-Options" : "nosniff", - "Pragma" : "no-cache", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Tue, 05 Oct 2021 01:54:24 GMT", - "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", - "Cache-Control" : "no-cache", - "x-ms-keyvault-region" : "centralus", - "x-ms-keyvault-network-info" : "conn_type=Ipv4;addr=174.127.169.154;act_addr_fam=InterNetwork;", - "Expires" : "-1", - "x-ms-request-id" : "a1a90302-d7cd-4f9c-9371-7af37b24606a", - "x-ms-keyvault-service-version" : "1.9.132.3", - "Body" : "{\"key\":{\"kid\":\"https://azure-kv-tests2.vault.azure.net/keys/testkey1256627e8/54a29939fea446c49148d7f46e899dff\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"2bI0E42bE90AINcCnRYQ7sjfxt6FD2TjBM2M-RuKFv5mDubY_JLfKaQRy6da6bxu_wgeVhkKD97vNkpBLWcQzOsdZ4e58YVFgei8oVRUuGAF3ZmDo_6byuMB_P6XYC7t4Sg4wIpdkY9h3fLQKfDfDUGRp0PVVmdGkb1LdOMmXBzP_f-Bcbfgsgmytu0VVQI44RuDdbDFHcLrIeD1dKONIgge_GLqyMzUDAE_4W9-5fax7-G2nwQx4SZqkac005fv45GRZZgqSLGsoZ8yG7OGq4axdmhF2sdWclPsVi8wTA2eSYjBK8-hj-GN9jcXdiLlkl9yZLpuzVR3clMN9u1IPQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2852668800,\"created\":1633398863,\"updated\":1633398863,\"recoveryLevel\":\"CustomizedRecoverable+Purgeable\",\"recoverableDays\":7},\"tags\":{\"second tag\":\"second value\",\"first tag\":\"first value\"}}", - "Content-Type" : "application/json; charset=utf-8", - "X-Powered-By" : "ASP.NET" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.vault.azure.net/keys/testkey1256627e8/?api-version=7.3-preview", + "Uri" : "https://REDACTED.vault.azure.net/keys/testkey108695036/64c394a984a14bf68145fbaa0126f9e9?api-version=7.3-preview", "Headers" : { "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)", "Content-Type" : "application/json" }, "Response" : { - "content-length" : "778", + "content-length" : "767", "X-Content-Type-Options" : "nosniff", "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 05 Oct 2021 01:54:23 GMT", + "Date" : "Thu, 07 Oct 2021 02:34:21 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", - "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-region" : "westus", "x-ms-keyvault-network-info" : "conn_type=Ipv4;addr=174.127.169.154;act_addr_fam=InterNetwork;", "Expires" : "-1", - "x-ms-request-id" : "a26d4b5e-944e-4309-854a-5e30016034e7", + "x-ms-request-id" : "f7af7986-94d0-43ee-8950-5d93c1219589", "x-ms-keyvault-service-version" : "1.9.132.3", - "Body" : "{\"key\":{\"kid\":\"https://azure-kv-tests2.vault.azure.net/keys/testkey1256627e8/54a29939fea446c49148d7f46e899dff\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"2bI0E42bE90AINcCnRYQ7sjfxt6FD2TjBM2M-RuKFv5mDubY_JLfKaQRy6da6bxu_wgeVhkKD97vNkpBLWcQzOsdZ4e58YVFgei8oVRUuGAF3ZmDo_6byuMB_P6XYC7t4Sg4wIpdkY9h3fLQKfDfDUGRp0PVVmdGkb1LdOMmXBzP_f-Bcbfgsgmytu0VVQI44RuDdbDFHcLrIeD1dKONIgge_GLqyMzUDAE_4W9-5fax7-G2nwQx4SZqkac005fv45GRZZgqSLGsoZ8yG7OGq4axdmhF2sdWclPsVi8wTA2eSYjBK8-hj-GN9jcXdiLlkl9yZLpuzVR3clMN9u1IPQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2852668800,\"created\":1633398863,\"updated\":1633398863,\"recoveryLevel\":\"CustomizedRecoverable+Purgeable\",\"recoverableDays\":7},\"tags\":{\"second tag\":\"second value\",\"first tag\":\"first value\"}}", + "Body" : "{\"key\":{\"kid\":\"https://azure-kv-tests2.vault.azure.net/keys/testkey108695036/64c394a984a14bf68145fbaa0126f9e9\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"vwWI_a4e8dW2Me1QldMsNo7VzkaV8fIrwr5HcBeFk1DJq8VtmU9Z445tP9tePilj4ktjblI2NtWq4HlpowrDp-yqcOqVYQ3t3G3C72UYkjxDBmfwTI1adLR9vL14e9it3oRJ3aQRDKd_n0z-RIL-AIyo8TUrP6V3yszlJz9KWjIK4ezc7YNWNMV7tETVSQDArBd3xVmdDAb45FwzT6ZRQCLcQzpNFF65k4U2tr0Emi2YJhy7uYEAiyBt0UJh_WIs0a_BWorQuSXYJy-c_f_ECTgCxT4Ejamo6d2OVCc7WflPiV7kPfye1tSRq-gIEy0VZD_TS5IHScIC3_fStCoZEQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2852668800,\"created\":1633574061,\"updated\":1633574062,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90},\"tags\":{\"second tag\":\"second value\",\"first tag\":\"first value\"}}", "Content-Type" : "application/json; charset=utf-8", "X-Powered-By" : "ASP.NET" }, "Exception" : null } ], - "variables" : [ "testkey1256627e8" ] + "variables" : [ "testkey108695036" ] } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyClientTest.createRsaKeyWithPublicExponent[1].json b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyClientTest.createRsaKeyWithPublicExponent[1].json deleted file mode 100644 index ea5014c11cffa..0000000000000 --- a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyClientTest.createRsaKeyWithPublicExponent[1].json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "networkCallRecords" : [ { - "Method" : "POST", - "Uri" : "https://REDACTED.vault.azure.net/keys/testrsakey002189a/create?api-version=7.3-preview", - "Headers" : { - "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "content-length" : "753", - "X-Content-Type-Options" : "nosniff", - "Pragma" : "no-cache", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Tue, 05 Oct 2021 01:42:29 GMT", - "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", - "Cache-Control" : "no-cache", - "x-ms-keyvault-region" : "centralus", - "x-ms-keyvault-network-info" : "conn_type=Ipv4;addr=174.127.169.154;act_addr_fam=InterNetwork;", - "Expires" : "-1", - "x-ms-request-id" : "b1ddbf94-73a3-45ce-bcef-04685549b890", - "x-ms-keyvault-service-version" : "1.9.132.3", - "Body" : "{\"key\":{\"kid\":\"https://azure-kv-tests2.vault.azure.net/keys/testrsakey002189a/75ee97becfb34314bd451248b3e9775c\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"yySvW1eidcKX0iOpWlz8dzlOVpBszvO9IGdR0MWnGc_0qCIzVLTATSyy40dlkpNUdGBGIYZdEUiJsb0T9b0IzKPO6W-AF_eaHF_iSstqC3xbGSqaKNDUtL22xuUEnHHV8RouEJjqpZt2wN57ODGAjwzSkojJOHz5ZX3nckmwA7DwaWxskZl4twO7flVsUPYZ4vfAWvRZ7WpMkkzaycB9K833NN4Nj3x6-jgeTY3sZcIcRSLDqPcBdCIhSUJZ8pwvmg_r1gih7K2DbjGdRThHhFui7Ce0CDqR34rfeNLVanERc9eAdfhXesghnvx2EQDzFREyaZ4CF6wJJZeKEwl2OQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"nbf\":949237199,\"exp\":2527113600,\"created\":1633398149,\"updated\":1633398149,\"recoveryLevel\":\"CustomizedRecoverable+Purgeable\",\"recoverableDays\":7},\"tags\":{\"foo\":\"baz\"}}", - "Content-Type" : "application/json; charset=utf-8", - "X-Powered-By" : "ASP.NET" - }, - "Exception" : null - } ], - "variables" : [ "testrsakey002189a" ] -} diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyClientTest.updateDisabledKey[1].json b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyClientTest.updateDisabledKey[1].json index ae1fbc43442ed..44062bd95f698 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyClientTest.updateDisabledKey[1].json +++ b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyClientTest.updateDisabledKey[1].json @@ -1,108 +1,56 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.vault.azure.net/keys/testkey218982f60/create?api-version=7.3-preview", + "Uri" : "https://REDACTED.vault.azure.net/keys/testkey2608029a9/create?api-version=7.3-preview", "Headers" : { "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)", "Content-Type" : "application/json" }, "Response" : { - "content-length" : "427", + "content-length" : "416", "X-Content-Type-Options" : "nosniff", "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 05 Oct 2021 01:42:29 GMT", + "Date" : "Thu, 07 Oct 2021 02:34:09 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", - "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-region" : "westus", "x-ms-keyvault-network-info" : "conn_type=Ipv4;addr=174.127.169.154;act_addr_fam=InterNetwork;", "Expires" : "-1", - "x-ms-request-id" : "a26824ec-4235-49be-808e-0edc7641dc27", + "x-ms-request-id" : "369ca5b6-171f-4479-bf1c-0ed763012cae", "x-ms-keyvault-service-version" : "1.9.132.3", - "Body" : "{\"key\":{\"kid\":\"https://azure-kv-tests2.vault.azure.net/keys/testkey218982f60/d65d30c4bb53467ab3cd32d11256f72f\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-256\",\"x\":\"hVx1bd73Xqge72KyuIgqV9x3qJfAl8YLVhveIA-JdJo\",\"y\":\"rMY-7ZWxKMH7aER09bAV3-nCP88TuZpXifEQeFlI5lY\"},\"attributes\":{\"enabled\":false,\"exp\":2537049600,\"created\":1633398149,\"updated\":1633398149,\"recoveryLevel\":\"CustomizedRecoverable+Purgeable\",\"recoverableDays\":7}}", - "Content-Type" : "application/json; charset=utf-8", - "X-Powered-By" : "ASP.NET" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.vault.azure.net/keys/testkey218982f60/?api-version=7.3-preview", - "Headers" : { - "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "content-length" : "427", - "X-Content-Type-Options" : "nosniff", - "Pragma" : "no-cache", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Tue, 05 Oct 2021 01:42:30 GMT", - "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", - "Cache-Control" : "no-cache", - "x-ms-keyvault-region" : "centralus", - "x-ms-keyvault-network-info" : "conn_type=Ipv4;addr=174.127.169.154;act_addr_fam=InterNetwork;", - "Expires" : "-1", - "x-ms-request-id" : "c5fdba1f-5bc3-4be8-9076-f8928cfc8415", - "x-ms-keyvault-service-version" : "1.9.132.3", - "Body" : "{\"key\":{\"kid\":\"https://azure-kv-tests2.vault.azure.net/keys/testkey218982f60/d65d30c4bb53467ab3cd32d11256f72f\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-256\",\"x\":\"hVx1bd73Xqge72KyuIgqV9x3qJfAl8YLVhveIA-JdJo\",\"y\":\"rMY-7ZWxKMH7aER09bAV3-nCP88TuZpXifEQeFlI5lY\"},\"attributes\":{\"enabled\":false,\"exp\":2537049600,\"created\":1633398149,\"updated\":1633398149,\"recoveryLevel\":\"CustomizedRecoverable+Purgeable\",\"recoverableDays\":7}}", + "Body" : "{\"key\":{\"kid\":\"https://azure-kv-tests2.vault.azure.net/keys/testkey2608029a9/f37ced90da0b43e88438a961ded07f6a\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-256\",\"x\":\"3kEoY_qgDdSwqcENRO4hHmwW7XRBY3_usVsU56iFQ1M\",\"y\":\"h2aTpXXPU75sesPZIiNPk4jZw_Rn9T1GTq1A2FOr-ao\"},\"attributes\":{\"enabled\":false,\"exp\":2537049600,\"created\":1633574049,\"updated\":1633574049,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", "Content-Type" : "application/json; charset=utf-8", "X-Powered-By" : "ASP.NET" }, "Exception" : null }, { "Method" : "PATCH", - "Uri" : "https://REDACTED.vault.azure.net/keys/testkey218982f60/d65d30c4bb53467ab3cd32d11256f72f?api-version=7.3-preview", - "Headers" : { - "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "content-length" : "427", - "X-Content-Type-Options" : "nosniff", - "Pragma" : "no-cache", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Tue, 05 Oct 2021 01:42:29 GMT", - "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", - "Cache-Control" : "no-cache", - "x-ms-keyvault-region" : "centralus", - "x-ms-keyvault-network-info" : "conn_type=Ipv4;addr=174.127.169.154;act_addr_fam=InterNetwork;", - "Expires" : "-1", - "x-ms-request-id" : "642e2889-f593-4f08-be1b-f7ed4b80aa10", - "x-ms-keyvault-service-version" : "1.9.132.3", - "Body" : "{\"key\":{\"kid\":\"https://azure-kv-tests2.vault.azure.net/keys/testkey218982f60/d65d30c4bb53467ab3cd32d11256f72f\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-256\",\"x\":\"hVx1bd73Xqge72KyuIgqV9x3qJfAl8YLVhveIA-JdJo\",\"y\":\"rMY-7ZWxKMH7aER09bAV3-nCP88TuZpXifEQeFlI5lY\"},\"attributes\":{\"enabled\":false,\"exp\":2852668800,\"created\":1633398149,\"updated\":1633398150,\"recoveryLevel\":\"CustomizedRecoverable+Purgeable\",\"recoverableDays\":7}}", - "Content-Type" : "application/json; charset=utf-8", - "X-Powered-By" : "ASP.NET" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.vault.azure.net/keys/testkey218982f60/?api-version=7.3-preview", + "Uri" : "https://REDACTED.vault.azure.net/keys/testkey2608029a9/f37ced90da0b43e88438a961ded07f6a?api-version=7.3-preview", "Headers" : { "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)", "Content-Type" : "application/json" }, "Response" : { - "content-length" : "427", + "content-length" : "416", "X-Content-Type-Options" : "nosniff", "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 05 Oct 2021 01:42:30 GMT", + "Date" : "Thu, 07 Oct 2021 02:34:09 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", - "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-region" : "westus", "x-ms-keyvault-network-info" : "conn_type=Ipv4;addr=174.127.169.154;act_addr_fam=InterNetwork;", "Expires" : "-1", - "x-ms-request-id" : "2c60d2c5-d7d2-4d6b-a1c7-24b5fd56bad2", + "x-ms-request-id" : "963720b1-d58c-49a0-ab73-ba470798e465", "x-ms-keyvault-service-version" : "1.9.132.3", - "Body" : "{\"key\":{\"kid\":\"https://azure-kv-tests2.vault.azure.net/keys/testkey218982f60/d65d30c4bb53467ab3cd32d11256f72f\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-256\",\"x\":\"hVx1bd73Xqge72KyuIgqV9x3qJfAl8YLVhveIA-JdJo\",\"y\":\"rMY-7ZWxKMH7aER09bAV3-nCP88TuZpXifEQeFlI5lY\"},\"attributes\":{\"enabled\":false,\"exp\":2852668800,\"created\":1633398149,\"updated\":1633398150,\"recoveryLevel\":\"CustomizedRecoverable+Purgeable\",\"recoverableDays\":7}}", + "Body" : "{\"key\":{\"kid\":\"https://azure-kv-tests2.vault.azure.net/keys/testkey2608029a9/f37ced90da0b43e88438a961ded07f6a\",\"kty\":\"EC\",\"key_ops\":[\"sign\",\"verify\"],\"crv\":\"P-256\",\"x\":\"3kEoY_qgDdSwqcENRO4hHmwW7XRBY3_usVsU56iFQ1M\",\"y\":\"h2aTpXXPU75sesPZIiNPk4jZw_Rn9T1GTq1A2FOr-ao\"},\"attributes\":{\"enabled\":false,\"exp\":2852668800,\"created\":1633574049,\"updated\":1633574049,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90}}", "Content-Type" : "application/json; charset=utf-8", "X-Powered-By" : "ASP.NET" }, "Exception" : null } ], - "variables" : [ "testkey218982f60" ] + "variables" : [ "testkey2608029a9" ] } diff --git a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyClientTest.updateKey[1].json b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyClientTest.updateKey[1].json index 72882df227fe3..345ca02f93277 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyClientTest.updateKey[1].json +++ b/sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyClientTest.updateKey[1].json @@ -1,108 +1,56 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.vault.azure.net/keys/testkey18037082f/create?api-version=7.3-preview", + "Uri" : "https://REDACTED.vault.azure.net/keys/testkey195728df1/create?api-version=7.3-preview", "Headers" : { "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)", "Content-Type" : "application/json" }, "Response" : { - "content-length" : "778", + "content-length" : "767", "X-Content-Type-Options" : "nosniff", "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 05 Oct 2021 01:42:29 GMT", + "Date" : "Thu, 07 Oct 2021 01:50:31 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", - "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-region" : "westus", "x-ms-keyvault-network-info" : "conn_type=Ipv4;addr=174.127.169.154;act_addr_fam=InterNetwork;", "Expires" : "-1", - "x-ms-request-id" : "c4419d60-51c6-4e81-a755-db81b3229de9", + "x-ms-request-id" : "be0f0aa8-1c38-43af-824c-016fde46844e", "x-ms-keyvault-service-version" : "1.9.132.3", - "Body" : "{\"key\":{\"kid\":\"https://azure-kv-tests2.vault.azure.net/keys/testkey18037082f/e48dfc1163cd4a1b96e01efa9a8ba949\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"tJW7dcu0e_lAcEnIj8lXb-kdfGpEtAzLIS-IqH8xJWdvhKhOeNW67c0DvINe2_Bqt_ZHh_V4rmR8ijZc_Vzu5V3Ln6erY70TJNmJrY_6lf8qYHz97xYZRsDKE00eoi3oTbi-nmSFvbnEYIDVSsGvr9FF80PPdcp3sE2bPJwvM4LxXBf8--vTiM1Fmv-AHDAsnX49ZnhQHj5NldE3Dju8FzWv6Kxji7XHqUQPs90ZlJwypqS5LEEy783EIs3R3plYLlQRCBZDh1TRRIRU2Q52cEM-4PycXlArQRQ9udfUGQx0AlNPHVQolcSYL0N_8WJd2c3pRGRyBLdgDOrXEUOzLQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1633398149,\"updated\":1633398149,\"recoveryLevel\":\"CustomizedRecoverable+Purgeable\",\"recoverableDays\":7},\"tags\":{\"second tag\":\"second value\",\"first tag\":\"first value\"}}", - "Content-Type" : "application/json; charset=utf-8", - "X-Powered-By" : "ASP.NET" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.vault.azure.net/keys/testkey18037082f/?api-version=7.3-preview", - "Headers" : { - "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "content-length" : "778", - "X-Content-Type-Options" : "nosniff", - "Pragma" : "no-cache", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Tue, 05 Oct 2021 01:42:29 GMT", - "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", - "Cache-Control" : "no-cache", - "x-ms-keyvault-region" : "centralus", - "x-ms-keyvault-network-info" : "conn_type=Ipv4;addr=174.127.169.154;act_addr_fam=InterNetwork;", - "Expires" : "-1", - "x-ms-request-id" : "e13e6188-a3e4-4e60-ba5b-74c2ff3eaca3", - "x-ms-keyvault-service-version" : "1.9.132.3", - "Body" : "{\"key\":{\"kid\":\"https://azure-kv-tests2.vault.azure.net/keys/testkey18037082f/e48dfc1163cd4a1b96e01efa9a8ba949\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"tJW7dcu0e_lAcEnIj8lXb-kdfGpEtAzLIS-IqH8xJWdvhKhOeNW67c0DvINe2_Bqt_ZHh_V4rmR8ijZc_Vzu5V3Ln6erY70TJNmJrY_6lf8qYHz97xYZRsDKE00eoi3oTbi-nmSFvbnEYIDVSsGvr9FF80PPdcp3sE2bPJwvM4LxXBf8--vTiM1Fmv-AHDAsnX49ZnhQHj5NldE3Dju8FzWv6Kxji7XHqUQPs90ZlJwypqS5LEEy783EIs3R3plYLlQRCBZDh1TRRIRU2Q52cEM-4PycXlArQRQ9udfUGQx0AlNPHVQolcSYL0N_8WJd2c3pRGRyBLdgDOrXEUOzLQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1633398149,\"updated\":1633398149,\"recoveryLevel\":\"CustomizedRecoverable+Purgeable\",\"recoverableDays\":7},\"tags\":{\"second tag\":\"second value\",\"first tag\":\"first value\"}}", + "Body" : "{\"key\":{\"kid\":\"https://azure-kv-tests2.vault.azure.net/keys/testkey195728df1/1b3cefe297f4428cae553b2bada6e33a\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"uM_Pklhdsq06rvvzZ4pOTEqzH75b11xURJ_EmkMmGH_znKLFmE4xNnUFuxs2Zx0RUUD_Mktb_4i-lz0neqlIrdSfbAKw90QKis6fgtrwgYUbQYerHvaGKeziIWl6XJYU2eCYS0-2W3Vow46gjwkAU0M79oxuPi6KVQraw3h-_L4rULSp86wsEyU38JNKAk-2aUxBK-Wa0vIM-pNmA99pxRewHFmiPUN6IHTHU6LwCrqZNzAmSa0a6R8O859Fh2BGOqal_ciL5E9T7SBBVK0ltT7tUshihYG4Udn2OEjwDHDQc03UDgkUiLiNtPBCp8HJrpB906NrAbExDhPNtQn1mQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2537049600,\"created\":1633571431,\"updated\":1633571431,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90},\"tags\":{\"second tag\":\"second value\",\"first tag\":\"first value\"}}", "Content-Type" : "application/json; charset=utf-8", "X-Powered-By" : "ASP.NET" }, "Exception" : null }, { "Method" : "PATCH", - "Uri" : "https://REDACTED.vault.azure.net/keys/testkey18037082f/e48dfc1163cd4a1b96e01efa9a8ba949?api-version=7.3-preview", - "Headers" : { - "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)", - "Content-Type" : "application/json" - }, - "Response" : { - "content-length" : "778", - "X-Content-Type-Options" : "nosniff", - "Pragma" : "no-cache", - "retry-after" : "0", - "StatusCode" : "200", - "Date" : "Tue, 05 Oct 2021 01:42:30 GMT", - "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", - "Cache-Control" : "no-cache", - "x-ms-keyvault-region" : "centralus", - "x-ms-keyvault-network-info" : "conn_type=Ipv4;addr=174.127.169.154;act_addr_fam=InterNetwork;", - "Expires" : "-1", - "x-ms-request-id" : "2485f961-c67f-4b0c-83ea-afb07b5fe887", - "x-ms-keyvault-service-version" : "1.9.132.3", - "Body" : "{\"key\":{\"kid\":\"https://azure-kv-tests2.vault.azure.net/keys/testkey18037082f/e48dfc1163cd4a1b96e01efa9a8ba949\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"tJW7dcu0e_lAcEnIj8lXb-kdfGpEtAzLIS-IqH8xJWdvhKhOeNW67c0DvINe2_Bqt_ZHh_V4rmR8ijZc_Vzu5V3Ln6erY70TJNmJrY_6lf8qYHz97xYZRsDKE00eoi3oTbi-nmSFvbnEYIDVSsGvr9FF80PPdcp3sE2bPJwvM4LxXBf8--vTiM1Fmv-AHDAsnX49ZnhQHj5NldE3Dju8FzWv6Kxji7XHqUQPs90ZlJwypqS5LEEy783EIs3R3plYLlQRCBZDh1TRRIRU2Q52cEM-4PycXlArQRQ9udfUGQx0AlNPHVQolcSYL0N_8WJd2c3pRGRyBLdgDOrXEUOzLQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2852668800,\"created\":1633398149,\"updated\":1633398150,\"recoveryLevel\":\"CustomizedRecoverable+Purgeable\",\"recoverableDays\":7},\"tags\":{\"second tag\":\"second value\",\"first tag\":\"first value\"}}", - "Content-Type" : "application/json; charset=utf-8", - "X-Powered-By" : "ASP.NET" - }, - "Exception" : null - }, { - "Method" : "GET", - "Uri" : "https://REDACTED.vault.azure.net/keys/testkey18037082f/?api-version=7.3-preview", + "Uri" : "https://REDACTED.vault.azure.net/keys/testkey195728df1/1b3cefe297f4428cae553b2bada6e33a?api-version=7.3-preview", "Headers" : { "User-Agent" : "azsdk-java-client_name/client_version (11.0.6; Windows 10; 10.0)", "Content-Type" : "application/json" }, "Response" : { - "content-length" : "778", + "content-length" : "767", "X-Content-Type-Options" : "nosniff", "Pragma" : "no-cache", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Tue, 05 Oct 2021 01:42:30 GMT", + "Date" : "Thu, 07 Oct 2021 01:50:31 GMT", "Strict-Transport-Security" : "max-age=31536000;includeSubDomains", "Cache-Control" : "no-cache", - "x-ms-keyvault-region" : "centralus", + "x-ms-keyvault-region" : "westus", "x-ms-keyvault-network-info" : "conn_type=Ipv4;addr=174.127.169.154;act_addr_fam=InterNetwork;", "Expires" : "-1", - "x-ms-request-id" : "39d05020-d2ac-4e61-8669-e74596805d77", + "x-ms-request-id" : "a4d622c5-434b-4934-9a6f-68c24da38a9d", "x-ms-keyvault-service-version" : "1.9.132.3", - "Body" : "{\"key\":{\"kid\":\"https://azure-kv-tests2.vault.azure.net/keys/testkey18037082f/e48dfc1163cd4a1b96e01efa9a8ba949\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"tJW7dcu0e_lAcEnIj8lXb-kdfGpEtAzLIS-IqH8xJWdvhKhOeNW67c0DvINe2_Bqt_ZHh_V4rmR8ijZc_Vzu5V3Ln6erY70TJNmJrY_6lf8qYHz97xYZRsDKE00eoi3oTbi-nmSFvbnEYIDVSsGvr9FF80PPdcp3sE2bPJwvM4LxXBf8--vTiM1Fmv-AHDAsnX49ZnhQHj5NldE3Dju8FzWv6Kxji7XHqUQPs90ZlJwypqS5LEEy783EIs3R3plYLlQRCBZDh1TRRIRU2Q52cEM-4PycXlArQRQ9udfUGQx0AlNPHVQolcSYL0N_8WJd2c3pRGRyBLdgDOrXEUOzLQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2852668800,\"created\":1633398149,\"updated\":1633398150,\"recoveryLevel\":\"CustomizedRecoverable+Purgeable\",\"recoverableDays\":7},\"tags\":{\"second tag\":\"second value\",\"first tag\":\"first value\"}}", + "Body" : "{\"key\":{\"kid\":\"https://azure-kv-tests2.vault.azure.net/keys/testkey195728df1/1b3cefe297f4428cae553b2bada6e33a\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"uM_Pklhdsq06rvvzZ4pOTEqzH75b11xURJ_EmkMmGH_znKLFmE4xNnUFuxs2Zx0RUUD_Mktb_4i-lz0neqlIrdSfbAKw90QKis6fgtrwgYUbQYerHvaGKeziIWl6XJYU2eCYS0-2W3Vow46gjwkAU0M79oxuPi6KVQraw3h-_L4rULSp86wsEyU38JNKAk-2aUxBK-Wa0vIM-pNmA99pxRewHFmiPUN6IHTHU6LwCrqZNzAmSa0a6R8O859Fh2BGOqal_ciL5E9T7SBBVK0ltT7tUshihYG4Udn2OEjwDHDQc03UDgkUiLiNtPBCp8HJrpB906NrAbExDhPNtQn1mQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"exp\":2852668800,\"created\":1633571431,\"updated\":1633571432,\"recoveryLevel\":\"Recoverable+Purgeable\",\"recoverableDays\":90},\"tags\":{\"second tag\":\"second value\",\"first tag\":\"first value\"}}", "Content-Type" : "application/json; charset=utf-8", "X-Powered-By" : "ASP.NET" }, "Exception" : null } ], - "variables" : [ "testkey18037082f" ] + "variables" : [ "testkey195728df1" ] }