CAS 6.0.5 : MFA simple with email

83 views
Skip to first unread message

Alfonso Vera

unread,
Oct 4, 2019, 4:06:23 AM10/4/19
to CAS Community
Hi folks

We configure mfa-simple: 

cas.authn.mfa.simple.mail.from=sso@xxxxx
cas
.authn.mfa.simple.mail.text= mfa-test
cas
.authn.mfa.simple.mail.subject= mfa-test
cas
.authn.mfa.simple.mail.attributeName=mail


spring
.mail.host=smtp.xxxxx.xxx
spring
.mail.port=25
spring
.mail.username=user
spring
.mail.password=passs
spring
.mail.testConnection=true
spring
.mail.properties.mail.smtp.auth=true
spring
.mail.properties.mail.smtp.starttls.enable=false


cas
.authn.mfa.simple.name=mfa-simple
cas
.authn.mfa.simple.order=1
cas
.authn.mfa.simple.timeToKillInSeconds=30


cas
.authn.mfa.globalPrincipalAttributeNameTriggers=memberof
cas
.authn.mfa.globalPrincipalAttributeValueRegex=grouptest




This is the log, the mail sent successfully but does not contain the token.
I think that we need include more parameter or variables  on  cas.authn.mfa.simple.mail.text
What is the correct configuration?

Thanks a lot. :) 



