Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
docpublic:systemes:ssocas:cas7mfasimple [2026/01/27 20:17]
adminjp [parametrage MFA cas.properties]
docpublic:systemes:ssocas:cas7mfasimple [2026/01/27 20:29] (current)
adminjp [reference]
Line 1: Line 1:
-==== CAS 7 MFA ====+===== CAS 7 MFA ====
 + 
 +==== reference ==== 
 + 
 +  * https://fawnoos.com/2023/07/29/cas70x-simple-mfa-provider/ 
 +  * https://apereo.github.io/cas/7.3.x/mfa/Simple-Multifactor-Authentication.html 
 +  * https://apereo.github.io/cas/7.2.x/mfa/Simple-Multifactor-Authentication.html 
  
 ==== dependencies ==== ==== dependencies ====
Line 13: Line 20:
 <code> <code>
 [root@cas cas-overlay-template]# vim etc/cas/config/cas.properties [root@cas cas-overlay-template]# vim etc/cas/config/cas.properties
 +#configure the global MFA trigger to always use this provider:
 cas.authn.mfa.triggers.global.global-provider-id=mfa-simple cas.authn.mfa.triggers.global.global-provider-id=mfa-simple
 #simple mfa via mail #simple mfa via mail
Line 18: Line 26:
 spring.mail.port=25 spring.mail.port=25
 spring.mail.testConnection=true spring.mail.testConnection=true
 +
 +# Where CAS finds the user's email address
 +cas.authn.mfa.simple.mail.attribute-name=mail
 +
 +#Sender and content
 cas.authn.mfa.simple.mail.from=adminmfa@domain.eu cas.authn.mfa.simple.mail.from=adminmfa@domain.eu
 cas.authn.mfa.simple.mail.subject=CAS MFA Token cas.authn.mfa.simple.mail.subject=CAS MFA Token
 cas.authn.mfa.simple.mail.text=Hello! Your requested CAS token is ${token} cas.authn.mfa.simple.mail.text=Hello! Your requested CAS token is ${token}
-##cas.authn.mfa.simple.mail.attribute-name=mail 
  
 +
 +## Since in 7.x the settings moved to a token core namespace, use:
 #cas.authn.mfa.simple.time-to-kill-in-seconds=300 #cas.authn.mfa.simple.time-to-kill-in-seconds=300
 #cas.authn.mfa.simple.token.time-to-live-in-seconds=300 #cas.authn.mfa.simple.token.time-to-live-in-seconds=300
Line 28: Line 42:
 cas.authn.mfa.simple.token.core.token-length=6 cas.authn.mfa.simple.token.core.token-length=6
  
 +#Give the provider a name and order (optional but useful):
 cas.authn.mfa.simple.name=Email MFA cas.authn.mfa.simple.name=Email MFA
 cas.authn.mfa.simple.order=0 cas.authn.mfa.simple.order=0
Line 44: Line 59:
     org.apereo.cas.authentication.mfa: DEBUG     org.apereo.cas.authentication.mfa: DEBUG
 </code> </code>
 +
 +
 +==== rebuild ====
 +
 +enchainement de commande depuis [root@cas cas-overlay-template]#
 +
 +<code>
 + 539  systemctl stop tomcat 
 +  540  ./gradlew clean copyCasConfiguration build --no-daemon
 +  541  cp /opt/cas-src/cas-overlay-template/build/libs/cas.war /opt/tomcat/webapps/cas.war
 +  542  systemctl start tomcat.service 
 +  543  tail -f /opt/tomcat/logs/catalina.out 
 +  </code>
docpublic/systemes/ssocas/cas7mfasimple.1769545061.txt.gz · Last modified: 2026/01/27 20:17 by adminjp
[unknown link type]Back to top
CC Attribution-Noncommercial-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0