How to validate SAML response - single-sign-on

I create SAML application on my Okta dashboard. Now when I clicked on that application it redirect me to my site and on my site I got SAML response.
What I need to do is to check that request is valid or not. If the request is valid, I'll skip my login page and let user login automatically.
How can I make sure the request is valid? I develop that code in MVC C#.

Which SAML toolkit are you using? In case if you are using Kentor you can see this article http://developer.okta.com/blog/2016/03/22/use-kentor-authservices-with-Okta which uses example app to validate SAML response. If you are using another toolkit you would need to check its documentation as how to validate SAML response, as toolkits vary in configuration and are 3rd party tools.
You would need certificate from Okta, which you can download from your app by going to the sign on tab and click view setup tab and download the certificate from the page that will be used to validate SAML.

Related

How to set Java app to act as an Identity Provider

I have one java app in which the user logs in. In one functionality of the app, when the user clicks on one button , it will redirect to client website where user has to login in that website. If i want to do the SSO to redirect to the client website without logging in , How can i do that? I don't want to use third party IDP'S(okta, Salesforce, azure) since the user is logging into the java app, so the user is verified, is there anyway i can make the java app as an idp and do the sso by sending saml assertion directly to the client site from the java app ?
You could do this by adding a Java SAML client to your application.
A number of these can act as an IDP as well as a SP (the application).
But this is not recommended since it does not scale.
Rather use an IDP. You get SSO so the user only has to login once.

How to implement OneLogin SSO/SLO without using OneLogin UI

I am working on Ruby on Rails application. I need to implement Single Sign on / Single Log out (SSO / SLO) using OneLogin.
I used OneLogin-Ruby-Sdk => https://github.com/onelogin/onelogin-ruby-sdk to log user via session token API. It creates a cookie in browser and allows me to login on other apps. But when I logout using log_a_user_out Api. It only logs out of current application but not from all applications. So SLO is not working in this case.
Thereafter, I integrated devise_saml_authenticatable => https://github.com/apokalipto/devise_saml_authenticatable. It works with SSO / SLO perfectly. But it redirects to oneLogin UI to generate SAMLRequest and send back SAMLResponse.
Is there a way I can generate SAMLRequest and SAMLResponse programatically ?
Just like we do for OAuth2 where we can generate access token using refresh token again and again.
Basically I want users to signup and login through my app forms and communicate with OneLogin and implement SSO / SLO using API rather than going to oneLogin UI.
Please let me know if more information is required in terms of code which could help in providing answer. I will be more than glad to do so. Any help is hugely appreciated.

OneLogin SAML logout functionality

I want to implement logout functionality for Onelogin SAML in ASP.net MVC.
Can anyone please share me sample application for Onelogin SAML logout functionality with redirection.
I have already refer onelogin site.
https://developers.onelogin.com/saml/examples/logout-response
still not getting response.
The Onelogin dot-net SAML toolkit is a proof of concept as described in its repository.
You should use another SAML toolkit (alternatives listed on the repo).
btw, check this SingleLogout class used on that view that executes a single logout request (extracted from the SAML toolkit of ITfoxtec).

Spring Security back channel SAML SOAP Authentication

I have a Spring Security app that uses SAML. It is working fine. I go to a secured page, I get redirected to the IDP, login... success.
Now I want to have the login done "in house" as it were, with no redirection.
I want to have a login page that takes username/pass - then -- well I don't know. :)
Is there anyway to NOT have the user's browser go to the IDP, either POST the form to the IDP and then redirect back to my app?
I read in the documentation about back-channel SOAP calls, and that sounds like exactly what I want, but I can't find anything on it. Does anyone have an example of how this would be achieved?

SAML authentication using ADFS for IONIC mobile app?

I am looking for a way to put my own login page, create SAML assertion and send to our ADFS server as a SAML request from my IONIC app. Any help on how it could be done.
I got my app url registered as Relying Party on our ADFS using ionic app custom url
I am not allowed to share my ADFS server details so I can not use:
auth0-ionic
Is there any other way to use my own login page and send a SAML request for ADFS
authentication?
I did find one option, to manually generate SAML request xml as a string and send the request, not sure if there is a better way available.
Appreciate your help. Please let me know if more information is required.
Thanks