I don't have much understating how make existing old ASP.NET MVC 4 app(claim-based auth, windows identity foundation, ws-federation, old thinktecture identity server) to use new Identity Server 4 with WS-Federation plugin. Does it require to substitute WIF's Authentication and Session modules with OWIN middleware as stated here or use both?

Here's configs from web.config:

      <add name="WSFederationAuthenticationModule" type="Microsoft.IdentityModel.Web.WSFederationAuthenticationModule, Microsoft.IdentityModel, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      <add name="SessionAuthenticationModule" type="Microsoft.IdentityModel.Web.SessionAuthenticationModule, Microsoft.IdentityModel, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <add value="https://localhost/" />
        <wsFederation passiveRedirectEnabled="true" issuer="https://localhost/LoginEndpoint/issue/wsfed" realm="https://localhost/" requireHttps="false" />
        <cookieHandler requireSsl="true" hideFromScript="true" />
          <claimType type="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name" optional="true" />
          <claimType type="http://schemas.microsoft.com/ws/2008/06/identity/claims/role" optional="true" />
      <issuerNameRegistry type="Microsoft.IdentityModel.Tokens.ConfigurationBasedIssuerNameRegistry, Microsoft.IdentityModel, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
          <add thumbprint="XXXXXXXXXXXX" name="https://localhost/LoginEndpoint/" />
      <certificateValidation certificateValidationMode="None" />
        <!--Needed for cookie encyption in web-farm environment. -->
        <certificateReference x509FindType="FindByThumbprint" findValue="XXXXXXXXXXXXXXXXX" />

Any help will be appreciated! Even suggestions if there are better frameworks or approaches for modern SSO solutions that can be used with old ASP.NET MVC 4 clients.

1 Answers

nzpcmad On Best Solutions

On the client side, you can use the OWIN stack.

Note this is .NET Core but the principles are the same.

You can still use WIF if you want to. You just need to change the IDP URL and wtrealm parameters.

On the server side you need the Rock Solid Knowledge WS-Fed plugin.

Follow this approach.

The other way is to change to OpenID Connect that idsrv4 supports out of the box.

There's a good walk-through here.