Select SMS or Email method on Single MFA (mfa-simple)

53 views
Skip to first unread message

denizg

unread,
Sep 15, 2020, 10:28:36 AM9/15/20
to CAS Community
Hello,

I have configured mfa-simple, and it works both sms method and e-mail method. 

is there any way to select sms or email method based on principal atrribute?

cas.authn.accept.users=xx:yy
cas.authn.attributeRepository.stub.attributes.home=
a

for example, if "home" attribute is equal to "a", then select sms. if not, the select email.

thanks.
(ps: i am using 6.2.0 cas overlay template)

Petr Bodnár

unread,
Sep 16, 2020, 4:59:54 PM9/16/20
to CAS Community, denizg
Hi,

I think this could be achieved by defining "email" and "sms" attributes dynamically, while always leaving one of them empty, provided I got the somewhat brief documentation right.

By "dynamically", I mean using the Attribute Definitions functionality via which one can define "inferred" attributes - e. g. via Groovy scripts (see examples on the linked page), while conditionally returning an empty value for one of the attributes. BUT this seems like a problematic part of this solution - according to the linked page, there is no way how to get to any user attribute in the scripts - I wonder how to workaround this.

Once computed as described above, the inferred attributes can be hopefully referenced from the corresponding ${configurationKey}.mail.attribute-name and ${configurationKey}.sms.attribute-name properties of given providers (as listed in the documentation).

Suggestions, anybody? Can't it be achieved in a simpler way?
Reply all
Reply to author
Forward
0 new messages