Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


  • The SAML standard allows multiple AuthnContextClassRef elements to be specified in the RequestedAuthnContext. Currenly SURFsecureID will only look at the first AuthnContextClassRef element.
  • Specifying an AuthnContextClassRef other than on one the of the defined authentication level levels for SFO will result in an error.
  • The SAML standard allows a Comparision attribute to be added to the the RequestedAuthnContext element. Currently SURFsecureID does not interpret the value of this attribute and behaves as if "minimum" was specified as value for the Comparison attribute, which is a deviation of the SAML standard which specifies "exact" as the default. "minimum" means that the authentication context in the authentication statement that is returned after a successfull authentication will either be the requested authentication context, or the the authentication context of a stronger (i.e. higher level) authentication. SURFsecureID currently always returns the authentication context corrsponding to the highst level at which the user could be authentictated.

Future SURFsecureID versions may support more complex processing of RequestedAuthnContext options and add new AuthnContextClassRef "families" do to support different registration policies.


Note that SFO uses a different SingleSignOn Location and a different AuthnConextClassRef identifiers than a standard authentication to SURFsecureID. See SURFsecureID Metadata for Service Providers for the diffenrent AuthnConextClassRef identifiers that are being used by SURfsecureIDSURFsecureID.

Determining the SURFconext identifier of a user


For the value of last two items: ask the administrator of the IdP .


SAML Response

The result of a successful authentication is a SAML Response. Note that it does not contain an AttributeStatement and that the Assertion element is signed and that the Response element is not signed. Response signing is not currently supported by SURFsecureID, it may be added in future versions.

Code Block
titleExample Response
 <samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
        <samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success" />
    <saml:Assertion xmlns:xsi=""
        <ds:Signature xmlns:ds="">
                <ds:CanonicalizationMethod Algorithm="" />
                <ds:SignatureMethod Algorithm="" />
                <ds:Reference URI="#_1ROuxGVzJi5bbre6W4woNza82aK41HKjp6aKtw9r">
                        <ds:Transform Algorithm="" />
                        <ds:Transform Algorithm="" />
                    <ds:DigestMethod Algorithm="" />
            <saml:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"></saml:NameID>
            <saml:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
                <saml:SubjectConfirmationData NotOnOrAfter="2016-03-10T15:14:25Z"
        <saml:Conditions NotBefore="2016-03-10T15:09:25Z"
        <saml:AuthnStatement AuthnInstant="2016-03-10T15:09:25Z">

Error handling

For specifiec scenario'sspecific scenarios, when the authenticated authentication fails, the SURFsecureID gateway sends a SAMLResponse to the SP with a non success status:

  • urn:oasis:names:tc:SAML:2.0:status:Responder with subcode urn:oasis:names:tc:SAML:2.0:status:AuthnFailed = 
    Authentication was not successful. This specifically happens when the user cancels the authentication.
  • urn:oasis:names:tc:SAML:2.0:status:Responder with subcode urn:oasis:names:tc:SAML:2.0:status:NoAuthnContext = 
    The user could not be authenticated at the requested level. The user does not have an activated (vetted) token at the requests requested level.
  • Other situations can also lead to an error response. Specifically:
    • No RequestedAuthnContext or AuthnContextClassRef in the AuthnRequest
    • An unsupported URI in the AuthnContextClassRef
    • No Subject NameID in the AuthnRequest
    • The service provider is not authorised to authenticate the user specified in the Subject NameID

A service provider SHOULD be able to handle the first two errors scenarios above (AuthnFailed and NoAuthnContext) in a user friendly manner. These error responses will occur during normal use: users can and do cancel the authentication process and users that do no not yet, or no longer have, a registered seond factor will try to authneticate authenticate to your service, and fail.


An example code for using SFO with SimpleSAMLphp can be found at: