Skip to content

Commit 6ef9969

Browse files
authored
Merge branch 'MicrosoftDocs:main' into v1-migration
2 parents 658f7e3 + 270ef48 commit 6ef9969

File tree

73 files changed

+1259
-299
lines changed

Some content is hidden

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

73 files changed

+1259
-299
lines changed

articles/ai-services/language-service/conversational-language-understanding/concepts/best-practices.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,14 @@ Once the request is sent, you can track the progress of the training job in Lang
121121
> [!NOTE]
122122
> You have to retrain your model after updating the `confidenceThreshold` project setting. Afterwards, you'll need to republish the app for the new threshold to take effect.
123123
124+
### Normalization in model version 2023-04-15
125+
126+
Model version 2023-04-15, conversational language understanding provides normalization in the inference layer that doesn't affect training.
127+
128+
The normalization layer normalizes the classification confidence scores to a confined range. The range selected currently is from `[-a,a]` where "a" is the square root of the number of intents. As a result, the normalization depends on the number of intents in the app. If there is a very low number of intents, the normalization layer has a very small range to work with. With a fairly large number of intents, the normalization is more effective.
129+
130+
If this normalization doesn’t seem to help intents that are out of scope to the extent that the confidence threshold can be used to filter out of scope utterances, it might be related to the number of intents in the app. Consider adding more intents to the app, or if you are using an orchestrated architecture, consider merging apps that belong to the same domain together.
131+
124132
## Debugging composed entities
125133

126134
Entities are functions that emit spans in your input with an associated type. The function is defined by one or more components. You can mark components as needed, and you can decide whether to enable the *combine components* setting. When you combine components, all spans that overlap will be merged into a single span. If the setting isn't used, each individual component span will be emitted.

articles/ai-services/openai/how-to/embeddings.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ services: cognitive-services
66
manager: nitinme
77
ms.service: azure-ai-openai
88
ms.topic: how-to
9-
ms.date: 9/12/2023
10-
author: ChrisHMSFT
11-
ms.author: chrhoder
9+
ms.date: 11/02/2023
10+
author: mrbullwinkle
11+
ms.author: mbullwin
1212
recommendations: false
1313
keywords:
1414

@@ -75,15 +75,7 @@ foreach (float item in returnValue.Value.Data[0].Embedding)
7575

7676
### Verify inputs don't exceed the maximum length
7777

78-
The maximum length of input text for our embedding models is 2048 tokens (equivalent to around 2-3 pages of text). You should verify that your inputs don't exceed this limit before making a request.
79-
80-
### Choose the best model for your task
81-
82-
For the search models, you can obtain embeddings in two ways. The `<search_model>-doc` model is used for longer pieces of text (to be searched over) and the `<search_model>-query` model is used for shorter pieces of text, typically queries or class labels in zero shot classification. You can read more about all of the Embeddings models in our [Models](../concepts/models.md) guide.
83-
84-
### Replace newlines with a single space
85-
86-
Unless you're embedding code, we suggest replacing newlines (\n) in your input with a single space, as we have observed inferior results when newlines are present.
78+
The maximum length of input text for our latest embedding models is 8192 tokens. You should verify that your inputs don't exceed this limit before making a request.
8779

