ComponentSpace

Forums



SAML SSO 2.0 Implementation with Asp.Net example


SAML SSO 2.0 Implementation with Asp.Net example

Author
Message
mdaman786
mdaman786
New Member
New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)

Group: Forum Members
Posts: 4, Visits: 18
Hi All,
I have downloaded ComponentSpace SAML SSO 2.0, But i don't understand, how it is working and how i can customize this according to my business need. Code implementation is available for this. Please provide me code implementation or any example to implement this an y application. I did not find SAML XML file into the solution, where i can put redirection URL.
Anyone can explain ComponentSpace SAML SSO 2.0 with integration with any asp.net application. 
ComponentSpace
ComponentSpace
ComponentSpace Development
ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)

Group: Administrators
Posts: 3.2K, Visits: 11K
I recommend taking a look at the Quick Start Guide that's available in the documentation folder of the download ZIP and also online.
https://www.componentspace.com/Forums/9353/Quick-Start-Guide

You'll also find various other guides in the same documentation folder as well as online.

There are general guides on how to use the product, the SAML API, SAML configuration etc as well as specific integration guides for ADFS, Azure AD, Okta etc.
https://www.componentspace.com/Forums/ComponentSpace-Documentation/Documentation-SAML-SSO-for-ASPNET

A good place to start is the Examples Guide which walks you through the ExampleIdentityProvider and ExampleServiceProvider projects that we ship.
https://www.componentspace.com/Forums/9351/Examples-Guide

There are various example projects including the ExampleIdentityProvider and ExampleServiceProvider projects I mentioned which are web-froms based, the MvcExampleIdentityProvider and MvcExampleServiceProvider projects which are MVC based, and a number of ancillary projects.

These example identity and service provider projects work with all the major SAML offerings, usually with no code changes required, assuming their SAML configuration has been updated accordingly.




Regards
ComponentSpace Development
mdaman786
mdaman786
New Member
New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)

Group: Forum Members
Posts: 4, Visits: 18
ComponentSpace - 9/6/2019
I recommend taking a look at the Quick Start Guide that's available in the documentation folder of the download ZIP and also online.
https://www.componentspace.com/Forums/9353/Quick-Start-Guide

You'll also find various other guides in the same documentation folder as well as online.

There are general guides on how to use the product, the SAML API, SAML configuration etc as well as specific integration guides for ADFS, Azure AD, Okta etc.
https://www.componentspace.com/Forums/ComponentSpace-Documentation/Documentation-SAML-SSO-for-ASPNET

A good place to start is the Examples Guide which walks you through the ExampleIdentityProvider and ExampleServiceProvider projects that we ship.
https://www.componentspace.com/Forums/9351/Examples-Guide

There are various example projects including the ExampleIdentityProvider and ExampleServiceProvider projects I mentioned which are web-froms based, the MvcExampleIdentityProvider and MvcExampleServiceProvider projects which are MVC based, and a number of ancillary projects.

These example identity and service provider projects work with all the major SAML offerings, usually with no code changes required, assuming their SAML configuration has been updated accordingly.



This is not helpful for me. I am implementing ServiceProvide SSO and want to redirect it in new tab. I am not ale to perform this.
ComponentSpace
ComponentSpace
ComponentSpace Development
ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)

Group: Administrators
Posts: 3.2K, Visits: 11K
SAML SSO doesn’t require a new browser tab to be opened. Typically the SSO flow occurs in the same browser window.

If you wish to open a new tab, your application needs to return to the browser the appropriate HTML or JavaScript to make this happen.
Once the user clicks the link or button etc and the HTTP request in the new browser tab comes back to your application, you call our SAML API to initiate SSO.

There are many ways to do this. The following demonstrates one possibility.

The HTML body includes a link that the browser will open in a new tab.


  <body>
    <h1>Login to the Service Provider</h1>
    <a href="/InitiateSSO.aspx" target="_blank">SSO to the Identity Provider</a>
