Skip to content

Commit

Permalink
Merge azure-keyvault-keys 4.3.2 hotfix (#15636)
Browse files Browse the repository at this point in the history
  • Loading branch information
chlowell authored Dec 3, 2020
1 parent c963f34 commit 92d3085
Show file tree
Hide file tree
Showing 11 changed files with 595 additions and 15 deletions.
7 changes: 6 additions & 1 deletion sdk/keyvault/azure-keyvault-keys/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# Release History

## 4.3.1 (Unreleased)
## 4.3.2 (Unreleased)
### Added
- Added method `parse_key_vault_key_id` that parses out a full ID returned by Key Vault, so users can easily
access the key's `name`, `vault_url`, and `version`.

## 4.3.1 (2020-12-03)
### Fixed
- `CryptographyClient` operations no longer raise `AttributeError` when
the client was constructed with a key ID
([#15608](https://github.com/Azure/azure-sdk-for-python/issues/15608))

## 4.3.0 (2020-10-06)
### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# Licensed under the MIT License.
# ------------------------------------

VERSION = "4.3.1"
VERSION = "4.3.2"
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,10 @@ def _initialize(self, **kwargs):
# try to get the key material, if we don't have it and aren't forbidden to do so
if not (self._key or self._keys_get_forbidden):
try:
self._key = self._client.get_key(
key_bundle = self._client.get_key(
self._key_id.vault_url, self._key_id.name, self._key_id.version, **kwargs
)
self._key = KeyVaultKey._from_key_bundle(key_bundle) # pylint:disable=protected-access
except HttpResponseError as ex:
# if we got a 403, we don't have keys/get permission and won't try to get the key again
# (other errors may be transient)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,10 @@ async def _initialize(self, **kwargs):
# try to get the key material, if we don't have it and aren't forbidden to do so
if not (self._key or self._keys_get_forbidden):
try:
self._key = await self._client.get_key(
key_bundle = await self._client.get_key(
self._key_id.vault_url, self._key_id.name, self._key_id.version, **kwargs
)
self._key = KeyVaultKey._from_key_bundle(key_bundle) # pylint:disable=protected-access
except HttpResponseError as ex:
# if we got a 403, we don't have keys/get permission and won't try to get the key again
# (other errors may be transient)
Expand Down
3 changes: 2 additions & 1 deletion sdk/keyvault/azure-keyvault-keys/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
'Programming Language :: Python :: 3.8',
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"License :: OSI Approved :: MIT License",
],
zip_safe=False,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
interactions:
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '0'
Content-Type:
- application/json
User-Agent:
- azsdk-python-keyvault-keys/4.3.1 Python/3.5.4 (Windows-10-10.0.19041-SP0)
method: POST
uri: https://vaultname.vault.azure.net/keys/eckeye9470d88/create?api-version=7.1
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, 02 Dec 2020 20:50:57 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-content-type-options:
- nosniff
x-ms-keyvault-network-info:
- conn_type=Ipv4;addr=24.17.201.78;act_addr_fam=InterNetwork;
x-ms-keyvault-region:
- westus
x-ms-keyvault-service-version:
- 1.2.80.0
x-powered-by:
- ASP.NET
status:
code: 401
message: Unauthorized
- request:
body: '{"kty": "EC"}'
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '13'
Content-Type:
- application/json
User-Agent:
- azsdk-python-keyvault-keys/4.3.1 Python/3.5.4 (Windows-10-10.0.19041-SP0)
method: POST
uri: https://vaultname.vault.azure.net/keys/eckeye9470d88/create?api-version=7.1
response:
body:
string: '{"key":{"kid":"https://vaultname.vault.azure.net/keys/eckeye9470d88/6e2cecdbf94c445e94f803e7718005be","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"JHuxTma0kqxGE158ricCGgzbYHx8wDoHFyiY_ew7LVs","y":"nkFZV0C0Mg-_ao0hkHY2Byx829BaSNEV_UBiRRgs8E4"},"attributes":{"enabled":true,"created":1606942258,"updated":1606942258,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}'
headers:
cache-control:
- no-cache
content-length:
- '404'
content-type:
- application/json; charset=utf-8
date:
- Wed, 02 Dec 2020 20:50:58 GMT
expires:
- '-1'
pragma:
- no-cache
strict-transport-security:
- max-age=31536000;includeSubDomains
x-content-type-options:
- nosniff
x-ms-keyvault-network-info:
- conn_type=Ipv4;addr=24.17.201.78;act_addr_fam=InterNetwork;
x-ms-keyvault-region:
- westus
x-ms-keyvault-service-version:
- 1.2.80.0
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-keys/4.3.1 Python/3.5.4 (Windows-10-10.0.19041-SP0)
method: GET
uri: https://vaultname.vault.azure.net/keys/eckeye9470d88/6e2cecdbf94c445e94f803e7718005be?api-version=7.1
response:
body:
string: '{"key":{"kid":"https://vaultname.vault.azure.net/keys/eckeye9470d88/6e2cecdbf94c445e94f803e7718005be","kty":"EC","key_ops":["sign","verify"],"crv":"P-256","x":"JHuxTma0kqxGE158ricCGgzbYHx8wDoHFyiY_ew7LVs","y":"nkFZV0C0Mg-_ao0hkHY2Byx829BaSNEV_UBiRRgs8E4"},"attributes":{"enabled":true,"created":1606942258,"updated":1606942258,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}'
headers:
cache-control:
- no-cache
content-length:
- '404'
content-type:
- application/json; charset=utf-8
date:
- Wed, 02 Dec 2020 20:50:59 GMT
expires:
- '-1'
pragma:
- no-cache
strict-transport-security:
- max-age=31536000;includeSubDomains
x-content-type-options:
- nosniff
x-ms-keyvault-network-info:
- conn_type=Ipv4;addr=24.17.201.78;act_addr_fam=InterNetwork;
x-ms-keyvault-region:
- westus
x-ms-keyvault-service-version:
- 1.2.80.0
x-powered-by:
- ASP.NET
status:
code: 200
message: OK
version: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
interactions:
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '0'
Content-Type:
- application/json
User-Agent:
- azsdk-python-keyvault-keys/4.3.1 Python/3.5.4 (Windows-10-10.0.19041-SP0)
method: POST
uri: https://vaultname.vault.azure.net/keys/rsakeyf8150e06/create?api-version=7.1
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, 02 Dec 2020 20:51:00 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-content-type-options:
- nosniff
x-ms-keyvault-network-info:
- conn_type=Ipv4;addr=24.17.201.78;act_addr_fam=InterNetwork;
x-ms-keyvault-region:
- westus
x-ms-keyvault-service-version:
- 1.2.80.0
x-powered-by:
- ASP.NET
status:
code: 401
message: Unauthorized
- request:
body: '{"kty": "RSA"}'
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '14'
Content-Type:
- application/json
User-Agent:
- azsdk-python-keyvault-keys/4.3.1 Python/3.5.4 (Windows-10-10.0.19041-SP0)
method: POST
uri: https://vaultname.vault.azure.net/keys/rsakeyf8150e06/create?api-version=7.1
response:
body:
string: '{"key":{"kid":"https://vaultname.vault.azure.net/keys/rsakeyf8150e06/ed780da8294a47aa906f65b4d3fff7d3","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"4ChGYiIT14cljCPVD6BEK23HeZ5Wzbm4JRLMtzLj7tpuUL3S0LBqcQRESEUkZ_La2olPa4lAwUhGN2cEQvhM0oNa1uGLubD9Q1V3g5yYeqj5faW5tdF_UXEcdSeODj7egV8miXO9IAKR0-L-8_-x8p_CkJSEk9DXSiiLtHUaxAb4EG2E8RyC3-Mw-Fb2cMxVC50X-S4dIs_9iKFenzqqWuYsIVme3Qritn2DMiOcswnr2LeCcFfruDTlFoLnAg-29dK0giOEYQmKOH3cM9EDZ93kKiiGcA6QLZefm8HbjqugvsAYoZDCtUvJkNBlCsc4YIM1FZYVXTDnWEddzB3CqQ","e":"AQAB"},"attributes":{"enabled":true,"created":1606942262,"updated":1606942262,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}'
headers:
cache-control:
- no-cache
content-length:
- '694'
content-type:
- application/json; charset=utf-8
date:
- Wed, 02 Dec 2020 20:51:01 GMT
expires:
- '-1'
pragma:
- no-cache
strict-transport-security:
- max-age=31536000;includeSubDomains
x-content-type-options:
- nosniff
x-ms-keyvault-network-info:
- conn_type=Ipv4;addr=24.17.201.78;act_addr_fam=InterNetwork;
x-ms-keyvault-region:
- westus
x-ms-keyvault-service-version:
- 1.2.80.0
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-keys/4.3.1 Python/3.5.4 (Windows-10-10.0.19041-SP0)
method: GET
uri: https://vaultname.vault.azure.net/keys/rsakeyf8150e06/ed780da8294a47aa906f65b4d3fff7d3?api-version=7.1
response:
body:
string: '{"key":{"kid":"https://vaultname.vault.azure.net/keys/rsakeyf8150e06/ed780da8294a47aa906f65b4d3fff7d3","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"4ChGYiIT14cljCPVD6BEK23HeZ5Wzbm4JRLMtzLj7tpuUL3S0LBqcQRESEUkZ_La2olPa4lAwUhGN2cEQvhM0oNa1uGLubD9Q1V3g5yYeqj5faW5tdF_UXEcdSeODj7egV8miXO9IAKR0-L-8_-x8p_CkJSEk9DXSiiLtHUaxAb4EG2E8RyC3-Mw-Fb2cMxVC50X-S4dIs_9iKFenzqqWuYsIVme3Qritn2DMiOcswnr2LeCcFfruDTlFoLnAg-29dK0giOEYQmKOH3cM9EDZ93kKiiGcA6QLZefm8HbjqugvsAYoZDCtUvJkNBlCsc4YIM1FZYVXTDnWEddzB3CqQ","e":"AQAB"},"attributes":{"enabled":true,"created":1606942262,"updated":1606942262,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}'
headers:
cache-control:
- no-cache
content-length:
- '694'
content-type:
- application/json; charset=utf-8
date:
- Wed, 02 Dec 2020 20:51:03 GMT
expires:
- '-1'
pragma:
- no-cache
strict-transport-security:
- max-age=31536000;includeSubDomains
x-content-type-options:
- nosniff
x-ms-keyvault-network-info:
- conn_type=Ipv4;addr=24.17.201.78;act_addr_fam=InterNetwork;
x-ms-keyvault-region:
- westus
x-ms-keyvault-service-version:
- 1.2.80.0
x-powered-by:
- ASP.NET
status:
code: 200
message: OK
version: 1
Loading

0 comments on commit 92d3085

Please sign in to comment.