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/governance/policy/how-to/guest-configuration-create.md
-49Lines changed: 0 additions & 49 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -232,55 +232,6 @@ You could also implement
232
232
for machines in a private network, although this configuration applies only to accessing the package
233
233
and not communicating with the service.
234
234
235
-
### Working with secrets in Guest Configuration packages
236
-
237
-
In Azure Policy Guest Configuration, the optimal way to manage secrets used at run time is to store
238
-
them in Azure Key Vault. This design is implemented within custom DSC resources.
239
-
240
-
1. Create a user-assigned managed identity in Azure.
241
-
242
-
The identity is used by machines to access secrets stored in Key Vault. For detailed steps, see
243
-
[Create, list or delete a user-assigned managed identity using Azure PowerShell](../../../active-directory/managed-identities-azure-resources/how-to-manage-ua-identity-powershell.md).
244
-
245
-
1. Create a Key Vault instance.
246
-
247
-
For detailed steps, see [Set and retrieve a secret - PowerShell](../../../key-vault/quick-create-powershell.md).
248
-
Assign permissions to the instance to give the user-assigned identity access to secrets stored in
249
-
Key Vault. For detailed steps, see
250
-
[Set and retrieve a secret - .NET](../../../key-vault/quick-create-net.md#give-the-service-principal-access-to-your-key-vault).
251
-
252
-
1. Assign the user-assigned identity to your machine.
253
-
254
-
For detailed steps, see
255
-
[Configure managed identities for Azure resources on an Azure VM using PowerShell](../../../active-directory/managed-identities-azure-resources/qs-configure-powershell-windows-vm.md#user-assigned-managed-identity).
256
-
Assign this identity using Azure Resource Manager via Azure Policy at scale. For detailed steps,
257
-
see
258
-
[Configure managed identities for Azure resources on an Azure VM using a template](../../../active-directory/managed-identities-azure-resources/qs-configure-template-windows-vm.md#assign-a-user-assigned-managed-identity-to-an-azure-vm).
259
-
260
-
1. Use the client ID generated above within your custom resource to access Key Vault using the token
261
-
available from the machine.
262
-
263
-
The `client_id` and url to the Key Vault instance can be passed to the resource as
264
-
[properties](/powershell/scripting/dsc/resources/authoringresourcemof#creating-the-mof-schema) so
265
-
the resource won't need to be updated for multiple environments or if the values need to be
266
-
changed.
267
-
268
-
The following code sample can be used in a custom resource to retrieve secrets from Key Vault using
269
-
a user-assigned identity. The value returned from the request to Key Vault is plain text. As a best
270
-
practice, store it within a credential object.
271
-
272
-
```azurepowershell-interactive
273
-
# the following values should be input as properties
0 commit comments