Steps to Implement SAML 2.0 in ASP.NET MVC Application

Hi,

I wanted to implement SAML 2.0 authentication in my mvc application. The client has the ADFS set up with SAML and they provided the FederationMetadata.xml.
The client has asked to implement SAML 2.0 authentication from the MVC application, have been doing lot of research on the implementation and I have no idea of how to do it.

Please help me in detail steps of how to use component Space to implement SAML with ADFS. This is very urgent and need reply as soon as possible.
I have the web application ready but using the WsFederationAuthentication protocol. Also, i have installed the sample code fro your site but lost in all that, please need help.

Thanks
Sravani

Please take a look at our ADFS Relying Party Integration Guide.

https://www.componentspace.com/Forums/9358/ADFS-Integration-Guides

This describes integration with ADFS.

Before doing that, if you haven’t already I suggest taking a look at our Examples Guide. This walks you through running the ExampleServiceProvider and ExampleIdentityProvider projects in Visual Studio. It’s a good idea to see SSO running in your environment.

The ExampleServiceProvider calls SAMLServiceProvider.InitiateSSO and SAMLServiceProvider.ReceiveSSO to support SAML SSO. Your application would have to make the same calls for SSO to ADFS.

It also includes a saml.config file that includes configuration information about your local service provider and the partner identity provider. Your application would need a similar saml.config but specific to your environment.

Thank you for your reply.
Yes, i have gone through the ADFS guide and the examples, but unable to run those examples throwing errors.

I would like to know step by step process of how to integrate the component space with my application.
I am lost and its confusing with lot of code, can you explain on an high level what needs to be done over all.

I need to implement SAML auth in my web application and ADFS should so the authorization and send me back the assertions. That’s it i don want anything else
Its been rough week to grab all these knowledge as i am new to SAML as well as ADFS.

Please help me…! Thanks in advance

The ExampleServiceProvider and ExampleIdentityProvider should run without any errors if you follow the instructions in the Examples Guide.
The ExampleServiceProvider, when run against ADFS, won’t work without updating its saml.config to use your ADFS server as it’s configured to use our test ADFS server which isn’t always running.

Did you take a look at the Quick Start Guide?
https://www.componentspace.com/Forums/9353/Quick-Start-Guide
The “Creating a Service Provider” lists the steps required to setup your application as the service provider.

You might also be interested in our paid consulting services where we can offer assistance via web conference calls etc and help you update your application and SAML configuration, as well as assisting with the ADFS configuration.

Hi,

Yes, Started looking at the examples guide and I dont have enough experience in generating the key and exporting local service metadata.
I need to find a solution as client is back of me, please help whatever is possible.

How do i contact the paid subscription for the support.

Thanks
Sravani

Please contact support@componentspace.com mentioning you’re interest in the paid consultancy and providing as much information as possible.


Hi,

I have implemented the code based on the examples provided and below is the request built. But i am not getting any response please help me what is the mistake.

<samlp:AuthnRequest xmlns:samlp=“urn:oasis:names:tc:SAML:2.0:protocol”
ID=“_32c02ead-e6ee-410f-ab2b-17e68b1aab34”
Version=“2.0”
IssueInstant=“2019-08-27T14:37:03.284Z”
Destination=“<a href=“https://fed.cabotcmp.com/adfs/ls/””>https://fed.cabotcmp.com/adfs/ls/
ForceAuthn=“false”
IsPassive=“false”
ProtocolBinding=“urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST”
AssertionConsumerServiceURL=”<a href=“https://localhost:44363/Home/AssertionConsumerService”“>https://localhost:44363/Home/AssertionConsumerService
>
<saml:Issuer xmlns:saml=“urn:oasis:names:tc:SAML:2.0:assertion”>https://cmcannotationapp.azurewebsites.net</saml:Issuer>
<samlp:NameIDPolicy Format=“urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified”
AllowCreate=“true”
/>
</samlp:AuthnRequest>

Thanks
Sravani


Hi Sravani,
There’s most likely a configuration mismatch between your application and ADFS.
To determine the issue, I would need the following:

1. The ADFS SAML metadata XML document downloaded from the ADFS server.
2. The SAML log file for the service provider application.
3. A screenshot of what you see in the browser.
4. Screenshots of the relying party property tabs in ADFS so I can check the ADFS configuration.
5. If ADFS is displaying an error in the browser, the error events in the Windows event log on the ADFS server associated with the failed SSO.

I suggest sending this information to support@componentspace.com rather than posting it to the forum.