You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sdk/keyvault/azure-keyvault-administration/README.md
+76-23Lines changed: 76 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,7 @@
1
-
# Azure KeyVault Administration client library for Python
1
+
# Azure Key Vault Administration client library for Python
2
+
3
+
>**Note:** The Administration library only works with [Managed HSM][managed_hsm] – functions targeting a Key Vault will fail.
4
+
2
5
Azure Key Vault helps solve the following problems:
3
6
- Vault administration (this library) - role-based access control (RBAC), and vault-level backup and restore options
4
7
- Cryptographic key management ([azure-keyvault-keys](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/keyvault/azure-keyvault-keys)) - create, store, and control
@@ -24,7 +27,7 @@ authentication as demonstrated below.
24
27
### Prerequisites
25
28
* An [Azure subscription][azure_sub]
26
29
* Python 2.7, 3.5.3, or later
27
-
* A Key Vault. If you need to create one, See the final two steps in the next section for details on creating the Key Vault with the Azure CLI.
30
+
* A [managed HSM][managed_hsm]. If you need to create one, see the final two steps in the next section for details on creating the managed HSM with the Azure CLI.
28
31
29
32
### Authenticate the client
30
33
This document demonstrates using [DefaultAzureCredential][default_cred_ref]
@@ -74,14 +77,23 @@ a more appropriate name for your service principal.
74
77
export AZURE_TENANT_ID="tenant id"
75
78
```
76
79
77
-
* Create the Key Vault and grant the above mentioned application authorization to perform administrative operations on the Azure Key Vault (replace `<your-resource-group-name>` and `<your-key-vault-name>` with your own, unique names and `<your-service-principal-object-id>` with the value from above):
80
+
* Create the managed HSM and grant the above mentioned application authorization to perform administrative operations on the managed HSM (replace `<your-resource-group-name>` and `<your-managed-hsm-name>` with your own, unique names and `<your-service-principal-object-id>` with the value from above):
* Activate your managed HSM to enable key and role management. Detailed instructions can be found in [this quickstart guide](https://docs.microsoft.com/azure/key-vault/managed-hsm/quick-create-cli#activate-your-managed-hsm). Create three self signed certificates and download the [Security Domain](https://docs.microsoft.com/azure/key-vault/managed-hsm/security-domain) for your managed HSM:
86
+
>**Important:** Create and store the RSA key pairs and security domain file generated in this step securely.
@@ -182,15 +230,15 @@ for role_assignment in role_assignments:
182
230
```
183
231
184
232
### Create, Get, and Delete a role assignment
185
-
Assign a role to a service principal. This will require a role definition id from the list retrieved in the [above snippet](#list-all-role-definitions) and the principal object id retrieved in the [Create and Get credentials](#create-and-get-credentials)
233
+
Assign a role to a service principal. This will require a role definition id from the list retrieved in the [above snippet](#list-all-role-definitions) and the principal object id retrieved in the [Create and Get credentials](#create-and-get-credentials) section.
186
234
187
235
```python
188
236
from azure.identity import DefaultAzureCredential
189
237
from azure.keyvault.administration import KeyVaultAccessControlClient
Clients from the Administration library can only be used to perform operations on a managed HSM, so attempting to do so on a Key Vault will raise an error.
341
+
292
342
## Next steps
293
343
294
344
Content forthcoming
@@ -297,6 +347,8 @@ Content forthcoming
297
347
For more extensive documentation on Azure Key Vault, see the
298
348
[API reference documentation][reference_docs].
299
349
350
+
For more extensive documentation on Managed HSM, see the [service documentation][managed_hsm].
351
+
300
352
## Contributing
301
353
This project welcomes contributions and suggestions. Most contributions require
302
354
you to agree to a Contributor License Agreement (CLA) declaring that you have
@@ -319,9 +371,10 @@ contact opencode@microsoft.com with any additional questions or comments.
0 commit comments