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: articles/azure-fluid-relay/concepts/customer-managed-keys.md
+48-2Lines changed: 48 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -83,13 +83,39 @@ Notes:
83
83
- Properties.encryption.customerManagedKeyEncryption.keyEncryptionKeyIdentity.userAssignedIdentityResourceId is the resource ID of the user assigned identity that should be used for CMK. Notice that it should be one of the identities in Identity.userAssignedIdentities (You must assign the identity to Fluid Relay resource before it can use it for CMK). Also, it should have necessary permissions on the key (provided by keyEncryptionKeyUrl).
84
84
- Properties.encryption.customerManagedKeyEncryption.keyEncryptionKeyUrl is the key identifier used for CMK.
85
85
86
+
### [PowerShell](#tab/azure-powershell)
87
+
You need to install [Azure Fluid Relay module](/powershell/module/az.fluidrelay) first.
88
+
89
+
```azurepowershell
90
+
Install-Module Az.FluidRelay
91
+
```
92
+
93
+
And make sure you complete all the prerequsite steps.
94
+
95
+
Example of creating a Fluid Relay Service with CMK enabled:
For more information about the command, see [New-AzFluidRelayServer](/powershell/module/az.fluidrelay/new-azfluidrelayserver)
101
+
102
+
**Notes:**
103
+
104
+
- The `KeyEncryptionKeyIdentityType`**must be**`UserAssigned` since `SystemAssigned` identity is not supported for CMK. It indicates the identity type to be used for Customer-Managed Key (CMK) encryption.
105
+
- While multiple identities can be specified in the `UserAssignedIdentity` argument, **only** the identity defined in `KeyEncryptionKeyIdentityUserAssignedIdentityResourceId` is used to access the Key Vault for CMK encryption.
106
+
- The `KeyEncryptionKeyIdentityUserAssignedIdentityResourceId` field should be set to the **resource ID** of the user-assigned identity intended for CMK access.
107
+
- This identity must already be listed in the `UserAssignedIdentity` field.
108
+
- Additionally, it needs the necessary permissions on the key specified in `CustomerManagedKeyEncryptionKeyUrl`.
109
+
-`CustomerManagedKeyEncryptionKeyUrl` is the **key identifier** used for CMK.
110
+
86
111
### [Azure CLI](#tab/azure-cli)
87
112
To create Fluid Relay with CMK enabled using Azure CLI, you need to install [fluid-relay](/cli/azure/fluid-relay) extension first. See [instructions](/cli/azure/azure-cli-extensions-overview).
88
113
89
114
And make sure you complete all the prerequsite steps.
90
115
116
+
Example of creating a Fluid Relay Service with CMK enabled:
91
117
```azurecli
92
-
az fluid-relay server create --server-name <Fluid Relay Service name> --resource-group <resource group name> --identity '{"type":"UserAssigned","user-assigned-identities":{"<user assigned resource id>":{}}}' --key-identity '{"identity-type":"UserAssigned","user-assigned-identities":"<user assigned resource id>"}' --key-url "https://akv-cuseuap-cmktest-02.vault.azure.net/keys/key-rsa-4096/81b15c848e874aabb6f13839b43b16fc" --location <location> --sku <standard or basic>
118
+
az fluid-relay server create --server-name <Fluid Relay Service name> --resource-group <resource group name> --identity '{"type":"UserAssigned","user-assigned-identities":{"<user assigned resource id>":{}}}' --key-identity '{"identity-type":"UserAssigned","user-assigned-identities":"<user assigned resource id>"}' --key-url "<key URL>" --location <location> --sku <standard or basic>
93
119
```
94
120
95
121
For more information about the command, see [az fluid-relay server create](/cli/azure/fluid-relay/server?view=azure-cli-latest#az-fluid-relay-server-create)
@@ -102,7 +128,6 @@ For more information about the command, see [az fluid-relay server create](/cli/
102
128
- While multiple identities can be specified in the `identity` argument, **only** the identity defined in `key-identity` is used to access the Key Vault for CMK encryption.
103
129
- The `user-assigned-identities` field under `key-identity` should be set to the **resource ID** of the user-assigned identity intended for CMK access.
104
130
- This identity must already be listed in the `identity` field.
105
-
- It must also be assigned to the Fluid Relay resource **before** it can be used for CMK.
106
131
- Additionally, it needs the necessary permissions on the key specified in `key-url`.
107
132
-`key-url` is the **key identifier** used for CMK.
108
133
@@ -144,6 +169,27 @@ Request payload example for updating key encryption key URL:
144
169
}
145
170
```
146
171
172
+
### [PowerShell](#tab/azure-powershell)
173
+
You need to install [Azure Fluid Relay module](/powershell/module/az.fluidrelay) first.
174
+
175
+
```azurepowershell
176
+
Install-Module Az.FluidRelay
177
+
```
178
+
179
+
During an update, you only need to provide the parameters that need to be changed.
180
+
181
+
Update encryption key URL
182
+
```azurepowershell
183
+
Update-AzFluidRelayServer -Name <Fluid Relay Service name> -ResourceGroup <resource group name> -SubscriptionId "<subscription id>" -CustomerManagedKeyEncryptionKeyUrl "<new key URL>"
184
+
```
185
+
186
+
Update assigned identity for CMK
187
+
```azurepowershell
188
+
Update-AzFluidRelayServer -Name <Fluid Relay Service name> -ResourceGroup <resource group name> -SubscriptionId "<subscription id>" -KeyEncryptionKeyIdentityUserAssignedIdentityResourceId "<new user assigned resource id>"
189
+
```
190
+
191
+
For more information about the command, see [Update-AzFluidRelayServer](/powershell/module/az.fluidrelay/update-azfluidrelayserver)
0 commit comments