I have a requirement to enforce LOA rather than particular authn methods on my CAS implementation, something I hacked in to my CAS 3 overlay a long time ago. The authn methods we use are assigned LOA like this:
In my CAS 3 implementation, clients request a particular LOA by appending a "securityLevel" parameter to the CAS login URL. It's enforced by a webflow hack that checks the LOA and sends the user back to "viewLoginForm" when the authn doesn't cut it, both for the initial authn and when the user has a valid TGT. Obviously I don't want to repeat this for CAS 5.
I can almost see how to do this easily with a custom MFA trigger, but there are two things I'm not sure of after a day of doc reading and code spelunking:
- For cases where you can't meet the security level by simply adding an MFA, I'll send the user back to the login page, perhaps with an error message. That's just returning CasWebflowConstants.STATE_ID_HANDLE_AUTHN_FAILURE", yes? Or should I throw an exception from the trigger?
- Is the trigger run if there is an existing SSO session/TGT, or I have to do something else to handle that case?
Thanks,
Rich
--