1

I am new to SAML and .NET core 2.0 cookie authentication. I am trying to implement SAML 2.0 compliance in a .NET core 2.0 using Okta as an IdP. I have read through a lot of .NET core documentation around authentication but there is no authentication scheme for a federated IdP using the SAML 2.0 flow wherein the IdP calls back the SP with a SAML once it is done authenticating the user.

The flow is as follows

Client (calls SP for accessing data) => SP

SP (redirects client to IdP) -> Client => IdP

IdP(authenticates user and calls the callback URL for SP) => SP

SP (serves content to client with cookie for future requests) => Client

Client (requests another resource + appends cookie) => SP

SP (validates cookie [ login again if invalid | continue if valid ] and serves content) => Client

I also tried reading through ASP .NET Core code samples for Cookies but it implements a method HttpContext.Authentication.SignInAsync that has been marked as obsolete by Microsoft.

While working on this I tried to use the using Microsoft.IdentityModel.Tokens.Saml2 nuget package for parsing Saml2 but without an authentication scheme I could not get far in my custom implementation.

Any code samples or libraries that I can use to implement this flow will be helpful.

Yadu
  • 51
  • 7
  • What SAML stack are you using? - https://medium.com/the-new-control-plane/i-need-a-saml-stack-now-63d9691e2d43 – rbrayb Jul 12 '18 at 20:59
  • I was looking for one if available. The beginning of the article describes me write now :D Will try out one of them. Do you have any recommendations for .NET core 2.0? – Yadu Jul 12 '18 at 21:18
  • As per the article, ComponentSpace, Rock Solid Knowledge, Sustainsys, – rbrayb Jul 13 '18 at 00:45

0 Answers0