Dev Overview of SAML
OneLogin has implemented and open-sourced SAML toolkits for five web development platforms:
Security Assertion Markup Language (SAML) is a standard for logging users into applications based on their sessions in another context. This single sign-on (SSO) login standard has significant advantages over logging in using a username/password:
No need to type in credentials
No need to remember and renew passwords
No weak passwords
Most organizations already know the identity of users because they are logged in to their Active Directory domain or intranet. It makes sense to use this information to log users in to other applications, such as web-based applications, and one of the more elegant ways of doing this is by using SAML.
SAML is very powerful and flexible, but the specification can be quite a handful. OneLogin’s open-source SAML toolkits can help you integrate SAML in hours, instead of months. We’ve come up with a simple setup that will work for most applications.
How SAML Works
SAML SSO works by transferring the user’s identity from one place (the identity provider) to another (the service provider). This is done through an exchange of digitally signed XML documents.
Consider the following scenario: A user is logged into a system that acts as an identity provider. The user wants to log in to a remote application, such as a support or accounting application (the service provider). The following happens:
The user accesses the remote application using a link on an intranet, a bookmark, or similar and the application loads.
The application identifies the user’s origin (by application subdomain, user IP address, or similar) and redirects the user back to the identity provider, asking for authentication. This is the authentication request.
The user either has an existing active browser session with the identity provider or establishes one by logging into the identity provider.
The identity provider builds the authentication response in the form of an XML-document containing the user’s username or email address, signs it using an X.509 certificate, and posts this information to the service provider.
The service provider, which already knows the identity provider and has a certificate fingerprint, retrieves the authentication response and validates it using the certificate fingerprint.
The identity of the user is established and the user is provided with app access.
SAML SSO Flow
The diagram below illustrates the single sign-on flow for service provider-initiated SSO, i.e. when an application triggers SSO.
Identity provider-initiated SSO is similar and consists of only the bottom half of the flow.
Have a Question?
Have a how-to question? Seeing a weird error? Ask us about it on StackOverflow.
Found a bug? Submit a support ticket.
Have a product idea or request? Share it with us in our Ideas Portal.
StackOverflow discussions about "onelogin saml"
Answered Apr 27 2016
I recently went through the same thought process: having never heard of SAML, I needed to enable a web application to authenticate via SAML with OneLogin as identity provider (instead of Active … that the confusion was three-fold: (1) how SAML works, (2) how the passport-saml library works in Node, and (3) how to configure the identity provider (OneLogin, Active Directory, or otherwise). What …
Asked Mar 14 2015
https://github.com/onelogin/ruby-saml CASino and https://github.com/rbCAS/casino-activerecord_authenticator And I am sure there are hundreds of OAuth related gems. I just want a separate Rails … about doing this, I read about CAS, SAML and OAuth2. (I know that the "Auth" in OAuth stands for authorization, and not authentication, but I read enough articles saying how OAuth can be used for …
Answered Nov 20 2010
I played with this one once: https://github.com/onelogin/ruby-saml It might be what you're looking for. …
Answered Oct 06 2014
You can also take a look on https://github.com/onelogin/python-saml Is also open source and the toolkit contains 2 demos: A django application and a Flask application. Right now only works on … python 2.X Edited 13/05/2015: There is a python 3.X version (beta, I'm still testing it): https://github.com/pitbulk/python3-saml (thanks bgaifullin for contributing it) Edited 13/04/2016 python 3.X version is stable and tested. …
Asked Mar 15 2016
: This would be set to saml_acs route //SAML protocol binding to be used when returning the <Response> //message. Onelogin Toolkit supports for this endpoint the //HTTP-Redirect … route // SAML protocol binding to be used when returning the <Response> // message. Onelogin Toolkit supports for this endpoint the // HTTP-Redirect binding only …