SAML 2.0 enables web-based, cross-domain single sign-on (SSO), which helps reduce the administrative overhead of distributing multiple authentication tokens to the user.
The critical aspects of SAML 2.0 are covered in detail in the official documents SAMLCore,[1] SAMLBind,[2] SAMLProf,[3] and SAMLMeta.
An assertion is a package of information that supplies zero or more statements made by a SAML authority.
Note that in the above example the
When a principal (or an entity acting on the principal's behalf) wishes to obtain an assertion containing an authentication statement, a
SAML protocol messages can be carried directly in the URL query string of an HTTP GET request.
SAML requests or responses transmitted via HTTP Redirect have a SAMLRequest or SAMLResponse query string parameter, respectively.
When the
Initially, the service provider responds to a request from the user agent with a document containing an XHTML form: The value of the SAMLRequest parameter is the base64-encoding of a
The SSO service at the identity provider validates the request and responds with a document containing another XHTML form: The value of the SAMLResponse parameter is the base64 encoding of a
Finally, the service provider returns a
The MessageHandle is a random sequence of bytes that references a SAML message that the artifact issuer is willing to produce on-demand.
The identity provider returns the SAML Response to the SP Assertion Consumer Service using the HTTP-POST Binding.
The RelayState token is an opaque reference to state information maintained at the service provider.
The SSO Service at the identity provider processes the
Respond with an XHTML form The service provider responds with a document containing an XHTML form: The RelayState token is an opaque reference to state information maintained at the service provider.
Request the SSO Service at the IdP The user agent issues a POST request to the SSO service at the identity provider: where the values of the SAMLRequest and RelayState parameters are taken from the XHTML form at step 2.
The SSO service processes the
For each browser user, this cookie stores a history list of recently visited IdPs.
The name and value of the cookie are specified in the IdP Discovery Profile (SAMLProf[3]).
After a successful act of authentication, the IdP requests the Common Domain Cookie Writing Service.
Below we give an example of a query issued by a principal directly: Note that the Issuer is the Subject in this case.
An identity provider might return the following assertion, wrapped in a
SAML 2.0 provides a well-defined, interoperable metadata format that entities can leverage to bootstrap the trust process.
An identity provider publishes data about itself in an
[3] See, for example, the identity provider described in the
Note the following details about this element: As noted at the beginning of this section, the values of the Location attributes are used by a service provider to route SAML messages, which minimizes the possibility of a rogue identity provider orchestrating a man-in-the-middle attack.
[3] See, for example, the service provider described in the
The assertion consumer service is contained in an
In practice, however, multiple