1

I am tasked with setting up SAML 2.0 Single Sign On via the Sustainsys (Kentor) library for the project I am currently working on. Here is the documentation I have been following. The website is a webforms application so I am using the HTTPModule portion of the Sustainsys library. I have configured my IDP (Okta) to send the SAML 2.0 assertions to the website which the documentation proclaims the Endpoint to be /Saml or /Saml/Acs. The site is a Kentico CMS website and the CMS offers an API for authenticating the user using their username as the parameter to authenticate them.

The part I am having a hard time figuring out is, once the assertion has been passed Sustainsys how do I then access that data within my application so that I may view the claims, extract the username, and authenticate the user? The documentation describes how to configure the system, but it doesn't seem to describe how to use it..

1 Answer 1

2

The library extracts all the attributes from the SAML2 Assertion and creates claims out of them. The HttpModule then calls the SessionAuthenticationModule (which you need to have loaded) to create a cookie to persist the info.

From within your application, you just have to access HttpContext.Current.User.

3
  • 1
    Hello Anders, thank you very much for responding. I have a question. The documentation defines the endpoint as /Saml2 so I should configure Okta to send the assertion to this URL? This is the entry point for where the assertion should be sent and which my application consumes the assertion? It doesn't seem to be working for me.
    – Colin
    Aug 28, 2018 at 14:18
  • 1
    The assertion consumer service url, where Okta should sent it's response is /Saml2/Acs (the Saml2 part of the path can be changed, Acs is hard coded). Aug 29, 2018 at 9:04
  • @AndersAbel Piggybacking on this question to hopefully catch your eye, but I'm having trouble accessing the custom claims after login. Question and code here: stackoverflow.com/questions/64071329/… Sep 25, 2020 at 21:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.