All Projects → IdentityServer → IdentityServer4.WsFederation

IdentityServer / IdentityServer4.WsFederation

Licence: Apache-2.0 license
Sample for implementing WS-Federation IdP support for IdentityServer4

Programming Languages

C#
18002 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects
Classic ASP
548 projects

Projects that are alternatives of or similar to IdentityServer4.WsFederation

Identityserverdemo
ASP.NET Core 2.x/3.x、.NET 5.x and IdentityServer4 Learn
Stars: ✭ 214 (+239.68%)
Mutual labels:  identityserver4
Authentication
Authentication examples for AspNetCore 3.1
Stars: ✭ 37 (-41.27%)
Mutual labels:  identityserver4
AppAuthIdentityServer4
Android sample using AppAuth-Android with identity server 4
Stars: ✭ 32 (-49.21%)
Mutual labels:  identityserver4
Samples.IdentityServer4.Saml2pIntegration
IdentityServer 4 implementation acting as SAML 2.0 IdP and SP
Stars: ✭ 51 (-19.05%)
Mutual labels:  identityserver4
AspNetCoreBackChannelLogout
ASP.NET Core Back-Channel Logout for Hybrid Clients, Redis, Key Vault, Azure
Stars: ✭ 17 (-73.02%)
Mutual labels:  identityserver4
example-oidc
OIDC (OpenID Connect) Example for http://openid.net/connect/
Stars: ✭ 221 (+250.79%)
Mutual labels:  identityserver4
Destiny.core.flow
Destiny.Core.Flow是基于.Net Core,VUE前后分离,开发的一个开源Admin管理框架目前有以下模块:菜单管理、用户管理、角色管理、用户角色、角色权限等功能。
Stars: ✭ 184 (+192.06%)
Mutual labels:  identityserver4
MonolithicArchitecture
This repository presents an approach on how to build an application using Monolithic architecture, ASP.NET Core, EntityFrameworkCore, Identity Server, CQRS, DDD
Stars: ✭ 18 (-71.43%)
Mutual labels:  identityserver4
squidex-identity
Identity Server for Squidex Headless CMS
Stars: ✭ 28 (-55.56%)
Mutual labels:  identityserver4
OcelotSample
Ocelot使用案例,结合IdentityServer4进行鉴权,结合Consul进行服务治理
Stars: ✭ 58 (-7.94%)
Mutual labels:  identityserver4
LYM.NetCore
IdentityServer4+EFCore
Stars: ✭ 17 (-73.02%)
Mutual labels:  identityserver4
MsCoreOne
MsCoreOne is a simple Ecommerce with using many technologies such as .NET 5, Entity Framework Core 5, React 16.13 with modern Clean Architecture, Domain-Driven Design, CQRS, SOLID, Identity Server 4, Blazor. It will focus on resolving the problems always see in the process to develop projects.
Stars: ✭ 77 (+22.22%)
Mutual labels:  identityserver4
Joker
An example of microservices container based application which implemented different approaches within each microservice (DDD, CQRS, Simple CRUD)
Stars: ✭ 41 (-34.92%)
Mutual labels:  identityserver4
Identityserver4.admin
The administration for the IdentityServer4 and Asp.Net Core Identity
Stars: ✭ 2,998 (+4658.73%)
Mutual labels:  identityserver4
Nebula.Admin
Destiny.Core.Flow是基于.Net Core,VUE前后分离,开发的一个开源Admin管理框架目前有以下模块:菜单管理、用户管理、角色管理、用户角色、角色权限等功能。
Stars: ✭ 254 (+303.17%)
Mutual labels:  identityserver4
Oidc.example
OIDC (OpenID Connect) Example for http://openid.net/connect/
Stars: ✭ 190 (+201.59%)
Mutual labels:  identityserver4
IdentityServer4.Contrib.AspNetCore.Testing
Testing framework for ASP.NET Core and Identity-Server 4
Stars: ✭ 16 (-74.6%)
Mutual labels:  identityserver4
QrF.Core
基于.net core 2.2 的微服务框架
Stars: ✭ 19 (-69.84%)
Mutual labels:  identityserver4
run-aspnet-identityserver4
Secure microservices with using standalone Identity Server 4 and backing with Ocelot API Gateway. Protect our ASP.NET Web MVC and API applications with using OAuth 2 and OpenID Connect in IdentityServer4. Securing your web application and API with tokens, working with claims, authentication and authorization middlewares and applying policies.
Stars: ✭ 159 (+152.38%)
Mutual labels:  identityserver4
fullstack-jobs
Real(ish) demo using Angular with ASP.NET Core GraphQL and IdentityServer.
Stars: ✭ 84 (+33.33%)
Mutual labels:  identityserver4

