If you are trying so set up Single Sign-On using Vanilla's SAML SSO plugin against your own authentication provider or a third-party authentication provider you will find that there are a many possible points of failure. SAML is a very secure method of authentication and, as such, requires a very precise configuration and is not necessarily easy to troubleshoot. This document tries to expose the sources of the pain points, and what can be done.
SAML is an acronym for Security Assertion Markup Language. It is a protocol for exchanging user data securely between a Service Provider (in our case Vanilla) and an Identity Provider (either your authentication server or a third-party server that you are using). SAML delivers the data in XML document containing Assertions. Assertions are claims, or data, concerning the user being authenticated.
The Basic SAML 2.0 Flow
ONE: On a Vanilla site a user will click on the 'Sign In' prompt. The browser will be instantly redirected to the sign in page of the Identity Provider that you have configured in the SAML addon in the Vanilla Dashboard with the GET variable "SAMLRequest". The SAMLRequest is a compressed, base64encoded XML document that tells the Identity Provider which Service Provider is making the request.
TWO: The Identity Provider presents the user with a Sign In form. Once the user has been authenticated, the Identity Provider POSTs back the Response to the ReturnURL. The Response, like the SAMLRequest, is a compressed, base64encoded, signed XML document with either an error message or, if successful, all the 'Assertions' (also known as 'Claims' or user data) for the user.
THREE: The Service Provider (Vanilla) will decode the SAMLResponse, read the Assertions, verify the signature and translate the Assertions into useable data for either starting a session for an existing (by matching the UniqueID or, if there isn't one, the Email in the Assertions with an existing user), or creating a new user.
For more information on how to configure your Vanilla SAML Single Sign On connection you should read this article.
You may want to ask your Customer Success Manager to turn on the DB Logger addon so that you can create and see the Event Logs. If you find there are too many logs, try filtering the Event Logs on
Common Error Messages
The SAML response was not valid.
This is a generic error that covers multiple possible points of failure. It could be:
- The signature could not be located in the Response.
- No References node was found in the Response. The Response node is expected to be found as a child of the SignedInfo node.
- Your Response has more than one set of Assertions. Vanilla expects everything to be the child of one Assertion node.
- Timing issues. SAML Responses MUST have 'NotBefore' and 'NotOnOrAfter' values that protect from replay attacks. Possibly your server's clocks are not properly synchronized.