Skip to content

Commit 90ad39e

Browse files
authored
Merge pull request #278425 from Nagarjuna-Vipparthi/Nagarjuna-Vipparthi-alt-azure-policy
Docs update for Azure Policy for VNet in Azure Load Testing
2 parents a634164 + 9062087 commit 90ad39e

File tree

9 files changed

+106
-0
lines changed

9 files changed

+106
-0
lines changed
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
---
2+
title: Use Azure Policy to secure Azure Load Testing
3+
titleSuffix: Azure Load Testing
4+
description: Learn how to use Azure Policy to secure your Azure Load Testing resources
5+
services: load-testing
6+
ms.service: azure-load-testing
7+
ms.author: vevippar
8+
author: nagarjuna-vipparthi
9+
ms.date: 06/12/2024
10+
ms.topic: how-to
11+
---
12+
13+
# Secure your Azure Load Testing resources with Azure Policy
14+
15+
[Azure Policy](../governance/policy/overview.md) is a governance tool that allows you to enforce organizational standards and to assess compliance at-scale. The policies allow you to perform audits, real-time enforcement, and remediation of your Azure environment. Audit results are available in your compliance dashboard. In the dashboard, you can review which resources and components are compliant and noncompliant, and take remediation actions. For more information, see the [Overview of the Azure Policy service](../governance/policy/overview.md).
16+
17+
Use Azure policy to manage your load testing resources in scenarios like:
18+
19+
- **Private tests**
20+
- When you want to ensure that load tests in Azure Load Testing can be created only in private test traffic mode.
21+
- When you want to ensure that the resources like virtual machines, Network Security Group (NSG), Azure load balancer and public IP created by the Azure Load Testing service get created only in a set of virtual networks in your subscription.
22+
- **Customer-managed keys**
23+
- You want to use customer-managed keys(CMK) to manage the encryption at rest for your Azure Load Testing resource.
24+
25+
## Types of policy effects and guidance
26+
27+
When enforcing a policy, you can determine its [effect](../governance/policy/policy-glossary.md#effect) over the resulting evaluation. Each policy definition allows you to choose one of multiple [effects](../governance/policy/concepts/effect-basics.md). Therefore, policy enforcement may behave differently depending on the type of operation you are evaluating. In general, the effects for policies that integrate with Azure Load Testing include:
28+
29+
- [**Audit**](../governance/policy/concepts/effects.md#audit): When the effect of a policy is set to `Audit`, the policy doesn't cause any breaking changes to your environment. The policy alerts you to Azure Load Testing resources that don't comply with the policy definitions within a specified scope. Components are marked as noncompliant in the policy compliance dashboard. The `Audit` value is default if no policy effect is selected.
30+
31+
- [**Deny**](../governance/policy/concepts/effects.md#deny): When the effect of a policy is set to `Deny`, the policy blocks the creation of a new test run that doesn't comply with the policy definition. Existing noncompliant test runs and resources are not affected. The 'Audit' capabilities continue to operate.
32+
33+
- [**Disabled**](../governance/policy/concepts/effects.md#disabled): When the effect of a policy is set to `Disabled`, the policy gets evaluated but enforcement doesn't take effect. This effect is useful to disable the policy for a specific condition as opposed to all conditions.
34+
35+
## Built-in policy definitions
36+
37+
Predetermined policies, referred to as 'built-ins', allow governance over your load testing resources so you don't have to write custom policies in JSON format to enforce commonly used rules associated with best security practices. Even though built-ins are predetermined, certain policies require you to define parameters. For example, by defining the effect of the policy, you can audit the load testing resource before enforcing a deny operation to prevent outages. See [built-in policies for Azure Load Testing](../governance/policy/samples/built-in-policies.md#azure-load-testing) to view the current built-in policies available for Azure Load Testing.
38+
39+
## Enable and manage a load testing policy
40+
41+
### Select a policy definition
42+
43+
1. Log in to the Azure portal.
44+
1.Search **Policy** in the search bar and select **Policy**.
45+
46+
![Screenshot that shows the Search Bar.](media/how-to-use-azure-policy/search-policy.png)
47+
48+
1. In the **Policy** window, select **Definitions**.
49+
50+
![Screenshot that highlights the Definitions option.](media/how-to-use-azure-policy/select-definitions.png)
51+
52+
1. In the *Category* filter, unselect **Select All** and select **Azure Load Testing**.
53+
54+
![Screenshot that shows the Category Filter and the selected Azure Load Testing category.](media/how-to-use-azure-policy/select-category.png)
55+
56+
1. Now you should be able to see all the policies available for Azure Load Testing. Make sure you read and understand the [policy guidance](#types-of-policy-effects-and-guidance) and select a policy you want to assign to a scope.
57+
58+
![Screenshot that shows the available policies.](media/how-to-use-azure-policy/select-policy-scope.png)
59+
60+
### Assign a policy to a scope
61+
62+
1. Select a policy to apply. In this example, the **Load tests using Azure Load Testing should be run only against private endpoints from within a virtual network** policy is shown. Click the **Assign** button in the top-left corner.
63+
64+
![Screenshot that shows the Load tests using Azure Load Testing should be run only against private endpoints from within a virtual network policy.](media/how-to-use-azure-policy/select-policy.png)
65+
66+
1. Select the subscription where you want the policy to be applied.
67+
68+
- You can choose to restrict the scope to only a single resource group within a subscription.
69+
70+
- If you want to apply the policy to the entire subscription and exclude some resource groups, you can also configure an exclusion list.
71+
72+
- Set the policy enforcement selector to **Enabled** if you want the effect of the policy (audit or deny) to occur or **Disabled** to turn the effect (audit or deny) off.
73+
74+
![Screenshot that shows where you can choose to restrict the scope to only a single resource group within a subscription.](media/how-to-use-azure-policy/select-policy-scope.png)
75+
76+
1. To specify the policy effect, select the parameters tab at the top of the screen.
77+
78+
1. Uncheck the *Only show parameters that need input or review* option.
79+
80+
1. Select **Audit** or **Deny** or **Disabled** for the effect of the policy following the [policy guidance](#types-of-policy-effects-and-guidance).
81+
82+
1. Select the **Review + create** button.
83+
84+
![Screenshot that shows the Parameters tab where you can specify the policy effect.](media/how-to-use-azure-policy/select-policy-effect.png)
85+
86+
## Feature limitations
87+
88+
- The **Load tests using Azure Load Testing should be run only against private endpoints from within a virtual network** policy is only applicable for load tests that are triggered after the policy assignment. If the "audit" effect is selected, the Azure Load Testing resources with load test runs that are violating the policy will be shown as noncompliant. To remediate, delete the test runs that are violating the policy and reassign the policy.
89+
90+
- Assigning a policy with a "deny" effect may take from 30 mins (on average) or up to one hour to start denying the creation of non-compliant resources. The delay refers to following scenarios:
91+
- A new policy is assigned.
92+
- An existing policy assignment is modified.
93+
- A new Azure Load Testing resource is created in a scope with existing policies.
94+
95+
- The policy evaluation of existing components in an Azure Load Testing resource may take up to one hour (one average) or up to two hours before compliance results are viewable in the portal.
96+
97+
- If the compliance results show up as "Not Started" it may be due to the following reasons:
98+
- The policy evaluation is not completed. Initial evaluation latency can take up to two hours.
99+
- There are no Azure Load Testing resources in the scope of the policy assignment.
100+
101+
## Next steps
102+
103+
- Learn more about the [Azure Policy service](../governance/policy/overview.md)
104+
- See Key Vault samples: [Azure Load Testing built-in policy definitions](../governance/policy/samples/built-in-policies.md#azure-load-testing)
320 KB
Loading
251 KB
Loading
339 KB
Loading
318 KB
Loading
161 KB
Loading
238 KB
Loading
114 KB
Loading

articles/load-testing/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ items:
9595
href: how-to-use-a-managed-identity.md
9696
- name: Configure customer-managed keys
9797
href: how-to-configure-customer-managed-keys.md
98+
- name: Secure Azure Load Testing with Azure Policy
99+
href: how-to-use-azure-policy.md
98100
- name: Manage resources
99101
items:
100102
- name: Create & manage tests (Azure portal)

0 commit comments

Comments
 (0)