</body>



The code behind for this page initiates SSO in this newly opened tab.


protected void Page_Load(object sender, EventArgs e)
{
    // Remember the return URL.
    string returnUrl = Request.QueryString["ReturnUrl"];

    // To login at the service provider, initiate single sign-on to the identity provider (SP-initiated SSO).
    string partnerIdP = WebConfigurationManager.AppSettings[AppSettings.PartnerIdP];

    SAMLServiceProvider.InitiateSSO(Response, returnUrl, partnerIdP);
}




Regards
ComponentSpace Development
mdaman786
mdaman786
New Member
New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)

Group: Forum Members
Posts: 4, Visits: 18
ComponentSpace - 9/19/2019
SAML SSO doesn’t require a new browser tab to be opened. Typically the SSO flow occurs in the same browser window.

If you wish to open a new tab, your application needs to return to the browser the appropriate HTML or JavaScript to make this happen.
Once the user clicks the link or button etc and the HTTP request in the new browser tab comes back to your application, you call our SAML API to initiate SSO.

There are many ways to do this. The following demonstrates one possibility.

The HTML body includes a link that the browser will open in a new tab.


  <body>
    <h1>Login to the Service Provider</h1>
    <a href="/InitiateSSO.aspx" target="_blank">SSO to the Identity Provider</a>
</body>



The code behind for this page initiates SSO in this newly opened tab.


protected void Page_Load(object sender, EventArgs e)
{
    // Remember the return URL.
    string returnUrl = Request.QueryString["ReturnUrl"];

    // To login at the service provider, initiate single sign-on to the identity provider (SP-initiated SSO).
    string partnerIdP = WebConfigurationManager.AppSettings[AppSettings.PartnerIdP];

    SAMLServiceProvider.InitiateSSO(Response, returnUrl, partnerIdP);
}



Where should i use the following code: 
<body>
    <h1>Login to the Service Provider</h1>
    <a href="/InitiateSSO.aspx" target="_blank">SSO to the Identity Provider</a>
</body>


I did not understand your answer. Not able to implement ServiceProvider SSO by using your code. Any easier way to do this. Please let me know.

 I have the following urls. Please provide me a demo that perform operation on these two URLs
  1. I have web application https://d-alliant.smartusys.net/portal/, in this application, I have implemented ServiceProvider SSO.
  2. Now I want to redirect and login to following URL https://alliantenergy-staging.tendril-energize.com/auth/saml/callback?/saml2/idp/sso/initiator?spName=WebSSO-SP-Partner-0" that must be open in new tab in browser.

ComponentSpace
ComponentSpace
ComponentSpace Development
ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)

Group: Administrators
Posts: 3.2K, Visits: 11K
That's some example HTML showing the user of target="_blank" to get the browser to open a new tab. Perhaps you should get SAML SSO working within the one tab and then make changes to your application to use a second tab.

We can't provide a demonstration for the specific URLs you list as this requires the correct configuration at the IdP for an SP we would run to work.

The redirect URL you list looks like the SSO service URL for the IdP which is where SAML authn requests are sent. The call to SAMLServiceProvider.InitiateSSO will use the <PartnerIdentityProvider> SingleSignOnServiceUrl configured in your saml.config as the destination for the SAML authn request. I would expect this is the URL you should have configured.

What happens when you call SAMLServiceProvider.InitiateSSO?

Are you redirected to the IdP?

What do you see in the browser?

Has the IdP updated their configuration to support SSO requests from your SP?

It would help if you enabled SAML trace and sent the generated log file as an email attachment to [email protected].

https://www.componentspace.com/Forums/17/Enabing-SAML-Trace


Regards
ComponentSpace Development
GO


Similar Topics


Execution: 0.000. 2 queries. Compression Enabled.
Login
Existing Account
Email Address:


Password:


Select a Forum....












Forums, Documentation & Knowledge Base - ComponentSpace


Search