Second Factor Only authentication allows a SP to authenticate only the second factor of a user. With SFO you can add two factor authentication to your institutions application gateway (e.g. Citrix Netscaler or F5 BIG-IP) or to the authentication or authorization gateway (e.g. Microsoft ADFS or Novell/NetIQ). SFO has its own authentication endpoint at SURFconext.

Once a user is registered with a second factor both SFO authentication and SURFconext Strong Authentication can be used.

Differences between 'standard' SURFconext Strong Authentication and SFO authentication

FeatureStandard authenticationSFO authenticaton
Authentication of first factorAlwaysNever
Authentication of second factorBased on policy between IdP and SPAlways
User registrationUsing SURFconext Strong Authentication selfservice registration and vetting by an RA
Standard SURFconext featuresAttributes, Authorization, persistent identifiersNone

With SFO the authentication via SURFconext is bypassed (see image below). This means that SURFconext functionality (e.g. attributes from the user's home IdP, the definition of authorization rules and persistent user identifiers) is not available.

Note that also with SFO the registration of users will be done by the institutions (IdP's): there is no work to be done for the SP.

SAML AuthRequest

To start a SFO the SP must send a SAML 2.0 AuthnRequest to the SFO endpoint of the SURFconext Strong Authentication Gateway. This request must:

SFO uses different SingleSignOn Location and AuthnConext identifiers as compared with standard authentication.

<samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
    xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="_zQIibz9FKixdlgX8E7bHqE29wfatcgbsPdVn0NN"
    Version="2.0" IssueInstant="2016-03-10T15:09:21Z"
        <saml:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"></saml:NameID>

The signature is not visible in the XML: it will be encoded in HTTP GET parameters according to the specification of the HTTP-Redirect binding.

Determining the SURFconext identifier of a user

The SURFconext identifier is built from identifiers that the IdP of the user sends to SURFconext during authentication: 


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. It does not contain an AttributeStatement.

 <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

When a user cannot be authenticated, the SURFconext Strong Authentication gateway sends a SAML Response to the SP with a non success status:

Level: authentication strength

See explanation at "Levels of Assurance".


SFO must be implemented at the SP. The authentication protocol is similar to the one used by the Strong Authentication gateway. The main difference is that the SP must send the identifier of the user in the Subject element of the SAML AuthnRequest (see description of AuthnRequest, line 2017).

You can find the metadata of the SFO endpoints on Surfconext Strong Authentiation Metadata for Service Providers.

Always do a first factor authentication before starting a SFO authentication

Starting an SFO authentication will immediately start an authentication at the SURFconext Strong Authentication gateway: a push notification (tqr) or an SMS will be sent to the user being authenticated. If authentication is started for the wrong user, this will derange the targeted user and in case of SMS, incur a cost to the institution and possibly for the user.

By observing the behavior of the SFO authentication it is possible to determine whether a username exists.

For this reasons we advise to perform a first factor authentication before starting a SFO authentication.


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