Skip to content

Commit dc84cca

Browse files
authored
Final Key Vault 4.0.0b3 updates (Azure#7189)
1 parent 59e24d1 commit dc84cca

File tree

13 files changed

+395
-193
lines changed

13 files changed

+395
-193
lines changed

sdk/keyvault/azure-keyvault-certificates/HISTORY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Release History
22

3-
## 4.0.0b3 (2019-09-10)
3+
## 4.0.0b3 (2019-09-11)
44
Version 4.0.0b3 is the first preview of our efforts to create a user-friendly and Pythonic client library for Azure Key Vault.
55
For more information about preview releases of other Azure SDK libraries, please visit https://aka.ms/azure-sdk-preview1-python.
66

sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
# Licensed under the MIT License.
44
# ------------------------------------
55

6-
VERSION = "4.0.0b1"
6+
VERSION = "4.0.0b3"

sdk/keyvault/azure-keyvault-certificates/setup.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,9 @@
7979
]
8080
),
8181
install_requires=["azure-core<2.0.0,>=1.0.0b2", "azure-common~=1.1", "msrest>=0.5.0"],
82-
extras_require={":python_version<'3.0'": ["azure-keyvault-nspkg"], ":python_version<'3.5'": ["typing"]},
82+
extras_require={
83+
":python_version<'3.0'": ["azure-keyvault-nspkg"],
84+
":python_version<'3.4'": ["enum34>=1.0.4"],
85+
":python_version<'3.5'": ["typing"],
86+
},
8387
)

sdk/keyvault/azure-keyvault-keys/HISTORY.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Release History
22

3+
## 4.0.0b3 (2019-09-11)
4+
### Breaking changes:
5+
- `CryptographyClient` methods `wrap` and `unwrap` are renamed `wrap_key` and
6+
`unwrap_key`, respectively.
7+
8+
### New features:
9+
- `CryptographyClient` performs encrypt, verify and wrap operations locally
10+
when its key's public material is available (i.e., when it has keys/get
11+
permission).
12+
313
## 4.0.0b2 (2019-08-06)
414
### Breaking changes:
515
- Removed `azure.core.Configuration` from the public API in preparation for a

sdk/keyvault/azure-keyvault-keys/README.md

Lines changed: 149 additions & 84 deletions
Large diffs are not rendered by default.

sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
# Licensed under the MIT License.
44
# ------------------------------------
55

6-
VERSION = "4.0.0b2"
6+
VERSION = "4.0.0b3"

sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/aio/client.py

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,43 @@ class CryptographyClient(AsyncKeyVaultClientBase):
2828
2929
:param key:
3030
Either a :class:`~azure.keyvault.keys.models.Key` instance as returned by
31-
:func:`~azure.keyvault.keys.KeyClient.get_key`, or a string.
31+
:func:`~azure.keyvault.keys.aio.KeyClient.get_key`, or a string.
3232
If a string, the value must be the full identifier of an Azure Key Vault key with a version.
3333
:type key: str or :class:`~azure.keyvault.keys.models.Key`
3434
:param credential: An object which can provide an access token for the vault, such as a credential from
35-
:mod:`azure.identity`
35+
:mod:`azure.identity.aio`
3636
3737
Keyword arguments
38-
- *api_version* - version of the Key Vault API to use. Defaults to the most recent.
38+
- **api_version** - version of the Key Vault API to use. Defaults to the most recent.
39+
40+
Creating a ``CryptographyClient``:
41+
42+
.. code-block:: python
43+
44+
from azure.identity.aio import DefaultAzureCredential
45+
from azure.keyvault.keys.crypto.aio import CryptographyClient
46+
47+
credential = DefaultAzureCredential()
48+
49+
# create a CryptographyClient using a Key instance
50+
key = await key_client.get_key("mykey")
51+
crypto_client = CryptographyClient(key, credential)
52+
53+
# or a Key's id, which must include a version
54+
key_id = "https://<your vault>.vault.azure.net/keys/mykey/fe4fdcab688c479a9aa80f01ffeac26"
55+
crypto_client = CryptographyClient(key_id, credential)
56+
57+
You can also obtain a ``CryptographyClient`` from a :class:`~azure.keyvault.keys.aio.KeyClient`:
58+
59+
.. code-block:: python
60+
61+
from azure.identity.aio import DefaultAzureCredential
62+
from azure.keyvault.keys.aio import KeyClient
63+
64+
credential = DefaultAzureCredential()
65+
key_client = KeyClient(vault_url=<your vault url>, credential=credential)
66+
crypto_client = key_client.get_cryptography_client("mykey")
67+
3968
"""
4069

4170
def __init__(self, key: "Union[Key, str]", credential: "TokenCredential", **kwargs: "**Any") -> None:

sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/client.py

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,36 @@ class CryptographyClient(KeyVaultClientBase):
3636
:mod:`azure.identity`
3737
3838
Keyword arguments
39-
- *api_version* - version of the Key Vault API to use. Defaults to the most recent.
39+
- **api_version** - version of the Key Vault API to use. Defaults to the most recent.
40+
41+
Creating a ``CryptographyClient``:
42+
43+
.. code-block:: python
44+
45+
from azure.identity import DefaultAzureCredential
46+
from azure.keyvault.keys.crypto import CryptographyClient
47+
48+
credential = DefaultAzureCredential()
49+
50+
# create a CryptographyClient using a Key instance
51+
key = key_client.get_key("mykey")
52+
crypto_client = CryptographyClient(key, credential)
53+
54+
# or a Key's id, which must include a version
55+
key_id = "https://<your vault>.vault.azure.net/keys/mykey/fe4fdcab688c479a9aa80f01ffeac26"
56+
crypto_client = CryptographyClient(key_id, credential)
57+
58+
You can also obtain a ``CryptographyClient`` from a :class:`~azure.keyvault.keys.KeyClient`:
59+
60+
.. code-block:: python
61+
62+
from azure.identity import DefaultAzureCredential
63+
from azure.keyvault.keys import KeyClient
64+
65+
credential = DefaultAzureCredential()
66+
key_client = KeyClient(vault_url=<your vault url>, credential=credential)
67+
crypto_client = key_client.get_cryptography_client("mykey")
68+
4069
"""
4170

4271
def __init__(self, key, credential, **kwargs):

sdk/keyvault/azure-keyvault-keys/setup.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,9 @@
7979
]
8080
),
8181
install_requires=["azure-core<2.0.0,>=1.0.0b2", "azure-common~=1.1", "msrest>=0.5.0"],
82-
extras_require={":python_version<'3.0'": ["azure-keyvault-nspkg"], ":python_version<'3.5'": ["typing"]},
82+
extras_require={
83+
":python_version<'3.0'": ["azure-keyvault-nspkg"],
84+
":python_version<'3.4'": ["enum34>=1.0.4"],
85+
":python_version<'3.5'": ["typing"],
86+
},
8387
)

sdk/keyvault/azure-keyvault-secrets/HISTORY.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Release History
2+
## 4.0.0b3 (2019-09-11)
3+
This release includes only internal changes.
24

35
## 4.0.0b2 (2019-08-06)
46
### Breaking changes:

0 commit comments

Comments
 (0)