I have an SSO app that uses wsFederation to an Optimal IDM server for our ASP.Net web form apps. The SSO app and other apps sit on the same server. All dependent apps redirect to the SSO app and let it do the magic of SSO. The SSO app will then set some cookies that the dependent apps use to identify the current user. This was done because SSO was added after a forms auth method was already place for years and these apps were already looking for these custom cookies.
I'm creating a new MVC Core app that I would like to use the built-in identity model but also use the existing SSO app. Before the SSO app redirects to the dependent apps, I can see the identity and claims. Once redirected, this is gone. I believe this is because I don't have the MVC Core app configured correctly to use this identity.
Here's the web.config section from the ASP.Net SSO app:
<microsoft.identityModel>
<service>
<applicationService>
<claimTypeRequired>
<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" />
</claimTypeRequired>
</applicationService>
<certificateValidation certificateValidationMode="None" />
<audienceUris>
<add value="urn:someURN" />
</audienceUris>
<federatedAuthentication>
<wsFederation passiveRedirectEnabled="true" issuer="https://sso.ourdomain.com/ofis/" realm="urn:someURN" requireHttps="true" />
<cookieHandler requireSsl="true" name="WSFedAuthSampleApp" path="/" />
</federatedAuthentication>
<issuerNameRegistry type="Microsoft.IdentityModel.Tokens.ConfigurationBasedIssuerNameRegistry, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<trustedIssuers>
<add thumbprint="XXX" name="urn:ofis4" />
</trustedIssuers>
</issuerNameRegistry>
</service>
</microsoft.identityModel>
Looking how to configure the MVC Core app to consume the identity.
I've tried different variations of AddWsFederation and AddCookie and I can't seem to get the IsAuthenticated to come back true.