I am modifying the file project file not the file in the local /etc folder. the full path is /home/<user>/cas-management-overlay/etc/cas/config/cas.properties
On Tue, Feb 8, 2022 at 12:38 PM Pablo Vidaurri <[email protected]> wrote: > Are you modifying the cas.properties created in /etc/cas or the one in > your project folder? I don't think you want to do a > copyCasConfiguration on each run as it will overwrite the cas.properies > file in your /etc/cas folder > > Anyhow, my config looks similar to yours. One think I did run a problem > with is the password policy. If you don't plan on managing passwords via > CAS then also use this setting: > cas.authn.ldap[0].passwordPolicy.enabled: false > > On Tuesday, February 8, 2022 at 10:03:31 AM UTC-6 [email protected] > wrote: > >> Hello all, >> >> Forgive me for this, I'm brand new to CAS and I'm trying to get LDAP >> working. >> >> I built an Ubuntu VM and did initial setup by doing: >> >> 1. git clone https://github.com/apereo/cas-overlay-template >> 2. I did some initial config changes in the cas.properties to get SSL >> up and running >> 3. Ran sudo ./gradlew clean copyCasConfiguration build run >> 4. I can login using the casuser and the default password as >> expected. This part is all working fine. >> >> So I tried adding LDAP support by: >> >> 1. Modify build.gradle by adding >> implementation >> "org.apereo.cas:cas-server-support-ldap:${project.'cas.version'}" >> to the dependencies section. >> 2. Modify cas.properties by adding: >> # Disable casuser >> cas.authn.accept.users= >> # LDAP Servers Authenticated >> cas.authn.ldap[0].ldapUrl=ldap://<ldap server ip>:389 >> #cas.authn.ldap[0].usessl=false >> cas.authn.ldap[0].useStartTls=false >> cas.authn.ldap[0].type=AUTHENTICATED >> cas.authn.ldap[0].bindDn=cn=cas bind,CN=Users,DC=... >> cas.authn.ldap[0].bindCredential=<the password> >> # LDAP Servers Authenticated >> >> # Search For CAS User >> cas.authn.ldap[0].baseDn=OU=Technology,OU=Staff,DC=CHS,DC=... >> cas.authn.ldap[0].subtreeSearch=true >> #cas.authn.ldap[0].searchFilter=(&(objectClass=person)(uid={user})) >> #cas.authn.ldap[0].searchFilter=uid={user} >> cas.authn.ldap[0].searchFilter=sAMAaccountName={user} >> #cas.authn.ldap[0].principalAttributeList=cn,givenName,mail,sn >> # Search for CAS User >> 3. Ran sudo ./gradlew clean copyCasConfiguration build run >> >> The page loads as usual. I am unable to login as casuser, which is >> expected. I cannot login with any domain credentials. >> >> In the log I get an error: >> 2022-02-08 15:43:49,567 INFO >> [org.apereo.cas.authentication.DefaultAuthenticationManager] - >> <[LdapAuthenticationHandler] exception details: [Unable to resolve user dn >> for <a username>].> >> >> So I tried to verify that the server can connect via LDAP: >> >> ldapsearch -H ldap://<ldap server ip>:389 -D "CN=cas >> bind,CN=Users,DC=..." -W samaccountname=<a username> -b >> "OU=Technology,OU=Staff,DC=..." -v >> >> And I receive a valid result. >> >> I'm not sure where the disconnect is, or what else I should search for. >> Any tips or suggestions that you could provide would be helpful. >> >> I'm attaching the output of Task :run. >> > -- : Michael A. Santangelo :: Owner, https://talesofatech.com :: Primary: (908) 285-8760 :: Rutgers University, Class of 2007 & 2011 :::: B.A. in Mathematics :::: B.S. in Information Technology -- - Website: https://apereo.github.io/cas - Gitter Chatroom: https://gitter.im/apereo/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 on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/CAE2VgAVHgne2V%2BkOKu7ib7wgNRHFsGOCE17dv0p43QXe2DChQA%40mail.gmail.com.