8880
## Limitations & risks
8981

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
---
2+
title: Disable basic authentication for deployment
3+
description: Learn how to secure App Service deployment by disabling basic authentication.
4+
keywords: azure app service, security, deployment, FTP, MsDeploy
5+
ms.topic: article
6+
ms.date: 11/05/2023
7+
author: cephalin
8+
ms.author: cephalin
9+
---
10+
11+
# Disable basic authentication in App Service deployments
12+
13+
This article shows you how to disable basic authentication (username and password authentication) when deploying code to App Service apps.
14+
15+
App Service provides basic authentication for FTP and WebDeploy clients to connect to it by using [deployment credentials](deploy-configure-credentials.md). These APIs are great for browsing your site’s file system, uploading drivers and utilities, and deploying with MsBuild. However, enterprises often require more secure deployment methods than basic authentication, such as [Microsoft Entra ID](/entra/fundamentals/whatis) authentication (see [Authentication types by deployment methods in Azure App Service](deploy-authentication-types.md)). Entra ID uses OAuth 2.0 token-based authorization and has many benefits and improvements that help mitigate the issues in basic authentication. For example, OAuth access tokens have a limited usable lifetime, and are specific to the applications and resources for which they're issued, so they can't be reused. Entra ID also lets you deploy from other Azure services using managed identities.
16+
17+
## Disable basic authentication
18+
19+
### [Azure portal](#tab/portal)
20+
21+
1. In the [Azure portal], search for and select **App Services**, and then select your app.
22+
23+
1. In the app's left menu, select **Configuration**.
24+
25+
1. For **Basic Auth Publishing Credentials**, select **Off**, then select **Save**.
26+
27+
:::image type="content" source="media/configure-basic-auth-disable/basic-auth-disable.png" alt-text="A screenshot showing how to disable basic authentication for Azure App Service in the Azure portal.":::
28+
29+
### [Azure CLI](#tab/cli)
30+
31+
There are two different settings to configure when you disable basic authentication with Azure CLI, one for FTP and one for WebDeploy and Git.
32+
33+
#### Disable for FTP
34+
35+
To disable FTP access using basic authentication, you must have owner-level access to the app. Run the following CLI command by replacing the placeholders with your resource group name and app name:
36+
37+
```azurecli-interactive
38+
az resource update --resource-group <group-name> --name ftp --namespace Microsoft.Web --resource-type basicPublishingCredentialsPolicies --parent sites/<app-name> --set properties.allow=false
39+
```
40+
41+
#### Disable for WebDeploy and Git
42+
43+
To disable basic authentication access to the WebDeploy port and the Git deploy URL (https://\<app-name>.scm.azurewebsites.net), run the following CLI command. Replace the placeholders with your resource group name and app name.
44+
45+
```azurecli-interactive
46+
az resource update --resource-group <resource-group> --name scm --namespace Microsoft.Web --resource-type basicPublishingCredentialsPolicies --parent sites/<app-name> --set properties.allow=false
47+
```
48+
49+
-----
50+
51+
To confirm that FTP access is blocked, try [connecting to your app using FTP/S](deploy-ftp.md). You should get a `401 Unauthenticted` message.
52+
53+
To confirm that Git access is blocked, try [local Git deployment](deploy-local-git.md). You should get an `Authentication failed` message.
54+
55+
## Deployment without basic authentication
56+
57+
When you disable basic authentication, deployment methods based on basic authentication stop working, such as FTP and local Git deployment. For alternate deployment methods, see [Authentication types by deployment methods in Azure App Service](deploy-authentication-types.md).
58+
59+
<!-- Azure Pipelines with App Service deploy task (manual config) need the newer version hosted agent that supports vs2022.
60+
OIDC GitHub actions -->
61+
62+
## Create a custom role with no permissions for basic authentication
63+
64+
To prevent a lower-priveldged user from enabling basic authentication for any app, you can create a custom role and assign the user to the role.
65+
66+
### [Azure portal](#tab/portal)
67+
68+
1. In the Azure portal, in the top menu, search for and select the subscription you want to create the custom role in.
69+
1. From the left navigation, select **Access Control (IAM)** > **Add** > **Add custom role**.
70+
1. Set the **Basic** tab as you wish, then select **Next**.
71+
1. In the **Permissions** tab, and select **Exclude permissions**.
72+
1. Find and select **Microsoft Web Apps**, then search for the following operations:
73+
74+
|Operation |Description |
75+
|---------|---------|
76+
|`microsoft.web/sites/basicPublishingCredentialsPolicies/ftp` | FTP publishing credentials for App Service apps. |
77+
|`microsoft.web/sites/basicPublishingCredentialsPolicies/scm` | SCM publishing credentials for App Service apps. |
78+
|`microsoft.web/sites/slots/basicPublishingCredentialsPolicies/ftp` | FTP publishing credentials for App Service slots. |
79+
|`microsoft.web/sites/slots/basicPublishingCredentialsPolicies/scm` | SCM publishing credentials for App Service slots. |
80+
81+
1. Under each of these operations, select the box for **Write**, then select **Add**. This step adds the operation as **NotActions** for the role.
82+
83+
Your Permissions tab should look like the following screenshot:
84+
85+
:::image type="content" source="media/configure-basic-auth-disable/custom-role-no-basic-auth.png" alt-text="A screenshot showing the creation of a custom role with all basic authentication permissions excluded.":::
86+
87+
1. Select **Review + create**, then select **Create**.
88+
89+
1. You can now assign this role to your organization’s users.
90+
91+
For more information, see [Create or update Azure custom roles using the Azure portal](../role-based-access-control/custom-roles-portal.md#step-2-choose-how-to-start)
92+
93+
### [Azure CLI](#tab/cli)
94+
95+
In the following command, replace *\<role-name>* and *\<subscription-guid>* (with the GUID of your subscription) and run in the cloud shell:
96+
97+
```azurecli-interactive
98+
az role definition create --role-definition '{
99+
"Name": "<role-name>",
100+
"IsCustom": true,
101+
"Description": "Prevents users from enabling basic authentication for all App Service apps or slots.",
102+
"NotActions": [
103+
"Microsoft.Web/sites/basicPublishingCredentialsPolicies/ftp/Write",
104+
"Microsoft.Web/sites/basicPublishingCredentialsPolicies/scm/Write",
105+
"Microsoft.Web/sites/slots/basicPublishingCredentialsPolicies/ftp/Write",
106+
"Microsoft.Web/sites/slots/basicPublishingCredentialsPolicies/scm/Write"
107+
],
108+
"AssignableScopes": ["/subscriptions/<subscription-guid>"]
109+
}'
110+
```
111+
112+
You can now assign this role to your organization’s users.
113+
114+
For more information, see [Create or update Azure custom roles using Azure CLI](../role-based-access-control/custom-roles-cli.md).
115+
116+
-----
117+
118+
## Monitor for basic authentication attempts
119+
120+
All successful and attempted logins are logged to the Azure Monitor `AppServiceAuditLogs` log type. To audit the attempted and successful logins on FTP and WebDeploy, follow the steps at [Send logs to Azure Monitor](troubleshoot-diagnostic-logs.md#send-logs-to-azure-monitor) and enable shipping of the `AppServiceAuditLogs` log type.
121+
122+
To confirm that the logs are shipped to your selected service(s), try logging in via FTP or WebDeploy. The following example shows a Storage Account log.
123+
124+
<pre>
125+
{
126+
"time": "2020-07-16T17:42:32.9322528Z",
127+
"ResourceId": "/SUBSCRIPTIONS/EF90E930-9D7F-4A60-8A99-748E0EEA69DE/RESOURCEGROUPS/FREEBERGDEMO/PROVIDERS/MICROSOFT.WEB/SITES/FREEBERG-WINDOWS",
128+
"Category": "AppServiceAuditLogs",
129+
"OperationName": "Authorization",
130+
"Properties": {
131+
"User": "$freeberg-windows",
132+
"UserDisplayName": "$freeberg-windows",
133+
"UserAddress": "24.19.191.170",
134+
"Protocol": "FTP"
135+
}
136+
}
137+
</pre>
138+
139+
## Basic authentication related policies
140+
141+
[Azure Policy](../governance/policy/overview.md) can help you enforce organizational standards and to assess compliance at-scale. You can use Azure Policy to audit for any apps that still use basic authentication, and remediate any noncompliant resources. The following are built-in policies for auditing and remediating basic authentication on App Service:
142+
143+
- [Audit policy for FTP](https://portal.azure.com/#blade/Microsoft_Azure_Policy/PolicyDetailBlade/definitionId/%2Fproviders%2FMicrosoft.Authorization%2FpolicyDefinitions%2F871b205b-57cf-4e1e-a234-492616998bf7)
144+
- [Audit policy for SCM](https://ms.portal.azure.com/#blade/Microsoft_Azure_Policy/PolicyDetailBlade/definitionId/%2Fproviders%2FMicrosoft.Authorization%2FpolicyDefinitions%2Faede300b-d67f-480a-ae26-4b3dfb1a1fdc)
145+
- [Remediation policy for FTP](https://ms.portal.azure.com/#blade/Microsoft_Azure_Policy/PolicyDetailBlade/definitionId/%2Fproviders%2FMicrosoft.Authorization%2FpolicyDefinitions%2Ff493116f-3b7f-4ab3-bf80-0c2af35e46c2)
146+
- [Remediation policy for SCM](https://ms.portal.azure.com/#blade/Microsoft_Azure_Policy/PolicyDetailBlade/definitionId/%2Fproviders%2FMicrosoft.Authorization%2FpolicyDefinitions%2F2c034a29-2a5f-4857-b120-f800fe5549ae)
147+
148+
The following are corresponding policies for slots:
149+
150+
- [Audit policy for FTP](https://ms.portal.azure.com/#blade/Microsoft_Azure_Policy/PolicyDetailBlade/definitionId/%2Fproviders%2FMicrosoft.Authorization%2FpolicyDefinitions%2Fec71c0bc-6a45-4b1f-9587-80dc83e6898c)
151+
- [Audit policy for SCM](https://ms.portal.azure.com/#blade/Microsoft_Azure_Policy/PolicyDetailBlade/definitionId/%2Fproviders%2FMicrosoft.Authorization%2FpolicyDefinitions%2F847ef871-e2fe-4e6e-907e-4adbf71de5cf)
152+
- [Remediation policy for FTP](https://ms.portal.azure.com/#blade/Microsoft_Azure_Policy/PolicyDetailBlade/definitionId/%2Fproviders%2FMicrosoft.Authorization%2FpolicyDefinitions%2Ff493116f-3b7f-4ab3-bf80-0c2af35e46c2)
153+
- [Remediation policy for SCM](https://ms.portal.azure.com/#blade/Microsoft_Azure_Policy/PolicyDetailBlade/definitionId/%2Fproviders%2FMicrosoft.Authorization%2FpolicyDefinitions%2F2c034a29-2a5f-4857-b120-f800fe5549ae)
154+

articles/app-service/deploy-authentication-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.author: cephalin
1212
Azure App Service lets you deploy your web application code and configuration by using multiple options. These deployment options may support one or more authentication mechanisms. This article provides details about various authentication mechanisms supported by different deployment methods.
1313

1414
> [!NOTE]
15-
> To disable basic authentication for your App Service app, see [Configure deployment credentials](deploy-configure-credentials.md).
15+
> To disable basic authentication for your App Service app, see [Disable basic authentication in App Service deployments](configure-basic-auth-disable.md).
1616
1717
|Deployment method|Authentication  |Reference Documents |
1818
|:----|:----|:----|

articles/app-service/deploy-configure-credentials.md

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -135,33 +135,7 @@ Invoke-AzResourceAction -ResourceGroupName <group-name> -ResourceType Microsoft.
135135

136136
## Disable basic authentication
137137

138-
Some organizations need to meet security requirements and would rather disable access via FTP or WebDeploy. This way, the organization's members can only access its App Services through APIs that are controlled by Microsoft Entra ID.
139-
140-
### FTP
141-
142-
To disable FTP access to the site, run the following CLI command. Replace the placeholders with your resource group and site name.
143-
144-
```azurecli-interactive
145-
az resource update --resource-group <resource-group> --name ftp --namespace Microsoft.Web --resource-type basicPublishingCredentialsPolicies --parent sites/<site-name> --set properties.allow=false
146-
```
147-
148-
To confirm that FTP access is blocked, you can try to authenticate using an FTP client such as FileZilla. To retrieve the publishing credentials, go to the overview blade of your site and click Download Publish Profile. Use the file’s FTP hostname, username, and password to authenticate, and you will get a 401 error response, indicating that you are not authorized.
149-
150-
### WebDeploy and SCM
151-
152-
To disable basic auth access to the WebDeploy port and SCM site, run the following CLI command. Replace the placeholders with your resource group and site name.
153-
154-
```azurecli-interactive
155-
az resource update --resource-group <resource-group> --name scm --namespace Microsoft.Web --resource-type basicPublishingCredentialsPolicies --parent sites/<site-name> --set properties.allow=false
156-
```
157-
158-
To confirm that the publish profile credentials are blocked on WebDeploy, try [publishing a web app using Visual Studio 2019](/visualstudio/deployment/quickstart-deploy-to-azure).
159-
160-
### Disable access to the API
161-
162-
The API in the previous section is backed Azure role-based access control (Azure RBAC), which means you can [create a custom role](../role-based-access-control/custom-roles.md#steps-to-create-a-custom-role) and assign lower-priveldged users to the role so they cannot enable basic auth on any sites. To configure the custom role, [follow these instructions](https://azure.github.io/AppService/2020/08/10/securing-data-plane-access.html#create-a-custom-rbac-role).
163-
164-
You can also use [Azure Monitor](https://azure.github.io/AppService/2020/08/10/securing-data-plane-access.html#audit-with-azure-monitor) to audit any successful authentication requests and use [Azure Policy](https://azure.github.io/AppService/2020/08/10/securing-data-plane-access.html#enforce-compliance-with-azure-policy) to enforce this configuration for all sites in your subscription.
138+
See [Disable basic authentication in App Service deployments](configure-basic-auth-disable.md).
165139

166140
## Next steps
167141

77.1 KB
Loading
107 KB
Loading

articles/app-service/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,8 @@
289289
href: tutorial-secure-ntier-app.md
290290
- name: Isolate network traffic (tutorial)
291291
href: tutorial-networking-isolate-vnet.md
292+
- name: Disable basic auth
293+
href: configure-basic-auth-disable.md
292294
- name: Security
293295
items:
294296
- name: Security recommendations

0 commit comments

Comments
 (0)