Skip to content

Commit bc3b883

Browse files
author
Adit Sheth
committed
Merge branch 'main' of https://github.com/shethaadit/docs into shethaadit/FixBug40061
2 parents 2f634f1 + 4359103 commit bc3b883

File tree

43 files changed

+112
-223
lines changed

Some content is hidden

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

43 files changed

+112
-223
lines changed

.openpublishing.redirection.core.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,10 @@
342342
"source_path_from_root": "/docs/core/compatibility/windows-forms/8.0/anchor-layout.md",
343343
"redirect_url": "/dotnet/core/compatibility/8.0"
344344
},
345+
{
346+
"source_path_from_root": "/docs/core/compatibility/windows-forms/9.0/statusstrip-renderer.md",
347+
"redirect_url": "/dotnet/core/compatibility/9.0"
348+
},
345349
{
346350
"source_path_from_root": "/docs/core/deploying/applications.md",
347351
"redirect_url": "/dotnet/core/deploying/index"

docs/architecture/cloud-native/identity-server.md

Lines changed: 41 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: IdentityServer for Cloud Native Apps
33
description: Architecting Cloud Native .NET Apps for Azure | IdentityServer
4-
ms.date: 04/06/2022
4+
ms.date: 02/06/2025
55
---
66

77
# IdentityServer for cloud-native applications
@@ -26,7 +26,7 @@ Typically, applications need to support some or all of the following scenarios:
2626

2727
In each of these scenarios, the exposed functionality needs to be secured against unauthorized use. At a minimum, this typically requires authenticating the user or principal making a request for a resource. This authentication may use one of several common protocols such as SAML2p, WS-Fed, or OpenID Connect. Communicating with APIs typically uses the OAuth2 protocol and its support for security tokens. Separating these critical cross-cutting security concerns and their implementation details from the applications themselves ensures consistency and improves security and maintainability. Outsourcing these concerns to a dedicated product like IdentityServer helps the requirement for every application to solve these problems itself.
2828

29-
IdentityServer provides middleware that runs within an ASP.NET Core application and adds support for OpenID Connect and OAuth2 (see [supported specifications](https://docs.duendesoftware.com/identityserver/v6/overview/specs/)). Organizations would create their own ASP.NET Core app using IdentityServer middleware to act as the STS for all of their token-based security protocols. The IdentityServer middleware exposes endpoints to support standard functionality, including:
29+
IdentityServer provides middleware that runs within an ASP.NET Core application and adds support for OpenID Connect and OAuth2 (see [supported specifications](https://docs.duendesoftware.com/identityserver/v7/overview/specs/)). Organizations would create their own ASP.NET Core app using IdentityServer middleware to act as the STS for all of their token-based security protocols. The IdentityServer middleware exposes endpoints to support standard functionality, including:
3030

3131
- Authorize (authenticate the end user)
3232
- Token (request a token programmatically)
@@ -39,71 +39,66 @@ IdentityServer provides middleware that runs within an ASP.NET Core application
3939

4040
## Getting started
4141

42-
IdentityServer4 is available under dual license:
42+
IdentityServer is available:
4343

44-
* RPL - lets you use the IdentityServer4 free if used in open-source work
45-
* Paid - lets you use the IdentityServer4 in a commercial scenario
44+
* With a community license, which lets you use the [IdentityServer free for small companies and non-profits](https://duendesoftware.com/products/communityedition) (conditions apply)
45+
* Paid, which lets you use the IdentityServer [in a commercial scenario](https://duendesoftware.com/products/identityserver)
4646

4747
For more information about pricing, see the official product's [pricing page](https://duendesoftware.com/products/identityserver).
4848

49-
You can add it to your applications using its NuGet packages. The main package is [IdentityServer4](https://www.nuget.org/packages/IdentityServer4/), which has been downloaded over four million times. The base package doesn't include any user interface code and only supports in-memory configuration. To use it with a database, you'll also want a data provider like [IdentityServer4.EntityFramework](https://www.nuget.org/packages/IdentityServer4.EntityFramework), which uses Entity Framework Core to store configuration and operational data for IdentityServer. For user interface, you can copy files from the [Quickstart UI repository](https://github.com/IdentityServer/IdentityServer4.Quickstart.UI) into your ASP.NET Core MVC application to add support for sign in and sign out using IdentityServer middleware.
49+
You can add it to your applications using its NuGet packages. The main package is [IdentityServer](https://www.nuget.org/packages/Duende.IdentityServer/), which has been downloaded over four million times. The base package doesn't include any user interface code and only supports in-memory configuration. To use it with a database, you'll also want a data provider like [Duende.IdentityServer.Storage](https://www.nuget.org/packages/Duende.IdentityServer.Storage), which uses Entity Framework Core to store configuration and operational data for IdentityServer. For user interface, you can copy files from the [Quickstart UI repository](https://github.com/DuendeSoftware/IdentityServer.Quickstart.UI) into your ASP.NET Core MVC application to add support for sign in and sign out using IdentityServer middleware.
5050

5151
## Configuration
5252

53-
IdentityServer supports different kinds of protocols and social authentication providers that can be configured as part of each custom installation. This is typically done in the ASP.NET Core application's `Program` class (or in the `Startup` class in the `ConfigureServices` method). The configuration involves specifying the supported protocols and the paths to the servers and endpoints that will be used. Figure 8-2 shows an example configuration taken from the IdentityServer4 Quickstart UI project:
53+
IdentityServer supports different kinds of protocols and social authentication providers that can be configured as part of each custom installation. This is typically done in the ASP.NET Core application's `Program` class (or in the `Startup` class in the `ConfigureServices` method). The configuration involves specifying the supported protocols and the paths to the servers and endpoints that will be used. Figure 8-2 shows an example configuration taken from the [IdentityServer Quickstart for ASP.NET Core applications](https://docs.duendesoftware.com/identityserver/v7/quickstarts/2_interactive/) project:
5454

5555
```csharp
56-
public class Startup
57-
{
58-
public void ConfigureServices(IServiceCollection services)
56+
// some details omitted
57+
builder.Services.AddIdentityServer();
58+
59+
builder.Services.AddAuthentication(options =>
60+
{
61+
options.DefaultScheme = "Cookies";
62+
options.DefaultChallengeScheme = "oidc";
63+
})
64+
.AddCookie("Cookies")
65+
.AddGoogle("Google", options =>
66+
{
67+
options.SignInScheme = IdentityServerConstants.ExternalCookieAuthenticationScheme;
68+
69+
options.ClientId = "<insert here>";
70+
options.ClientSecret = "<insert here>";
71+
})
72+
.AddOpenIdConnect("oidc", options =>
5973
{
60-
services.AddMvc();
61-
62-
// some details omitted
63-
services.AddIdentityServer();
64-
65-
services.AddAuthentication()
66-
.AddGoogle("Google", options =>
67-
{
68-
options.SignInScheme = IdentityServerConstants.ExternalCookieAuthenticationScheme;
69-
70-
options.ClientId = "<insert here>";
71-
options.ClientSecret = "<insert here>";
72-
})
73-
.AddOpenIdConnect("demoidsrv", "IdentityServer", options =>
74-
{
75-
options.SignInScheme = IdentityServerConstants.ExternalCookieAuthenticationScheme;
76-
options.SignOutScheme = IdentityServerConstants.SignoutScheme;
77-
78-
options.Authority = "https://demo.identityserver.io/";
79-
options.ClientId = "implicit";
80-
options.ResponseType = "id_token";
81-
options.SaveTokens = true;
82-
options.CallbackPath = new PathString("/signin-idsrv");
83-
options.SignedOutCallbackPath = new PathString("/signout-callback-idsrv");
84-
options.RemoteSignOutPath = new PathString("/signout-idsrv");
85-
86-
options.TokenValidationParameters = new TokenValidationParameters
87-
{
88-
NameClaimType = "name",
89-
RoleClaimType = "role"
90-
};
91-
});
92-
}
74+
options.Authority = "https://localhost:5001";
75+
76+
options.ClientId = "web";
77+
options.ClientSecret = "secret";
78+
options.ResponseType = "code";
79+
80+
options.Scope.Clear();
81+
options.Scope.Add("openid");
82+
options.Scope.Add("profile");
83+
84+
options.MapInboundClaims = false; // Don't rename claim types
85+
86+
options.SaveTokens = true;
87+
});
9388
}
9489
```
9590

9691
**Figure 8-2**. Configuring IdentityServer.
9792

9893
## JavaScript clients
9994

100-
Many cloud-native applications use server-side APIs and rich client single page applications (SPAs) on the front end. IdentityServer ships a [JavaScript client](https://docs.duendesoftware.com/identityserver/v6/quickstarts/js_clients/) (`oidc-client.js`) via NPM that can be added to SPAs to enable them to use IdentityServer for sign in, sign out, and token-based authentication of web APIs.
95+
Many cloud-native applications use server-side APIs and rich client single page applications (SPAs) on the front end. IdentityServer ships a [JavaScript client](https://docs.duendesoftware.com/identityserver/v7/quickstarts/js_clients/) (`oidc-client.js`) via NPM that can be added to SPAs to enable them to use IdentityServer for sign in, sign out, and token-based authentication of web APIs. In addition, you can use a [backend-for-frontend (BFF)](https://docs.duendesoftware.com/identityserver/v7/quickstarts/js_clients/js_with_backend/) that implements all of the security protocol interactions with the token server and the IETF's [OAuth 2.0 for Browser-Based Applications spec](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-browser-based-apps).
10196

10297
## References
10398

104-
- [IdentityServer documentation](https://docs.duendesoftware.com/identityserver/v6/)
99+
- [IdentityServer documentation](https://docs.duendesoftware.com/identityserver/v7/)
105100
- [Application types](/azure/active-directory/develop/app-types)
106-
- [JavaScript OIDC client](https://docs.duendesoftware.com/identityserver/v6/quickstarts/js_clients/)
101+
- [JavaScript OIDC client](https://docs.duendesoftware.com/identityserver/v7/quickstarts/js_clients/)
107102

108103
>[!div class="step-by-step"]
109104
>[Previous](azure-active-directory.md)

docs/azure/includes/dotnet-all.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
| WCF Storage Queues | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Microsoft.WCF.Azure.StorageQueues/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Microsoft.WCF.Azure.StorageQueues-readme?view=azure-dotnet-preview&amp;preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.WCF.Azure.StorageQueues_1.0.0-beta.1/sdk/extension-wcf/Microsoft.WCF.Azure.StorageQueues/) |
119119
| Web PubSub | NuGet [1.4.0](https://www.nuget.org/packages/Azure.Messaging.WebPubSub/1.4.0) | [docs](/dotnet/api/overview/azure/Messaging.WebPubSub-readme) | GitHub [1.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.WebPubSub_1.4.0/sdk/webpubsub/Azure.Messaging.WebPubSub/) |
120120
| Web PubSub Client | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Messaging.WebPubSub.Client/1.0.0) | [docs](/dotnet/api/overview/azure/Messaging.WebPubSub.Client-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.WebPubSub.Client_1.0.0/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/) |
121-
| Azure client library integration for ASP.NET Core | NuGet [1.9.0](https://www.nuget.org/packages/Microsoft.Extensions.Azure/1.9.0) | [docs](/dotnet/api/overview/azure/Microsoft.Extensions.Azure-readme) | GitHub [1.9.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Extensions.Azure_1.9.0/sdk/extensions/Microsoft.Extensions.Azure/) |
121+
| Azure client library integration for ASP.NET Core | NuGet [1.10.0](https://www.nuget.org/packages/Microsoft.Extensions.Azure/1.10.0) | [docs](/dotnet/api/overview/azure/Microsoft.Extensions.Azure-readme) | GitHub [1.10.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Extensions.Azure_1.10.0/sdk/extensions/Microsoft.Extensions.Azure/) |
122122
| Blob Storage Key Store for .NET Data Protection | NuGet [1.4.0](https://www.nuget.org/packages/Azure.Extensions.AspNetCore.DataProtection.Blobs/1.4.0) | [docs](/dotnet/api/overview/azure/Extensions.AspNetCore.DataProtection.Blobs-readme) | GitHub [1.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Extensions.AspNetCore.DataProtection.Blobs_1.4.0/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Blobs/) |
123123
| CloudNative CloudEvents with Event Grid | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents/1.0.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents_1.0.0/sdk/eventgrid/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents/) |
124124
| Core - Client - Spatial | NuGet [1.1.0](https://www.nuget.org/packages/Microsoft.Azure.Core.Spatial/1.1.0)<br>NuGet [1.2.0-beta.1](https://www.nuget.org/packages/Microsoft.Azure.Core.Spatial/1.2.0-beta.1) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.Core.Spatial-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Core.Spatial_1.1.0/sdk/core/Microsoft.Azure.Core.Spatial/)<br>GitHub [1.2.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Core.Spatial_1.2.0-beta.1/sdk/core/Microsoft.Azure.Core.Spatial/) |

docs/azure/includes/dotnet-new.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
| WCF Storage Queues | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Microsoft.WCF.Azure.StorageQueues/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Microsoft.WCF.Azure.StorageQueues-readme?view=azure-dotnet-preview&amp;preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.WCF.Azure.StorageQueues_1.0.0-beta.1/sdk/extension-wcf/Microsoft.WCF.Azure.StorageQueues/) |
124124
| Web PubSub | NuGet [1.4.0](https://www.nuget.org/packages/Azure.Messaging.WebPubSub/1.4.0) | [docs](/dotnet/api/overview/azure/Messaging.WebPubSub-readme) | GitHub [1.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.WebPubSub_1.4.0/sdk/webpubsub/Azure.Messaging.WebPubSub/) |
125125
| Web PubSub Client | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Messaging.WebPubSub.Client/1.0.0) | [docs](/dotnet/api/overview/azure/Messaging.WebPubSub.Client-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.WebPubSub.Client_1.0.0/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/) |
126-
| Azure client library integration for ASP.NET Core | NuGet [1.9.0](https://www.nuget.org/packages/Microsoft.Extensions.Azure/1.9.0) | [docs](/dotnet/api/overview/azure/Microsoft.Extensions.Azure-readme) | GitHub [1.9.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Extensions.Azure_1.9.0/sdk/extensions/Microsoft.Extensions.Azure/) |
126+
| Azure client library integration for ASP.NET Core | NuGet [1.10.0](https://www.nuget.org/packages/Microsoft.Extensions.Azure/1.10.0) | [docs](/dotnet/api/overview/azure/Microsoft.Extensions.Azure-readme) | GitHub [1.10.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Extensions.Azure_1.10.0/sdk/extensions/Microsoft.Extensions.Azure/) |
127127
| Blob Storage Key Store for .NET Data Protection | NuGet [1.4.0](https://www.nuget.org/packages/Azure.Extensions.AspNetCore.DataProtection.Blobs/1.4.0) | [docs](/dotnet/api/overview/azure/Extensions.AspNetCore.DataProtection.Blobs-readme) | GitHub [1.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Extensions.AspNetCore.DataProtection.Blobs_1.4.0/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Blobs/) |
128128
| CloudNative CloudEvents with Event Grid | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents/1.0.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents_1.0.0/sdk/eventgrid/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents/) |
129129
| Core - Client - Spatial | NuGet [1.1.0](https://www.nuget.org/packages/Microsoft.Azure.Core.Spatial/1.1.0)<br>NuGet [1.2.0-beta.1](https://www.nuget.org/packages/Microsoft.Azure.Core.Spatial/1.2.0-beta.1) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.Core.Spatial-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Core.Spatial_1.1.0/sdk/core/Microsoft.Azure.Core.Spatial/)<br>GitHub [1.2.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Core.Spatial_1.2.0-beta.1/sdk/core/Microsoft.Azure.Core.Spatial/) |

0 commit comments

Comments
 (0)