^[[30m2019-10-04 09:10:01,527 TRACE [org.apereo.cas.util.CollectionUtils] - <Converting multi-valued element [[USER@EMAIL.COM]]>^[[m
^[[36m2019-10-04 09:10:01,799 DEBUG [org.apereo.cas.ticket.registry.HazelcastTicketRegistry] - <Adding ticket [CAS-832011] with ttl [30s]>^[[m
^[[36m2019-10-04 09:10:01,799 DEBUG [org.apereo.cas.ticket.registry.AbstractTicketRegistry] - <Encoding ticket [TransientSessionTicketImpl(super=CAS-832011, service=AbstractWebApplicationService(id=https://XXXXXXXX/cas/entrada.test.php, originalUrl=https://telematica.um.es/cas/entrada.test.php, artifactId=null, principal=null, source=service, loggedOutAlready=false, format=XML, attributes={}), properties={})]>^[[m
^[[36m2019-10-04 09:10:01,801 DEBUG [org.apereo.cas.ticket.registry.AbstractTicketRegistry] - <Encoded original ticket id [CAS-832011] to [47d33d9f8d29388dd7f5b7ba91a7c3cf2f3403a279937e6d7a964d41ee658d19bf4683b61999bc624db6eb402ec062ecb626e3ff449752a74aae9f887a1271f4]>^[[m
^[[36m2019-10-04 09:10:01,801 DEBUG [org.apereo.cas.ticket.registry.AbstractTicketRegistry] - <Created encoded ticket [EncodedTicket(id=47d33d9f8d29388dd7f5b7ba91a7c3cf2f3403a279937e6d7a964d41ee658d19bf4683b61999bc624db6eb402ec062ecb626e3ff449752a74aae9f887a1271f4)]>^[[m
^[[30m2019-10-04 09:10:01,801 TRACE [org.apereo.cas.ticket.DefaultTicketCatalog] - <Locating ticket definition for ticket [TransientSessionTicketImpl(super=CAS-832011, service=AbstractWebApplicationService(id=https://XXXXXX/cas/entrada.test.php, originalUrl=https://telematica.um.es/cas/entrada.test.php, artifactId=null, principal=null, source=service, loggedOutAlready=false, format=XML, attributes={}), properties={})]>^[[m
^[[36m2019-10-04 09:10:01,801 DEBUG [org.apereo.cas.ticket.registry.HazelcastTicketRegistry] - <Locating map name [transientSessionTicketsCache] for ticket definition [DefaultTicketDefinition(implementationClass=class org.apereo.cas.ticket.TransientSessionTicketImpl, prefix=TST, properties=DefaultTicketDefinitionProperties(cascade=false, storageName=transientSessionTicketsCache, storageTimeout=300, storagePassword=null), order=2147483647)]>^[[m
^[[36m2019-10-04 09:10:01,801 DEBUG [org.apereo.cas.ticket.registry.HazelcastTicketRegistry] - <Located Hazelcast map instance [transientSessionTicketsCache]>^[[m
^[[36m2019-10-04 09:10:01,803 DEBUG [org.apereo.cas.ticket.registry.HazelcastTicketRegistry] - <Added ticket [47d33d9f8d29388dd7f5b7ba91a7c3cf2f3403a279937e6d7a964d41ee658d19bf4683b61999bc624db6eb402ec062ecb626e3ff449752a74aae9f887a1271f4] with ttl [30s]>^[[m
^[[36m2019-10-04 09:10:01,803 DEBUG [org.apereo.cas.mfa.simple.web.flow.CasSimpleSendTokenAction] - <Successfully submitted token via SMS to [USER@EMAIL.COM]>^[[m



Alfonso Vera

unread,
Oct 4, 2019, 5:15:15 AM10/4/19
to CAS Community
Hi folks.

I deleted  cas.authn.mfa.simple.mail.text in my config
then I received   "CAS-883995" "!!!!! :.) 

However it doesn't work :-( 



^[[36m2019-10-04 11:09:20,573 DEBUG [org.apereo.cas.authentication.PolicyBasedAuthenticationManager] - <Attempting authentication of [CAS-883995] using [mfa-simple]>^[[m
^[[36m2019-10-04 11:09:20,573 DEBUG [org.apereo.cas.mfa.simple.CasSimpleMultifactorAuthenticationHandler] - <Received token [CAS-883995]>^[[m
^[[36m2019-10-04 11:09:20,573 DEBUG [org.apereo.cas.mfa.simple.CasSimpleMultifactorAuthenticationHandler] - <Received principal id [USER@EMAIL]. Attempting to locate token in registry...>^[[m
^[[36m2019-10-04 11:09:20,574 DEBUG [org.apereo.cas.ticket.registry.AbstractTicketRegistry] - <Encoded original ticket id [CAS-883995] to [0a3afeab9dcfdf8cf8386e12f76dd197a77a1cbc36166cea41dd7942a9c534dbbec2a72c8d174b4bd2d2d91cd25a225b17337eb169a4ccf662e6e627451bfe43]>^[[m
^[[1;31m2019-10-04 11:09:20,574 ERROR [org.apereo.cas.ticket.DefaultTicketCatalog] - <Ticket definition for [CAS-883995] cannot be found in the ticket catalog which only contains the following ticket types: [[TGT, ST, RT, AT, PT, TST, OC, SART, PGT, SATQ, ODT]]>^[[m
^[[33m2019-10-04 11:09:20,575 WARN [org.apereo.cas.ticket.registry.HazelcastTicketRegistry] - <No ticket definition could be found in the catalog to match [CAS-883995]>^[[m
^[[33m2019-10-04 11:09:20,575 WARN [org.apereo.cas.mfa.simple.CasSimpleMultifactorAuthenticationHandler] - <Authorization of token [CAS-883995] has failed. Token is not found in registry>^[[m
^[[1;31m2019-10-04 11:09:20,576 ERROR [org.apereo.cas.authentication.PolicyBasedAuthenticationManager] - <Authentication has failed. Credentials may be incorrect or CAS cannot find authentication handler that supports [CasSimpleMultifactorTokenCredential()] of type [CasSimpleMultifactorTokenCredential]. Examine the configuration to ensure a method of authentication is defined and analyze CAS logs at DEBUG level to trace the authentication event.>^[[m
^[[36m2019-10-04 11:09:20,576 DEBUG [org.apereo.cas.authentication.PolicyBasedAuthenticationManager] - <[mfa-simple] exception details: [Failed to authenticate code CAS-883995].>^[[m
^[[30m2019-10-04 11:09:20,576 TRACE [org.apereo.cas.authentication.DefaultAuthenticationBuilder] - <Recording authentication handler failure under key [mfa-simple]>^[[m







Reply all
Reply to author
Forward
0 new messages