Skip to content

Commit e663d48

Browse files
committed
Merge branch 'main' of https://github.com/MicrosoftDocs/azure-docs-pr into mqtt-broker-batch2
2 parents e44eacc + 75dc47a commit e663d48

File tree

132 files changed

+2883
-1512
lines changed

Some content is hidden

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

132 files changed

+2883
-1512
lines changed

.openpublishing.redirection.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
{
22
"redirections": [
3+
{
4+
"source_path": "articles/defender-for-iot/organizations/appliance-catalog/virtual-management-hyper-v.md",
5+
"redirect_url": "/previous-versions/azure/defender-for-iot/organizations/appliance-catalog/virtual-management-hyper-v",
6+
"redirect_document_id": false
7+
},
8+
{
9+
"source_path": "articles/defender-for-iot/organizations/appliance-catalog/virtual-management-vmware.md",
10+
"redirect_url": "/previous-versions/azure/defender-for-iot/organizations/appliance-catalog/virtual-management-vmware",
11+
"redirect_document_id": false
12+
},
313
{
414
"source_path": "articles/defender-for-iot/organizations/api/management-alert-apis.md",
515
"redirect_url": "/previous-versions/azure/defender-for-iot/organizations/api/management-alert-apis",

articles/active-directory-b2c/partner-cloudflare.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: Tutorial to configure Azure Active Directory B2C with Cloudflare Web Application Firewall
2+
title: Configure Azure Active Directory B2C with Cloudflare Web Application Firewall
33
titleSuffix: Azure AD B2C
4-
description: Tutorial to configure Azure Active Directory B2C with Cloudflare Web application firewall and protect applications from malicious attacks
4+
description: Configure Azure Active Directory B2C with Cloudflare Web application firewall and protect applications from malicious attacks
55
author: gargi-sinha
66
manager: martinco
77
ms.reviewer: kengaderdus
@@ -13,9 +13,9 @@ ms.subservice: b2c
1313

1414
# Customer intent: I'm a developer configuring Azure AD B2C with Cloudflare WAF. I need to enable and configure the Web Application Firewall, so I can protect my application from malicious attacks such as SQL Injection and cross-site scripting (XSS).
1515
---
16-
# Tutorial: Configure Cloudflare Web Application Firewall with Azure Active Directory B2C
16+
# Configure Cloudflare Web Application Firewall with Azure Active Directory B2C
1717

18-
In this tutorial, you can learn how to configure the [Cloudflare Web Application Firewall (WAF)](https://www.cloudflare.com/application-services/products/waf/) solution for Azure Active Directory B2C (Azure AD B2C) tenant with custom domain. Use Cloudflare WAF to help protect organizations from malicious attacks that can exploit vulnerabilities such as SQL Injection, and cross-site scripting (XSS).
18+
In this article, you can learn how to configure the [Cloudflare Web Application Firewall (WAF)](https://www.cloudflare.com/application-services/products/waf/) solution for Azure Active Directory B2C (Azure AD B2C) tenant with custom domain. Use Cloudflare WAF to help protect organizations from malicious attacks that can exploit vulnerabilities such as SQL Injection, and cross-site scripting (XSS).
1919

2020
## Prerequisites
2121

articles/azure-app-configuration/feature-management-dotnet-reference.md

Lines changed: 60 additions & 257 deletions
Large diffs are not rendered by default.

articles/azure-app-configuration/howto-geo-replication.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ configurationBuilder.AddAzureAppConfiguration(options =>
275275
```
276276

277277
> [!NOTE]
278-
> Load balancing support is available if you use version **8.0.0-preview.3** or later of any of the following packages.
278+
> Load balancing support is available if you use version **8.0.0** or later of any of the following packages.
279279
> - `Microsoft.Extensions.Configuration.AzureAppConfiguration`
280280
> - `Microsoft.Azure.AppConfiguration.AspNetCore`
281281
> - `Microsoft.Azure.AppConfiguration.Functions.Worker`

articles/azure-app-configuration/howto-targetingfilter-aspnet-core.md

Lines changed: 14 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -199,68 +199,26 @@ In this section, you create a web application that allows users to sign in and u
199199
200200
## Enable targeting for the web application
201201
202-
The targeting filter evaluates a user's feature state based on the user's targeting context, which comprises the user ID and the groups the user belongs to. In this example, you use the signed-in user's email address as the user ID and the domain name of the email address as the group.
202+
A targeting context is required for feature evaluation with targeting. You can provide it as a parameter to the `featureManager.IsEnabledAsync` API explicitly. In ASP.NET Core, the targeting context can also be provided through the service collection as an ambient context by implementing the [ITargetingContextAccessor](./feature-management-dotnet-reference.md#itargetingcontextaccessor) interface.
203203
204-
1. Add an *ExampleTargetingContextAccessor.cs* file with the following code. You implement the `ITargetingContextAccessor` interface to provide the targeting context for the signed-in user of the current request.
204+
### Targeting Context Accessor
205205
206-
```csharp
207-
using Microsoft.FeatureManagement.FeatureFilters;
206+
To provide the targeting context, pass your implementation type of the `ITargetingContextAccessor` to the `WithTargeting<T>` method. If no type is provided, a default implementation is used, as shown in the following code snippet. The default targeting context accessor utilizes `HttpContext.User.Identity.Name` as `UserId` and `HttpContext.User.Claims` of type [`Role`](/dotnet/api/system.security.claims.claimtypes.role#system-security-claims-claimtypes-role) for `Groups`. You can reference the [DefaultHttpTargetingContextAccessor](https://github.com/microsoft/FeatureManagement-Dotnet/blob/main/src/Microsoft.FeatureManagement.AspNetCore/DefaultHttpTargetingContextAccessor.cs) to implement your own if customization is needed. To learn more about implementing the `ITargetingContextAccessor`, see the [feature reference for targeting](./feature-management-dotnet-reference.md#itargetingcontextaccessor).
208207
209-
namespace TestFeatureFlags
210-
{
211-
public class ExampleTargetingContextAccessor : ITargetingContextAccessor
212-
{
213-
private const string TargetingContextLookup = "ExampleTargetingContextAccessor.TargetingContext";
214-
private readonly IHttpContextAccessor _httpContextAccessor;
215-
216-
public ExampleTargetingContextAccessor(IHttpContextAccessor httpContextAccessor)
217-
{
218-
_httpContextAccessor = httpContextAccessor ?? throw new ArgumentNullException(nameof(httpContextAccessor));
219-
}
220-
221-
public ValueTask<TargetingContext> GetContextAsync()
222-
{
223-
HttpContext httpContext = _httpContextAccessor.HttpContext;
224-
if (httpContext.Items.TryGetValue(TargetingContextLookup, out object value))
225-
{
226-
return new ValueTask<TargetingContext>((TargetingContext)value);
227-
}
228-
List<string> groups = new List<string>();
229-
if (httpContext.User.Identity.Name != null)
230-
{
231-
groups.Add(httpContext.User.Identity.Name.Split("@", StringSplitOptions.None)[1]);
232-
}
233-
TargetingContext targetingContext = new TargetingContext
234-
{
235-
UserId = httpContext.User.Identity.Name,
236-
Groups = groups
237-
};
238-
httpContext.Items[TargetingContextLookup] = targetingContext;
239-
return new ValueTask<TargetingContext>(targetingContext);
240-
}
241-
}
242-
}
243-
```
208+
``` C#
209+
// Existing code in Program.cs
210+
// ... ...
244211
245-
1. Open the *Program.cs* file and enable the targeting filter by calling the `WithTargeting` method. You pass in the type `ExampleTargetingContextAccessor` that the targeting filter will use to get the targeting context during feature flag evaluation. Add `HttpContextAccessor` to the service collection to allow `ExampleTargetingContextAccessor` to access the signed-in user information from the `HttpContext`.
212+
// Add feature management to the container of services
213+
builder.Services.AddFeatureManagement()
214+
.WithTargeting();
246215
247-
```csharp
248-
// Existing code in Program.cs
249-
// ... ...
250-
251-
// Add feature management to the container of services
252-
builder.Services.AddFeatureManagement()
253-
.WithTargeting<ExampleTargetingContextAccessor>();
216+
// The rest of existing code in Program.cs
217+
// ... ...
218+
```
254219

255-
// Add HttpContextAccessor to the container of services.
256-
builder.Services.AddHttpContextAccessor();
257-
258-
// The rest of existing code in Program.cs
259-
// ... ...
260-
```
261-
262-
> [!NOTE]
263-
> For Blazor applications, see [instructions](./faq.yml#how-to-enable-feature-management-in-blazor-applications-or-as-scoped-services-in--net-applications) for enabling feature management as scoped services.
220+
> [!NOTE]
221+
> For Blazor applications, see [instructions](./faq.yml#how-to-enable-feature-management-in-blazor-applications-or-as-scoped-services-in--net-applications) for enabling feature management as scoped services.
264222
265223
## Targeting filter in action
266224

@@ -280,10 +238,6 @@ The targeting filter evaluates a user's feature state based on the user's target
280238
281239
Now sign in as `[email protected]`, using the password you set when registering the account. The **Beta** item doesn't appear on the toolbar, because `[email protected]` is specified as an excluded user.
282240

283-
You can create more users with `@contoso.com` and `@contoso-xyz.com` email addresses to see the behavior of the group settings.
284-
285-
Users with `contoso-xyz.com` email addresses won't see the **Beta** item. While 50% of users with `@contoso.com` email addresses will see the **Beta** item, the other 50% won't see the **Beta** item.
286-
287241
## Next steps
288242

289243
To learn more about the feature filters, continue to the following documents.

articles/azure-app-configuration/quickstart-feature-flag-azure-functions-csharp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,10 @@ This project will use [dependency injection in .NET Azure Functions](../azure-fu
134134
Add a constructor used to obtain instances of `_featureManagerSnapshot` and `IConfigurationRefresherProvider` through dependency injection. From the `IConfigurationRefresherProvider`, you can obtain the instance of `IConfigurationRefresher`.
135135

136136
```csharp
137-
private readonly IFeatureManagerSnapshot _featureManagerSnapshot;
137+
private readonly IVariantFeatureManagerSnapshot _featureManagerSnapshot;
138138
private readonly IConfigurationRefresher _configurationRefresher;
139139

140-
public Function1(IFeatureManagerSnapshot featureManagerSnapshot, IConfigurationRefresherProvider refresherProvider)
140+
public Function1(IVariantFeatureManagerSnapshot featureManagerSnapshot, IConfigurationRefresherProvider refresherProvider)
141141
{
142142
_featureManagerSnapshot = featureManagerSnapshot;
143143
_configurationRefresher = refresherProvider.Refreshers.First();

articles/azure-app-configuration/quickstart-feature-flag-dotnet-background-service.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,16 +117,16 @@ Add a feature flag called *Beta* to the App Configuration store and leave **Labe
117117
using Microsoft.FeatureManagement;
118118
```
119119
120-
1. Update the constructor of the `Worker` service to obtain instances of `IConfigurationRefresher` and `IFeatureManager` through dependency injection.
120+
1. Update the constructor of the `Worker` service to obtain instances of `IConfigurationRefresher` and `IVariantFeatureManager` through dependency injection.
121121
122122
```csharp
123123
public class Worker : BackgroundService
124124
{
125125
private readonly ILogger<Worker> _logger;
126126
private readonly IConfigurationRefresher _refresher;
127-
private readonly IFeatureManager _featureManager;
127+
private readonly IVariantFeatureManager _featureManager;
128128
129-
public Worker(ILogger<Worker> logger, IConfigurationRefresher refresher, IFeatureManager featureManager)
129+
public Worker(ILogger<Worker> logger, IConfigurationRefresher refresher, IVariantFeatureManager featureManager)
130130
{
131131
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
132132
_refresher = refresher ?? throw new ArgumentNullException(nameof(refresher));

articles/azure-app-configuration/quickstart-feature-flag-dotnet.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ You can use Visual Studio to create a new console app project.
4040

4141
1. Start Visual Studio, and select **File** > **New** > **Project**.
4242

43-
1. In **Create a new project**, filter on the **Console** project type and select **Console App**. If you want to create a .NET Framework app, please select **Console App (.NET Framework)** instead. Click **Next**.
43+
1. In **Create a new project**, filter on the **Console** project type and select **Console App**. If you want to create a .NET Framework app, select **Console App (.NET Framework)** instead. Click **Next**.
4444

45-
1. In **Configure your new project**, enter a project name. If you are creating a .NET Framework app, please select **.NET Framework 4.7.2** or higher under **Framework**. Click **Create**.
45+
1. In **Configure your new project**, enter a project name. If you're creating a .NET Framework app, select **.NET Framework 4.7.2** or higher under **Framework**. Click **Create**.
4646

4747
## Use the feature flag
4848

@@ -77,7 +77,7 @@ You can use Visual Studio to create a new console app project.
7777
7878
IFeatureDefinitionProvider featureDefinitionProvider = new ConfigurationFeatureDefinitionProvider(configuration);
7979
80-
IFeatureManager featureManager = new FeatureManager(
80+
IVariantFeatureManager featureManager = new FeatureManager(
8181
featureDefinitionProvider,
8282
new FeatureManagementOptions());
8383
@@ -103,7 +103,7 @@ You can use Visual Studio to create a new console app project.
103103
104104
IFeatureDefinitionProvider featureDefinitionProvider = new ConfigurationFeatureDefinitionProvider(configuration);
105105
106-
IFeatureManager featureManager = new FeatureManager(
106+
IVariantFeatureManager featureManager = new FeatureManager(
107107
featureDefinitionProvider,
108108
new FeatureManagementOptions());
109109
@@ -130,7 +130,7 @@ You can use Visual Studio to create a new console app project.
130130
setx ConnectionString "<connection-string-of-your-app-configuration-store>"
131131
```
132132
133-
Restart the command prompt to allow the change to take effect. Print the value of the environment variable to validate that it's set properly.
133+
Restart the command prompt to allow the change to take effect. Validate that it's set properly by printing the value of the environment variable.
134134
135135
### [PowerShell](#tab/powershell)
136136
2.25 KB
Loading

articles/azure-maps/spatial-io-add-simple-data-layer.md

Lines changed: 61 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -36,65 +36,68 @@ map.layers.add(layer);
3636
The following code snippet demonstrates using a simple data layer, referencing the data from an online source.
3737

3838
```javascript
39-
function InitMap()
40-
{
41-
var map = new atlas.Map('myMap', {
42-
center: [-73.967605, 40.780452],
43-
zoom: 12,
44-
view: "Auto",
45-
46-
//Add authentication details for connecting to Azure Maps.
47-
authOptions: {
48-
// Get an Azure Maps key at https://azuremaps.com/.
49-
authType: 'subscriptionKey',
50-
subscriptionKey: '{Your-Azure-Maps-Subscription-key}'
51-
},
52-
});
53-
54-
//Wait until the map resources are ready.
55-
map.events.add('ready', function () {
56-
57-
//Create a data source and add it to the map.
58-
var datasource = new atlas.source.DataSource();
59-
map.sources.add(datasource);
60-
61-
//Add a simple data layer for rendering data.
62-
var layer = new atlas.layer.SimpleDataLayer(datasource);
63-
map.layers.add(layer);
64-
65-
//Load an initial data set.
66-
const dataSet = {
67-
"type": "Feature",
68-
"geometry": {
69-
"type": "Point",
70-
"coordinates": [0, 0]
71-
},
72-
"properties": {
73-
"color": "red"
74-
}
75-
};
76-
77-
loadDataSet(dataSet);
78-
79-
function loadDataSet(url) {
80-
//Read the spatial data and add it to the map.
81-
atlas.io.read(url).then(r => {
82-
if (r) {
83-
//Update the features in the data source.
84-
datasource.setShapes(r);
85-
86-
//If bounding box information is known for data, set the map view to it.
87-
if (r.bbox) {
88-
map.setCamera({
89-
bounds: r.bbox,
90-
padding: 50
91-
});
92-
}
93-
}
94-
});
39+
<script src="https://atlas.microsoft.com/sdk/javascript/spatial/0/atlas-spatial.min.js"></script>
40+
41+
<script>
42+
function InitMap() {
43+
var map = new atlas.Map("myMap", {
44+
center: [-73.967605, 40.780452],
45+
zoom: 12,
46+
view: "Auto",
47+
48+
//Add authentication details for connecting to Azure Maps.
49+
authOptions: {
50+
// Get an Azure Maps key at https://azuremaps.com/.
51+
authType: "subscriptionKey",
52+
subscriptionKey: '{Your-Azure-Maps-Subscription-key}'
53+
}
54+
});
55+
56+
//Wait until the map resources are ready.
57+
map.events.add("ready", function () {
58+
//Create a data source and add it to the map.
59+
var datasource = new atlas.source.DataSource();
60+
map.sources.add(datasource);
61+
62+
//Add a simple data layer for rendering data.
63+
var layer = new atlas.layer.SimpleDataLayer(datasource);
64+
map.layers.add(layer);
65+
66+
//Load an initial data set.
67+
const dataSet = {
68+
type: "FeatureCollection",
69+
bbox: [0, 0, 0, 0],
70+
features: [
71+
{
72+
type: "Feature",
73+
geometry: {
74+
type: "Point",
75+
coordinates: [0, 0]
76+
},
77+
properties: {
78+
color: "red"
79+
}
80+
}
81+
]
82+
};
83+
84+
loadDataSet(dataSet);
85+
86+
function loadDataSet(r) {
87+
//Update the features in the data source.
88+
datasource.setShapes(r);
89+
90+
//If bounding box information is known for data, set the map view to it.
91+
if (r.bbox) {
92+
map.setCamera({
93+
bounds: r.bbox,
94+
padding: 50
95+
});
96+
}
97+
}
98+
});
9599
}
96-
});
97-
}
100+
</script>
98101
```
99102

100103
Once you add features to the data source, the simple data layer figures out how best to render them. Styles for individual features can be set as properties on the feature.
@@ -114,10 +117,6 @@ This sample code renders the point feature using the simple data layer, and appe
114117
>
115118
> &emsp; "coordinates": [0, 0]
116119
117-
<!------------------------------------
118-
> [!VIDEO //codepen.io/azuremaps/embed/zYGzpQV/?height=500&theme-id=0&default-tab=js,result&editable=true]
119-
------------------------------------>
120-
121120
The real power of the simple data layer comes when:
122121

123122
- There are several different types of features in a data source; or

0 commit comments

Comments
 (0)