Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Final Key Vault 4.0.0b3 updates #7189

Merged
merged 6 commits into from
Sep 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/keyvault/azure-keyvault-certificates/HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release History

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

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.0.0b1"
VERSION = "4.0.0b3"
6 changes: 5 additions & 1 deletion sdk/keyvault/azure-keyvault-certificates/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,9 @@
]
),
install_requires=["azure-core<2.0.0,>=1.0.0b2", "azure-common~=1.1", "msrest>=0.5.0"],
extras_require={":python_version<'3.0'": ["azure-keyvault-nspkg"], ":python_version<'3.5'": ["typing"]},
extras_require={
":python_version<'3.0'": ["azure-keyvault-nspkg"],
":python_version<'3.4'": ["enum34>=1.0.4"],
":python_version<'3.5'": ["typing"],
},
)
10 changes: 10 additions & 0 deletions sdk/keyvault/azure-keyvault-keys/HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Release History

## 4.0.0b3 (2019-09-11)
### Breaking changes:
- `CryptographyClient` methods `wrap` and `unwrap` are renamed `wrap_key` and
`unwrap_key`, respectively.

### New features:
- `CryptographyClient` performs encrypt, verify and wrap operations locally
when its key's public material is available (i.e., when it has keys/get
permission).

## 4.0.0b2 (2019-08-06)
### Breaking changes:
- Removed `azure.core.Configuration` from the public API in preparation for a
Expand Down
233 changes: 149 additions & 84 deletions sdk/keyvault/azure-keyvault-keys/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# Licensed under the MIT License.
# ------------------------------------

VERSION = "4.0.0b2"
VERSION = "4.0.0b3"
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,43 @@ class CryptographyClient(AsyncKeyVaultClientBase):

:param key:
Either a :class:`~azure.keyvault.keys.models.Key` instance as returned by
:func:`~azure.keyvault.keys.KeyClient.get_key`, or a string.
:func:`~azure.keyvault.keys.aio.KeyClient.get_key`, or a string.
If a string, the value must be the full identifier of an Azure Key Vault key with a version.
:type key: str or :class:`~azure.keyvault.keys.models.Key`
:param credential: An object which can provide an access token for the vault, such as a credential from
:mod:`azure.identity`
:mod:`azure.identity.aio`

Keyword arguments
- *api_version* - version of the Key Vault API to use. Defaults to the most recent.
- **api_version** - version of the Key Vault API to use. Defaults to the most recent.

Creating a ``CryptographyClient``:

.. code-block:: python

from azure.identity.aio import DefaultAzureCredential
from azure.keyvault.keys.crypto.aio import CryptographyClient

credential = DefaultAzureCredential()

# create a CryptographyClient using a Key instance
key = await key_client.get_key("mykey")
crypto_client = CryptographyClient(key, credential)

# or a Key's id, which must include a version
key_id = "https://<your vault>.vault.azure.net/keys/mykey/fe4fdcab688c479a9aa80f01ffeac26"
crypto_client = CryptographyClient(key_id, credential)

You can also obtain a ``CryptographyClient`` from a :class:`~azure.keyvault.keys.aio.KeyClient`:

.. code-block:: python

from azure.identity.aio import DefaultAzureCredential
from azure.keyvault.keys.aio import KeyClient

credential = DefaultAzureCredential()
key_client = KeyClient(vault_url=<your vault url>, credential=credential)
crypto_client = key_client.get_cryptography_client("mykey")

"""

def __init__(self, key: "Union[Key, str]", credential: "TokenCredential", **kwargs: "**Any") -> None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,36 @@ class CryptographyClient(KeyVaultClientBase):
:mod:`azure.identity`

Keyword arguments
- *api_version* - version of the Key Vault API to use. Defaults to the most recent.
- **api_version** - version of the Key Vault API to use. Defaults to the most recent.

Creating a ``CryptographyClient``:

.. code-block:: python

from azure.identity import DefaultAzureCredential
from azure.keyvault.keys.crypto import CryptographyClient

credential = DefaultAzureCredential()

# create a CryptographyClient using a Key instance
key = key_client.get_key("mykey")
crypto_client = CryptographyClient(key, credential)

# or a Key's id, which must include a version
key_id = "https://<your vault>.vault.azure.net/keys/mykey/fe4fdcab688c479a9aa80f01ffeac26"
crypto_client = CryptographyClient(key_id, credential)

You can also obtain a ``CryptographyClient`` from a :class:`~azure.keyvault.keys.KeyClient`:

.. code-block:: python

from azure.identity import DefaultAzureCredential
from azure.keyvault.keys import KeyClient

credential = DefaultAzureCredential()
key_client = KeyClient(vault_url=<your vault url>, credential=credential)
crypto_client = key_client.get_cryptography_client("mykey")

"""

def __init__(self, key, credential, **kwargs):
Expand Down
6 changes: 5 additions & 1 deletion sdk/keyvault/azure-keyvault-keys/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,9 @@
]
),
install_requires=["azure-core<2.0.0,>=1.0.0b2", "azure-common~=1.1", "msrest>=0.5.0"],
extras_require={":python_version<'3.0'": ["azure-keyvault-nspkg"], ":python_version<'3.5'": ["typing"]},
extras_require={
":python_version<'3.0'": ["azure-keyvault-nspkg"],
":python_version<'3.4'": ["enum34>=1.0.4"],
":python_version<'3.5'": ["typing"],
},
)
2 changes: 2 additions & 0 deletions sdk/keyvault/azure-keyvault-secrets/HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Release History
## 4.0.0b3 (2019-09-11)
This release includes only internal changes.

## 4.0.0b2 (2019-08-06)
### Breaking changes:
Expand Down
Loading