Multiple authentication levels for a single application

Guillaume Rousse guillaume.rousse at
Mon Sep 2 12:46:52 EDT 2019

Le 27/08/2019 à 17:44, Guillaume Rousse a écrit :
> Le 27/08/2019 à 16:59, Morgan, Andrew Jason a écrit :
>> I haven't looked recently, but the InCommon certificate service app 
>> (run by Comodo) used the following methodology:
>>  1. Send an authnRequest with no authnContextClassRef (or was it
>>     PasswordProtectedTransport?)
>>  2. After successful auth, lookup the user to see if MFA is required for
>>     this user
>>  3. If MFA is required for that user, send another authnRequest with the
>>     authnContextClassRef set to
>> This allows the application to decide if MFA is required, and it uses 
>> SSO to avoid prompting the user for their password twice.
> That seems great.
> I didn't considered the possibility for an application to chain multiple 
> authentication requests. Is there any documentation available somewhere 
> about how to implement this  ?
I tried this strategy, as it lets the application in full control of the 

When connecting, the application issues a first authentication request, 
with just minimal 
authentication class requirement.

The IdP replies, asking the user for its password.

The application then issue a new authentication request, this time with 
'' authentication class requirement.

The IdP replies, this time requesting a second factor for the user.

In order to achieve this behaviour, tough, I had to ensure only the MFA 
flow was allowed, and to make it short-circuitable, using 
Programmatically Selecting Flows strategy documented on the wiki, so as 
to skip the second factor step if only password was required:

<bean id="checkSecondFactor"  parent="shibboleth.ContextFunctions.Scripted"
// check current context
authCtx = 
mfaCtx = 
if (mfaCtx.isAcceptable()) {
     nextFlow = null;
} else {
     nextFlow = "authn/Duo";

Any attempt to avoid this kind of conditional strategy, and rely instead 
on builtin IdP authentication flow selection mechanism resulted in the 
user being presented password entry form twice, defeating the SSO 
purpose.  Whereas this behaviour is consistent with the MFA flow 
documentation, this seems quite cumbersome for something which looks 
like a trivial use case.

Guillaume Rousse
Pôle SSI

Tel: +33 1 53 94 20 45

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3637 bytes
Desc: Signature cryptographique S/MIME
URL: <>

More information about the users mailing list