Hi

For me, I put the ldap settings in a separate file ldap.properties and I
had to tell Spring to load the properties file by indicating those settings
in the file application.properties and the ldap authentication began to
work.

  spring.profiles.active=standalone,ldap
  spring.profiles.include=ldap

I also put the spring.profiles.active setting in the bootstrap.properties.

Be sure to put the following line in <cas root
folder>/webapp/gradle/webapp.gradle file near line 147.

compile project(":support:cas-server-support-ldap")

By doing this, the LdapAuthenticationHandler will be registered and will
accept a Username/Password authentication.

I hope this will help you.


Christian Poirier
Mobile: 418-473-2824

2018-05-08 13:54 GMT-04:00 Spider Main <spidermai...@gmail.com>:

> Hello,
>
> I generated a war file from cas-gradle-overlow and deployed on to Tomcat9.
> Default Username/Password authentication worked and now I'm trying to
> change it to LDAP but for some reason, am not able to see authentication
> with LDAP. Can anyone of you guys suggest what's going on?
>
> Below is the config for LDAP:
> cas.authn.accept.users=
> cas.authn.ldap[0].type=AUTHENTICATED
> cas.authn.ldap[0].ldapUrl=ldap://xxxxxx:3268
> cas.authn.ldap[0].connectionStrategy=
> cas.authn.ldap[0].connectTimeout=5000
> cas.authn.ldap[0].subtreeSearch=true
> cas.authn.ldap[0].baseDn=dc=ad,dc=xxxx,dc=com
> cas.authn.ldap[0].userFilter=sAMAccountName={user}
> cas.authn.ldap[0].bindCredential=ldap
> cas.authn.ldap[0].useSsl=false
> cas.authn.ldap[0].validator.type=SEARCH
> cas.authn.ldap[0].validator.baseDn=dc=ad,dc=xxx,dc=com
> cas.authn.ldap[0].validator.attributeValues=top
> cas.authn.ldap[0].validator.scope=SUBTREE
> cas.authn.ldap[0].bindDn=cn=ldap user,ou=System
> Accounts,dc=ad,dc=xxx,dc=com
>
> ldap.url=ldap://ldap.xxxxxxx.com:3268
> ldap.useStartTLS=false
> ldap.baseDn=dc=ad,dc=xxxx,dc=com
> ldap.connectTimeout=3000
> ldap.managerDn=cn=ldap user,ou=System Accounts,dc=ad,dc=xxxxxx,dc=com
> ldap.managerPassword=ldap
> ldap.authn.searchFilter=sAMAccountName={user}
> ldap.domain=cxtec.com
> ldap.allowMultipleDns=false
>
> 2018-05-08 13:53:38,070 ERROR [org.apereo.cas.authentication.
> PolicyBasedAuthenticationManager] - <Authentication has failed.
> Credentials may be incorrect or CAS cannot find authentication handler that
> supports [pvemi] of type [UsernamePasswordCredential]. Examine the
> configuration to ensure a method of authentication is defined and analyze
> CAS logs at DEBUG level to trace the authentication event.>
> 2018-05-08 13:53:38,074 INFO 
> [org.apereo.inspektr.audit.support.Slf4jLoggingAuditTrailManager]
> - <Audit trail record BEGIN
> =============================================================
> WHO: xxxx
> WHAT: Supplied credentials: [xxxx]
> ACTION: AUTHENTICATION_FAILED
> APPLICATION: CAS
>
> -Phani Vemi
>
> --
> - 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 cas-user+unsubscr...@apereo.org.
> To view this discussion on the web visit https://groups.google.com/a/
> apereo.org/d/msgid/cas-user/7ee48f04-0e0c-46dd-879c-
> 3a0136994668%40apereo.org
> <https://groups.google.com/a/apereo.org/d/msgid/cas-user/7ee48f04-0e0c-46dd-879c-3a0136994668%40apereo.org?utm_medium=email&utm_source=footer>
> .
>

-- 
- 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 cas-user+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/CA%2Bg7XAmYxNSQxQyYfg%2Bo%2BrEzjzCT%3DAfZUiPKt3%2BQ7K1ixZVgPQ%40mail.gmail.com.

Reply via email to