Hi,
For your information, I've made progress on the topic of MFA Triggers using 
a Groovy script as follows :

For your information, I've made progress on the topic of MFA Triggers using 
a Groovy script.
```
import java.util.*

def run(final Object... args) {
    def 
(authentication,registeredService,httpRequest,service,applicationContext,logger)
 
= args
    logger.debug("Determine mfa provider for ${registeredService.name} and 
${authentication.principal.id}")
    def groups = authentication.principal.attributes['GROUP'] as List
    logger.info('Groupes trouves : {}', groups)

    if (groups != null) {
        if (groups.toString().contains('mfa-radius')) {
            logger.info('=> Selection stricte de : mfa-radius')
            return 'mfa-radius'
        }
        if (groups.toString().contains('mfa-simple')) {
            logger.info('=> Selection stricte de : mfa-simple')
            return 'mfa-simple'
        }
    }
    logger.warn('=> Aucun groupe MFA trouve.')
    return null
}
``` 

`GROUP` being the released LDAP attribute and in json file, I use 

``` 
    "multifactorPolicy": {
        "@class": 
"org.apereo.cas.services.DefaultRegisteredServiceMultifactorPolicy",
        "script": "file:///etc/cas/config/mfa-adaptatif.groovy"
    }
```

  Now, a little customization of the MFA Radius page and everything will be 
perfect ;)
Regards 


Le vendredi 12 juin 2026 à 13:25:47 UTC+2, livio dezorzi a écrit :

> Hi,
> After successfully implementing mfa-simple, I also successfully 
> implemented mfa-radius.
> However, I have two issues regarding their use: 
>  - 1. After authentication, it prompts me to enter my RSA code, but the 
> entry page is very basic. Is it possible to customize it like mfa-simple  
> with 
> a short explanatory message  ?
>
>  - 2. In a JSON-formatted application, I want to offer the appropriate MFA 
> if the user is a member of a multi-evaluated group containing the 
> mfa-simple value, and vice versa with mfa-radius.
> How can I configure my application ? 
> Thank you for your ideas.
> Regards
>

-- 
- Website: https://apereo.github.io/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/7a5bc7c8-9ecd-48f4-bcc1-32ebf1486f52n%40apereo.org.

Reply via email to