From fb7364a8e20e7799f3fc51dfae618658dce5531f Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Tue, 30 Jun 2020 17:36:36 -0400 Subject: [PATCH 1/9] fix none policy bug in import_certificate --- .../azure/keyvault/certificates/_client.py | 2 +- .../azure/keyvault/certificates/aio/_client.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_client.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_client.py index 335b7eabd488..324b041e3d3b 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_client.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_client.py @@ -367,7 +367,7 @@ def import_certificate(self, certificate_name, certificate_bytes, **kwargs): certificate_name=certificate_name, base64_encoded_certificate=base64_encoded_certificate, password=password, - certificate_policy=policy._to_certificate_policy_bundle(), + certificate_policy=policy._to_certificate_policy_bundle() if policy else None, certificate_attributes=attributes, error_map=_error_map, **kwargs diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/aio/_client.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/aio/_client.py index ea65dd03d776..b6c1a8576e61 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/aio/_client.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/aio/_client.py @@ -343,7 +343,7 @@ async def import_certificate( certificate_name=certificate_name, base64_encoded_certificate=base64_encoded_certificate, password=password, - certificate_policy=CertificatePolicy._to_certificate_policy_bundle(policy), + certificate_policy=policy._to_certificate_policy_bundle() if policy else None, certificate_attributes=attributes, error_map=_error_map, **kwargs From 464b723bf1f2799b903b09858aac13c3ada0b4c1 Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Tue, 30 Jun 2020 17:36:46 -0400 Subject: [PATCH 2/9] add test for bug fix --- ...ent.test_import_certificate_no_policy.yaml | 107 ++++++++++++++++++ ...ync.test_import_certificate_no_policy.yaml | 74 ++++++++++++ .../tests/test_certificates_client.py | 29 +++-- .../tests/test_certificates_client_async.py | 28 +++-- 4 files changed, 208 insertions(+), 30 deletions(-) create mode 100644 sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client.test_import_certificate_no_policy.yaml create mode 100644 sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client_async.test_import_certificate_no_policy.yaml diff --git a/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client.test_import_certificate_no_policy.yaml b/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client.test_import_certificate_no_policy.yaml new file mode 100644 index 000000000000..e9807877fa48 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client.test_import_certificate_no_policy.yaml @@ -0,0 +1,107 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - azsdk-python-keyvault-certificates/4.2.0b2 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://vaultname.vault.azure.net/certificates/importCertificate/import?api-version=7.1-preview + response: + body: + string: '{"error":{"code":"Unauthorized","message":"Request is missing a Bearer + or PoP token."}}' + headers: + cache-control: + - no-cache + content-length: + - '87' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 30 Jun 2020 21:34:25 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000;includeSubDomains + www-authenticate: + - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=73.135.72.237;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.6.0 + x-powered-by: + - ASP.NET + status: + code: 401 + message: Unauthorized +- request: + body: '{"value": "MIIJOwIBAzCCCPcGCSqGSIb3DQEHAaCCCOgEggjkMIII4DCCBgkGCSqGSIb3DQEHAaCCBfoEggX2MIIF8jCCBe4GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAj15YH9pOE58AICB9AEggTYLrI+SAru2dBZRQRlJY7XQ3LeLkah2FcRR3dATDshZ2h0IA2oBrkQIdsLyAAWZ32qYR1qkWxLHn9AqXgu27AEbOk35+pITZaiy63YYBkkpR+pDdngZt19Z0PWrGwHEq5z6BHS2GLyyN8SSOCbdzCz7blj3+7IZYoMj4WOPgOm/tQ6U44SFWek46QwN2zeA4i97v7ftNNns27ms52jqfhOvTA9c/wyfZKAY4aKJfYYUmycKjnnRl012ldS2lOkASFt+lu4QCa72IY6ePtRudPCvmzRv2pkLYS6z3cI7omT8nHP3DymNOqLbFqr5O2M1ZYaLC63Q3xt3eVvbcPh3N08D1hHkhz/KDTvkRAQpvrW8ISKmgDdmzN55Pe55xHfSWGB7gPw8sZea57IxFzWHTK2yvTslooWoosmGxanYY2IG/no3EbPOWDKjPZ4ilYJe5JJ2immlxPz+2e2EOCKpDI+7fzQcRz3PTd3BK+budZ8aXX8aW/lOgKS8WmxZoKnOJBNWeTNWQFugmktXfdPHAdxMhjUXqeGQd8wTvZ4EzQNNafovwkI7IV/ZYoa++RGofVR3ZbRSiBNF6TDj/qXFt0wN/CQnsGAmQAGNiN+D4mY7i25dtTu/Jc7OxLdhAUFpHyJpyrYWLfvOiS5WYBeEDHkiPUa/8eZSPA3MXWZR1RiuDvuNqMjct1SSwdXADTtF68l/US1ksU657+XSC+6ly1A/upz+X71+C4Ho6W0751j5ZMT6xKjGh5pee7MVuduxIzXjWIy3YSd0fIT3U0A5NLEvJ9rfkx6JiHjRLx6V1tqsrtT6BsGtmCQR1UCJPLqsKVDvAINx3cPA/CGqr5OX2BGZlAihGmN6n7gv8w4O0k0LPTAe5Yefg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UGCSqGSIb3DQEHATAcBgoqhkiG9w0BDAEGMA4ECNX+VL2MxzzWAgIH0ICCAojmRBO+CPfVNUO0s+BVuwhOzikAGNBmQHNChmJ/pyzPbMUbx7tO63eIVSc67iERda2WCEmVwPigaVQkPaumsfp8+L6iV/BMf5RKlyRXcwh0vUdu2Qa7qadD+gFQ2kngf4Dk6vYo2/2HxayuIf6jpwe8vql4ca3ZtWXfuRix2fwgltM0bMz1g59d7x/glTfNqxNlsty0A/rWrPJjNbOPRU2XykLuc3AtlTtYsQ32Zsmu67A7UNBw6tVtkEXlFDqhavEhUEO3dvYqMY+QLxzpZhA0q44ZZ9/ex0X6QAFNK5wuWxCbupHWsgxRwKftrxyszMHsAvNoNcTlqcctee+ecNwTJQa1/MDbnhO6/qHA7cfG1qYDq8Th635vGNMW1w3sVS7l0uEvdayAsBHWTcOC2tlMa5bfHrhY8OEIqj5bN5H9RdFy8G/W239tjDu1OYjBDydiBqzBn8HG1DSj1Pjc0kd/82d4ZU0308KFTC3yGcRad0GnEH0Oi3iEJ9HbriUbfVMbXNHOF+MktWiDVqzndGMKmuJSdfTBKvGFvejAWVO5E4mgLvoaMmbchc3BO7sLeraHnJN5hvMBaLcQI38N86mUfTR8AP6AJ9c2k514KaDLclm4z6J8dMz60nUeo5D3YD09G6BavFHxSvJ8MF0Lu5zOFzEePDRFm9mH8W0N/sFlIaYfD/GWU/w44mQucjaBk95YtqOGRIj58tGDWr8iUdHwaYKGqU24zGeRae9DhFXPzZshV1ZGsBQFRaoYkyLAwdJWIXTi+c37YaC8FRSEnnNmS79Dou1Kc3BvK4EYKAD2KxjtUebrV174gD0Q+9YuJ0GXOTspBvCFd5VT2Rw5zDNrA/J3F5fMCk4wOzAfMAcGBSsOAwIaBBSxgh2xyF+88V4vAffBmZXv8Txt4AQU4O/NX4MjxSodbE7ApNAMIvrtREwCAgfQ", + "pwd": "123"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '3183' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - azsdk-python-keyvault-certificates/4.2.0b2 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://vaultname.vault.azure.net/certificates/importCertificate/import?api-version=7.1-preview + response: + body: + string: '{"id":"https://vaultname.vault.azure.net/certificates/importCertificate/89284eafcce24f0fb05a617e5cb3ea57","kid":"https://vaultname.vault.azure.net/keys/importCertificate/89284eafcce24f0fb05a617e5cb3ea57","sid":"https://vaultname.vault.azure.net/secrets/importCertificate/89284eafcce24f0fb05a617e5cb3ea57","x5t":"fLi3U52HunIVNXubkEnf8tP6Wbo","cer":"MIICODCCAeagAwIBAgIQqHmpBAv+CY9IJFoUhlbziTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5MB4XDTE1MDQyOTIxNTM0MVoXDTM5MTIzMTIzNTk1OVowFzEVMBMGA1UEAxMMS2V5VmF1bHRUZXN0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5bVAT73zr4+N4WVv2+SvTunAw08ksS4BrJW/nNliz3S9XuzMBMXvmYzU5HJ8TtEgluBiZZYd5qsMJD+OXHSNbsLdmMhni0jYX09h3XlC2VJw2sGKeYF+xEaavXm337aZZaZyjrFBrrUl51UePaN+kVFXNlBb3N3TYpqa7KokXenJQuR+i9Gv9a77c0UsSsDSryxppYhKK7HvTZCpKrhVtulF5iPMswWe9np3uggfMamyIsK/0L7X9w9B2qN7993RR0A00nOk4H6CnkuwO77dSsD0KJsk6FyAoZBzRXDZh9+d9R76zCL506NcQy/jl0lCiQYwsUX73PG5pxOh02OwKwIDAQABo0swSTBHBgNVHQEEQDA+gBAS5AktBh0dTwCNYSHcFmRjoRgwFjEUMBIGA1UEAxMLUm9vdCBBZ2VuY3mCEAY3bACqAGSKEc+41KpcNfQwCQYFKw4DAh0FAANBAGqIjo2geVagzuzaZOe1ClGKhZeiCKfWAxklaGN+qlGUbVS4IN4V1lot3VKnzabasmkEHeNxPwLn1qvSD0cX9CE=","attributes":{"enabled":true,"nbf":1430344421,"exp":2208988799,"created":1593552866,"updated":1593552866,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"policy":{"id":"https://vaultname.vault.azure.net/certificates/importCertificate/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"CN=KeyVaultTest","ekus":[],"key_usage":[],"validity_months":297,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"EmailContacts"}}],"issuer":{"name":"Unknown"},"attributes":{"enabled":true,"created":1593552866,"updated":1593552866}}}' + headers: + cache-control: + - no-cache + content-length: + - '1887' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 30 Jun 2020 21:34:26 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000;includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=73.135.72.237;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.6.0 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client_async.test_import_certificate_no_policy.yaml b/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client_async.test_import_certificate_no_policy.yaml new file mode 100644 index 000000000000..2e95f47454f0 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client_async.test_import_certificate_no_policy.yaml @@ -0,0 +1,74 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - azsdk-python-keyvault-certificates/4.2.0b2 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://vaultname.vault.azure.net/certificates/importCertificate/import?api-version=7.1-preview + response: + body: + string: '{"error":{"code":"Unauthorized","message":"Request is missing a Bearer + or PoP token."}}' + headers: + cache-control: no-cache + content-length: '87' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jun 2020 21:35:09 GMT + expires: '-1' + pragma: no-cache + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: conn_type=Ipv4;addr=73.135.72.237;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.6.0 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: https://i42yq7w3yawctk67gnhq7u5g.vault.azure.net/certificates/importCertificate/import?api-version=7.1-preview +- request: + body: '{"value": "MIIJOwIBAzCCCPcGCSqGSIb3DQEHAaCCCOgEggjkMIII4DCCBgkGCSqGSIb3DQEHAaCCBfoEggX2MIIF8jCCBe4GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAj15YH9pOE58AICB9AEggTYLrI+SAru2dBZRQRlJY7XQ3LeLkah2FcRR3dATDshZ2h0IA2oBrkQIdsLyAAWZ32qYR1qkWxLHn9AqXgu27AEbOk35+pITZaiy63YYBkkpR+pDdngZt19Z0PWrGwHEq5z6BHS2GLyyN8SSOCbdzCz7blj3+7IZYoMj4WOPgOm/tQ6U44SFWek46QwN2zeA4i97v7ftNNns27ms52jqfhOvTA9c/wyfZKAY4aKJfYYUmycKjnnRl012ldS2lOkASFt+lu4QCa72IY6ePtRudPCvmzRv2pkLYS6z3cI7omT8nHP3DymNOqLbFqr5O2M1ZYaLC63Q3xt3eVvbcPh3N08D1hHkhz/KDTvkRAQpvrW8ISKmgDdmzN55Pe55xHfSWGB7gPw8sZea57IxFzWHTK2yvTslooWoosmGxanYY2IG/no3Eb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voaMmbchc3BO7sLeraHnJN5hvMBaLcQI38N86mUfTR8AP6AJ9c2k514KaDLclm4z6J8dMz60nUeo5D3YD09G6BavFHxSvJ8MF0Lu5zOFzEePDRFm9mH8W0N/sFlIaYfD/GWU/w44mQucjaBk95YtqOGRIj58tGDWr8iUdHwaYKGqU24zGeRae9DhFXPzZshV1ZGsBQFRaoYkyLAwdJWIXTi+c37YaC8FRSEnnNmS79Dou1Kc3BvK4EYKAD2KxjtUebrV174gD0Q+9YuJ0GXOTspBvCFd5VT2Rw5zDNrA/J3F5fMCk4wOzAfMAcGBSsOAwIaBBSxgh2xyF+88V4vAffBmZXv8Txt4AQU4O/NX4MjxSodbE7ApNAMIvrtREwCAgfQ", + "pwd": "123"}' + headers: + Accept: + - application/json + Content-Length: + - '3183' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - azsdk-python-keyvault-certificates/4.2.0b2 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://vaultname.vault.azure.net/certificates/importCertificate/import?api-version=7.1-preview + response: + body: + string: '{"id":"https://vaultname.vault.azure.net/certificates/importCertificate/f9bbb4e48632444087b463a6b0fff796","kid":"https://vaultname.vault.azure.net/keys/importCertificate/f9bbb4e48632444087b463a6b0fff796","sid":"https://vaultname.vault.azure.net/secrets/importCertificate/f9bbb4e48632444087b463a6b0fff796","x5t":"fLi3U52HunIVNXubkEnf8tP6Wbo","cer":"MIICODCCAeagAwIBAgIQqHmpBAv+CY9IJFoUhlbziTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5MB4XDTE1MDQyOTIxNTM0MVoXDTM5MTIzMTIzNTk1OVowFzEVMBMGA1UEAxMMS2V5VmF1bHRUZXN0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5bVAT73zr4+N4WVv2+SvTunAw08ksS4BrJW/nNliz3S9XuzMBMXvmYzU5HJ8TtEgluBiZZYd5qsMJD+OXHSNbsLdmMhni0jYX09h3XlC2VJw2sGKeYF+xEaavXm337aZZaZyjrFBrrUl51UePaN+kVFXNlBb3N3TYpqa7KokXenJQuR+i9Gv9a77c0UsSsDSryxppYhKK7HvTZCpKrhVtulF5iPMswWe9np3uggfMamyIsK/0L7X9w9B2qN7993RR0A00nOk4H6CnkuwO77dSsD0KJsk6FyAoZBzRXDZh9+d9R76zCL506NcQy/jl0lCiQYwsUX73PG5pxOh02OwKwIDAQABo0swSTBHBgNVHQEEQDA+gBAS5AktBh0dTwCNYSHcFmRjoRgwFjEUMBIGA1UEAxMLUm9vdCBBZ2VuY3mCEAY3bACqAGSKEc+41KpcNfQwCQYFKw4DAh0FAANBAGqIjo2geVagzuzaZOe1ClGKhZeiCKfWAxklaGN+qlGUbVS4IN4V1lot3VKnzabasmkEHeNxPwLn1qvSD0cX9CE=","attributes":{"enabled":true,"nbf":1430344421,"exp":2208988799,"created":1593552910,"updated":1593552910,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"policy":{"id":"https://vaultname.vault.azure.net/certificates/importCertificate/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"CN=KeyVaultTest","ekus":[],"key_usage":[],"validity_months":297,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"EmailContacts"}}],"issuer":{"name":"Unknown"},"attributes":{"enabled":true,"created":1593552910,"updated":1593552910}}}' + headers: + cache-control: no-cache + content-length: '1887' + content-type: application/json; charset=utf-8 + date: Tue, 30 Jun 2020 21:35:10 GMT + expires: '-1' + pragma: no-cache + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: conn_type=Ipv4;addr=73.135.72.237;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.6.0 + x-powered-by: ASP.NET + status: + code: 200 + message: OK + url: https://i42yq7w3yawctk67gnhq7u5g.vault.azure.net/certificates/importCertificate/import?api-version=7.1-preview +version: 1 diff --git a/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client.py b/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client.py index 061911fbdd8c..497300c54176 100644 --- a/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client.py +++ b/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client.py @@ -54,19 +54,8 @@ def emit(self, record): class CertificateClientTests(KeyVaultTestCase): - FILTER_HEADERS = [ - "authorization", - "client-request-id", - "x-ms-client-request-id", - "x-ms-correlation-request-id", - "x-ms-ratelimit-remaining-subscription-reads", - "x-ms-request-id", - "x-ms-routing-request-id", - "x-ms-gateway-service-instanceid", - "x-ms-ratelimit-remaining-tenant-reads", - "x-ms-served-by", - "x-ms-authorization-auxiliary", - ] + + CERT_CONTENT = b"0\x82\t;\x02\x01\x030\x82\x08\xf7\x06\t*\x86H\x86\xf7\r\x01\x07\x01\xa0\x82\x08\xe8\x04\x82\x08\xe40\x82\x08\xe00\x82\x06\t\x06\t*\x86H\x86\xf7\r\x01\x07\x01\xa0\x82\x05\xfa\x04\x82\x05\xf60\x82\x05\xf20\x82\x05\xee\x06\x0b*\x86H\x86\xf7\r\x01\x0c\n\x01\x02\xa0\x82\x04\xfe0\x82\x04\xfa0\x1c\x06\n*\x86H\x86\xf7\r\x01\x0c\x01\x030\x0e\x04\x08\xf5\xe5\x81\xfd\xa4\xe19\xf0\x02\x02\x07\xd0\x04\x82\x04\xd8.\xb2>H\n\xee\xd9\xd0YE\x04e%\x8e\xd7Cr\xde.F\xa1\xd8W\x11Gw@L;!ght \r\xa8\x06\xb9\x10!\xdb\x0b\xc8\x00\x16g}\xaaa\x1dj\x91lK\x1e\x7f@\xa9x.\xdb\xb0\x04l\xe97\xe7\xeaHM\x96\xa2\xcb\xad\xd8`\x19$\xa5\x1f\xa9\r\xd9\xe0f\xdd}gC\xd6\xacl\x07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XG\x92\x1c\xff(4\xef\x91\x10\x10\xa6\xfa\xd6\xf0\x84\x8a\x9a\x00\xdd\x9b3y\xe4\xf7\xb9\xe7\x11\xdfIa\x81\xee\x03\xf0\xf2\xc6^k\x9e\xc8\xc4\\\xd6\x1d2\xb6\xca\xf4\xec\x96\x8a\x16\xa2\x8b&\x1b\x16\xa7a\x8d\x88\x1b\xf9\xe8\xdcF\xcf9`\xca\x8c\xf6x\x8aV\t{\x92I\xda)\xa6\x97\x13\xf3\xfbg\xb6\x10\xe0\x8a\xa42>\xed\xfc\xd0q\x1c\xf7=7w\x04\xaf\x9b\xb9\xd6|iu\xfcio\xe5:\x02\x92\xf1i\xb1f\x82\xa78\x90MY\xe4\xcdY\x01n\x82i-]\xf7O\x1c\x07q2\x18\xd4^\xa7\x86A\xdf0N\xf6x\x134\r5\xa7\xe8\xbf\t\x08\xec\x85\x7fe\x8a\x1a\xfb\xe4F\xa1\xf5Q\xdd\x96\xd1J M\x17\xa4\xc3\x8f\xfa\x97\x16\xdd07\xf0\x90\x9e\xc1\x80\x99\x00\x066#~\x0f\x89\x98\xee-\xb9v\xd4\xee\xfc\x97;;\x12\xdd\x84\x05\x05\xa4|\x89\xa7*\xd8X\xb7\xef:$\xb9Y\x80^\x101\xe4\x88\xf5\x1a\xff\xc7\x99H\xf071u\x99GTb\xb8;\xee6\xa3#r\xddRK\x07W\x004\xed\x17\xaf%\xfdD\xb5\x92\xc5:\xe7\xbf\x97H/\xba\x97-@\xfe\xeas\xf9~\xf5\xf8.\x07\xa3\xa5\xb4\xef\x9dc\xe5\x93\x13\xeb\x12\xa3\x1a\x1eiy\xee\xccV\xe7n\xc4\x8c\xd7\x8db2\xdd\x84\x9d\xd1\xf2\x13\xddM\x00\xe4\xd2\xc4\xbc\x9fk~Lz&!\xe3D\xbczW[j\xb2\xbbS\xe8\x1b\x06\xb6`\x90GU\x02$\xf2\xea\xb0\xa5C\xbc\x02\r\xc7w\x0f\x03\xf0\x86\xaa\xbeN_`FfP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xcbrY\xb8\xcf\xa2|t\xcc\xfa\xd2u\x1e\xa3\x90\xf7`==\x1b\xa0Z\xbcQ\xf1J\xf2|0]\x0b\xbb\x9c\xce\x171\x1e<4E\x9b\xd9\x87\xf1m\r\xfe\xc1e!\xa6\x1f\x0f\xf1\x96S\xfc8\xe2d.r6\x81\x93\xdeX\xb6\xa3\x86D\x88\xf9\xf2\xd1\x83Z\xbf\"Q\xd1\xf0i\x82\x86\xa9M\xb8\xccg\x91i\xefC\x84U\xcf\xcd\x9b!WVF\xb0\x14\x05E\xaa\x18\x93\"\xc0\xc1\xd2V!t\xe2\xf9\xcd\xfba\xa0\xbc\x15\x14\x84\x9esfK\xbfC\xa2\xedJspo+\x81\x18(\x00\xf6+\x18\xedQ\xe6\xebW^\xf8\x80=\x10\xfb\xd6.'A\x979;)\x06\xf0\x85w\x95S\xd9\x1c9\xcc3k\x03\xf2w\x17\x97\xcc\nN0;0\x1f0\x07\x06\x05+\x0e\x03\x02\x1a\x04\x14\xb1\x82\x1d\xb1\xc8_\xbc\xf1^/\x01\xf7\xc1\x99\x95\xef\xf1 Date: Tue, 30 Jun 2020 18:04:17 -0400 Subject: [PATCH 3/9] update changelog --- sdk/keyvault/azure-keyvault-certificates/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sdk/keyvault/azure-keyvault-certificates/CHANGELOG.md b/sdk/keyvault/azure-keyvault-certificates/CHANGELOG.md index b283fa6eae23..76b064fc715b 100644 --- a/sdk/keyvault/azure-keyvault-certificates/CHANGELOG.md +++ b/sdk/keyvault/azure-keyvault-certificates/CHANGELOG.md @@ -4,6 +4,7 @@ - Values of `x-ms-keyvault-region` and `x-ms-keyvault-service-version` headers are no longer redacted in logging output. - Updated minimum `azure-core` version to 1.4.0 +- Fixed bug so users can now not pass in `policy` when calling `import_certificate` ## 4.2.0b1 (2020-03-10) - Support for Key Vault API version 7.1-preview From fcc2e290cf72751598b1439746558da83814a32a Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Wed, 1 Jul 2020 13:50:19 -0400 Subject: [PATCH 4/9] add test for not password encoded certificate importing without policy --- .../_shared/challenge_auth_policy.py | 4 +- ...ync_request_cancellation_and_deletion.yaml | 957 ------------------ ...ficate_not_password_encoded_no_policy.yaml | 106 ++ ...rtificate_password_encoded_no_policy.yaml} | 12 +- ...ficate_not_password_encoded_no_policy.yaml | 73 ++ ...ertificate_password_encoded_no_policy.yaml | 74 ++ .../tests/test_certificates_client.py | 25 +- .../tests/test_certificates_client_async.py | 25 +- .../test_key_client.test_logging_enabled.yaml | 110 -- 9 files changed, 301 insertions(+), 1085 deletions(-) delete mode 100644 sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client.test_async_request_cancellation_and_deletion.yaml create mode 100644 sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client.test_import_certificate_not_password_encoded_no_policy.yaml rename sdk/keyvault/azure-keyvault-certificates/tests/recordings/{test_certificates_client.test_import_certificate_no_policy.yaml => test_certificates_client.test_import_certificate_password_encoded_no_policy.yaml} (72%) create mode 100644 sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client_async.test_import_certificate_not_password_encoded_no_policy.yaml create mode 100644 sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client_async.test_import_certificate_password_encoded_no_policy.yaml delete mode 100644 sdk/keyvault/azure-keyvault-keys/tests/recordings/test_key_client.test_logging_enabled.yaml diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/challenge_auth_policy.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/challenge_auth_policy.py index fca7dc6f01d2..ca490f180ee2 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/challenge_auth_policy.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/challenge_auth_policy.py @@ -136,5 +136,5 @@ def _handle_challenge(self, request, challenge): scope = challenge.get_scope() or challenge.get_resource() + "/.default" self._token = self._credential.get_token(scope) - # ignore mypy's warning because although self._token is Optional, get_token raises when it fails to get a token - request.http_request.headers["Authorization"] = "Bearer {}".format(self._token.token) # type: ignore + answer = "Bearer {}".format(self._token.token) + request.http_request.headers["Authorization"] = answer # type: ignore diff --git a/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client.test_async_request_cancellation_and_deletion.yaml b/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client.test_async_request_cancellation_and_deletion.yaml deleted file mode 100644 index 81e01ec6ad07..000000000000 --- a/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client.test_async_request_cancellation_and_deletion.yaml +++ /dev/null @@ -1,957 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) - method: POST - uri: https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/create?api-version=7.1-preview - response: - body: - string: '{"error":{"code":"Unauthorized","message":"Request is missing a Bearer - or PoP token."}}' - headers: - cache-control: - - no-cache - content-length: - - '87' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 06 Mar 2020 00:07:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", - resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.897 - x-powered-by: - - ASP.NET - status: - code: 401 - message: Unauthorized -- request: - body: '{"policy": {"x509_props": {"subject": "CN=DefaultPolicy", "sans": {}}, - "issuer": {"name": "Self"}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '99' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) - method: POST - uri: https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/create?api-version=7.1-preview - response: - body: - string: '{"id":"https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/pending","issuer":{"name":"Self"},"csr":"MIICqDCCAZACAQAwGDEWMBQGA1UEAxMNRGVmYXVsdFBvbGljeTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALrLFtzOxre8e7FEYfzGucf/9i4O7DAikLwYdAvVPdn8eO7G26OpIgtF+8eq/+asQgD8G54f1hhbQj0TosKqEQ42DkyPOIx+xLdLCt0uOlsiqXc1IJZtehTLS4dmJduCMg7+5YfpXQHxVLK6uSRdnLdpIQRedthgXGfvKJ2Zr/h4KV5aAZN0zzyuRl4EF4sswOzgc/Mtrob1ni2pwiklwbrTEzEHY9k7mVtviegFEAXOsjgnsQO1S/PwHmHTMe6+VfRn1/Z4AaZLVEgrf+AatRkf+21Lo3xJnmlkMESv4FnK7GQ+rkB7rLzOJy+EybF1oZYimk7XmqVjn6rNq1wbymcCAwEAAaBLMEkGCSqGSIb3DQEJDjE8MDowDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAJBgNVHRMEAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQBtB8RrIWNYhNO0mC4jO2rUfNoYjX9HvK2XdUwXRIFKqHzPhJsTUCXUdsFd+8g0xEnbGAH/sYKRT9a25LleDaB6o6D2hPEc5khEAm740dmZ6v95Hz+zNxMYv4IkwK95q7w1qRlWE+YzJyqhy4IavYRSgyd0yaumiDFbLkXqlb29wciWGD4Oi9MvLNXBcbvykopDUSSBf85i6NeA6s6TeiWaskesQq4BA7WaiLhpfw3/v/1+bFLyxc5L+FbuNNkvOhFaOv+0wMKr1zmt+KmQT2Jy1kilNkEv9g4DgVH7DJlmjTwUsiTwkB58PIEaoaMPST+ZHROReMAJEM/BpUJPCnsB","cancellation_requested":false,"status":"inProgress","status_details":"Pending - certificate created. Certificate request is in progress. This may take some - time based on the issuer provider. Please check again later.","request_id":"dd6fd01b95df416d9c0b4b4942a3e66d"}' - headers: - cache-control: - - no-cache - content-length: - - '1314' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 06 Mar 2020 00:07:34 GMT - expires: - - '-1' - location: - - https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/pending?api-version=7.1-preview&request_id=dd6fd01b95df416d9c0b4b4942a3e66d - pragma: - - no-cache - retry-after: - - '10' - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.897 - x-powered-by: - - ASP.NET - status: - code: 202 - message: Accepted -- request: - body: '{"cancellation_requested": true}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '32' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) - method: PATCH - uri: https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/pending?api-version=7.1-preview - response: - body: - string: '{"id":"https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/pending","issuer":{"name":"Self"},"csr":"MIICqDCCAZACAQAwGDEWMBQGA1UEAxMNRGVmYXVsdFBvbGljeTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALrLFtzOxre8e7FEYfzGucf/9i4O7DAikLwYdAvVPdn8eO7G26OpIgtF+8eq/+asQgD8G54f1hhbQj0TosKqEQ42DkyPOIx+xLdLCt0uOlsiqXc1IJZtehTLS4dmJduCMg7+5YfpXQHxVLK6uSRdnLdpIQRedthgXGfvKJ2Zr/h4KV5aAZN0zzyuRl4EF4sswOzgc/Mtrob1ni2pwiklwbrTEzEHY9k7mVtviegFEAXOsjgnsQO1S/PwHmHTMe6+VfRn1/Z4AaZLVEgrf+AatRkf+21Lo3xJnmlkMESv4FnK7GQ+rkB7rLzOJy+EybF1oZYimk7XmqVjn6rNq1wbymcCAwEAAaBLMEkGCSqGSIb3DQEJDjE8MDowDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAJBgNVHRMEAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQBtB8RrIWNYhNO0mC4jO2rUfNoYjX9HvK2XdUwXRIFKqHzPhJsTUCXUdsFd+8g0xEnbGAH/sYKRT9a25LleDaB6o6D2hPEc5khEAm740dmZ6v95Hz+zNxMYv4IkwK95q7w1qRlWE+YzJyqhy4IavYRSgyd0yaumiDFbLkXqlb29wciWGD4Oi9MvLNXBcbvykopDUSSBf85i6NeA6s6TeiWaskesQq4BA7WaiLhpfw3/v/1+bFLyxc5L+FbuNNkvOhFaOv+0wMKr1zmt+KmQT2Jy1kilNkEv9g4DgVH7DJlmjTwUsiTwkB58PIEaoaMPST+ZHROReMAJEM/BpUJPCnsB","cancellation_requested":true,"status":"inProgress","status_details":"Pending - certificate created. Certificate request is in progress. This may take some - time based on the issuer provider. Please check again later.","request_id":"dd6fd01b95df416d9c0b4b4942a3e66d"}' - headers: - cache-control: - - no-cache - content-length: - - '1313' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 06 Mar 2020 00:07:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.897 - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/pending?api-version=7.1-preview - response: - body: - string: '{"id":"https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/pending","issuer":{"name":"Self"},"csr":"MIICqDCCAZACAQAwGDEWMBQGA1UEAxMNRGVmYXVsdFBvbGljeTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALrLFtzOxre8e7FEYfzGucf/9i4O7DAikLwYdAvVPdn8eO7G26OpIgtF+8eq/+asQgD8G54f1hhbQj0TosKqEQ42DkyPOIx+xLdLCt0uOlsiqXc1IJZtehTLS4dmJduCMg7+5YfpXQHxVLK6uSRdnLdpIQRedthgXGfvKJ2Zr/h4KV5aAZN0zzyuRl4EF4sswOzgc/Mtrob1ni2pwiklwbrTEzEHY9k7mVtviegFEAXOsjgnsQO1S/PwHmHTMe6+VfRn1/Z4AaZLVEgrf+AatRkf+21Lo3xJnmlkMESv4FnK7GQ+rkB7rLzOJy+EybF1oZYimk7XmqVjn6rNq1wbymcCAwEAAaBLMEkGCSqGSIb3DQEJDjE8MDowDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAJBgNVHRMEAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQBtB8RrIWNYhNO0mC4jO2rUfNoYjX9HvK2XdUwXRIFKqHzPhJsTUCXUdsFd+8g0xEnbGAH/sYKRT9a25LleDaB6o6D2hPEc5khEAm740dmZ6v95Hz+zNxMYv4IkwK95q7w1qRlWE+YzJyqhy4IavYRSgyd0yaumiDFbLkXqlb29wciWGD4Oi9MvLNXBcbvykopDUSSBf85i6NeA6s6TeiWaskesQq4BA7WaiLhpfw3/v/1+bFLyxc5L+FbuNNkvOhFaOv+0wMKr1zmt+KmQT2Jy1kilNkEv9g4DgVH7DJlmjTwUsiTwkB58PIEaoaMPST+ZHROReMAJEM/BpUJPCnsB","cancellation_requested":true,"status":"inProgress","status_details":"Pending - certificate created. Certificate request is in progress. This may take some - time based on the issuer provider. Please check again later.","request_id":"dd6fd01b95df416d9c0b4b4942a3e66d"}' - headers: - cache-control: - - no-cache - content-length: - - '1313' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 06 Mar 2020 00:07:45 GMT - expires: - - '-1' - pragma: - - no-cache - retry-after: - - '10' - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.897 - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/pending?api-version=7.1-preview - response: - body: - string: '{"id":"https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/pending","issuer":{"name":"Self"},"csr":"MIICqDCCAZACAQAwGDEWMBQGA1UEAxMNRGVmYXVsdFBvbGljeTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALrLFtzOxre8e7FEYfzGucf/9i4O7DAikLwYdAvVPdn8eO7G26OpIgtF+8eq/+asQgD8G54f1hhbQj0TosKqEQ42DkyPOIx+xLdLCt0uOlsiqXc1IJZtehTLS4dmJduCMg7+5YfpXQHxVLK6uSRdnLdpIQRedthgXGfvKJ2Zr/h4KV5aAZN0zzyuRl4EF4sswOzgc/Mtrob1ni2pwiklwbrTEzEHY9k7mVtviegFEAXOsjgnsQO1S/PwHmHTMe6+VfRn1/Z4AaZLVEgrf+AatRkf+21Lo3xJnmlkMESv4FnK7GQ+rkB7rLzOJy+EybF1oZYimk7XmqVjn6rNq1wbymcCAwEAAaBLMEkGCSqGSIb3DQEJDjE8MDowDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAJBgNVHRMEAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQBtB8RrIWNYhNO0mC4jO2rUfNoYjX9HvK2XdUwXRIFKqHzPhJsTUCXUdsFd+8g0xEnbGAH/sYKRT9a25LleDaB6o6D2hPEc5khEAm740dmZ6v95Hz+zNxMYv4IkwK95q7w1qRlWE+YzJyqhy4IavYRSgyd0yaumiDFbLkXqlb29wciWGD4Oi9MvLNXBcbvykopDUSSBf85i6NeA6s6TeiWaskesQq4BA7WaiLhpfw3/v/1+bFLyxc5L+FbuNNkvOhFaOv+0wMKr1zmt+KmQT2Jy1kilNkEv9g4DgVH7DJlmjTwUsiTwkB58PIEaoaMPST+ZHROReMAJEM/BpUJPCnsB","cancellation_requested":true,"status":"cancelled","request_id":"dd6fd01b95df416d9c0b4b4942a3e66d"}' - headers: - cache-control: - - no-cache - content-length: - - '1148' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 06 Mar 2020 00:07:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.897 - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/pending?api-version=7.1-preview - response: - body: - string: '{"id":"https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/pending","issuer":{"name":"Self"},"csr":"MIICqDCCAZACAQAwGDEWMBQGA1UEAxMNRGVmYXVsdFBvbGljeTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALrLFtzOxre8e7FEYfzGucf/9i4O7DAikLwYdAvVPdn8eO7G26OpIgtF+8eq/+asQgD8G54f1hhbQj0TosKqEQ42DkyPOIx+xLdLCt0uOlsiqXc1IJZtehTLS4dmJduCMg7+5YfpXQHxVLK6uSRdnLdpIQRedthgXGfvKJ2Zr/h4KV5aAZN0zzyuRl4EF4sswOzgc/Mtrob1ni2pwiklwbrTEzEHY9k7mVtviegFEAXOsjgnsQO1S/PwHmHTMe6+VfRn1/Z4AaZLVEgrf+AatRkf+21Lo3xJnmlkMESv4FnK7GQ+rkB7rLzOJy+EybF1oZYimk7XmqVjn6rNq1wbymcCAwEAAaBLMEkGCSqGSIb3DQEJDjE8MDowDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAJBgNVHRMEAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQBtB8RrIWNYhNO0mC4jO2rUfNoYjX9HvK2XdUwXRIFKqHzPhJsTUCXUdsFd+8g0xEnbGAH/sYKRT9a25LleDaB6o6D2hPEc5khEAm740dmZ6v95Hz+zNxMYv4IkwK95q7w1qRlWE+YzJyqhy4IavYRSgyd0yaumiDFbLkXqlb29wciWGD4Oi9MvLNXBcbvykopDUSSBf85i6NeA6s6TeiWaskesQq4BA7WaiLhpfw3/v/1+bFLyxc5L+FbuNNkvOhFaOv+0wMKr1zmt+KmQT2Jy1kilNkEv9g4DgVH7DJlmjTwUsiTwkB58PIEaoaMPST+ZHROReMAJEM/BpUJPCnsB","cancellation_requested":true,"status":"cancelled","request_id":"dd6fd01b95df416d9c0b4b4942a3e66d"}' - headers: - cache-control: - - no-cache - content-length: - - '1148' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 06 Mar 2020 00:07:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.897 - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) - method: DELETE - uri: https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/pending?api-version=7.1-preview - response: - body: - string: '{"id":"https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/pending","issuer":{"name":"Self"},"csr":"MIICqDCCAZACAQAwGDEWMBQGA1UEAxMNRGVmYXVsdFBvbGljeTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALrLFtzOxre8e7FEYfzGucf/9i4O7DAikLwYdAvVPdn8eO7G26OpIgtF+8eq/+asQgD8G54f1hhbQj0TosKqEQ42DkyPOIx+xLdLCt0uOlsiqXc1IJZtehTLS4dmJduCMg7+5YfpXQHxVLK6uSRdnLdpIQRedthgXGfvKJ2Zr/h4KV5aAZN0zzyuRl4EF4sswOzgc/Mtrob1ni2pwiklwbrTEzEHY9k7mVtviegFEAXOsjgnsQO1S/PwHmHTMe6+VfRn1/Z4AaZLVEgrf+AatRkf+21Lo3xJnmlkMESv4FnK7GQ+rkB7rLzOJy+EybF1oZYimk7XmqVjn6rNq1wbymcCAwEAAaBLMEkGCSqGSIb3DQEJDjE8MDowDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAJBgNVHRMEAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQBtB8RrIWNYhNO0mC4jO2rUfNoYjX9HvK2XdUwXRIFKqHzPhJsTUCXUdsFd+8g0xEnbGAH/sYKRT9a25LleDaB6o6D2hPEc5khEAm740dmZ6v95Hz+zNxMYv4IkwK95q7w1qRlWE+YzJyqhy4IavYRSgyd0yaumiDFbLkXqlb29wciWGD4Oi9MvLNXBcbvykopDUSSBf85i6NeA6s6TeiWaskesQq4BA7WaiLhpfw3/v/1+bFLyxc5L+FbuNNkvOhFaOv+0wMKr1zmt+KmQT2Jy1kilNkEv9g4DgVH7DJlmjTwUsiTwkB58PIEaoaMPST+ZHROReMAJEM/BpUJPCnsB","cancellation_requested":true,"status":"cancelled","request_id":"dd6fd01b95df416d9c0b4b4942a3e66d"}' - headers: - cache-control: - - no-cache - content-length: - - '1148' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 06 Mar 2020 00:07:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.897 - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/pending?api-version=7.1-preview - response: - body: - string: '{"error":{"code":"PendingCertificateNotFound","message":"Pending certificate - not found: asyncCanceledDeletedCert"}}' - headers: - cache-control: - - no-cache - content-length: - - '115' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 06 Mar 2020 00:07:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.897 - x-powered-by: - - ASP.NET - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) - method: DELETE - uri: https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert?api-version=7.1-preview - response: - body: - string: '{"recoveryId":"https://vaultname.vault.azure.net/deletedcertificates/asyncCanceledDeletedCert","deletedDate":1583453275,"scheduledPurgeDate":1591229275,"id":"https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/f84d4b4ea5924465a95c758f8d824464","attributes":{"enabled":false,"nbf":1583452654,"exp":1614989254,"created":1583453254,"updated":1583453254,"recoveryLevel":"Recoverable+Purgeable"},"policy":{"id":"https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"CN=DefaultPolicy","sans":{},"ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1583453254,"updated":1583453254}}}' - headers: - cache-control: - - no-cache - content-length: - - '1087' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 06 Mar 2020 00:07:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.897 - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://vaultname.vault.azure.net/deletedcertificates/asyncCanceledDeletedCert?api-version=7.1-preview - response: - body: - string: '{"error":{"code":"CertificateNotFound","message":"Deleted Certificate - not found: asyncCanceledDeletedCert"}}' - headers: - cache-control: - - no-cache - content-length: - - '108' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 06 Mar 2020 00:07:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.897 - x-powered-by: - - ASP.NET - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://vaultname.vault.azure.net/deletedcertificates/asyncCanceledDeletedCert?api-version=7.1-preview - response: - body: - string: '{"error":{"code":"CertificateNotFound","message":"Deleted Certificate - not found: asyncCanceledDeletedCert"}}' - headers: - cache-control: - - no-cache - content-length: - - '108' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 06 Mar 2020 00:07:57 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.897 - x-powered-by: - - ASP.NET - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://vaultname.vault.azure.net/deletedcertificates/asyncCanceledDeletedCert?api-version=7.1-preview - response: - body: - string: '{"error":{"code":"CertificateNotFound","message":"Deleted Certificate - not found: asyncCanceledDeletedCert"}}' - headers: - cache-control: - - no-cache - content-length: - - '108' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 06 Mar 2020 00:07:59 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.897 - x-powered-by: - - ASP.NET - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://vaultname.vault.azure.net/deletedcertificates/asyncCanceledDeletedCert?api-version=7.1-preview - response: - body: - string: '{"error":{"code":"CertificateNotFound","message":"Deleted Certificate - not found: asyncCanceledDeletedCert"}}' - headers: - cache-control: - - no-cache - content-length: - - '108' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 06 Mar 2020 00:08:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.897 - x-powered-by: - - ASP.NET - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://vaultname.vault.azure.net/deletedcertificates/asyncCanceledDeletedCert?api-version=7.1-preview - response: - body: - string: '{"error":{"code":"CertificateNotFound","message":"Deleted Certificate - not found: asyncCanceledDeletedCert"}}' - headers: - cache-control: - - no-cache - content-length: - - '108' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 06 Mar 2020 00:08:03 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.897 - x-powered-by: - - ASP.NET - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://vaultname.vault.azure.net/deletedcertificates/asyncCanceledDeletedCert?api-version=7.1-preview - response: - body: - string: '{"error":{"code":"CertificateNotFound","message":"Deleted Certificate - not found: asyncCanceledDeletedCert"}}' - headers: - cache-control: - - no-cache - content-length: - - '108' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 06 Mar 2020 00:08:05 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.897 - x-powered-by: - - ASP.NET - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://vaultname.vault.azure.net/deletedcertificates/asyncCanceledDeletedCert?api-version=7.1-preview - response: - body: - string: '{"error":{"code":"CertificateNotFound","message":"Deleted Certificate - not found: asyncCanceledDeletedCert"}}' - headers: - cache-control: - - no-cache - content-length: - - '108' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 06 Mar 2020 00:08:07 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.897 - x-powered-by: - - ASP.NET - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://vaultname.vault.azure.net/deletedcertificates/asyncCanceledDeletedCert?api-version=7.1-preview - response: - body: - string: '{"error":{"code":"CertificateNotFound","message":"Deleted Certificate - not found: asyncCanceledDeletedCert"}}' - headers: - cache-control: - - no-cache - content-length: - - '108' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 06 Mar 2020 00:08:10 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.897 - x-powered-by: - - ASP.NET - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://vaultname.vault.azure.net/deletedcertificates/asyncCanceledDeletedCert?api-version=7.1-preview - response: - body: - string: '{"error":{"code":"CertificateNotFound","message":"Deleted Certificate - not found: asyncCanceledDeletedCert"}}' - headers: - cache-control: - - no-cache - content-length: - - '108' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 06 Mar 2020 00:08:12 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.897 - x-powered-by: - - ASP.NET - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://vaultname.vault.azure.net/deletedcertificates/asyncCanceledDeletedCert?api-version=7.1-preview - response: - body: - string: '{"recoveryId":"https://vaultname.vault.azure.net/deletedcertificates/asyncCanceledDeletedCert","deletedDate":1583453275,"scheduledPurgeDate":1591229275,"id":"https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/f84d4b4ea5924465a95c758f8d824464","attributes":{"enabled":false,"nbf":1583452654,"exp":1614989254,"created":1583453254,"updated":1583453254,"recoveryLevel":"Recoverable+Purgeable"},"policy":{"id":"https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"CN=DefaultPolicy","sans":{},"ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1583453254,"updated":1583453254}}}' - headers: - cache-control: - - no-cache - content-length: - - '1087' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 06 Mar 2020 00:08:14 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.897 - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client.test_import_certificate_not_password_encoded_no_policy.yaml b/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client.test_import_certificate_not_password_encoded_no_policy.yaml new file mode 100644 index 000000000000..613fbc8f27bb --- /dev/null +++ b/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client.test_import_certificate_not_password_encoded_no_policy.yaml @@ -0,0 +1,106 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - azsdk-python-keyvault-certificates/4.2.0b2 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://vaultname.vault.azure.net/certificates/importNotPasswordEncodedCertificate/import?api-version=7.1-preview + response: + body: + string: '{"error":{"code":"Unauthorized","message":"Request is missing a Bearer + or PoP token."}}' + headers: + cache-control: + - no-cache + content-length: + - '87' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 01 Jul 2020 17:49:14 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000;includeSubDomains + www-authenticate: + - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=73.135.72.237;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.6.0 + x-powered-by: + - ASP.NET + status: + code: 401 + message: Unauthorized +- request: + body: '{"value": "MIIKNAIBAzCCCfQGCSqGSIb3DQEHAaCCCeUEggnhMIIJ3TCCBhYGCSqGSIb3DQEHAaCCBgcEggYDMIIF/zCCBfsGCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAgfpTPTGedBYwICB9AEggTY6aSetgYrhYJQddKxpbxcnXHYu30CQ+jxUQFy83sskgTpq5dBTQvXUl8NN68pfuP4jaTcwaMSoAoZaQh3mwzQjgH3+rkMHUBSll+SSD2Cm9uv5dBmbtqCJMhmCmaWPkH0DKHe03Jq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sOqKkuTls/0vM8clPolr5UwJETwafGI9mP07AQZMt/F9Doixue7gmsbAhjRcWqrsz9AlyixhnFX1Z9bzeStaxZratMset9s/ZYmf8/7NLRy35DzQDLdXXASxDlop+Gp0TCxomN3aaH7bZkeuyrjqaYqG5SwwdgsT/94nlpxV+cgKT+GBDVey11muOHwTm13IKMg9fHR9IeqG0SyJoyT+Qi2aYbO92V42EHyekeJ/p4q0BzmI6K01UulVfUUzBgD+xGD+SGXaYXA35zehvSr5/4JI0RDJKDYXm8aKtZtadHbNOCiJS+CqVYS9LCnNqhO0Au24YdGOd9MLL5ywyK7gQmTwZNxNGOVjmEVfFEVGRGEzHDlgdBFx9fiSQJoiHthSxFp1vPD3YKMpmerjIbKsursQlF0rh+9bXci5Hy4efj/UEaIoLFPCM49nbOXY9SMGIJ3yVh4S2rGyAnJmDggMzeZg6+X82Ge1A/ETb+/BvOSz1ivWF1MpAgunhITYmkaRHCBTbI/KaVdeYUBwKurbJRI96Tc89MY3wx5vsQQx0xKDBODKp20T/4ajvFKwvzjj4P2hxwmYa+w6h0XKSIP5Czo3F2aKUG8WG2JRiOcWMyBMfAPmncj0m8sILch2rZ/wVle9IBDvCRf8v4ojf70ZyWrVOXF7DzRrTGwygvxIjf801AbsTYONAlaHEMrqu/keb/1G5w7ZqrBINeLyH39ZGlNMlusTS2jdtRQi0E+JhImOEwS3N3rAxjQJIQHEGWszlnbGpsNtRjethpdB7tWl36DJPOl80ik2X4sQJiuSC1xVcS9eeBc/kkK/TuE95RAkNxFXjj2L4mpCxrMFWphxXHhoKwQFH7u/ahMb8dWyzsFmDFwg8vCo+f62b6889Xne1E9N+MiMN7iXP2sjArokr/eL2tmjkv7sJ4P87Ce7gbKQ6Kb+OGeyVuLn6MlcmFW/oaMDcwHzAHBgUrDgMCGgQUwuuUC2zGcTM2jIv7h6JODqQAES4EFFIp13hoej1shCzMB6bv12mw6RNv"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '3501' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - azsdk-python-keyvault-certificates/4.2.0b2 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://vaultname.vault.azure.net/certificates/importNotPasswordEncodedCertificate/import?api-version=7.1-preview + response: + body: + string: '{"id":"https://vaultname.vault.azure.net/certificates/importNotPasswordEncodedCertificate/d8485cf22a714ca2a9073701a7da2167","kid":"https://vaultname.vault.azure.net/keys/importNotPasswordEncodedCertificate/d8485cf22a714ca2a9073701a7da2167","sid":"https://vaultname.vault.azure.net/secrets/importNotPasswordEncodedCertificate/d8485cf22a714ca2a9073701a7da2167","x5t":"Yj07xp_eOJMn7HPlahwQbKs9Eg8","cer":"MIIDKDCCAhCgAwIBAgIQfDvNAzhSSh6HHUDV89pfITANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNjI1MTMwMDMzWhcNMjEwNjI1MTMxMDMzWjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQChubMEV/8RtgjNYGw8CMGo6p9VssZjWulzHfnjVcemZ96eYegXh74fIDTdh+J9CK5oHd/qU4IGKR5lRkiEMw7mdPv4FUWRmd1KG1CR9MTShnjL9kaIFv5zYSy9oQZL/wWR4pX3wXV53tD6P42higSrad7wAFV2GanDDBEMNXm7x5o0bvwzNRUMobW9SnYy2wmTIFjQNyHovDWuXLaafMfv4yl59dv1mw6GJkOG6wyHPOEx8auoyQFRU5C3aTzS8gG0AJMW7uwwjSz/sh5sr5pqNu99GOx1ZVANySwKU+Lgjp0P6AKg1uluicsZc/aIFV7ulp+9raz/MXVmTfMOiobbAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBTjkI1VhBb9cYdl70SJH8tdOV847DAdBgNVHQ4EFgQU45CNVYQW/XGHZe9EiR/LXTlfOOwwDQYJKoZIhvcNAQELBQADggEBAGafeWghsVmVEo6/QGgBRW/hhVWq4MEfW5YOLwmNObpJL3/OEKhUDw9u9to1kWcos/aRj4u+bz3vTqIJxK+i0dEBIo///mkxJhtLLGd6Ks6rXlGgEOG1+m8GvZkUsLOaZsPAFYAgnF091iS7PcNW5VYqvpFvIWgIEVwhE0dBGCUogoBatYZyc+YqWCqbzv8mhui3NgToGoiLW1dFxXbeyeGGee5yyroSDE+6jTbMCzrdX/2fK41J2lOL3Ap/IYtHltCTKIOmlToq6uG2qSyeYGLL63bYo+4ZvpHyjN/5QYQQXS4WMyPw5o9+jcIyONNOEbJoiFUTwsm55A0diDisDlk=","attributes":{"enabled":true,"nbf":1593090033,"exp":1624626633,"created":1593625755,"updated":1593625755,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"policy":{"id":"https://vaultname.vault.azure.net/certificates/importNotPasswordEncodedCertificate/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"CN=MyCert","ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":13,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"EmailContacts"}}],"issuer":{"name":"Unknown"},"attributes":{"enabled":true,"created":1593625755,"updated":1593625755}}}' + headers: + cache-control: + - no-cache + content-length: + - '2347' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 01 Jul 2020 17:49:15 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000;includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=73.135.72.237;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.6.0 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client.test_import_certificate_no_policy.yaml b/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client.test_import_certificate_password_encoded_no_policy.yaml similarity index 72% rename from sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client.test_import_certificate_no_policy.yaml rename to sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client.test_import_certificate_password_encoded_no_policy.yaml index e9807877fa48..ba647d2d7b34 100644 --- a/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client.test_import_certificate_no_policy.yaml +++ b/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client.test_import_certificate_password_encoded_no_policy.yaml @@ -15,7 +15,7 @@ interactions: User-Agent: - azsdk-python-keyvault-certificates/4.2.0b2 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) method: POST - uri: https://vaultname.vault.azure.net/certificates/importCertificate/import?api-version=7.1-preview + uri: https://vaultname.vault.azure.net/certificates/importPasswordEncodedCertificate/import?api-version=7.1-preview response: body: string: '{"error":{"code":"Unauthorized","message":"Request is missing a Bearer @@ -28,7 +28,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 30 Jun 2020 21:34:25 GMT + - Wed, 01 Jul 2020 17:49:14 GMT expires: - '-1' pragma: @@ -70,19 +70,19 @@ interactions: User-Agent: - azsdk-python-keyvault-certificates/4.2.0b2 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) method: POST - uri: https://vaultname.vault.azure.net/certificates/importCertificate/import?api-version=7.1-preview + uri: https://vaultname.vault.azure.net/certificates/importPasswordEncodedCertificate/import?api-version=7.1-preview response: body: - string: '{"id":"https://vaultname.vault.azure.net/certificates/importCertificate/89284eafcce24f0fb05a617e5cb3ea57","kid":"https://vaultname.vault.azure.net/keys/importCertificate/89284eafcce24f0fb05a617e5cb3ea57","sid":"https://vaultname.vault.azure.net/secrets/importCertificate/89284eafcce24f0fb05a617e5cb3ea57","x5t":"fLi3U52HunIVNXubkEnf8tP6Wbo","cer":"MIICODCCAeagAwIBAgIQqHmpBAv+CY9IJFoUhlbziTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5MB4XDTE1MDQyOTIxNTM0MVoXDTM5MTIzMTIzNTk1OVowFzEVMBMGA1UEAxMMS2V5VmF1bHRUZXN0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5bVAT73zr4+N4WVv2+SvTunAw08ksS4BrJW/nNliz3S9XuzMBMXvmYzU5HJ8TtEgluBiZZYd5qsMJD+OXHSNbsLdmMhni0jYX09h3XlC2VJw2sGKeYF+xEaavXm337aZZaZyjrFBrrUl51UePaN+kVFXNlBb3N3TYpqa7KokXenJQuR+i9Gv9a77c0UsSsDSryxppYhKK7HvTZCpKrhVtulF5iPMswWe9np3uggfMamyIsK/0L7X9w9B2qN7993RR0A00nOk4H6CnkuwO77dSsD0KJsk6FyAoZBzRXDZh9+d9R76zCL506NcQy/jl0lCiQYwsUX73PG5pxOh02OwKwIDAQABo0swSTBHBgNVHQEEQDA+gBAS5AktBh0dTwCNYSHcFmRjoRgwFjEUMBIGA1UEAxMLUm9vdCBBZ2VuY3mCEAY3bACqAGSKEc+41KpcNfQwCQYFKw4DAh0FAANBAGqIjo2geVagzuzaZOe1ClGKhZeiCKfWAxklaGN+qlGUbVS4IN4V1lot3VKnzabasmkEHeNxPwLn1qvSD0cX9CE=","attributes":{"enabled":true,"nbf":1430344421,"exp":2208988799,"created":1593552866,"updated":1593552866,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"policy":{"id":"https://vaultname.vault.azure.net/certificates/importCertificate/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"CN=KeyVaultTest","ekus":[],"key_usage":[],"validity_months":297,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"EmailContacts"}}],"issuer":{"name":"Unknown"},"attributes":{"enabled":true,"created":1593552866,"updated":1593552866}}}' + string: '{"id":"https://vaultname.vault.azure.net/certificates/importPasswordEncodedCertificate/63dd491171b64912828d982dbba797fd","kid":"https://vaultname.vault.azure.net/keys/importPasswordEncodedCertificate/63dd491171b64912828d982dbba797fd","sid":"https://vaultname.vault.azure.net/secrets/importPasswordEncodedCertificate/63dd491171b64912828d982dbba797fd","x5t":"fLi3U52HunIVNXubkEnf8tP6Wbo","cer":"MIICODCCAeagAwIBAgIQqHmpBAv+CY9IJFoUhlbziTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5MB4XDTE1MDQyOTIxNTM0MVoXDTM5MTIzMTIzNTk1OVowFzEVMBMGA1UEAxMMS2V5VmF1bHRUZXN0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5bVAT73zr4+N4WVv2+SvTunAw08ksS4BrJW/nNliz3S9XuzMBMXvmYzU5HJ8TtEgluBiZZYd5qsMJD+OXHSNbsLdmMhni0jYX09h3XlC2VJw2sGKeYF+xEaavXm337aZZaZyjrFBrrUl51UePaN+kVFXNlBb3N3TYpqa7KokXenJQuR+i9Gv9a77c0UsSsDSryxppYhKK7HvTZCpKrhVtulF5iPMswWe9np3uggfMamyIsK/0L7X9w9B2qN7993RR0A00nOk4H6CnkuwO77dSsD0KJsk6FyAoZBzRXDZh9+d9R76zCL506NcQy/jl0lCiQYwsUX73PG5pxOh02OwKwIDAQABo0swSTBHBgNVHQEEQDA+gBAS5AktBh0dTwCNYSHcFmRjoRgwFjEUMBIGA1UEAxMLUm9vdCBBZ2VuY3mCEAY3bACqAGSKEc+41KpcNfQwCQYFKw4DAh0FAANBAGqIjo2geVagzuzaZOe1ClGKhZeiCKfWAxklaGN+qlGUbVS4IN4V1lot3VKnzabasmkEHeNxPwLn1qvSD0cX9CE=","attributes":{"enabled":true,"nbf":1430344421,"exp":2208988799,"created":1593625755,"updated":1593625755,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"policy":{"id":"https://vaultname.vault.azure.net/certificates/importPasswordEncodedCertificate/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"CN=KeyVaultTest","ekus":[],"key_usage":[],"validity_months":297,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"EmailContacts"}}],"issuer":{"name":"Unknown"},"attributes":{"enabled":true,"created":1593625755,"updated":1593625755}}}' headers: cache-control: - no-cache content-length: - - '1887' + - '1947' content-type: - application/json; charset=utf-8 date: - - Tue, 30 Jun 2020 21:34:26 GMT + - Wed, 01 Jul 2020 17:49:15 GMT expires: - '-1' pragma: diff --git a/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client_async.test_import_certificate_not_password_encoded_no_policy.yaml b/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client_async.test_import_certificate_not_password_encoded_no_policy.yaml new file mode 100644 index 000000000000..117462118d97 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client_async.test_import_certificate_not_password_encoded_no_policy.yaml @@ -0,0 +1,73 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - azsdk-python-keyvault-certificates/4.2.0b2 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://vaultname.vault.azure.net/certificates/importNotPasswordEncodedCertificate/import?api-version=7.1-preview + response: + body: + string: '{"error":{"code":"Unauthorized","message":"Request is missing a Bearer + or PoP token."}}' + headers: + cache-control: no-cache + content-length: '87' + content-type: application/json; charset=utf-8 + date: Wed, 01 Jul 2020 17:49:14 GMT + expires: '-1' + pragma: no-cache + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: conn_type=Ipv4;addr=73.135.72.237;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.6.0 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: https://z6pswuijhxm55dd3mmkrqou7.vault.azure.net/certificates/importNotPasswordEncodedCertificate/import?api-version=7.1-preview +- request: + body: '{"value": "MIIKNAIBAzCCCfQGCSqGSIb3DQEHAaCCCeUEggnhMIIJ3TCCBhYGCSqGSIb3DQEHAaCCBgcEggYDMIIF/zCCBfsGCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAgfpTPTGedBYwICB9AEggTY6aSetgYrhYJQddKxpbxcnXHYu30CQ+jxUQFy83sskgTpq5dBTQvXUl8NN68pfuP4jaTcwaMSoAoZaQh3mwzQjgH3+rkMHUBSll+SSD2Cm9uv5dBmbtqCJMhmCmaWPkH0DKHe03JqhbzcVzNjnRM3F4ABsmbMRmYUvfm+v+GeRueucd6MqZSJSTK0rFm00QI/zuD5neeK8PGNwNWNkelQzenUWACqzUkJLe1ly1Q//YuhrGkwc3coG7GDM59pgjo5tC8gSAdi0/Uty1NgghAL0Y+4Sc4vFKIwaafvuD3iWhU/eqkbwmsOdPEYFgfYmv3q6bJGcZYEcssWs3b9rLUqB3Mxl8nh+UkY4vB7zqa6L834P9IqjLNm6JloqBMDr3MspUGzYpwjt6EbMnfNYNKVDc2GinH7P/pPvp3pQp6AocK1XK349GkKyIBqjBriC2WxRrN7S2rtCbmz8hX500U8N+H7jYjHnIEjbBkHpQXd2/jDHP+nlJzIXXR+jiQvcRBgZ8GhUep8c9eqnw+cI09nE5XafQDE8cBTuHGa3VT/VVl+B4HDXV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M49nbOXY9SMGIJ3yVh4S2rGyAnJmDggMzeZg6+X82Ge1A/ETb+/BvOSz1ivWF1MpAgunhITYmkaRHCBTbI/KaVdeYUBwKurbJRI96Tc89MY3wx5vsQQx0xKDBODKp20T/4ajvFKwvzjj4P2hxwmYa+w6h0XKSIP5Czo3F2aKUG8WG2JRiOcWMyBMfAPmncj0m8sILch2rZ/wVle9IBDvCRf8v4ojf70ZyWrVOXF7DzRrTGwygvxIjf801AbsTYONAlaHEMrqu/keb/1G5w7ZqrBINeLyH39ZGlNMlusTS2jdtRQi0E+JhImOEwS3N3rAxjQJIQHEGWszlnbGpsNtRjethpdB7tWl36DJPOl80ik2X4sQJiuSC1xVcS9eeBc/kkK/TuE95RAkNxFXjj2L4mpCxrMFWphxXHhoKwQFH7u/ahMb8dWyzsFmDFwg8vCo+f62b6889Xne1E9N+MiMN7iXP2sjArokr/eL2tmjkv7sJ4P87Ce7gbKQ6Kb+OGeyVuLn6MlcmFW/oaMDcwHzAHBgUrDgMCGgQUwuuUC2zGcTM2jIv7h6JODqQAES4EFFIp13hoej1shCzMB6bv12mw6RNv"}' + headers: + Accept: + - application/json + Content-Length: + - '3501' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - azsdk-python-keyvault-certificates/4.2.0b2 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://vaultname.vault.azure.net/certificates/importNotPasswordEncodedCertificate/import?api-version=7.1-preview + response: + body: + string: '{"id":"https://vaultname.vault.azure.net/certificates/importNotPasswordEncodedCertificate/0dcacfd984bd48da85d9594be0696615","kid":"https://vaultname.vault.azure.net/keys/importNotPasswordEncodedCertificate/0dcacfd984bd48da85d9594be0696615","sid":"https://vaultname.vault.azure.net/secrets/importNotPasswordEncodedCertificate/0dcacfd984bd48da85d9594be0696615","x5t":"Yj07xp_eOJMn7HPlahwQbKs9Eg8","cer":"MIIDKDCCAhCgAwIBAgIQfDvNAzhSSh6HHUDV89pfITANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZNeUNlcnQwHhcNMjAwNjI1MTMwMDMzWhcNMjEwNjI1MTMxMDMzWjARMQ8wDQYDVQQDEwZNeUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQChubMEV/8RtgjNYGw8CMGo6p9VssZjWulzHfnjVcemZ96eYegXh74fIDTdh+J9CK5oHd/qU4IGKR5lRkiEMw7mdPv4FUWRmd1KG1CR9MTShnjL9kaIFv5zYSy9oQZL/wWR4pX3wXV53tD6P42higSrad7wAFV2GanDDBEMNXm7x5o0bvwzNRUMobW9SnYy2wmTIFjQNyHovDWuXLaafMfv4yl59dv1mw6GJkOG6wyHPOEx8auoyQFRU5C3aTzS8gG0AJMW7uwwjSz/sh5sr5pqNu99GOx1ZVANySwKU+Lgjp0P6AKg1uluicsZc/aIFV7ulp+9raz/MXVmTfMOiobbAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBTjkI1VhBb9cYdl70SJH8tdOV847DAdBgNVHQ4EFgQU45CNVYQW/XGHZe9EiR/LXTlfOOwwDQYJKoZIhvcNAQELBQADggEBAGafeWghsVmVEo6/QGgBRW/hhVWq4MEfW5YOLwmNObpJL3/OEKhUDw9u9to1kWcos/aRj4u+bz3vTqIJxK+i0dEBIo///mkxJhtLLGd6Ks6rXlGgEOG1+m8GvZkUsLOaZsPAFYAgnF091iS7PcNW5VYqvpFvIWgIEVwhE0dBGCUogoBatYZyc+YqWCqbzv8mhui3NgToGoiLW1dFxXbeyeGGee5yyroSDE+6jTbMCzrdX/2fK41J2lOL3Ap/IYtHltCTKIOmlToq6uG2qSyeYGLL63bYo+4ZvpHyjN/5QYQQXS4WMyPw5o9+jcIyONNOEbJoiFUTwsm55A0diDisDlk=","attributes":{"enabled":true,"nbf":1593090033,"exp":1624626633,"created":1593625755,"updated":1593625755,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"policy":{"id":"https://vaultname.vault.azure.net/certificates/importNotPasswordEncodedCertificate/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"CN=MyCert","ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":13,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"EmailContacts"}}],"issuer":{"name":"Unknown"},"attributes":{"enabled":true,"created":1593625755,"updated":1593625755}}}' + headers: + cache-control: no-cache + content-length: '2347' + content-type: application/json; charset=utf-8 + date: Wed, 01 Jul 2020 17:49:16 GMT + expires: '-1' + pragma: no-cache + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: conn_type=Ipv4;addr=73.135.72.237;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.6.0 + x-powered-by: ASP.NET + status: + code: 200 + message: OK + url: https://z6pswuijhxm55dd3mmkrqou7.vault.azure.net/certificates/importNotPasswordEncodedCertificate/import?api-version=7.1-preview +version: 1 diff --git a/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client_async.test_import_certificate_password_encoded_no_policy.yaml b/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client_async.test_import_certificate_password_encoded_no_policy.yaml new file mode 100644 index 000000000000..0874cbd5e665 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client_async.test_import_certificate_password_encoded_no_policy.yaml @@ -0,0 +1,74 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - azsdk-python-keyvault-certificates/4.2.0b2 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://vaultname.vault.azure.net/certificates/importPasswordEncodedCertificate/import?api-version=7.1-preview + response: + body: + string: '{"error":{"code":"Unauthorized","message":"Request is missing a Bearer + or PoP token."}}' + headers: + cache-control: no-cache + content-length: '87' + content-type: application/json; charset=utf-8 + date: Wed, 01 Jul 2020 17:49:14 GMT + expires: '-1' + pragma: no-cache + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: conn_type=Ipv4;addr=73.135.72.237;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.6.0 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: https://lvzthr4gkgv6y7yc4n2s2xzr.vault.azure.net/certificates/importPasswordEncodedCertificate/import?api-version=7.1-preview +- request: + body: '{"value": "MIIJOwIBAzCCCPcGCSqGSIb3DQEHAaCCCOgEggjkMIII4DCCBgkGCSqGSIb3DQEHAaCCBfoEggX2MIIF8jCCBe4GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAj15YH9pOE58AICB9AEggTYLrI+SAru2dBZRQRlJY7XQ3LeLkah2FcRR3dATDshZ2h0IA2oBrkQIdsLyAAWZ32qYR1qkWxLHn9AqXgu27AEbOk35+pITZaiy63YYBkkpR+pDdngZt19Z0PWrGwHEq5z6BHS2GLyyN8SSOCbdzCz7blj3+7IZYoMj4WOPgOm/tQ6U44SFWek46QwN2zeA4i97v7ftNNns27ms52jqfhOvTA9c/wyfZKAY4aKJfYYUmycKjnnRl012ldS2lOkASFt+lu4QCa72IY6ePtRudPCvmzRv2pkLYS6z3cI7omT8nHP3DymNOqLbFqr5O2M1ZYaLC63Q3xt3eVvbcPh3N08D1hHkhz/KDTvkRAQpvrW8ISKmgDdmzN55Pe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UbfVMbXNHOF+MktWiDVqzndGMKmuJSdfTBKvGFvejAWVO5E4mgLvoaMmbchc3BO7sLeraHnJN5hvMBaLcQI38N86mUfTR8AP6AJ9c2k514KaDLclm4z6J8dMz60nUeo5D3YD09G6BavFHxSvJ8MF0Lu5zOFzEePDRFm9mH8W0N/sFlIaYfD/GWU/w44mQucjaBk95YtqOGRIj58tGDWr8iUdHwaYKGqU24zGeRae9DhFXPzZshV1ZGsBQFRaoYkyLAwdJWIXTi+c37YaC8FRSEnnNmS79Dou1Kc3BvK4EYKAD2KxjtUebrV174gD0Q+9YuJ0GXOTspBvCFd5VT2Rw5zDNrA/J3F5fMCk4wOzAfMAcGBSsOAwIaBBSxgh2xyF+88V4vAffBmZXv8Txt4AQU4O/NX4MjxSodbE7ApNAMIvrtREwCAgfQ", + "pwd": "123"}' + headers: + Accept: + - application/json + Content-Length: + - '3183' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - azsdk-python-keyvault-certificates/4.2.0b2 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) + method: POST + uri: https://vaultname.vault.azure.net/certificates/importPasswordEncodedCertificate/import?api-version=7.1-preview + response: + body: + string: '{"id":"https://vaultname.vault.azure.net/certificates/importPasswordEncodedCertificate/2f4fba39663a4b6ab46538bc03270e6b","kid":"https://vaultname.vault.azure.net/keys/importPasswordEncodedCertificate/2f4fba39663a4b6ab46538bc03270e6b","sid":"https://vaultname.vault.azure.net/secrets/importPasswordEncodedCertificate/2f4fba39663a4b6ab46538bc03270e6b","x5t":"fLi3U52HunIVNXubkEnf8tP6Wbo","cer":"MIICODCCAeagAwIBAgIQqHmpBAv+CY9IJFoUhlbziTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5MB4XDTE1MDQyOTIxNTM0MVoXDTM5MTIzMTIzNTk1OVowFzEVMBMGA1UEAxMMS2V5VmF1bHRUZXN0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5bVAT73zr4+N4WVv2+SvTunAw08ksS4BrJW/nNliz3S9XuzMBMXvmYzU5HJ8TtEgluBiZZYd5qsMJD+OXHSNbsLdmMhni0jYX09h3XlC2VJw2sGKeYF+xEaavXm337aZZaZyjrFBrrUl51UePaN+kVFXNlBb3N3TYpqa7KokXenJQuR+i9Gv9a77c0UsSsDSryxppYhKK7HvTZCpKrhVtulF5iPMswWe9np3uggfMamyIsK/0L7X9w9B2qN7993RR0A00nOk4H6CnkuwO77dSsD0KJsk6FyAoZBzRXDZh9+d9R76zCL506NcQy/jl0lCiQYwsUX73PG5pxOh02OwKwIDAQABo0swSTBHBgNVHQEEQDA+gBAS5AktBh0dTwCNYSHcFmRjoRgwFjEUMBIGA1UEAxMLUm9vdCBBZ2VuY3mCEAY3bACqAGSKEc+41KpcNfQwCQYFKw4DAh0FAANBAGqIjo2geVagzuzaZOe1ClGKhZeiCKfWAxklaGN+qlGUbVS4IN4V1lot3VKnzabasmkEHeNxPwLn1qvSD0cX9CE=","attributes":{"enabled":true,"nbf":1430344421,"exp":2208988799,"created":1593625755,"updated":1593625755,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"policy":{"id":"https://vaultname.vault.azure.net/certificates/importPasswordEncodedCertificate/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"CN=KeyVaultTest","ekus":[],"key_usage":[],"validity_months":297,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"EmailContacts"}}],"issuer":{"name":"Unknown"},"attributes":{"enabled":true,"created":1593625755,"updated":1593625755}}}' + headers: + cache-control: no-cache + content-length: '1947' + content-type: application/json; charset=utf-8 + date: Wed, 01 Jul 2020 17:49:15 GMT + expires: '-1' + pragma: no-cache + strict-transport-security: max-age=31536000;includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-network-info: conn_type=Ipv4;addr=73.135.72.237;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.1.6.0 + x-powered-by: ASP.NET + status: + code: 200 + message: OK + url: https://lvzthr4gkgv6y7yc4n2s2xzr.vault.azure.net/certificates/importPasswordEncodedCertificate/import?api-version=7.1-preview +version: 1 diff --git a/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client.py b/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client.py index 497300c54176..f1171d57b846 100644 --- a/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client.py +++ b/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client.py @@ -55,7 +55,8 @@ def emit(self, record): class CertificateClientTests(KeyVaultTestCase): - CERT_CONTENT = b"0\x82\t;\x02\x01\x030\x82\x08\xf7\x06\t*\x86H\x86\xf7\r\x01\x07\x01\xa0\x82\x08\xe8\x04\x82\x08\xe40\x82\x08\xe00\x82\x06\t\x06\t*\x86H\x86\xf7\r\x01\x07\x01\xa0\x82\x05\xfa\x04\x82\x05\xf60\x82\x05\xf20\x82\x05\xee\x06\x0b*\x86H\x86\xf7\r\x01\x0c\n\x01\x02\xa0\x82\x04\xfe0\x82\x04\xfa0\x1c\x06\n*\x86H\x86\xf7\r\x01\x0c\x01\x030\x0e\x04\x08\xf5\xe5\x81\xfd\xa4\xe19\xf0\x02\x02\x07\xd0\x04\x82\x04\xd8.\xb2>H\n\xee\xd9\xd0YE\x04e%\x8e\xd7Cr\xde.F\xa1\xd8W\x11Gw@L;!ght \r\xa8\x06\xb9\x10!\xdb\x0b\xc8\x00\x16g}\xaaa\x1dj\x91lK\x1e\x7f@\xa9x.\xdb\xb0\x04l\xe97\xe7\xeaHM\x96\xa2\xcb\xad\xd8`\x19$\xa5\x1f\xa9\r\xd9\xe0f\xdd}gC\xd6\xacl\x07\x12\xaes\xe8\x11\xd2\xd8b\xf2\xc8\xdf\x12H\xe0\x9bw0\xb3\xed\xb9c\xdf\xee\xc8e\x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\x9c\x1f\x16\x85\x0e\x11\xff\xa4\xeeJI\xddK\xf4!e\x9c\xb61\x81\xe90\x13\x06\t*\x86H\x86\xf7\r\x01\t\x151\x06\x04\x04\x01\x00\x00\x000W\x06\t*\x86H\x86\xf7\r\x01\t\x141J\x1eH\x00b\x00d\x008\x003\x007\x009\x00c\x001\x00-\x00a\x006\x005\x00c\x00-\x004\x003\x00e\x00e\x00-\x008\x001\x000\x00a\x00-\x005\x00a\x002\x004\x003\x004\x006\x003\x00f\x00c\x00e\x00c0y\x06\t+\x06\x01\x04\x01\x827\x11\x011l\x1ej\x00M\x00i\x00c\x00r\x00o\x00s\x00o\x00f\x00t\x00 \x00E\x00n\x00h\x00a\x00n\x00c\x00e\x00d\x00 \x00R\x00S\x00A\x00 \x00a\x00n\x00d\x00 \x00A\x00E\x00S\x00 \x00C\x00r\x00y\x00p\x00t\x00o\x00g\x00r\x00a\x00p\x00h\x00i\x00c\x00 \x00P\x00r\x00o\x00v\x00i\x00d\x00e\x00r0\x82\x03\xbf\x06\t*\x86H\x86\xf7\r\x01\x07\x06\xa0\x82\x03\xb00\x82\x03\xac\x02\x01\x000\x82\x03\xa5\x06\t*\x86H\x86\xf7\r\x01\x07\x010\x1c\x06\n*\x86H\x86\xf7\r\x01\x0c\x01\x060\x0e\x04\x08\xd0~p\xe13w{_\x02\x02\x07\xd0\x80\x82\x03x\x1e]uF\xa8\xb8\xdf\xf4\xb0x4\xf4\xe3r\xea\xee\xc7\x83k;\x07.\xde!W\x98b\x0f]\x87v\x06^\xe2\xc4Z\xd9\x16\xee\xe4z\xb5\xa5^R\xf8!V\x01\xcb\x90\xbf\x05\xdfWN\x8c\xe2\x059\xba\x02\xa0\xf3\xb0d\x0f\x94 |\xe89\x07\xa8\xff\x86\xc5\x12\x8c\xb0Pa\xaa\xb2\xb3\xbe\xe7\xd5 \xc7\xf6\xa5\xa0\xe9\x87\x93\x16\xea\xebPV\xc9\xda\x97B\x1e\xa1M)\x1c^\xe7\xfb\xbe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e\xa4\x00\x11.\x04\x14R)\xd7xhz=l\x84,\xcc\x07\xa6\xef\xd7i\xb0\xe9\x13o' def __init__(self, *args, **kwargs): super(CertificateClientTests, self).__init__( @@ -76,7 +77,7 @@ def _import_common_certificate(self, client, cert_name): key_usage=["digitalSignature", "keyEncipherment"], ) return client.import_certificate( - certificate_name=cert_name, certificate_bytes=CertificateClientTests.CERT_CONTENT, policy=cert_policy, password=cert_password + certificate_name=cert_name, certificate_bytes=CertificateClientTests.CERT_CONTENT_PASSWORD_ENODED, policy=cert_policy, password=cert_password ) def _validate_certificate_operation(self, pending_cert_operation, vault, cert_name, original_cert_policy): @@ -223,10 +224,24 @@ def test_crud_operations(self, client, **kwargs): @ResourceGroupPreparer(random_name_enabled=True) @KeyVaultPreparer() @KeyVaultClientPreparer() - def test_import_certificate_no_policy(self, client): + def test_import_certificate_not_password_encoded_no_policy(self, client): + # If a certificate is not password encoded, we can import the certificate + # without passing in 'password' certificate = client.import_certificate( - certificate_name="importCertificate", - certificate_bytes=CertificateClientTests.CERT_CONTENT, + certificate_name="importNotPasswordEncodedCertificate", + certificate_bytes=CertificateClientTests.CERT_CONTENT_NOT_PASSWORD_ENCODED, + ) + self.assertIsNotNone(certificate.policy) + + @ResourceGroupPreparer(random_name_enabled=True) + @KeyVaultPreparer() + @KeyVaultClientPreparer() + def test_import_certificate_password_encoded_no_policy(self, client): + # If a certificate is password encoded, we have to pass in 'password' + # when importing the certificate + certificate = client.import_certificate( + certificate_name="importPasswordEncodedCertificate", + certificate_bytes=CertificateClientTests.CERT_CONTENT_PASSWORD_ENODED, password="123" ) self.assertIsNotNone(certificate.policy) diff --git a/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client_async.py b/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client_async.py index ff12bb203237..6fde4cf3be6a 100644 --- a/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client_async.py +++ b/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client_async.py @@ -55,7 +55,8 @@ def emit(self, record): class CertificateClientTests(KeyVaultTestCase): - CERT_CONTENT = b"0\x82\t;\x02\x01\x030\x82\x08\xf7\x06\t*\x86H\x86\xf7\r\x01\x07\x01\xa0\x82\x08\xe8\x04\x82\x08\xe40\x82\x08\xe00\x82\x06\t\x06\t*\x86H\x86\xf7\r\x01\x07\x01\xa0\x82\x05\xfa\x04\x82\x05\xf60\x82\x05\xf20\x82\x05\xee\x06\x0b*\x86H\x86\xf7\r\x01\x0c\n\x01\x02\xa0\x82\x04\xfe0\x82\x04\xfa0\x1c\x06\n*\x86H\x86\xf7\r\x01\x0c\x01\x030\x0e\x04\x08\xf5\xe5\x81\xfd\xa4\xe19\xf0\x02\x02\x07\xd0\x04\x82\x04\xd8.\xb2>H\n\xee\xd9\xd0YE\x04e%\x8e\xd7Cr\xde.F\xa1\xd8W\x11Gw@L;!ght \r\xa8\x06\xb9\x10!\xdb\x0b\xc8\x00\x16g}\xaaa\x1dj\x91lK\x1e\x7f@\xa9x.\xdb\xb0\x04l\xe97\xe7\xeaHM\x96\xa2\xcb\xad\xd8`\x19$\xa5\x1f\xa9\r\xd9\xe0f\xdd}gC\xd6\xacl\x07\x12\xaes\xe8\x11\xd2\xd8b\xf2\xc8\xdf\x12H\xe0\x9bw0\xb3\xed\xb9c\xdf\xee\xc8e\x8a\x0c\x8f\x85\x8e>\x03\xa6\xfe\xd4:S\x8e\x12\x15g\xa4\xe3\xa407l\xde\x03\x88\xbd\xee\xfe\xdf\xb4\xd3g\xb3n\xe6\xb3\x9d\xa3\xa9\xf8N\xbd0=s\xfc2}\x92\x80c\x86\x8a%\xf6\x18Rl\x9c*9\xe7F]5\xdaWR\xdaS\xa4\x01!m\xfa[\xb8@&\xbb\xd8\x86:x\xfbQ\xb9\xd3\xc2\xbel\xd1\xbfjd-\x84\xba\xcfw\x08\xee\x89\x93\xf2q\xcf\xdc<\xa64\xea\x8blZ\xab\xe4\xed\x8c\xd5\x96\x1a,.\xb7C|m\xdd\xe5om\xc3\xe1\xdc\xdd<\x0fXG\x92\x1c\xff(4\xef\x91\x10\x10\xa6\xfa\xd6\xf0\x84\x8a\x9a\x00\xdd\x9b3y\xe4\xf7\xb9\xe7\x11\xdfIa\x81\xee\x03\xf0\xf2\xc6^k\x9e\xc8\xc4\\\xd6\x1d2\xb6\xca\xf4\xec\x96\x8a\x16\xa2\x8b&\x1b\x16\xa7a\x8d\x88\x1b\xf9\xe8\xdcF\xcf9`\xca\x8c\xf6x\x8aV\t{\x92I\xda)\xa6\x97\x13\xf3\xfbg\xb6\x10\xe0\x8a\xa42>\xed\xfc\xd0q\x1c\xf7=7w\x04\xaf\x9b\xb9\xd6|iu\xfcio\xe5:\x02\x92\xf1i\xb1f\x82\xa78\x90MY\xe4\xcdY\x01n\x82i-]\xf7O\x1c\x07q2\x18\xd4^\xa7\x86A\xdf0N\xf6x\x134\r5\xa7\xe8\xbf\t\x08\xec\x85\x7fe\x8a\x1a\xfb\xe4F\xa1\xf5Q\xdd\x96\xd1J M\x17\xa4\xc3\x8f\xfa\x97\x16\xdd07\xf0\x90\x9e\xc1\x80\x99\x00\x066#~\x0f\x89\x98\xee-\xb9v\xd4\xee\xfc\x97;;\x12\xdd\x84\x05\x05\xa4|\x89\xa7*\xd8X\xb7\xef:$\xb9Y\x80^\x101\xe4\x88\xf5\x1a\xff\xc7\x99H\xf071u\x99GTb\xb8;\xee6\xa3#r\xddRK\x07W\x004\xed\x17\xaf%\xfdD\xb5\x92\xc5:\xe7\xbf\x97H/\xba\x97-@\xfe\xeas\xf9~\xf5\xf8.\x07\xa3\xa5\xb4\xef\x9dc\xe5\x93\x13\xeb\x12\xa3\x1a\x1eiy\xee\xccV\xe7n\xc4\x8c\xd7\x8db2\xdd\x84\x9d\xd1\xf2\x13\xddM\x00\xe4\xd2\xc4\xbc\x9fk~Lz&!\xe3D\xbczW[j\xb2\xbbS\xe8\x1b\x06\xb6`\x90GU\x02$\xf2\xea\xb0\xa5C\xbc\x02\r\xc7w\x0f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\xd5hq\xaf\x88\xde\x068)\xca\x8b\xd4\x10pE\xc8e\x04i<\x18^\x1b\x7f\xfdJaP\x1f\xd4R\x10\xc5\xae\xe6Q\x08\x8b\xbcy*\x15\xb8\xb7G\xc1R\\\t\xbb\x93g\x9f\x1e\xdb7j\x02h\xe5\\@\xf0A\xfc^\x84U \xc9\xa7\x92%W\x0ep\x03\xb95gH!N\xfcjG\xb4\xc72\x0eq\x10W\xdd\xe8^Y\xa2p\xab\xd1\xcf\xe4\xd8q\xa9\xce]\xf9\xdbJ\x8e\xe9\xaaS\xed6y\x93~2\x8e\xbbx\x0eIF5\x16\xdco\xd1\xec;\tqm \xd3\x80\x93\xcc\xb38\xe9\x12\x1a\xb1\xbd\x1f\xb5\x80\xef\x8bR@f\'QF\xac\xd1\x1e\x18\x1e-\x80\x85\x82\xe8\x9f\xb6|E\xc1c\xe4\xcc\xd0\x96\x88\xc5\xa0\x83"\xa3\xa69\xfb\x10\xc2XN\x1e9\xe9\xeeB\x01\x00\xe8w\xc3\xb1\xb6\x9e\xbd\x8d\n\x92\x94Vc\x85mjA=\x92?\x12\x17\xa2nJV$\xcd\xea/XO\x00\xf9\x8b\xdc\xf0\xcef\xc8\x06\x94*M\xce\xfb\x0b\xe5/SC\xad\xed\xdfu\x95\x83S\xdc\xa9\xad:\xdc\t\xc8r\x9c\x1f\x16\x85\x0e\x11\xff\xa4\xeeJI\xddK\xf4!e\x9c\xb61\x81\xe90\x13\x06\t*\x86H\x86\xf7\r\x01\t\x151\x06\x04\x04\x01\x00\x00\x000W\x06\t*\x86H\x86\xf7\r\x01\t\x141J\x1eH\x00b\x00d\x008\x003\x007\x009\x00c\x001\x00-\x00a\x006\x005\x00c\x00-\x004\x003\x00e\x00e\x00-\x008\x001\x000\x00a\x00-\x005\x00a\x002\x004\x003\x004\x006\x003\x00f\x00c\x00e\x00c0y\x06\t+\x06\x01\x04\x01\x827\x11\x011l\x1ej\x00M\x00i\x00c\x00r\x00o\x00s\x00o\x00f\x00t\x00 \x00E\x00n\x00h\x00a\x00n\x00c\x00e\x00d\x00 \x00R\x00S\x00A\x00 \x00a\x00n\x00d\x00 \x00A\x00E\x00S\x00 \x00C\x00r\x00y\x00p\x00t\x00o\x00g\x00r\x00a\x00p\x00h\x00i\x00c\x00 \x00P\x00r\x00o\x00v\x00i\x00d\x00e\x00r0\x82\x03\xbf\x06\t*\x86H\x86\xf7\r\x01\x07\x06\xa0\x82\x03\xb00\x82\x03\xac\x02\x01\x000\x82\x03\xa5\x06\t*\x86H\x86\xf7\r\x01\x07\x010\x1c\x06\n*\x86H\x86\xf7\r\x01\x0c\x01\x060\x0e\x04\x08\xd0~p\xe13w{_\x02\x02\x07\xd0\x80\x82\x03x\x1e]uF\xa8\xb8\xdf\xf4\xb0x4\xf4\xe3r\xea\xee\xc7\x83k;\x07.\xde!W\x98b\x0f]\x87v\x06^\xe2\xc4Z\xd9\x16\xee\xe4z\xb5\xa5^R\xf8!V\x01\xcb\x90\xbf\x05\xdfWN\x8c\xe2\x059\xba\x02\xa0\xf3\xb0d\x0f\x94 |\xe89\x07\xa8\xff\x86\xc5\x12\x8c\xb0Pa\xaa\xb2\xb3\xbe\xe7\xd5 \xc7\xf6\xa5\xa0\xe9\x87\x93\x16\xea\xebPV\xc9\xda\x97B\x1e\xa1M)\x1c^\xe7\xfb\xbe\x00q;\x8e\xf4\r\xf3q\x87\xb9)g\xc8\xa1\x07i\x06\xca\xc8\x97S\xd3\xd3ihO\xaf(\xd7\xa0\t\xefo\x10\xb8\xeaE\xfc\xdf\x18\xf0\xd4\xe5\xbc\xbc\x12\x11\xc2p\xb4\xfd\xf8\x1b\x0e\xa8\xa9.N[?\xd2\xf3\x0f\xda\x1cp\x99\x86\xbe\xc3\xa8t\\\xa4\x88?\x90\xb3\xa3qvh\xa5\x06\xf1a\xb6%\x18\x8eqc2\x04\xc7\xc0>i\xdc\x8fI\xbc\xb0\x82\xdc\x87j\xd9\xff\x05e{\xd2\x01\x0e\xf0\x91\x7f\xcb\xf8\xa27\xfb\xd1\x9c\x96\xadS\x97\x17\xb0\xf3F\xb4\xc6\xc3(/\xc4\x88\xdf\xf3M@n\xc4\xd88\xd0%hq\x0c\xae\xab\xbf\x91\xe6\xff\xd4np\xed\x9a\xab\x04\x83^/!\xf7\xf5\x91\xa54\xc9n\xb14\xb6\x8d\xdbQB-\x04\xf8\x98H\x98\xe10Ksw\xac\x0cc@\x92\x10\x1cA\x96\xb39gljl6\xd4cz\xd8it\x1e\xedZ]\xfa\x0c\x93\xce\x97\xcd"\x93e\xf8\xb1\x02b\xb9 \xb5\xc5W\x12\xf5\xe7\x81s\xf9$+\xf4\xee\x13\xdeQ\x02Cq\x15x\xe3\xd8\xbe&\xa4,k0U\xa9\x87\x15\xc7\x86\x82\xb0@Q\xfb\xbb\xf6\xa11\xbf\x1d[,\xec\x16`\xc5\xc2\x0f/\n\x8f\x9f\xebf\xfa\xf3\xcfW\x9d\xedD\xf4\xdf\x8c\x88\xc3{\x89s\xf6\xb20+\xa2J\xffx\xbd\xad\x9a9/\xee\xc2x?\xce\xc2{\xb8\x1b)\x0e\x8ao\xe3\x86{%n.~\x8c\x95\xc9\x85[\xfa\x1a070\x1f0\x07\x06\x05+\x0e\x03\x02\x1a\x04\x14\xc2\xeb\x94\x0bl\xc6q36\x8c\x8b\xfb\x87\xa2N\x0e\xa4\x00\x11.\x04\x14R)\xd7xhz=l\x84,\xcc\x07\xa6\xef\xd7i\xb0\xe9\x13o' async def _import_common_certificate(self, client, cert_name): cert_password = "123" @@ -70,7 +71,7 @@ async def _import_common_certificate(self, client, cert_name): validity_in_months=12, key_usage=["digitalSignature", "keyEncipherment"], ) - return await client.import_certificate(cert_name, CertificateClientTests.CERT_CONTENT, policy=cert_policy, password=cert_password) + return await client.import_certificate(cert_name, CertificateClientTests.CERT_CONTENT_PASSWORD_ENODED, policy=cert_policy, password=cert_password) def _validate_certificate_operation(self, pending_cert_operation, vault, cert_name, original_cert_policy): self.assertIsNotNone(pending_cert_operation) @@ -216,10 +217,24 @@ async def test_crud_operations(self, client, **kwargs): @ResourceGroupPreparer(random_name_enabled=True) @KeyVaultPreparer() @KeyVaultClientPreparer() - async def test_import_certificate_no_policy(self, client): + async def test_import_certificate_not_password_encoded_no_policy(self, client): + # If a certificate is not password encoded, we can import the certificate + # without passing in 'password' certificate = await client.import_certificate( - certificate_name="importCertificate", - certificate_bytes=CertificateClientTests.CERT_CONTENT, + certificate_name="importNotPasswordEncodedCertificate", + certificate_bytes=CertificateClientTests.CERT_CONTENT_NOT_PASSWORD_ENCODED, + ) + self.assertIsNotNone(certificate.policy) + + @ResourceGroupPreparer(random_name_enabled=True) + @KeyVaultPreparer() + @KeyVaultClientPreparer() + async def test_import_certificate_password_encoded_no_policy(self, client): + # If a certificate is password encoded, we have to pass in 'password' + # when importing the certificate + certificate = await client.import_certificate( + certificate_name="importPasswordEncodedCertificate", + certificate_bytes=CertificateClientTests.CERT_CONTENT_PASSWORD_ENODED, password="123" ) self.assertIsNotNone(certificate.policy) diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_key_client.test_logging_enabled.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_key_client.test_logging_enabled.yaml deleted file mode 100644 index 447378c0e16c..000000000000 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_key_client.test_logging_enabled.yaml +++ /dev/null @@ -1,110 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - azsdk-python-keyvault-keys/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) - method: POST - uri: https://vaultname.vault.azure.net/keys/rsa-key-name/create?api-version=7.1-preview - response: - body: - string: '{"error":{"code":"Unauthorized","message":"Request is missing a Bearer - or PoP token."}}' - headers: - cache-control: - - no-cache - content-length: - - '87' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 05 Mar 2020 23:16:49 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - www-authenticate: - - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", - resource="https://vault.azure.net" - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.897 - x-powered-by: - - ASP.NET - status: - code: 401 - message: Unauthorized -- request: - body: '{"kty": "RSA", "key_size": 2048}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '32' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - azsdk-python-keyvault-keys/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) - method: POST - uri: https://vaultname.vault.azure.net/keys/rsa-key-name/create?api-version=7.1-preview - response: - body: - string: '{"key":{"kid":"https://vaultname.vault.azure.net/keys/rsa-key-name/05171c05e42b41b2afaf309ae1ba9ac8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"xpQWL0VR5FEjMqtrBzholVzvVh4J_O_lRpq2LXFoc2U8lfpwlqJUh8xxdBSP2rKHxwOzYKGxSsx9R3w6gnpC_gLNF9mdS1LexLznN9NUWDCt7VYrHQFv-lxk7TpzPjTB1udWXewY3wZwgRt2ryFbEidUu1qxH97qAxObgHQllKm2SaMGB19h7qyrT_bIVpaEiihrqRxTBdSBeFLCGx61bHKLcDq5QBLcsMp5sgaLHvehBtq3cpw0wXq3SuHWQtKeYDH4ufdu_Jpx68HJhN254WyEszyz4nqBJi9hks-z3rrJli_7o6EfgzFkxo5IY3q-1clurV5jwPC16i0YC0gPew","e":"AQAB"},"attributes":{"enabled":true,"created":1583450209,"updated":1583450209,"recoveryLevel":"Recoverable+Purgeable"}}' - headers: - cache-control: - - no-cache - content-length: - - '671' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 05 Mar 2020 23:16:49 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000;includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-network-info: - - addr=76.121.58.221;act_addr_fam=InterNetwork; - x-ms-keyvault-region: - - westus - x-ms-keyvault-service-version: - - 1.1.0.897 - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -version: 1 From 2fc1769c31f7b40b58e0fa216220672143cf6dca Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Wed, 1 Jul 2020 13:51:45 -0400 Subject: [PATCH 5/9] revert erroneous commit --- .../keyvault/certificates/_shared/challenge_auth_policy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/challenge_auth_policy.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/challenge_auth_policy.py index ca490f180ee2..fca7dc6f01d2 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/challenge_auth_policy.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/challenge_auth_policy.py @@ -136,5 +136,5 @@ def _handle_challenge(self, request, challenge): scope = challenge.get_scope() or challenge.get_resource() + "/.default" self._token = self._credential.get_token(scope) - answer = "Bearer {}".format(self._token.token) - request.http_request.headers["Authorization"] = answer # type: ignore + # ignore mypy's warning because although self._token is Optional, get_token raises when it fails to get a token + request.http_request.headers["Authorization"] = "Bearer {}".format(self._token.token) # type: ignore From d3420eb4972ba90dded3eaf468d35c25a9422bdc Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Wed, 1 Jul 2020 15:53:24 -0400 Subject: [PATCH 6/9] add back removed test recording --- ...ync_request_cancellation_and_deletion.yaml | 957 ++++++++++++++++++ 1 file changed, 957 insertions(+) create mode 100644 sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client.test_async_request_cancellation_and_deletion.yaml diff --git a/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client.test_async_request_cancellation_and_deletion.yaml b/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client.test_async_request_cancellation_and_deletion.yaml new file mode 100644 index 000000000000..81e01ec6ad07 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client.test_async_request_cancellation_and_deletion.yaml @@ -0,0 +1,957 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/create?api-version=7.1-preview + response: + body: + string: '{"error":{"code":"Unauthorized","message":"Request is missing a Bearer + or PoP token."}}' + headers: + cache-control: + - no-cache + content-length: + - '87' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 06 Mar 2020 00:07:33 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000;includeSubDomains + www-authenticate: + - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - addr=76.121.58.221;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.0.897 + x-powered-by: + - ASP.NET + status: + code: 401 + message: Unauthorized +- request: + body: '{"policy": {"x509_props": {"subject": "CN=DefaultPolicy", "sans": {}}, + "issuer": {"name": "Self"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '99' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/create?api-version=7.1-preview + response: + body: + string: '{"id":"https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/pending","issuer":{"name":"Self"},"csr":"MIICqDCCAZACAQAwGDEWMBQGA1UEAxMNRGVmYXVsdFBvbGljeTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALrLFtzOxre8e7FEYfzGucf/9i4O7DAikLwYdAvVPdn8eO7G26OpIgtF+8eq/+asQgD8G54f1hhbQj0TosKqEQ42DkyPOIx+xLdLCt0uOlsiqXc1IJZtehTLS4dmJduCMg7+5YfpXQHxVLK6uSRdnLdpIQRedthgXGfvKJ2Zr/h4KV5aAZN0zzyuRl4EF4sswOzgc/Mtrob1ni2pwiklwbrTEzEHY9k7mVtviegFEAXOsjgnsQO1S/PwHmHTMe6+VfRn1/Z4AaZLVEgrf+AatRkf+21Lo3xJnmlkMESv4FnK7GQ+rkB7rLzOJy+EybF1oZYimk7XmqVjn6rNq1wbymcCAwEAAaBLMEkGCSqGSIb3DQEJDjE8MDowDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAJBgNVHRMEAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQBtB8RrIWNYhNO0mC4jO2rUfNoYjX9HvK2XdUwXRIFKqHzPhJsTUCXUdsFd+8g0xEnbGAH/sYKRT9a25LleDaB6o6D2hPEc5khEAm740dmZ6v95Hz+zNxMYv4IkwK95q7w1qRlWE+YzJyqhy4IavYRSgyd0yaumiDFbLkXqlb29wciWGD4Oi9MvLNXBcbvykopDUSSBf85i6NeA6s6TeiWaskesQq4BA7WaiLhpfw3/v/1+bFLyxc5L+FbuNNkvOhFaOv+0wMKr1zmt+KmQT2Jy1kilNkEv9g4DgVH7DJlmjTwUsiTwkB58PIEaoaMPST+ZHROReMAJEM/BpUJPCnsB","cancellation_requested":false,"status":"inProgress","status_details":"Pending + certificate created. Certificate request is in progress. This may take some + time based on the issuer provider. Please check again later.","request_id":"dd6fd01b95df416d9c0b4b4942a3e66d"}' + headers: + cache-control: + - no-cache + content-length: + - '1314' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 06 Mar 2020 00:07:34 GMT + expires: + - '-1' + location: + - https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/pending?api-version=7.1-preview&request_id=dd6fd01b95df416d9c0b4b4942a3e66d + pragma: + - no-cache + retry-after: + - '10' + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000;includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - addr=76.121.58.221;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.0.897 + x-powered-by: + - ASP.NET + status: + code: 202 + message: Accepted +- request: + body: '{"cancellation_requested": true}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '32' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) + method: PATCH + uri: https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/pending?api-version=7.1-preview + response: + body: + string: '{"id":"https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/pending","issuer":{"name":"Self"},"csr":"MIICqDCCAZACAQAwGDEWMBQGA1UEAxMNRGVmYXVsdFBvbGljeTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALrLFtzOxre8e7FEYfzGucf/9i4O7DAikLwYdAvVPdn8eO7G26OpIgtF+8eq/+asQgD8G54f1hhbQj0TosKqEQ42DkyPOIx+xLdLCt0uOlsiqXc1IJZtehTLS4dmJduCMg7+5YfpXQHxVLK6uSRdnLdpIQRedthgXGfvKJ2Zr/h4KV5aAZN0zzyuRl4EF4sswOzgc/Mtrob1ni2pwiklwbrTEzEHY9k7mVtviegFEAXOsjgnsQO1S/PwHmHTMe6+VfRn1/Z4AaZLVEgrf+AatRkf+21Lo3xJnmlkMESv4FnK7GQ+rkB7rLzOJy+EybF1oZYimk7XmqVjn6rNq1wbymcCAwEAAaBLMEkGCSqGSIb3DQEJDjE8MDowDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAJBgNVHRMEAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQBtB8RrIWNYhNO0mC4jO2rUfNoYjX9HvK2XdUwXRIFKqHzPhJsTUCXUdsFd+8g0xEnbGAH/sYKRT9a25LleDaB6o6D2hPEc5khEAm740dmZ6v95Hz+zNxMYv4IkwK95q7w1qRlWE+YzJyqhy4IavYRSgyd0yaumiDFbLkXqlb29wciWGD4Oi9MvLNXBcbvykopDUSSBf85i6NeA6s6TeiWaskesQq4BA7WaiLhpfw3/v/1+bFLyxc5L+FbuNNkvOhFaOv+0wMKr1zmt+KmQT2Jy1kilNkEv9g4DgVH7DJlmjTwUsiTwkB58PIEaoaMPST+ZHROReMAJEM/BpUJPCnsB","cancellation_requested":true,"status":"inProgress","status_details":"Pending + certificate created. Certificate request is in progress. This may take some + time based on the issuer provider. Please check again later.","request_id":"dd6fd01b95df416d9c0b4b4942a3e66d"}' + headers: + cache-control: + - no-cache + content-length: + - '1313' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 06 Mar 2020 00:07:35 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000;includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - addr=76.121.58.221;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.0.897 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/pending?api-version=7.1-preview + response: + body: + string: '{"id":"https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/pending","issuer":{"name":"Self"},"csr":"MIICqDCCAZACAQAwGDEWMBQGA1UEAxMNRGVmYXVsdFBvbGljeTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALrLFtzOxre8e7FEYfzGucf/9i4O7DAikLwYdAvVPdn8eO7G26OpIgtF+8eq/+asQgD8G54f1hhbQj0TosKqEQ42DkyPOIx+xLdLCt0uOlsiqXc1IJZtehTLS4dmJduCMg7+5YfpXQHxVLK6uSRdnLdpIQRedthgXGfvKJ2Zr/h4KV5aAZN0zzyuRl4EF4sswOzgc/Mtrob1ni2pwiklwbrTEzEHY9k7mVtviegFEAXOsjgnsQO1S/PwHmHTMe6+VfRn1/Z4AaZLVEgrf+AatRkf+21Lo3xJnmlkMESv4FnK7GQ+rkB7rLzOJy+EybF1oZYimk7XmqVjn6rNq1wbymcCAwEAAaBLMEkGCSqGSIb3DQEJDjE8MDowDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAJBgNVHRMEAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQBtB8RrIWNYhNO0mC4jO2rUfNoYjX9HvK2XdUwXRIFKqHzPhJsTUCXUdsFd+8g0xEnbGAH/sYKRT9a25LleDaB6o6D2hPEc5khEAm740dmZ6v95Hz+zNxMYv4IkwK95q7w1qRlWE+YzJyqhy4IavYRSgyd0yaumiDFbLkXqlb29wciWGD4Oi9MvLNXBcbvykopDUSSBf85i6NeA6s6TeiWaskesQq4BA7WaiLhpfw3/v/1+bFLyxc5L+FbuNNkvOhFaOv+0wMKr1zmt+KmQT2Jy1kilNkEv9g4DgVH7DJlmjTwUsiTwkB58PIEaoaMPST+ZHROReMAJEM/BpUJPCnsB","cancellation_requested":true,"status":"inProgress","status_details":"Pending + certificate created. Certificate request is in progress. This may take some + time based on the issuer provider. Please check again later.","request_id":"dd6fd01b95df416d9c0b4b4942a3e66d"}' + headers: + cache-control: + - no-cache + content-length: + - '1313' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 06 Mar 2020 00:07:45 GMT + expires: + - '-1' + pragma: + - no-cache + retry-after: + - '10' + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000;includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - addr=76.121.58.221;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.0.897 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/pending?api-version=7.1-preview + response: + body: + string: '{"id":"https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/pending","issuer":{"name":"Self"},"csr":"MIICqDCCAZACAQAwGDEWMBQGA1UEAxMNRGVmYXVsdFBvbGljeTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALrLFtzOxre8e7FEYfzGucf/9i4O7DAikLwYdAvVPdn8eO7G26OpIgtF+8eq/+asQgD8G54f1hhbQj0TosKqEQ42DkyPOIx+xLdLCt0uOlsiqXc1IJZtehTLS4dmJduCMg7+5YfpXQHxVLK6uSRdnLdpIQRedthgXGfvKJ2Zr/h4KV5aAZN0zzyuRl4EF4sswOzgc/Mtrob1ni2pwiklwbrTEzEHY9k7mVtviegFEAXOsjgnsQO1S/PwHmHTMe6+VfRn1/Z4AaZLVEgrf+AatRkf+21Lo3xJnmlkMESv4FnK7GQ+rkB7rLzOJy+EybF1oZYimk7XmqVjn6rNq1wbymcCAwEAAaBLMEkGCSqGSIb3DQEJDjE8MDowDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAJBgNVHRMEAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQBtB8RrIWNYhNO0mC4jO2rUfNoYjX9HvK2XdUwXRIFKqHzPhJsTUCXUdsFd+8g0xEnbGAH/sYKRT9a25LleDaB6o6D2hPEc5khEAm740dmZ6v95Hz+zNxMYv4IkwK95q7w1qRlWE+YzJyqhy4IavYRSgyd0yaumiDFbLkXqlb29wciWGD4Oi9MvLNXBcbvykopDUSSBf85i6NeA6s6TeiWaskesQq4BA7WaiLhpfw3/v/1+bFLyxc5L+FbuNNkvOhFaOv+0wMKr1zmt+KmQT2Jy1kilNkEv9g4DgVH7DJlmjTwUsiTwkB58PIEaoaMPST+ZHROReMAJEM/BpUJPCnsB","cancellation_requested":true,"status":"cancelled","request_id":"dd6fd01b95df416d9c0b4b4942a3e66d"}' + headers: + cache-control: + - no-cache + content-length: + - '1148' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 06 Mar 2020 00:07:54 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000;includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - addr=76.121.58.221;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.0.897 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/pending?api-version=7.1-preview + response: + body: + string: '{"id":"https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/pending","issuer":{"name":"Self"},"csr":"MIICqDCCAZACAQAwGDEWMBQGA1UEAxMNRGVmYXVsdFBvbGljeTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALrLFtzOxre8e7FEYfzGucf/9i4O7DAikLwYdAvVPdn8eO7G26OpIgtF+8eq/+asQgD8G54f1hhbQj0TosKqEQ42DkyPOIx+xLdLCt0uOlsiqXc1IJZtehTLS4dmJduCMg7+5YfpXQHxVLK6uSRdnLdpIQRedthgXGfvKJ2Zr/h4KV5aAZN0zzyuRl4EF4sswOzgc/Mtrob1ni2pwiklwbrTEzEHY9k7mVtviegFEAXOsjgnsQO1S/PwHmHTMe6+VfRn1/Z4AaZLVEgrf+AatRkf+21Lo3xJnmlkMESv4FnK7GQ+rkB7rLzOJy+EybF1oZYimk7XmqVjn6rNq1wbymcCAwEAAaBLMEkGCSqGSIb3DQEJDjE8MDowDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAJBgNVHRMEAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQBtB8RrIWNYhNO0mC4jO2rUfNoYjX9HvK2XdUwXRIFKqHzPhJsTUCXUdsFd+8g0xEnbGAH/sYKRT9a25LleDaB6o6D2hPEc5khEAm740dmZ6v95Hz+zNxMYv4IkwK95q7w1qRlWE+YzJyqhy4IavYRSgyd0yaumiDFbLkXqlb29wciWGD4Oi9MvLNXBcbvykopDUSSBf85i6NeA6s6TeiWaskesQq4BA7WaiLhpfw3/v/1+bFLyxc5L+FbuNNkvOhFaOv+0wMKr1zmt+KmQT2Jy1kilNkEv9g4DgVH7DJlmjTwUsiTwkB58PIEaoaMPST+ZHROReMAJEM/BpUJPCnsB","cancellation_requested":true,"status":"cancelled","request_id":"dd6fd01b95df416d9c0b4b4942a3e66d"}' + headers: + cache-control: + - no-cache + content-length: + - '1148' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 06 Mar 2020 00:07:55 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000;includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - addr=76.121.58.221;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.0.897 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) + method: DELETE + uri: https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/pending?api-version=7.1-preview + response: + body: + string: '{"id":"https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/pending","issuer":{"name":"Self"},"csr":"MIICqDCCAZACAQAwGDEWMBQGA1UEAxMNRGVmYXVsdFBvbGljeTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALrLFtzOxre8e7FEYfzGucf/9i4O7DAikLwYdAvVPdn8eO7G26OpIgtF+8eq/+asQgD8G54f1hhbQj0TosKqEQ42DkyPOIx+xLdLCt0uOlsiqXc1IJZtehTLS4dmJduCMg7+5YfpXQHxVLK6uSRdnLdpIQRedthgXGfvKJ2Zr/h4KV5aAZN0zzyuRl4EF4sswOzgc/Mtrob1ni2pwiklwbrTEzEHY9k7mVtviegFEAXOsjgnsQO1S/PwHmHTMe6+VfRn1/Z4AaZLVEgrf+AatRkf+21Lo3xJnmlkMESv4FnK7GQ+rkB7rLzOJy+EybF1oZYimk7XmqVjn6rNq1wbymcCAwEAAaBLMEkGCSqGSIb3DQEJDjE8MDowDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAJBgNVHRMEAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQBtB8RrIWNYhNO0mC4jO2rUfNoYjX9HvK2XdUwXRIFKqHzPhJsTUCXUdsFd+8g0xEnbGAH/sYKRT9a25LleDaB6o6D2hPEc5khEAm740dmZ6v95Hz+zNxMYv4IkwK95q7w1qRlWE+YzJyqhy4IavYRSgyd0yaumiDFbLkXqlb29wciWGD4Oi9MvLNXBcbvykopDUSSBf85i6NeA6s6TeiWaskesQq4BA7WaiLhpfw3/v/1+bFLyxc5L+FbuNNkvOhFaOv+0wMKr1zmt+KmQT2Jy1kilNkEv9g4DgVH7DJlmjTwUsiTwkB58PIEaoaMPST+ZHROReMAJEM/BpUJPCnsB","cancellation_requested":true,"status":"cancelled","request_id":"dd6fd01b95df416d9c0b4b4942a3e66d"}' + headers: + cache-control: + - no-cache + content-length: + - '1148' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 06 Mar 2020 00:07:55 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000;includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - addr=76.121.58.221;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.0.897 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/pending?api-version=7.1-preview + response: + body: + string: '{"error":{"code":"PendingCertificateNotFound","message":"Pending certificate + not found: asyncCanceledDeletedCert"}}' + headers: + cache-control: + - no-cache + content-length: + - '115' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 06 Mar 2020 00:07:55 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000;includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - addr=76.121.58.221;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.0.897 + x-powered-by: + - ASP.NET + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) + method: DELETE + uri: https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert?api-version=7.1-preview + response: + body: + string: '{"recoveryId":"https://vaultname.vault.azure.net/deletedcertificates/asyncCanceledDeletedCert","deletedDate":1583453275,"scheduledPurgeDate":1591229275,"id":"https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/f84d4b4ea5924465a95c758f8d824464","attributes":{"enabled":false,"nbf":1583452654,"exp":1614989254,"created":1583453254,"updated":1583453254,"recoveryLevel":"Recoverable+Purgeable"},"policy":{"id":"https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"CN=DefaultPolicy","sans":{},"ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1583453254,"updated":1583453254}}}' + headers: + cache-control: + - no-cache + content-length: + - '1087' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 06 Mar 2020 00:07:55 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000;includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - addr=76.121.58.221;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.0.897 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://vaultname.vault.azure.net/deletedcertificates/asyncCanceledDeletedCert?api-version=7.1-preview + response: + body: + string: '{"error":{"code":"CertificateNotFound","message":"Deleted Certificate + not found: asyncCanceledDeletedCert"}}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 06 Mar 2020 00:07:55 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000;includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - addr=76.121.58.221;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.0.897 + x-powered-by: + - ASP.NET + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://vaultname.vault.azure.net/deletedcertificates/asyncCanceledDeletedCert?api-version=7.1-preview + response: + body: + string: '{"error":{"code":"CertificateNotFound","message":"Deleted Certificate + not found: asyncCanceledDeletedCert"}}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 06 Mar 2020 00:07:57 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000;includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - addr=76.121.58.221;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.0.897 + x-powered-by: + - ASP.NET + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://vaultname.vault.azure.net/deletedcertificates/asyncCanceledDeletedCert?api-version=7.1-preview + response: + body: + string: '{"error":{"code":"CertificateNotFound","message":"Deleted Certificate + not found: asyncCanceledDeletedCert"}}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 06 Mar 2020 00:07:59 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000;includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - addr=76.121.58.221;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.0.897 + x-powered-by: + - ASP.NET + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://vaultname.vault.azure.net/deletedcertificates/asyncCanceledDeletedCert?api-version=7.1-preview + response: + body: + string: '{"error":{"code":"CertificateNotFound","message":"Deleted Certificate + not found: asyncCanceledDeletedCert"}}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 06 Mar 2020 00:08:01 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000;includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - addr=76.121.58.221;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.0.897 + x-powered-by: + - ASP.NET + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://vaultname.vault.azure.net/deletedcertificates/asyncCanceledDeletedCert?api-version=7.1-preview + response: + body: + string: '{"error":{"code":"CertificateNotFound","message":"Deleted Certificate + not found: asyncCanceledDeletedCert"}}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 06 Mar 2020 00:08:03 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000;includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - addr=76.121.58.221;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.0.897 + x-powered-by: + - ASP.NET + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://vaultname.vault.azure.net/deletedcertificates/asyncCanceledDeletedCert?api-version=7.1-preview + response: + body: + string: '{"error":{"code":"CertificateNotFound","message":"Deleted Certificate + not found: asyncCanceledDeletedCert"}}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 06 Mar 2020 00:08:05 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000;includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - addr=76.121.58.221;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.0.897 + x-powered-by: + - ASP.NET + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://vaultname.vault.azure.net/deletedcertificates/asyncCanceledDeletedCert?api-version=7.1-preview + response: + body: + string: '{"error":{"code":"CertificateNotFound","message":"Deleted Certificate + not found: asyncCanceledDeletedCert"}}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 06 Mar 2020 00:08:07 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000;includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - addr=76.121.58.221;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.0.897 + x-powered-by: + - ASP.NET + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://vaultname.vault.azure.net/deletedcertificates/asyncCanceledDeletedCert?api-version=7.1-preview + response: + body: + string: '{"error":{"code":"CertificateNotFound","message":"Deleted Certificate + not found: asyncCanceledDeletedCert"}}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 06 Mar 2020 00:08:10 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000;includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - addr=76.121.58.221;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.0.897 + x-powered-by: + - ASP.NET + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://vaultname.vault.azure.net/deletedcertificates/asyncCanceledDeletedCert?api-version=7.1-preview + response: + body: + string: '{"error":{"code":"CertificateNotFound","message":"Deleted Certificate + not found: asyncCanceledDeletedCert"}}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 06 Mar 2020 00:08:12 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000;includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - addr=76.121.58.221;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.0.897 + x-powered-by: + - ASP.NET + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-keyvault-certificates/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://vaultname.vault.azure.net/deletedcertificates/asyncCanceledDeletedCert?api-version=7.1-preview + response: + body: + string: '{"recoveryId":"https://vaultname.vault.azure.net/deletedcertificates/asyncCanceledDeletedCert","deletedDate":1583453275,"scheduledPurgeDate":1591229275,"id":"https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/f84d4b4ea5924465a95c758f8d824464","attributes":{"enabled":false,"nbf":1583452654,"exp":1614989254,"created":1583453254,"updated":1583453254,"recoveryLevel":"Recoverable+Purgeable"},"policy":{"id":"https://vaultname.vault.azure.net/certificates/asyncCanceledDeletedCert/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"CN=DefaultPolicy","sans":{},"ekus":["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2"],"key_usage":["digitalSignature","keyEncipherment"],"validity_months":12,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"AutoRenew"}}],"issuer":{"name":"Self"},"attributes":{"enabled":true,"created":1583453254,"updated":1583453254}}}' + headers: + cache-control: + - no-cache + content-length: + - '1087' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 06 Mar 2020 00:08:14 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000;includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - addr=76.121.58.221;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.0.897 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 From efb2d47f37bf8026e44955dfc3c3c8d365274f8d Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Wed, 1 Jul 2020 15:56:03 -0400 Subject: [PATCH 7/9] remove old test recording --- ...ync.test_import_certificate_no_policy.yaml | 74 ------------------- 1 file changed, 74 deletions(-) delete mode 100644 sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client_async.test_import_certificate_no_policy.yaml diff --git a/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client_async.test_import_certificate_no_policy.yaml b/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client_async.test_import_certificate_no_policy.yaml deleted file mode 100644 index 2e95f47454f0..000000000000 --- a/sdk/keyvault/azure-keyvault-certificates/tests/recordings/test_certificates_client_async.test_import_certificate_no_policy.yaml +++ /dev/null @@ -1,74 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Content-Length: - - '0' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - azsdk-python-keyvault-certificates/4.2.0b2 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) - method: POST - uri: https://vaultname.vault.azure.net/certificates/importCertificate/import?api-version=7.1-preview - response: - body: - string: '{"error":{"code":"Unauthorized","message":"Request is missing a Bearer - or PoP token."}}' - headers: - cache-control: no-cache - content-length: '87' - content-type: application/json; charset=utf-8 - date: Tue, 30 Jun 2020 21:35:09 GMT - expires: '-1' - pragma: no-cache - strict-transport-security: max-age=31536000;includeSubDomains - www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", - resource="https://vault.azure.net" - x-aspnet-version: 4.0.30319 - x-content-type-options: nosniff - x-ms-keyvault-network-info: conn_type=Ipv4;addr=73.135.72.237;act_addr_fam=InterNetwork; - x-ms-keyvault-region: westus - x-ms-keyvault-service-version: 1.1.6.0 - x-powered-by: ASP.NET - status: - code: 401 - message: Unauthorized - url: https://i42yq7w3yawctk67gnhq7u5g.vault.azure.net/certificates/importCertificate/import?api-version=7.1-preview -- request: - body: '{"value": "MIIJOwIBAzCCCPcGCSqGSIb3DQEHAaCCCOgEggjkMIII4DCCBgkGCSqGSIb3DQEHAaCCBfoEggX2MIIF8jCCBe4GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAj15YH9pOE58AICB9AEggTYLrI+SAru2dBZRQRlJY7XQ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ZtWXfuRix2fwgltM0bMz1g59d7x/glTfNqxNlsty0A/rWrPJjNbOPRU2XykLuc3AtlTtYsQ32Zsmu67A7UNBw6tVtkEXlFDqhavEhUEO3dvYqMY+QLxzpZhA0q44ZZ9/ex0X6QAFNK5wuWxCbupHWsgxRwKftrxyszMHsAvNoNcTlqcctee+ecNwTJQa1/MDbnhO6/qHA7cfG1qYDq8Th635vGNMW1w3sVS7l0uEvdayAsBHWTcOC2tlMa5bfHrhY8OEIqj5bN5H9RdFy8G/W239tjDu1OYjBDydiBqzBn8HG1DSj1Pjc0kd/82d4ZU0308KFTC3yGcRad0GnEH0Oi3iEJ9HbriUbfVMbXNHOF+MktWiDVqzndGMKmuJSdfTBKvGFvejAWVO5E4mgLvoaMmbchc3BO7sLeraHnJN5hvMBaLcQI38N86mUfTR8AP6AJ9c2k514KaDLclm4z6J8dMz60nUeo5D3YD09G6BavFHxSvJ8MF0Lu5zOFzEePDRFm9mH8W0N/sFlIaYfD/GWU/w44mQucjaBk95YtqOGRIj58tGDWr8iUdHwaYKGqU24zGeRae9DhFXPzZshV1ZGsBQFRaoYkyLAwdJWIXTi+c37YaC8FRSEnnNmS79Dou1Kc3BvK4EYKAD2KxjtUebrV174gD0Q+9YuJ0GXOTspBvCFd5VT2Rw5zDNrA/J3F5fMCk4wOzAfMAcGBSsOAwIaBBSxgh2xyF+88V4vAffBmZXv8Txt4AQU4O/NX4MjxSodbE7ApNAMIvrtREwCAgfQ", - "pwd": "123"}' - headers: - Accept: - - application/json - Content-Length: - - '3183' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - azsdk-python-keyvault-certificates/4.2.0b2 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) - method: POST - uri: https://vaultname.vault.azure.net/certificates/importCertificate/import?api-version=7.1-preview - response: - body: - string: '{"id":"https://vaultname.vault.azure.net/certificates/importCertificate/f9bbb4e48632444087b463a6b0fff796","kid":"https://vaultname.vault.azure.net/keys/importCertificate/f9bbb4e48632444087b463a6b0fff796","sid":"https://vaultname.vault.azure.net/secrets/importCertificate/f9bbb4e48632444087b463a6b0fff796","x5t":"fLi3U52HunIVNXubkEnf8tP6Wbo","cer":"MIICODCCAeagAwIBAgIQqHmpBAv+CY9IJFoUhlbziTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5MB4XDTE1MDQyOTIxNTM0MVoXDTM5MTIzMTIzNTk1OVowFzEVMBMGA1UEAxMMS2V5VmF1bHRUZXN0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5bVAT73zr4+N4WVv2+SvTunAw08ksS4BrJW/nNliz3S9XuzMBMXvmYzU5HJ8TtEgluBiZZYd5qsMJD+OXHSNbsLdmMhni0jYX09h3XlC2VJw2sGKeYF+xEaavXm337aZZaZyjrFBrrUl51UePaN+kVFXNlBb3N3TYpqa7KokXenJQuR+i9Gv9a77c0UsSsDSryxppYhKK7HvTZCpKrhVtulF5iPMswWe9np3uggfMamyIsK/0L7X9w9B2qN7993RR0A00nOk4H6CnkuwO77dSsD0KJsk6FyAoZBzRXDZh9+d9R76zCL506NcQy/jl0lCiQYwsUX73PG5pxOh02OwKwIDAQABo0swSTBHBgNVHQEEQDA+gBAS5AktBh0dTwCNYSHcFmRjoRgwFjEUMBIGA1UEAxMLUm9vdCBBZ2VuY3mCEAY3bACqAGSKEc+41KpcNfQwCQYFKw4DAh0FAANBAGqIjo2geVagzuzaZOe1ClGKhZeiCKfWAxklaGN+qlGUbVS4IN4V1lot3VKnzabasmkEHeNxPwLn1qvSD0cX9CE=","attributes":{"enabled":true,"nbf":1430344421,"exp":2208988799,"created":1593552910,"updated":1593552910,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90},"policy":{"id":"https://vaultname.vault.azure.net/certificates/importCertificate/policy","key_props":{"exportable":true,"kty":"RSA","key_size":2048,"reuse_key":false},"secret_props":{"contentType":"application/x-pkcs12"},"x509_props":{"subject":"CN=KeyVaultTest","ekus":[],"key_usage":[],"validity_months":297,"basic_constraints":{"ca":false}},"lifetime_actions":[{"trigger":{"lifetime_percentage":80},"action":{"action_type":"EmailContacts"}}],"issuer":{"name":"Unknown"},"attributes":{"enabled":true,"created":1593552910,"updated":1593552910}}}' - headers: - cache-control: no-cache - content-length: '1887' - content-type: application/json; charset=utf-8 - date: Tue, 30 Jun 2020 21:35:10 GMT - expires: '-1' - pragma: no-cache - strict-transport-security: max-age=31536000;includeSubDomains - x-aspnet-version: 4.0.30319 - x-content-type-options: nosniff - x-ms-keyvault-network-info: conn_type=Ipv4;addr=73.135.72.237;act_addr_fam=InterNetwork; - x-ms-keyvault-region: westus - x-ms-keyvault-service-version: 1.1.6.0 - x-powered-by: ASP.NET - status: - code: 200 - message: OK - url: https://i42yq7w3yawctk67gnhq7u5g.vault.azure.net/certificates/importCertificate/import?api-version=7.1-preview -version: 1 From 75296854304d659f5ad4edff8f68530481a75ba9 Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Wed, 1 Jul 2020 15:57:05 -0400 Subject: [PATCH 8/9] add back removed keys test recording --- .../test_key_client.test_logging_enabled.yaml | 110 ++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 sdk/keyvault/azure-keyvault-keys/tests/recordings/test_key_client.test_logging_enabled.yaml diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_key_client.test_logging_enabled.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_key_client.test_logging_enabled.yaml new file mode 100644 index 000000000000..447378c0e16c --- /dev/null +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_key_client.test_logging_enabled.yaml @@ -0,0 +1,110 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - azsdk-python-keyvault-keys/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://vaultname.vault.azure.net/keys/rsa-key-name/create?api-version=7.1-preview + response: + body: + string: '{"error":{"code":"Unauthorized","message":"Request is missing a Bearer + or PoP token."}}' + headers: + cache-control: + - no-cache + content-length: + - '87' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 05 Mar 2020 23:16:49 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000;includeSubDomains + www-authenticate: + - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - addr=76.121.58.221;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.0.897 + x-powered-by: + - ASP.NET + status: + code: 401 + message: Unauthorized +- request: + body: '{"kty": "RSA", "key_size": 2048}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '32' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - azsdk-python-keyvault-keys/4.2.0b1 Python/3.8.0 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://vaultname.vault.azure.net/keys/rsa-key-name/create?api-version=7.1-preview + response: + body: + string: '{"key":{"kid":"https://vaultname.vault.azure.net/keys/rsa-key-name/05171c05e42b41b2afaf309ae1ba9ac8","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"xpQWL0VR5FEjMqtrBzholVzvVh4J_O_lRpq2LXFoc2U8lfpwlqJUh8xxdBSP2rKHxwOzYKGxSsx9R3w6gnpC_gLNF9mdS1LexLznN9NUWDCt7VYrHQFv-lxk7TpzPjTB1udWXewY3wZwgRt2ryFbEidUu1qxH97qAxObgHQllKm2SaMGB19h7qyrT_bIVpaEiihrqRxTBdSBeFLCGx61bHKLcDq5QBLcsMp5sgaLHvehBtq3cpw0wXq3SuHWQtKeYDH4ufdu_Jpx68HJhN254WyEszyz4nqBJi9hks-z3rrJli_7o6EfgzFkxo5IY3q-1clurV5jwPC16i0YC0gPew","e":"AQAB"},"attributes":{"enabled":true,"created":1583450209,"updated":1583450209,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: + - no-cache + content-length: + - '671' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 05 Mar 2020 23:16:49 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000;includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - addr=76.121.58.221;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.1.0.897 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 From 908af6bc45da61de766d15d6d10f1a308eeabd57 Mon Sep 17 00:00:00 2001 From: iscai-msft <43154838+iscai-msft@users.noreply.github.com> Date: Mon, 6 Jul 2020 15:05:04 -0400 Subject: [PATCH 9/9] Update sdk/keyvault/azure-keyvault-certificates/CHANGELOG.md Co-authored-by: Charles Lowell --- sdk/keyvault/azure-keyvault-certificates/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/keyvault/azure-keyvault-certificates/CHANGELOG.md b/sdk/keyvault/azure-keyvault-certificates/CHANGELOG.md index 76b064fc715b..a0f8628ee7f4 100644 --- a/sdk/keyvault/azure-keyvault-certificates/CHANGELOG.md +++ b/sdk/keyvault/azure-keyvault-certificates/CHANGELOG.md @@ -4,7 +4,7 @@ - Values of `x-ms-keyvault-region` and `x-ms-keyvault-service-version` headers are no longer redacted in logging output. - Updated minimum `azure-core` version to 1.4.0 -- Fixed bug so users can now not pass in `policy` when calling `import_certificate` +- `import_certificate` no longer raises `AttributeError` when the `policy` keyword argument isn't passed ## 4.2.0b1 (2020-03-10) - Support for Key Vault API version 7.1-preview