Password Manager with ldap integration error

165 views
Skip to first unread message

Lexo Nih

unread,
Nov 3, 2021, 3:45:00 AM11/3/21
to CAS Community
Hi i need some help
i facing error with my cas, here is the error

ERROR [org.springframework.boot.web.servlet.support.ErrorPageFilter] - <Forwarding to error page from request [/login] due to exception [Exception thrown executing org.apereo.cas.pm.web.flow.actions.SendPasswordResetInstructionsAction@21c68553 in state 'sendPasswordResetInstructions' of flow 'login' -- action execution attributes were 'map[[empty]]']>

This is the only error i got from cas.log

here is my cas.properties
cas.server.prefix=${cas.server.name}/cas

logging.config=file:/etc/cas/config/log4j2.xml

cas.authn.accept.enabled=false
#json
cas.service-registry.core.init-from-json=false
cas.service-registry.json.location=file:/etc/cas/services

#theme
cas.theme.default-theme-name=sso

#Ldap
cas.authn.ldap[0].base-dn=DN
cas.authn.ldap[0].bind-credential=PASSWORD
cas.authn.ldap[0].bind-dn=DN
cas.authn.ldap[0].ldap-url=ldaps://xxx.xxx.xxx
cas.authn.ldap[0].search-filter=userPrincipalName={user}
cas.authn.ldap[0].type=AUTHENTICATED

#PM module
cas.authn.pm.core.enabled=true
cas.authn.pm.core.policy-pattern=^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&])[A-Za-z\d$@$!%*?&]{8,16}

#PM Ldap 
cas.authn.pm.ldap[0].base-dn=DN
cas.authn.pm.ldap[0].bind-credential=password
cas.authn.pm.ldap[0].bind-dn=DN
cas.authn.pm.ldap[0].ldap-url=ldaps://xxx.xxx.xxx
cas.authn.pm.ldap[0].search-filter=userPrincipalName={user}
cas.authn.pm.ldap[0].type=AD


#Reset Email 
cas.authn.pm.reset.mail.attribute-name=mail
cas.authn.pm.reset.mail.from=email address
cas.authn.pm.reset.mail.subject=mail subject
cas.authn.pm.reset.crypto.encryption.key=value
cas.authn.pm.reset.crypto.signing.key=value
cas.authn.pm.reset.mail.replyTo=email address
cas.authn.pm.reset.mail.html=false
cas.authn.pm.reset.expirationMinutes=5
cas.authn.pm.reset.crypto.enabled=true
cas.authn.pm.autoLogin=false

#smtp
spring.mail.default-encoding=UTF-8
spring.mail.host=host
spring.mail.password=password
spring.mail.port=587
spring.mail.protocol=smtp
spring.mail.test-connection=true
spring.mail.username=username
spring.mail.properties.mail.smtp.auth=false
spring.mail.properties.mail.smtp.starttls.enable=true

#encryption
cas.tgc.crypto.encryption.key=value
cas.tgc.crypto.signing.key=value
cas.webflow.crypto.signing.key=value
cas.webflow.crypto.encryption.key=value

is there any missing from my configuration??

Fabio Bettiol

unread,
Nov 3, 2021, 3:56:16 AM11/3/21
to CAS Community, lex...@gmail.com
Was working fine on 6.3.7. After uptading CAS, got the same error.
In order to solve this issue, while using CAS 6.4.2, I had to downgrade org.apereo.cas:cas-server-support-pm-ldap to the following:

In build.gradle:
...
implementation "org.apereo.cas:cas-server-support-pm-ldap:6.4.0-RC4"
...

Tryed every other version whitout success.

Just in case, I had to take a similar solution for; org.apereo.cas:cas-server-support-mongo-ticket-registry:


Fabio

Lexo Nih

unread,
Nov 3, 2021, 4:51:12 AM11/3/21
to Fabio Bettiol, CAS Community
hi, after i try i got new error like this

