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
If you have enabled role-based access control (RBAC) for Key Vault instead, you can find roles like "Key Vault Certificates Officer" in our [RBAC guide][rbac_guide].
77
+
76
78
* Use the aforementioned Key Vault name to retrieve details of your Key Vault, which also contain your Key Vault URL:
77
79
78
80
```Bash
@@ -338,5 +340,6 @@ This project has adopted the [Microsoft Open Source Code of Conduct][microsoft_c
Copy file name to clipboardExpand all lines: sdk/keyvault/azure-security-keyvault-keys/README.md
+57-3Lines changed: 57 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,9 @@
1
1
# Azure Key Vault Key client library for Java
2
-
Azure Key Vault allows you to create, manage and store keys in the Key Vault. The Azure Key Vault Keys client library supports RSA keys and elliptic curve keys, each with corresponding support in hardware security modules (HSM).
2
+
Azure Key Vault is a cloud service that provides secure storage of keys for encrypting your data. Multiple keys, and multiple versions of the same key, can be kept in the Azure Key Vault. Cryptographic keys in Azure Key Vault are represented as JSON Web Key (JWK) objects.
3
3
4
-
Multiple keys and multiple versions of the same key can be kept in the Key Vault. Cryptographic keys in Key Vault are represented as [JSON Web Key [JWK]][jwk_specification] objects. This library offers operations to create, retrieve, update, delete, purge, backup, restore and list the keys, as well as its versions.
4
+
Azure Key Vault Managed HSM is a fully-managed, highly-available, single-tenant, standards-compliant cloud service that enables you to safeguard cryptographic keys for your cloud applications using FIPS 140-2 Level 3 validated HSMs.
5
+
6
+
The Azure Key Vault keys library client supports RSA keys and Elliptic Curve (EC) keys, each with corresponding support in hardware security modules (HSM). It offers operations to create, retrieve, update, delete, purge, backup, restore, and list the keys and its versions.
@@ -56,7 +58,16 @@ Here is an [Azure Cloud Shell][azure_cloud_shell] snippet below to
56
58
}
57
59
```
58
60
59
-
* Use the above returned credentials information to set the **AZURE_CLIENT_ID** (appId), **AZURE_CLIENT_SECRET** (password), and **AZURE_TENANT_ID** (tenantId) environment variables. The following example shows a way to do this in Bash:
61
+
* Take note of the service principal objectId
62
+
```PowerShell
63
+
az ad sp show --id <appId> --query objectId
64
+
```
65
+
Output:
66
+
```
67
+
"<your-service-principal-object-id>"
68
+
```
69
+
70
+
* Use the returned credentials above to set the **AZURE_CLIENT_ID** (appId), **AZURE_CLIENT_SECRET** (password), and **AZURE_TENANT_ID** (tenantId) environment variables. The following example shows a way to do this in Bash:
60
71
61
72
```Bash
62
73
export AZURE_CLIENT_ID="generated-app-ID"
@@ -73,12 +84,53 @@ Here is an [Azure Cloud Shell][azure_cloud_shell] snippet below to
If you have enabled role-based access control (RBAC) for Key Vault instead, you can find roles like "Key Vault Crypto Officer" in our [RBAC guide][rbac_guide].
88
+
If you are managing your keys using Managed HSM, read about its [access control][access_control] that supports different built-in roles isolated from Azure Resource Manager (ARM).
89
+
76
90
* Use the aforementioned Key Vault name to retrieve details of your Key Vault, which also contain your Key Vault URL:
77
91
78
92
```Bash
79
93
az keyvault show --name <your-key-vault-name>
80
94
```
81
95
96
+
* Create the Azure Key Vault or Managed HSM and grant the above mentioned application authorization to perform administrative operations on the Managed HSM (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):
97
+
98
+
If you are creating a standard Key Vault resource, use the following CLI command:
99
+
```bash
100
+
az keyvault create --resource-group <your-resource-group-name> --name <your-key-vault-name>
101
+
```
102
+
103
+
If you are creating a Managed HSM resource, use the following CLI command:
This section only applies if you are creating a Managed HSM. All data plane commands are disabled until the HSM is activated. You will not be able to create keys or assign roles. Only the designated administrators that were assigned during the create command can activate the HSM. To activate the HSM you must download the security domain.
110
+
111
+
To activate your HSM you need:
112
+
- Minimum 3 RSA key-pairs (maximum 10)
113
+
- Specify minimum number of keys required to decrypt the security domain (quorum)
114
+
115
+
To activate the HSM you send at least 3 (maximum 10) RSA public keys to the HSM. The HSM encrypts the security domain with these keys and sends it back.
116
+
Once this security domain is successfully downloaded, your HSM is ready to use.
117
+
You also need to specify quorum, which is the minimum number of private keys required to decrypt the security domain.
118
+
119
+
The example below shows how to use openssl to generate 3 self signed certificate.
Once you've populated the **AZURE_CLIENT_ID**, **AZURE_CLIENT_SECRET**, and **AZURE_TENANT_ID** environment variables and replaced **your-key-vault-url** with the URI returned above, you can create the KeyClient:
84
136
@@ -432,5 +484,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][microsoft_c
If you have enabled role-based access control (RBAC) for Key Vault instead, you can find roles like "Key Vault Secrets Officer" in our [RBAC guide][rbac_guide].
80
+
79
81
* Use the aforementioned Key Vault name to retrieve details of your Vault, which also contain your Key Vault URL:
80
82
81
83
```Bash
@@ -320,5 +322,6 @@ This project has adopted the [Microsoft Open Source Code of Conduct][microsoft_c
0 commit comments