Skip to content

Commit 53af3d9

Browse files
Merge pull request #272763 from msmbaldwin/akv-misc
Anonymizing examples
2 parents aba3370 + cce80d8 commit 53af3d9

File tree

5 files changed

+27
-27
lines changed

5 files changed

+27
-27
lines changed

articles/key-vault/general/integrate-databricks-blob-storage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ az storage account create --name contosoblobstorage5 --resource-group contosoRes
4141
Before you can create a container to upload the blob to, you'll need to assign the [Storage Blob Data Contributor](../../role-based-access-control/built-in-roles.md#storage-blob-data-contributor) role to yourself. For this example, the role will be assigned to the storage account you've made earlier.
4242

4343
```azurecli
44-
az role assignment create --role "Storage Blob Data Contributor" --assignee [email protected] --scope "/subscriptions/aaaaaaaa-bbbb-bbbb-cccc-dddddddddddd/resourceGroups/contosoResourceGroup5/providers/Microsoft.Storage/storageAccounts/contosoblobstorage5
44+
az role assignment create --role "Storage Blob Data Contributor" --assignee [email protected] --scope "/subscriptions/{subscription-id}/resourceGroups/contosoResourceGroup5/providers/Microsoft.Storage/storageAccounts/contosoblobstorage5
4545
```
4646

4747
Now that you've assign the role to storage account, you can create a container for your blob.

articles/key-vault/general/manage-with-cli2.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,16 +205,16 @@ az ad sp create-for-rbac -n "MyApp" --password "hVFkk965BuUv" --role Contributor
205205

206206
To authorize the application to access the key or secret in the vault, use the `az keyvault set-policy` command.
207207

208-
For example, if your vault name is ContosoKeyVault, the application has an appID of 8f8c4bbd-485b-45fd-98f7-ec6300b7b4ed, and you want to authorize the application to decrypt and sign with keys in your vault, use the following command:
208+
For example, if your vault name is ContosoKeyVault and you want to authorize the application to decrypt and sign with keys in your vault, use the following command with your application ID:
209209

210210
```azurecli
211-
az keyvault set-policy --name "ContosoKeyVault" --spn 8f8c4bbd-485b-45fd-98f7-ec6300b7b4ed --key-permissions decrypt sign
211+
az keyvault set-policy --name "ContosoKeyVault" --spn {application-id} --key-permissions decrypt sign
212212
```
213213

214214
To authorize the same application to read secrets in your vault, type the following command:
215215

216216
```azurecli
217-
az keyvault set-policy --name "ContosoKeyVault" --spn 8f8c4bbd-485b-45fd-98f7-ec6300b7b4ed --secret-permissions get
217+
az keyvault set-policy --name "ContosoKeyVault" --spn {application-id} --secret-permissions get
218218
```
219219

220220
## Setting key vault advanced access policies

