I know it's been a long time but can you elaborate on the need for SamlSignedXml - what the problem is with SignedXml and what this is doing to fix it? I see Sustainsys.Saml2 doing something similar but haven't figured it out yet. Thanks!
I'm trying to setup a website to be the IdP in a SSO scenario. Will this code example help me do that? It's all terribly confusing at the code level for me. I understand the premise of SSO and SAML, but there's very little help in executing.
You could. In the downloads there are libraries that will generate a SAML Response. See the "Using the code" section. If you're the IDP and you want to generate what's called an "Unsolicited Response", this code closely mimics that.
There are other more complicated scenarios where the SP initiates the conversation and sends you a request (AuthnRequest) and after you authenticate the user you send back and SAML Response.
For the unsolicited Response, you'll need a certificate that you have the private key for. You'll need to either load it locally in the Windows Key store, or you'll need it in a file that is password protected. Then you'd call generate the response by calling the following method;
The solution has a Solution folder listing a bunch of files, one of which is a .bat file. This .bat file and the other files in the folder, are not present. Is this intentional?
Also, there seems to be a step implied in the build which does not resolve - something to do with a ThirdParty Assemblies folder, something called ilmerge and what appears to be a catch-al "All" DLL file. Is this why I cannot compile the code?
I cannot get the project to compile. I think parts of it are missing. I know the article is 10 years old, but does anyone has any advice?
I found your code years ago and implemented it for an SSO integration and it has worked great.
We have a new SSO integration I need to implement and this time there is a wrinkle, the actual assertion is encrypted (saml:EncryptedAssertion). The original code is failing when I try to Deserialize the xml.
code: assertion = (AssertionType)serializer.Deserialize(reader);
Error: InvalidOperationException: <encryptedassertion xmlns="urn:oasis:names:tc:SAML:2.0:assertion"> was not expected.
Have you done any work with an EncryptedAssertion?
This article is really good and very informative. Your step by step in explanation helped me understand the usage of SAML. Now I would like to understand the complete SSO workflow. Could you please share me your Service provider code and SSO.asmx implementation?