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
docs: add KMS encryption documentation for self-managed Azure
- Add Key Vault Crypto User role assignment instructions for KMS
identity in self-managed Azure cluster creation guide
- Add KMS role assignment warning callout in workload identity
setup guide
- Update aggregated docs and API reference with KMS workload
identity fields
Signed-off-by: Bryan Cox <brcox@redhat.com>
Commit-Message-Assisted-by: Claude (via Claude Code)
Copy file name to clipboardExpand all lines: docs/content/how-to/azure/azure-workload-identity-setup.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ hypershift create iam azure \
52
52
--output-file workload-identities.json
53
53
```
54
54
55
-
This creates 7 managed identities with federated credentials for:
55
+
This creates 8 managed identities with federated credentials for:
56
56
57
57
- Disk CSI driver
58
58
- File CSI driver
@@ -61,6 +61,11 @@ This creates 7 managed identities with federated credentials for:
61
61
- Cloud Provider
62
62
- NodePool Management
63
63
- Network Operator
64
+
- KMS (Key Management Service) — for Azure Key Vault etcd encryption at rest
65
+
66
+
!!! warning "KMS Key Vault Role Assignment"
67
+
68
+
If you plan to use KMS encryption, you must **manually** assign the `Key Vault Crypto User` role to the KMS identity on your Key Vault. The `--auto-assign-roles` flag does not cover this because the Key Vault scope is user-provided. See [Enabling KMS Encryption](create-self-managed-azure-cluster.md#enabling-kms-encryption-etcd-encryption-at-rest) for the role assignment commands.
64
69
65
70
For complete documentation on the IAM commands, see [Create Azure IAM Resources Separately](create-iam-separately.md).
## Enabling KMS Encryption (etcd Encryption at Rest)
251
+
252
+
Self-managed Azure HostedClusters support encrypting etcd data at rest using [Azure Key Vault](https://learn.microsoft.com/en-us/azure/key-vault/general/overview) with the KMSv2 protocol. This requires:
253
+
254
+
1. An Azure Key Vault with a cryptographic key
255
+
2. A workload identity with `Key Vault Crypto User` role on the Key Vault
256
+
257
+
### Prerequisites
258
+
259
+
Ensure the `kms` workload identity is included in your `workload-identities.json` file. If you used `hypershift create iam azure`, the KMS identity is created automatically.
260
+
261
+
### Create a Key Vault and Key
262
+
263
+
```bash
264
+
# Create Key Vault
265
+
KV_NAME="${PREFIX}-kv"
266
+
az keyvault create \
267
+
--name "${KV_NAME}" \
268
+
--resource-group "${MANAGED_RG_NAME}" \
269
+
--location "${LOCATION}" \
270
+
--enable-rbac-authorization
271
+
272
+
# Create encryption key
273
+
KEY_NAME="${PREFIX}-etcd-key"
274
+
az keyvault key create \
275
+
--vault-name "${KV_NAME}" \
276
+
--name "${KEY_NAME}" \
277
+
--kty RSA \
278
+
--size 2048
279
+
280
+
# Get the key ID (used as --encryption-key-id)
281
+
ENCRYPTION_KEY_ID=$(az keyvault key show \
282
+
--vault-name "${KV_NAME}" \
283
+
--name "${KEY_NAME}" \
284
+
--query key.kid -o tsv)
285
+
```
286
+
287
+
### Assign Key Vault Crypto User Role to the KMS Identity
288
+
289
+
!!! warning "Manual Step Required"
290
+
291
+
The `--auto-assign-roles` / `--assign-service-principal-roles` flag does **not** assign the Key Vault role because the Key Vault scope is user-provided and not known to the CLI at role-assignment time. You must perform this role assignment manually.
292
+
293
+
Grant the KMS workload identity the `Key Vault Crypto User` role on your Key Vault so it can encrypt and decrypt etcd data:
294
+
295
+
```bash
296
+
# Get the principal ID of the KMS managed identity
297
+
# The identity name follows the pattern: {clusterName}-kms-{infraID}
298
+
# List identities in the resource group to find the exact name:
299
+
# az identity list --resource-group "${PERSISTENT_RG_NAME}" --query "[?contains(name, 'kms')]" -o table
For self-managed Azure, the KMS provider authenticates using the `kms` workload identity specified in your `workload-identities.json`. This is different from managed Azure (ARO HCP), which uses managed identities with CSI secret store volumes. The `--kms-credentials-secret-name` flag is not needed for self-managed clusters.
0 commit comments