articles/key-vault/general/rbac-guide.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ To add role assignments, you must have `Microsoft.Authorization/roleAssignments/
103103
To create a role assignment using the Azure CLI, use the [az role assignment](/cli/azure/role/assignment) command:
104104

105105
```azurecli
106-
az role assignment create --role <role_name_or_id> --assignee <assignee> --scope <scope>
106+
az role assignment create --role {role-name-or-id} --assignee {assignee-upn}> --scope {scope}
107107
```
108108

109109
For full details, see [Assign Azure roles using Azure CLI](../../role-based-access-control/role-assignments-cli.md).
@@ -114,10 +114,10 @@ To create a role assignment using Azure PowerShell, use the [New-AzRoleAssignmen
114114

115115
```azurepowershell
116116
#Assign by User Principal Name
117-
New-AzRoleAssignment -RoleDefinitionName <role_name> -SignInName <assignee_upn> -Scope <scope>
117+
New-AzRoleAssignment -RoleDefinitionName {role-name} -SignInName {assignee-upn} -Scope {scope}
118118
119119
#Assign by Service Principal ApplicationId
120-
New-AzRoleAssignment -RoleDefinitionName Reader -ApplicationId <applicationId> -Scope <scope>
120+
New-AzRoleAssignment -RoleDefinitionName Reader -ApplicationId {application-id} -Scope {scope}
121121
```
122122

123123
For full details, see [Assign Azure roles using Azure PowerShell](../../role-based-access-control/role-assignments-powershell.md).
@@ -161,10 +161,10 @@ For full details, see [Assign Azure roles using Azure CLI](../../role-based-acce
161161

162162
```azurepowershell
163163
#Assign by User Principal Name
164-
New-AzRoleAssignment -RoleDefinitionName 'Key Vault Reader' -SignInName {i.e [email protected]} -Scope /subscriptions/{subscriptionid}/resourcegroups/{resource-group-name}
164+
New-AzRoleAssignment -RoleDefinitionName 'Key Vault Reader' -SignInName {assignee-upn} -Scope /subscriptions/{subscriptionid}/resourcegroups/{resource-group-name}
165165
166166
#Assign by Service Principal ApplicationId
167-
New-AzRoleAssignment -RoleDefinitionName 'Key Vault Reader' -ApplicationId {i.e 8ee5237a-816b-4a72-b605-446970e5f156} -Scope /subscriptions/{subscriptionid}/resourcegroups/{resource-group-name}
167+
New-AzRoleAssignment -RoleDefinitionName 'Key Vault Reader' -ApplicationId {application-id} -Scope /subscriptions/{subscriptionid}/resourcegroups/{resource-group-name}
168168
```
169169
For full details, see [Assign Azure roles using Azure PowerShell](../../role-based-access-control/role-assignments-powershell.md).
170170

@@ -191,7 +191,7 @@ Above role assignment provides ability to list key vault objects in key vault.
191191

192192
# [Azure CLI](#tab/azure-cli)
193193
```azurecli
194-
az role assignment create --role "Key Vault Secrets Officer" --assignee {i.e [email protected]} --scope /subscriptions/{subscriptionid}/resourcegroups/{resource-group-name}/providers/Microsoft.KeyVault/vaults/{key-vault-name}
194+
az role assignment create --role "Key Vault Secrets Officer" --assignee {assignee-upn} --scope /subscriptions/{subscriptionid}/resourcegroups/{resource-group-name}/providers/Microsoft.KeyVault/vaults/{key-vault-name}
195195
```
196196

197197
For full details, see [Assign Azure roles using Azure CLI](../../role-based-access-control/role-assignments-cli.md).
@@ -200,10 +200,10 @@ For full details, see [Assign Azure roles using Azure CLI](../../role-based-acce
200200

201201
```azurepowershell
202202
#Assign by User Principal Name
203-
New-AzRoleAssignment -RoleDefinitionName 'Key Vault Secrets Officer' -SignInName {i.e [email protected]} -Scope /subscriptions/{subscriptionid}/resourcegroups/{resource-group-name}/providers/Microsoft.KeyVault/vaults/{key-vault-name}
203+
New-AzRoleAssignment -RoleDefinitionName 'Key Vault Secrets Officer' -SignInName {assignee-upn} -Scope /subscriptions/{subscriptionid}/resourcegroups/{resource-group-name}/providers/Microsoft.KeyVault/vaults/{key-vault-name}
204204
205205
#Assign by Service Principal ApplicationId
206-
New-AzRoleAssignment -RoleDefinitionName 'Key Vault Secrets Officer' -ApplicationId {i.e 8ee5237a-816b-4a72-b605-446970e5f156} -Scope /subscriptions/{subscriptionid}/resourcegroups/{resource-group-name}/providers/Microsoft.KeyVault/vaults/{key-vault-name}
206+
New-AzRoleAssignment -RoleDefinitionName 'Key Vault Secrets Officer' -ApplicationId {application-id} -Scope /subscriptions/{subscriptionid}/resourcegroups/{resource-group-name}/providers/Microsoft.KeyVault/vaults/{key-vault-name}
207207
```
208208

209209
For full details, see [Assign Azure roles using Azure PowerShell](../../role-based-access-control/role-assignments-powershell.md).
@@ -260,7 +260,7 @@ For full details, see [Assign Azure roles using Azure PowerShell](../../role-bas
260260
### Test and verify
261261

262262
> [!NOTE]
263-
> Browsers use caching and page refresh is required after removing role assignments.<br>
263+
> Browsers use caching and page refresh is required after removing role assignments.
264264
> Allow several minutes for role assignments to refresh
265265
266266
1. Validate adding new secret without "Key Vault Secrets Officer" role on key vault level.

articles/key-vault/managed-hsm/backup-restore.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Full backup/restore and selective restore for Azure Managed HSM
3-
description: This document explains full backup/restore and selective restore
3+
description: This document explains full backup/restore and selective restore.
44
services: key-vault
55
author: mbaldwin
66
tags: azure-key-vault
@@ -26,8 +26,8 @@ Only following built-in roles have permission to perform full backup:
2626
- Managed HSM Administrator
2727
- Managed HSM Backup
2828

29-
There are 2 ways to execute a full backup/restore:
30-
1. Assigning an User-Assigned Managed Identity (UAMI) to the Managed HSM service. You can backup and restore your MHSM using a user assigned managed identity regardless of whether your storage account has public network access or private network access enabled. If storage account is behind a private endpoint, the UAMI method works with trusted service bypass to allow for backup and restore.
29+
There are two ways to execute a full backup/restore:
30+
1. Assigning a User-Assigned Managed Identity (UAMI) to the Managed HSM service. You can back up and restore your MHSM using a user assigned managed identity regardless of whether your storage account has public network access or private network access enabled. If storage account is behind a private endpoint, the UAMI method works with trusted service bypass to allow for backup and restore.
3131
2. Using storage container SAS token with permissions 'crdw'. Backing up and restoring using storage container SAS token requires your storage account to have public network access enabled.
3232

3333
You must provide the following information to execute a full backup:
@@ -43,8 +43,8 @@ You must provide the following information to execute a full backup:
4343
1. Ensure you have the Azure CLI version 2.56.0 or later. Run `az --version` to find the version. If you need to install or upgrade, see [Install the Azure CLI](/cli/azure/install-azure-cli).
4444
2. Create a user assigned managed identity.
4545
3. Create a storage account (or use an existing storage account).
46-
4. If public network access is diabled on your storage account, enable trusted service bypass on the storage account in the “Networking” tab, under “Exceptions.”
47-
5. Provide ‘storage blob data contributor’ role access to the user assigned managed identity created in step#2. Do this by going to the “Access Control” tab on the portal -> Add Role Assignment. Then select “managed identity” and select the managed identity created in step#2 -> Review + Assign
46+
4. If public network access is disabled on your storage account, enable trusted service bypass on the storage account in the “Networking” tab, under “Exceptions.”
47+
5. Provide ‘storage blob data contributor’ role access to the user assigned managed identity created in step #2 by going to the “Access Control” tab on the portal -> Add Role Assignment. Then select “managed identity” and select the managed identity created in step#2 -> Review + Assign
4848
6. Create the Managed HSM and associate the managed identity with below command.
4949
```azurecli-interactive
5050
az keyvault create --hsm-name mhsmdemo2 –l mhsmlocation -- retention-days 7 --administrators "initialadmin" --mi-user-assigned "/subscriptions/subid/resourcegroups/mhsmrgname/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userassignedidentitynamefromstep2"
@@ -56,7 +56,7 @@ You must provide the following information to execute a full backup:
5656