ERROR [org.apereo.cas.pm.LdapPasswordManagementService] - <NullPointerException>
WARN [org.apereo.cas.pm.LdapPasswordManagementService] - <Email address [null] for [ma...@mail.mail] is not valid>

before it i've try to login with email and it success then when i try to reset the password this is happened
any advice for this kind of error
thanks.

Lexo Nih

unread,
Nov 4, 2021, 12:25:58 AM11/4/21
to CAS Community, Lexo Nih, CAS Community, fabiob...@gmail.com
Hi i need some help with password manager, i got this error.
i already check the email on my ldap profile was exist so what i'm missing? 

[m [33m2021-11-04 11:20:03,267 WARN [org.apereo.cas.pm.web.flow.actions.SendPasswordResetInstructionsAction] - <No recipient is provided with a valid email/phone>
[m [1;31m2021-11-04 11:20:03,267 ERROR [org.apereo.cas.pm.web.flow.actions.SendPasswordResetInstructionsAction] - <Provided email address or phone number is invalid>

my cas.properties
#------------LDAP CONF---------------#
cas.authn.ldap[0].password-policy.groovy.location=
cas.authn.ldap[0].principal-transformation.groovy.location=
cas.authn.ldap[0].base-dn=DN
cas.authn.ldap[0].bind-credential=password
cas.authn.ldap[0].bind-dn=DN
cas.authn.ldap[0].ldap-url=ldaps://xxx.xxx.xxx:636
cas.authn.ldap[0].search-filter=userPrincipalName={user}
cas.authn.ldap[0].type=AUTHENTICATED

#---------PASSWORD MANAGER CONF--------#
cas.authn.pm.core.enabled=true
cas.authn.pm.core.policy-pattern=^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&])[A-Za-z\d$@$!%*?&]{8,10}


#------------PASSWORD MANAGER LDAP CONF------------#
cas.authn.pm.ldap[0].base-dn=DN
cas.authn.pm.ldap[0].bind-credential=password
cas.authn.pm.ldap[0].bind-dn=DN
cas.authn.pm.ldap[0].ldap-url=ldaps://XXX.XXX.XXX:636
cas.authn.pm.ldap[0].search-filter=userPrincipalName={user}
cas.authn.pm.ldap[0].type=AD
cas.authn.pm.ldap[0].username-attribute=userPrincipalName

#-------PASSWORD MANAGER MAIL CONF--------#
cas.authn.pm.reset.mail.attribute-name=mail
cas.authn.pm.reset.mail.from=em...@domain.com
cas.authn.pm.reset.mail.subject=subject
cas.authn.pm.reset.crypto.encryption.key=value
cas.authn.pm.reset.crypto.signing.key=value
cas.authn.pm.reset.mail.text=Reset your password with this link: %s
cas.authn.pm.reset.mail.validate-addresses=false

#---------MAIL CONF---------#
spring.mail.default-encoding=UTF-8
spring.mail.host=host
spring.mail.password=password
spring.mail.port=587
spring.mail.protocol=smtp
spring.mail.test-connection=false
spring.mail.username=username
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true

#---------ENCRYPTION-------#
cas.tgc.crypto.encryption.key=value
cas.tgc.crypto.signing.key=value
cas.webflow.crypto.signing.key=value
cas.webflow.crypto.encryption.key=value


Here is my gradle.build implementation

implementation "org.apereo.cas:cas-server-core-api-configuration-model"
implementation "org.apereo.cas:cas-server-webapp-init"
implementation "org.apereo.cas:cas-server-webapp-tomcat:${project.'cas.version'}"
implementation "org.apereo.cas:cas-server-support-ldap:${project.'cas.version'}"
implementation "org.apereo.cas:cas-server-support-pm-webflow:6.3.7"
implementation "org.apereo.cas:cas-server-support-json-service-registry:${project.'cas.version'}"
implementation "org.apereo.cas:cas-server-support-pm-ldap:6.3.7"
implementation "org.apereo.cas:cas-server-core-notifications:${project.'cas.version'}"

Thanks
Lexo
Reply all
Reply to author
Forward
0 new messages