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/postgresql/flexible-server/concepts-data-encryption.md
+19-14Lines changed: 19 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -158,9 +158,12 @@ Some of the reasons why server state can become *Inaccessible* are:
158
158
- If you setup overly restrictive Azure KeyVault firewall rules that cause Azure Database for PostgreSQL- Flexible Server inability to communicate with Azure KeyVault to retrieve keys. If you enable [KeyVault firewall](../../key-vault/general/overview-vnet-service-endpoints.md#trusted-services), make sure you check an option to *'Allow Trusted Microsoft Services to bypass this firewall.'*
159
159
160
160
161
+
> [!NOTE]
162
+
> CLI examples below are based on 2.43.0 version of Azure Database for PostgreSQL - Flexible Server CLI libraries, which are in preview and may be subject to changes.
163
+
161
164
## Setup Customer Managed Key during Server Creation
162
165
163
-
### From portal
166
+
### Portal
164
167
165
168
Prerequisites:
166
169
@@ -181,7 +184,7 @@ Follow the steps below to enable CMK while creating Postgres Flexible Server usi
181
184
1. Once it's finished, you should be able to navigate to Data Encryption (preview) screen for the server and update identity or key if necessary
182
185
183
186
184
-
### From CLI:
187
+
### CLI:
185
188
186
189
Prerequisites:
187
190
@@ -192,31 +195,30 @@ Follow the steps below to enable CMK while creating Postgres Flexible Server usi
192
195
1. Create a key vault and a key to use for a customer-managed key. Also enable purge protection and soft delete on the key vault.
193
196
194
197
```azurecli-interactive
195
-
az keyvault create -g <resource_group> -n <vault_name> --location <azure_region> --enable-purge-
4. Add access policy with key permissions of *wrapKey*,*unwrapKey*, *get*, *list* in Azure KeyVault to the managed identity we created above
209
212
```azurecli-interactive
210
-
az keyvault set-policy -g <resource_group> -n <vault_name> --object-id '<principalID of managed_identity>' --key-permissions wrapKey unwrapKey get list
213
+
az keyvault set-policy -g <resource_group> -n <vault_name> --object-id $identityPrincipalId --key-permissions wrapKey unwrapKey get list
211
214
```
212
215
5. Finally, lets create Azure Database for PostgreSQL - Flexible Server with CMK based encryption enabled
## Update Customer Managed Key on the CMK enabled Flexible Server
218
220
219
-
### From portal
221
+
### Portal
220
222
221
223
Prerequisites:
222
224
@@ -235,17 +237,20 @@ Follow the steps below to update CMK on CMK enabled Flexible Server using Azure
235
237
1. Select different key by choosing subscription, Key Vault and key from dropdowns provided.
236
238
237
239
238
-
### From CLI
240
+
### CLI
239
241
240
242
Prerequisites:
241
243
- You must have an Azure subscription and be an administrator on that subscription.
242
244
- Key Vault with key in region where Postgres Flex Server will be created. Follow this [tutorial](../../key-vault/general/quick-create-portal.md) to create Key Vault and generate key.
243
245
244
246
Follow the steps below to change\rotate key or identity after creation of server with data encryption.
245
-
1. Change key/identity for data encryption for existing server
247
+
1. Change key/identity for data encryption for existing server, first lets get new key identifier
0 commit comments