5757
## Full backup
5858

59-
Backup is a long running operation but will immediately return a Job ID. You can check the status of backup process using this Job ID. The backup process creates a folder inside the designated container with a following naming pattern **`mhsm-{HSM_NAME}-{YYYY}{MM}{DD}{HH}{mm}{SS}`**, where HSM_NAME is the name of managed HSM being backed up and YYYY, MM, DD, HH, MM, mm, SS are the year, month, date, hour, minutes, and seconds of date/time in UTC when the backup command was received.
59+
Backup is a long running operation but immediately returns a Job ID. You can check the status of backup process using this Job ID. The backup process creates a folder inside the designated container with a following naming pattern **`mhsm-{HSM_NAME}-{YYYY}{MM}{DD}{HH}{mm}{SS}`**, where HSM_NAME is the name of managed HSM being backed up and YYYY, MM, DD, HH, MM, mm, SS are the year, month, date, hour, minutes, and seconds of date/time in UTC when the backup command was received.
6060

6161
While the backup is in progress, the HSM might not operate at full throughput as some HSM partitions will be busy performing the backup operation.
6262

@@ -73,19 +73,19 @@ end=$(date -u -d "500 minutes" '+%Y-%m-%dT%H:%MZ')
7373
7474
# Get storage account key
7575
76-
skey=$(az storage account keys list --query '[0].value' -o tsv --account-name mhsmdemobackup --subscription a1ba9aaa-b7f6-4a33-b038-6e64553a6c7b)
76+
skey=$(az storage account keys list --query '[0].value' -o tsv --account-name mhsmdemobackup --subscription {subscription-id})
7777
7878
# Create a container
7979
8080
az storage container create --account-name mhsmdemobackup --name mhsmdemobackupcontainer --account-key $skey
8181
8282
# Generate a container sas token
8383
84-
sas=$(az storage container generate-sas -n mhsmdemobackupcontainer --account-name mhsmdemobackup --permissions crdw --expiry $end --account-key $skey -o tsv --subscription a1ba9aaa-b7f6-4a33-b038-6e64553a6c7b)
84+
sas=$(az storage container generate-sas -n mhsmdemobackupcontainer --account-name mhsmdemobackup --permissions crdw --expiry $end --account-key $skey -o tsv --subscription {subscription-id})
8585
8686
# Backup HSM
8787
88-
az keyvault backup start --hsm-name mhsmdemo2 --storage-account-name mhsmdemobackup --blob-container-name mhsmdemobackupcontainer --storage-container-SAS-token $sas --subscription 361da5d4-a47a-4c79-afdd-d66f684f4070
88+
az keyvault backup start --hsm-name mhsmdemo2 --storage-account-name mhsmdemobackup --blob-container-name mhsmdemobackupcontainer --storage-container-SAS-token $sas --subscription {subscription-id}
8989
9090
```
9191

@@ -120,11 +120,11 @@ end=$(date -u -d "500 minutes" '+%Y-%m-%dT%H:%MZ')
120120
121121
# Get storage account key
122122
123-
skey=$(az storage account keys list --query '[0].value' -o tsv --account-name mhsmdemobackup --subscription a1ba9aaa-b7f6-4a33-b038-6e64553a6c7b)
123+
skey=$(az storage account keys list --query '[0].value' -o tsv --account-name mhsmdemobackup --subscription {subscription-id})
124124
125125
# Generate a container sas token
126126
127-
sas=$(az storage container generate-sas -n mhsmdemobackupcontainer --account-name mhsmdemobackup --permissions rl --expiry $end --account-key $skey -o tsv --subscription a1ba9aaa-b7f6-4a33-b038-6e64553a6c7b)
127+
sas=$(az storage container generate-sas -n mhsmdemobackupcontainer --account-name mhsmdemobackup --permissions rl --expiry $end --account-key $skey -o tsv --subscription {subscription-id})
128128
129129
# Restore HSM
130130

articles/key-vault/managed-hsm/logging.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ Individual blobs are stored as text, formatted as a JSON. Let's look at an examp
9090
```json
9191
[
9292
{
93-
"TenantId": "766eaf62-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
93+
"TenantId": "{tenant-id}",
9494
"time": "2020-08-31T19:52:39.763Z",
95-
"resourceId": "/SUBSCRIPTIONS/A1BA9AAA-xxxx-xxxx-xxxx-xxxxxxxxxxxx/RESOURCEGROUPS/CONTOSORESOURCEGROUP/PROVIDERS/MICROSOFT.KEYVAULT/MANAGEDHSMS/CONTOSOMHSM",
95+
"resourceId": "/SUBSCRIPTIONS/{subscription-id}/RESOURCEGROUPS/CONTOSORESOURCEGROUP/PROVIDERS/MICROSOFT.KEYVAULT/MANAGEDHSMS/CONTOSOMHSM",
9696
"operationName": "BackupCreate",
9797
"operationVersion": "7.0",
9898
"category": "AuditEvent",
@@ -104,7 +104,7 @@ Individual blobs are stored as text, formatted as a JSON. Let's look at an examp
104104
},
105105
"durationMs": 488,
106106
"callerIpAddress": "X.X.X.X",
107-
"identity": "{\"claim\":{\"appid\":\"04b07795-xxxx-xxxx-xxxx-xxxxxxxxxxxx\",\"http_schemas_microsoft_com_identity\":{\"claims\":{\"objectidentifier\":\"b1c52bf0-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"}},\"http_schemas_xmlsoap_org_ws_2005_05_identity\":{\"claims\":{\"upn\":\"[email protected]\"}}}}",
107+
"identity": "{\"claim\":{\"appid\":\"{application-id}\",\"http_schemas_microsoft_com_identity\":{\"claims\":{\"objectidentifier\":\"{object-id}\"}},\"http_schemas_xmlsoap_org_ws_2005_05_identity\":{\"claims\":{\"upn\":\"[email protected]\"}}}}",
108108
"clientInfo": "azsdk-python-core/1.7.0 Python/3.8.2 (Linux-4.19.84-microsoft-standard-x86_64-with-glibc2.29) azsdk-python-azure-keyvault/7.2",
109109
"correlationId": "8806614c-ebc3-11ea-9e9b-00155db778ad",
110110
"subnetId": "(unknown)",

0 commit comments

Comments
 (0)