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-linux.md
+24-34Lines changed: 24 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,8 @@ ms.topic: how-to
6
6
---
7
7
# How to create Guest Configuration policies for Linux
8
8
9
-
Before creating custom policies, it is a good idea to read the conceptual overview information
10
-
at the page [Azure Policy Guest Configuration](../concepts/guest-configuration.md).
9
+
Before creating custom policies, read the overview information
10
+
at [Azure Policy Guest Configuration](../concepts/guest-configuration.md).
11
11
12
12
To learn about creating Guest Configuration policies for Windows, see the page
13
13
[How to create Guest Configuration policies for Windows](./guest-configuration-create.md)
@@ -28,9 +28,8 @@ non-Azure machine.
28
28
29
29
## Install the PowerShell module
30
30
31
-
The process of creating a Guest Configuration artifact, automated testing of the artifact, creating
32
-
a policy definition, and publishing the policy, is entirely automatable using PowerShell. This
33
-
module can be installed on a machine running Windows, macOS, or Linux with PowerShell 6.2 or later
31
+
Creating a Guest Configuration artifact, automated testing of the artifact, creating
32
+
a policy definition, and publishing the policy, is entirely automatable using the Guest Configuration module in PowerShell. The module can be installed on a machine running Windows, macOS, or Linux with PowerShell 6.2 or later
34
33
running locally, or with [Azure Cloud Shell](https://shell.azure.com), or with the
After creating the Configuration package but before publishing it to Azure, you can test the
184
-
functionality of the package from your workstation or CI/CD environment. The GuestConfiguration
185
-
module includes a cmdlet `Test-GuestConfigurationPackage` that loads the same agent in your
180
+
After creating the Configuration package but before publishing it to Azure, you can test the package from your workstation or CI/CD environment. The GuestConfiguration cmdlet `Test-GuestConfigurationPackage` includes the same agent in your
186
181
development environment as is used inside Azure machines. Using this solution, you can perform
187
182
integration testing locally before releasing to billed cloud environments.
188
183
@@ -267,8 +262,7 @@ $uri = publish `
267
262
-filePath ./AuditFilePathExists.zip `
268
263
-blobName 'AuditFilePathExists'
269
264
```
270
-
Once a Guest Configuration custom policy package has been created and uploaded to a location
271
-
accessible by the machines, create the Guest Configuration policy definition for Azure Policy. The
265
+
Once a Guest Configuration custom policy package has been created and uploaded, create the Guest Configuration policy definition. The
272
266
`New-GuestConfigurationPolicy` cmdlet takes a custom policy package and creates a policy definition.
273
267
274
268
Parameters of the `New-GuestConfigurationPolicy` cmdlet:
@@ -307,7 +301,7 @@ Finally, publish the policy definitions using the `Publish-GuestConfigurationPol
307
301
The cmdlet only has the **Path** parameter that points to the location of the JSON files
308
302
created by `New-GuestConfigurationPolicy`.
309
303
310
-
Publishing a new policy definition will require **Resource Policy Contributor** access in Azure.
304
+
To run the Publish command, you need access to create Policies in Azure. The specific authorization requirements are documented in the [Azure Policy Overview](../overview.md) page. The best built-in role is **Resource Policy Contributor**.
311
305
312
306
```azurepowershell-interactive
313
307
Publish-GuestConfigurationPolicy `
@@ -339,7 +333,7 @@ and [Azure PowerShell](../assign-policy-powershell.md).
339
333
Assigning an Azure Policy with _DeployIfNotExists_ type requires an additional level of access.
340
334
To grant the least privilege, you can create a custom role definition
341
335
that extends **Resource Policy Contributor**. The example below creates a role named
342
-
**Resource Policy Contributor DINE** with the additional permission *Microsoft.Authorization/roleAssignments/write*.
336
+
**Resource Policy Contributor DINE** with the additional permission _Microsoft.Authorization/roleAssignments/write_.
@@ -362,8 +356,7 @@ override values are provided through Azure Policy and don't impact how the Confi
362
356
authored or compiled.
363
357
364
358
With InSpec, parameters are typically handled as input either at runtime or as code using
365
-
attributes. Guest Configuration obfuscates this process so input can be provided to Azure Resource
366
-
Manager when policy is assigned. An attributes file is automatically created within the machine. You
359
+
attributes. Guest Configuration obfuscates this process so input can be provided when policy is assigned. An attributes file is automatically created within the machine. You
367
360
don't need to create and add a file in your project. There are two steps to adding parameters to
368
361
your Linux audit project.
369
362
@@ -379,7 +372,7 @@ end
379
372
```
380
373
381
374
The cmdlets `New-GuestConfigurationPolicy` and `Test-GuestConfigurationPolicyPackage` include a
382
-
parameter named **Parameters**. This parameter takes a hashtable definition including all details
375
+
parameter named **Parameters**. This parameter takes a hashtable including all details
383
376
about each parameter and automatically creates all the required sections of the files used to create
Copy file name to clipboardExpand all lines: articles/governance/policy/how-to/guest-configuration-create.md
+28-38Lines changed: 28 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,9 +29,8 @@ non-Azure machine.
29
29
30
30
## Install the PowerShell module
31
31
32
-
The process of creating a Guest Configuration artifact, automated testing of the artifact, creating
33
-
a policy definition, and publishing the policy, is entirely automatable using PowerShell. This
34
-
module can be installed on a machine running Windows, macOS, or Linux with PowerShell 6.2 or later
32
+
Creating a Guest Configuration artifact, automated testing of the artifact, creating
33
+
a policy definition, and publishing the policy, is entirely automatable using the Guest Configuration module in PowerShell. The module can be installed on a machine running Windows, macOS, or Linux with PowerShell 6.2 or later
35
34
running locally, or with [Azure Cloud Shell](https://shell.azure.com), or with the
After creating the Configuration package but before publishing it to Azure, you can test the
230
-
functionality of the package from your workstation or CI/CD environment. The GuestConfiguration
231
-
module includes a cmdlet `Test-GuestConfigurationPackage` that loads the same agent in your
232
-
development environment as is used inside Azure machines. Using this solution, you can perform
225
+
After creating the Configuration package but before publishing it to Azure, you can test the package from your workstation or CI/CD environment. The GuestConfiguration
226
+
cmdlet `Test-GuestConfigurationPackage` includes the same agent in your
227
+
development environment as is used inside Azure machines. Using this solution, you can do
233
228
integration testing locally before releasing to billed cloud environments.
234
229
235
230
Since the agent is actually evaluating the local environment, in most cases you need to run the
@@ -314,8 +309,7 @@ $uri = publish `
314
309
-blobName 'AuditBitlocker'
315
310
```
316
311
317
-
Once a Guest Configuration custom policy package has been created and uploaded to a location
318
-
accessible by the machines, create the Guest Configuration policy definition for Azure Policy. The
312
+
Once a Guest Configuration custom policy package has been created and uploaded, create the Guest Configuration policy definition. The
319
313
`New-GuestConfigurationPolicy` cmdlet takes a custom policy package and creates a policy definition.
320
314
321
315
Parameters of the `New-GuestConfigurationPolicy` cmdlet:
@@ -354,7 +348,7 @@ Finally, publish the policy definitions using the `Publish-GuestConfigurationPol
354
348
cmdlet only has the **Path** parameter that points to the location of the JSON files created by
355
349
`New-GuestConfigurationPolicy`.
356
350
357
-
Publishing a new policy definition will require **Resource Policy Contributor** access in Azure.
351
+
To run the Publish command, you need access to create Policies in Azure. The specific authorization requirements are documented in the [Azure Policy Overview](../overview.md) page. The best built-in role is **Resource Policy Contributor**.
358
352
359
353
```azurepowershell-interactive
360
354
Publish-GuestConfigurationPolicy `
@@ -386,7 +380,7 @@ initiative with [Portal](../assign-policy-portal.md), [Azure CLI](../assign-poli
386
380
Assigning an Azure Policy with _DeployIfNotExists_ type requires an additional level of access.
387
381
To grant the least privilege, you can create a custom role definition
388
382
that extends **Resource Policy Contributor**. The example below creates a role named
389
-
**Resource Policy Contributor DINE** with the additional permission *Microsoft.Authorization/roleAssignments/write*.
383
+
**Resource Policy Contributor DINE** with the additional permission _Microsoft.Authorization/roleAssignments/write_.
0 commit comments