Conventions

export CAS_SRC_DIR=`pwd` # somewhere

Yes, I assume we are on root directory of our CAS Gradle overlay.

Configure CAS

CAS Project

Add dependency at $CAS_SRC_DIR/cas/build.gradle:

compile "org.apereo.cas:cas-server-support-ldap:${project.'cas.version'}"

Configuration

Add to $CAS_SRC_DIR/etc/cas/config/cas.properties:

# Disable casuser
cas.authn.accept.users=

# LDAP authentication
cas.authn.ldap[0].type=ANONYMOUS
cas.authn.ldap[0].ldapUrl=ldaps://ldap.example.org:636
cas.authn.ldap[0].useSsl=true
cas.authn.ldap[0].baseDn=dc=example,dc=org
cas.authn.ldap[0].userFilter=uid={user}

It is needed that we access LDAP via SSL/TLS connection. For OpenLDAP, we must specify the port.

Re-deploy

./deploy package
./deploy run

References