IdentityServer4.WsFederation

Sample for implementing WS-Federation IdP support for IdentityServer4

Overview

IdentityServer4 is designed to be extensible with custom protocol endpoints. This repo shows a simple implementation of WS-Federation IdP services. This is useful for connecting SharePoint or older ASP.NET relying parties to IdentityServer.

This is not supposed to be a generic WS-Federation implementation, but is rather a sample that you can use as a starting point to build your own WS-Federation support (or even for inspiration for integrating other custom protocols, which are not natively supported by IdentityServer4).

The following is a brief description of some technical points of interest. Feel free to amend this document if more details are needed.

.NET Support

The underlying WS-Federation classes used in this repo are only part of the "desktop" .NET Framework and are not included in .NET Core.

WS-Federation endpoint

The WS-Federation endpoint (metadata, sign-in and out) is implemented via an MVC controller (~/wsfederation). This controller handles the WS-Federation protocol requests and redirects the user to the login page if needed.

The login page will then use the normal return URL mechanism to redirect back to the WS-Federation endpoint to create the protocol response.

Response generation

The SignInResponseGenerator class does the heavy lifting of creating the contents of the WS-Federation response:

  • it calls the IdentityServer profile service to retrieve the configured claims for the relying party
  • it tries to map the standard claim types to WS-* style claim types
  • it creates the SAML 1.1/2.0 token
  • it creates the RSTR (request security token response)

The outcome of these operations is a SignInResponseMessage object which then gets turned into a WS-Federation response and sent back to the relying party.

Configuration

For most parts, the WS-Federation endpoint can use the standard IdentityServer4 client configuration for relying parties. But there are also options available for setting WS-Federation specific options.

Defaults

You can configure global defaults in the WsFederationOptions class, e.g.:

  • default token type (SAML 1.1 or SAML 2.0)
  • default hashing and digest algorithms
  • default SAML name identifier format
  • default mappings from "short" claim types to WS-* claim types

Relying party configuration

The following client settings are used by the WS-Federation endpoint:

public static IEnumerable<Client> GetClients()
{
    return new[]
    {
        new Client
        {
            // realm identifier
            ClientId = "urn:owinrp",
            
            // must be set to WS-Federation
            ProtocolType = ProtocolTypes.WsFederation,

            // reply URL
            RedirectUris = { "http://localhost:10313/" },
            
            // signout cleanup url
            LogoutUri = "http://localhost:10313/home/signoutcleanup",
            
            // lifetime of SAML token
            IdentityTokenLifetime = 36000,

            // identity scopes - the associated claims will be used to call the profile service
            AllowedScopes = { "openid", "profile" }
        }
    };
}

WS-Federation specific relying party settings

If you want to deviate from the global defaults (e.g. set a different token type or claim mapping) for a specific relying party, you can define a RelyingParty object that uses the same realm name as the client ID used above.

This sample contains an in-memory relying party store that you can use to make these relying party specific settings available to the WS-Federation engine (using the AddInMemoryRelyingParty extension method). Otherwise, if you want to use your own store, you will need an implementation of IRelyingPartyStore.

Configuring IdentityServer

This repo contains an extension method for the IdentityServer builder object to register all the necessary services in DI, e.g.:

services.AddIdentityServer()
    .AddSigningCredential(cert)
    .AddInMemoryIdentityResources(Config.GetIdentityResources())
    .AddInMemoryApiResources(Config.GetApiResources())
    .AddInMemoryClients(Config.GetClients())
    .AddTestUsers(TestUsers.Users)
    .AddWsFederation()
    .AddInMemoryRelyingParties(Config.GetRelyingParties());

Connecting a relying party to the WS-Federation endpoint

Using Katana

Use the Katana WS-Federation middleware to point to the WS-Federation endpoint, e.g.:

public void Configuration(IAppBuilder app)
{
    app.UseCookieAuthentication(new CookieAuthenticationOptions
    {
        AuthenticationType = "Cookies"
    });

    app.UseWsFederationAuthentication(new WsFederationAuthenticationOptions
    {
        MetadataAddress = "http://localhost:5000/wsfederation",
        Wtrealm = "urn:owinrp",

        SignInAsAuthenticationType = "Cookies"
    });
}

SharePoint

see https://www.scottbrady91.com/Identity-Server/IdentityServer-4-SharePoint-Integration-using-WS-Federation

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].