Skip to content

Commit af85016

Browse files
Merge branch 'main' of https://github.com/MicrosoftDocs/azure-docs-pr into update-classic-account
2 parents bfff329 + 20accb9 commit af85016

File tree

185 files changed

+634
-478
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+634
-478
lines changed

.github/policies/disallow-edits.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,16 @@ configuration:
155155
if:
156156
# If a 'sign-off' comment is added to a PR in the articles/reliability folder , and the PR author isn't Anastasia or John...
157157
- payloadType: Issue_Comment
158-
- isPullRequest
159158
- filesMatchPattern:
160159
matchAny: true
161160
pattern: articles/reliability/*
162-
- commentContains:
163-
pattern: '\#sign-off'
164-
isRegex: true
161+
- or:
162+
- commentContains:
163+
pattern: ^(#sign-off)$
164+
isRegex: True
165+
- commentContains:
166+
pattern: ^(\#sign-off)$
167+
isRegex: True
165168
- not:
166169
or:
167170
- isActivitySender:

.openpublishing.redirection.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,11 @@
200200
"redirect_url": "https://azuremarketplace.microsoft.com/marketplace/apps?page=1",
201201
"redirect_document_id": false
202202
},
203+
{
204+
"source_path": "articles/partner-solutions/logzio/index.yml",
205+
"redirect_url": "/previous-versions/azure/partner-solutions/logzio/index",
206+
"redirect_document_id": false
207+
},
203208
{
204209
"source_path": "articles/partner-solutions/logzio/create.md",
205210
"redirect_url": "/previous-versions/azure/partner-solutions/logzio/create",

articles/api-management/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,8 @@
544544
href: json-to-xml-policy.md
545545
- name: limit-concurrency
546546
href: limit-concurrency-policy.md
547+
- name: llm-content-safety
548+
href: llm-content-safety-policy.md
547549
- name: llm-emit-token-metric
548550
href: llm-emit-token-metric-policy.md
549551
- name: llm-semantic-cache-lookup

articles/api-management/api-management-policies.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ More information about policies:
5959

6060
|Policy |Description | Classic | V2 | Consumption |Self-hosted |Workspace |
6161
|---------|---------|---------|---------|---------|--------|------|
62+
| [Enforce content safety checks on LLM requests](llm-content-safety-policy.md) | Enforces content safety checks on LLM requests (prompts) by transmitting them to the [Azure AI Content Safety](/azure/ai-services/content-safety/overview) service before sending to the backend LLM. | Yes | Yes | Yes | Yes | Yes |
6263
| [Validate content](validate-content-policy.md) | Validates the size or content of a request or response body against one or more API schemas. The supported schema formats are JSON and XML. | Yes | Yes | Yes | Yes | Yes |
6364
| [Validate GraphQL request](validate-graphql-request-policy.md) | Validates and authorizes a request to a GraphQL API. | Yes | Yes | Yes | Yes | No |
6465
| [Validate OData request](validate-odata-request-policy.md) | Validates a request to an OData API to ensure conformance with the OData specification. | Yes | Yes | Yes | Yes | Yes |
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
---
2+
title: Azure API Management policy reference - llm-content-safety
3+
description: Reference for the llm-content-safety policy available for use in Azure API Management. Provides policy usage, settings, and examples.
4+
services: api-management
5+
author: dlepow
6+
7+
ms.service: azure-api-management
8+
ms.collection: ce-skilling-ai-copilot
9+
ms.custom:
10+
ms.topic: article
11+
ms.date: 03/04/2025
12+
ms.author: danlep
13+
---
14+
15+
# Enforce content safety checks on LLM requests
16+
17+
[!INCLUDE [api-management-availability-premium-dev-standard-basic-premiumv2-standardv2-basicv2](../../includes/api-management-availability-premium-dev-standard-basic-premiumv2-standardv2-basicv2.md)]
18+
19+
The `llm-content-safety` policy enforces content safety checks on large language model (LLM) requests (prompts) by transmitting them to the [Azure AI Content Safety](/azure/ai-services/content-safety/overview) service before sending to the backend LLM API. When the policy is enabled and Azure AI Content Safety detects malicious content, API Management blocks the request and returns a `403` error code.
20+
21+
Use the policy in scenarios such as the following:
22+
23+
* Block requests that contain predefined categories of harmful content or hate speech
24+
* Apply custom blocklists to prevent specific content from being sent
25+
* Shield against prompts that match attack patterns
26+
27+
[!INCLUDE [api-management-policy-generic-alert](../../includes/api-management-policy-generic-alert.md)]
28+
29+
## Prerequisites
30+
31+
* An [Azure AI Content Safety](/azure/ai-services/content-safety/) resource.
32+
* An API Management [backend](backends.md) configured to route content safety API calls and authenticate to the Azure AI Content Safety service, in the form `https://<content-safety-service-name>.cognitiveservices.azure.com`. Managed identity with Cognitive Services User role is recommended for authentication.
33+
34+
35+
## Policy statement
36+
37+
```xml
38+
<llm-content-safety backend-id="name of backend entity" shield-prompt="true | false" >
39+
<categories output-type="FourSeverityLevels | EightSeverityLevels">
40+
<category name="Hate | SelfHarm | Sexual | Violence" threshold="integer" />
41+
<!-- If there are multiple categories, add more category elements -->
42+
[...]
43+
</categories>
44+
<blocklists>
45+
<id>blocklist-identifier</id>
46+
<!-- If there are multiple blocklists, add more id elements -->
47+
[...]
48+
</blocklists>
49+
</llm-content-safety>
50+
```
51+
52+
## Attributes
53+
54+
| Attribute | Description | Required | Default |
55+
| -------------- | ----------------------------------------------------------------------------------------------------- | -------- | ------- |
56+
| backend-id | Identifier (name) of the Azure AI Content Safety backend to route content-safety API calls to. Policy expressions are allowed. | Yes | N/A |
57+
| shield-prompt | If set to `true`, content is checked for user attacks. Otherwise, skip this check. Policy expressions are allowed. | No | `false` |
58+
59+
60+
## Elements
61+
62+
| Element | Description | Required |
63+
| -------------- | -----| -------- |
64+
| categories | A list of `category` elements that specify settings for blocking requests when the category is detected. | No |
65+
| blocklists | A list of [blocklist](/azure/ai-services/content-safety/how-to/use-blocklist) `id` elements from the Azure AI Content Safety instance for which detection causes the request to be blocked. Policy expressions are allowed. | No |
66+
67+
### categories attributes
68+
69+
| Attribute | Description | Required | Default |
70+
| -------------- | ----------------------------------------------------------------------------------------------------- | -------- | ------- |
71+
| output-type | Specifies how severity levels are returned by Azure AI Content Safety. The attribute must have one of the following values.<br /><br />- `FourSeverityLevels`: Output severities in four levels: 0,2,4,6.<br/>- `EightSeverityLevels`: Output severities in eight levels: 0,1,2,3,4,5,6,7.<br/><br/>Policy expressions are allowed. | No | `FourSeverityLevels` |
72+
73+
74+
### category attributes
75+
76+
| Attribute | Description | Required | Default |
77+
| -------------- | ----------------------------------------------------------------------------------------------------- | -------- | ------- |
78+
| name | Specifies the name of this category. The attribute must have one of the following values: `Hate`, `SelfHarm`, `Sexual`, `Violence`. Policy expressions are allowed. | Yes | N/A |
79+
| threshold | Specifies the threshold value for this category at which request are blocked. Requests with content severities less than the threshold aren't blocked. The value must be between 0 and 7. Policy expressions are allowed. | Yes | N/A |
80+
81+
82+
## Usage
83+
84+
- [**Policy sections:**](./api-management-howto-policies.md#sections) inbound
85+
- [**Policy scopes:**](./api-management-howto-policies.md#scopes) global, workspace, product, API
86+
- [**Gateways:**](api-management-gateways-overview.md) classic, v2, consumption, self-hosted, workspace
87+
88+
### Usage notes
89+
90+
* The policy runs on a concatenation of all text content in a completion or chat completion request.
91+
* If the request exceeds the character limit of Azure AI Content Safety, a `403` error is returned.
92+
* This policy can be used multiple times per policy definition.
93+
94+
## Example
95+
96+
The following example enforces content safety checks on LLM requests using the Azure AI Content Safety service. The policy blocks requests that contain speech in the `Hate` or `Violence` category with a severity level of 4 or higher. The `shield-prompt` attribute is set to `true` to check for adversarial attacks.
97+
98+
```xml
99+
<policies>
100+
<inbound>
101+
<llm-content-safety backend-id="content-safety-backend" shield-prompt="true">
102+
<categories output-type="EightSeverityLevels">
103+
<category name="Hate" threshold="4" />
104+
<category name="Violence" threshold="4" />
105+
</categories>
106+
</llm-content-safety>
107+
</inbound>
108+
</policies>
109+
110+
```
111+
112+
## Related policies
113+
114+
* [Content validation](api-management-policies.md#content-validation)
115+
* [llm-token-limit](llm-token-limit-policy.md) policy
116+
* [llm-emit-token-metric](llm-emit-token-metric-policy.md) policy
117+
118+
[!INCLUDE [api-management-policy-ref-next-steps](../../includes/api-management-policy-ref-next-steps.md)]

articles/application-gateway/configuration-infrastructure.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,11 @@ Depending on whether you're creating new resources or using existing ones, add t
8383

8484
|Resource | Resource status | Required Azure permissions |
8585
|---|---|---|
86-
| Subnet | Create new| Microsoft.Network/virtualNetworks/subnets/write<br>Microsoft.Network/virtualNetworks/subnets/join/action |
87-
| Subnet | Use existing| Microsoft.Network/virtualNetworks/subnets/read<br>Microsoft.Network/virtualNetworks/subnets/join/action |
88-
| IP addresses| Create new| Microsoft.Network/publicIPAddresses/write<br>Microsoft.Network/publicIPAddresses/join/action |
89-
| IP addresses | Use existing| Microsoft.Network/publicIPAddresses/read<br>Microsoft.Network/publicIPAddresses/join/action |
90-
| ApplicationGatewayWebApplicationFirewallPolicies | Create new / Update existing | Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/write
91-
Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/read
92-
Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/join/action |
86+
| Subnet | Create new| `Microsoft.Network/virtualNetworks/subnets/write' <br> 'Microsoft.Network/virtualNetworks/subnets/join/action` |
87+
| Subnet | Use existing| `Microsoft.Network/virtualNetworks/subnets/read` <br> `Microsoft.Network/virtualNetworks/subnets/join/action` |
88+
| IP addresses| Create new| `Microsoft.Network/publicIPAddresses/write` <br> `Microsoft.Network/publicIPAddresses/join/action` |
89+
| IP addresses | Use existing| `Microsoft.Network/publicIPAddresses/read` <br> `Microsoft.Network/publicIPAddresses/join/action` |
90+
| ApplicationGatewayWebApplicationFirewallPolicies | Create new / Update existing | `Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/write` <br> `Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/read` <br> `Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/join/action` |
9391

9492
For more information, see [Azure permissions for Networking](../role-based-access-control/permissions/networking.md) and [Virtual network permissions](../virtual-network/virtual-network-manage-subnet.md#permissions).
9593
## Roles scope

articles/azure-vmware/azure-vmware-solution-platform-updates.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ Microsoft regularly applies important updates to the Azure VMware Solution for n
1313

1414
## March 2025
1515

16-
To address the vulnerabilities (CVE-2025-22224, CVE-2025-22225, CVE-2025-22226) reported in Broadcom security advisory [VMSA-2025-0004](https://support.broadcom.com/web/ecx/support-content-notification/-/external/content/SecurityAdvisories/0/25390), ESXi hosts are being patched in all Azure VMware Solution private clouds to [ESXi 8.0 U2d, Patch Release 24585300](https://techdocs.broadcom.com/us/en/vmware-cis/vsphere/vsphere/8-0/release-notes/esxi-update-and-patch-release-notes/vsphere-esxi-80u2d-release-notes.html). All new Azure VMware Solution private clouds are deployed with the same version. [Learn more](https://techcommunity.microsoft.com/blog/azuremigrationblog/azure-vmware-solution-broadcom-vmsa-2025-0004-remediation/4388074)
16+
To address the vulnerabilities (CVE-2025-22224, CVE-2025-22225, CVE-2025-22226) reported in Broadcom security advisory [VMSA-2025-0004](https://support.broadcom.com/web/ecx/support-content-notification/-/external/content/SecurityAdvisories/0/25390), ESXi hosts are being patched in all Azure VMware Solution private clouds to [ESXi 8.0 U2d, Patch Release 24585300](https://techdocs.broadcom.com/us/en/vmware-cis/vsphere/vsphere/8-0/release-notes/esxi-update-and-patch-release-notes/vsphere-esxi-80u2d-release-notes.html). All new Azure VMware Solution private clouds are deployed with the same version. [Learn more](https://techcommunity.microsoft.com/blog/azuremigrationblog/azure-vmware-solution-broadcom-vmsa-2025-0004-remediation/4388074)
17+
18+
vSAN in-transit encryption is now available in Azure VMware Solution through a Run Command. This new feature enhances data security by encrypting data as it moves between hosts in your vSAN cluster in the Azure VMware Solution. [Learn more](https://techdocs.broadcom.com/us/en/vmware-cis/vsan/vsan/8-0/vsan-administration/using-encryption-in-a-vsan-cluster-1/vsan-data-in-transit-encryption.html)
1719

1820
## February 2025
1921

0 commit comments

Comments
 (0)