git clone https://github.com/apereo/cas-overlay-template.git
dependencies {
implementation "org.apereo.cas:cas-server-support-ldap:${project.'cas.version'}"
implementation "org.apereo.cas:cas-server-support-json-service-registry:${project.'cas.version'}"
implementation "org.apereo.cas:cas-server-support-generic:${project.'cas.version'}"
}
sourceCompatibility=11
targetCompatibility=11
mkdir -p /etc/cas/config
cp config/cas.properties config/log4j.xml /etc/cas/config
ln -s $(pwd)/templates/bivc/templates /etc/cas
ln -s $(pwd)/templates/bivc/static /etc/cas
cd cas-overlay-template
./gradlew clean build
cp build/libs/cas.war /var/lib/tomcat*/webapps/
service tomcat restart
./gradlew createKeystore
./gradlew run
The cas is available on https://localhost:8443/ (accept the autosigned certificate)
sudo docker build . -t cas_viticonnect --build-arg cas_templatespath=templates/path --build-arg ldap_domain=example.org --build-arg ldap_passwd=adminpassword --build-arg ldap_test_username=test --build-arg ldap_test_password=test --build-arg viticonnect_shared_secret=SHAREDSECRET
with the build-arg
:
cas_templatespath
: the path to a directory containing the static Apereo/CAS files (subdirectorystatic
) and the Thymeleaf template files (subdirectoriestemplates/fragments
,templates/login
,templates/logout
). Examples are provided in templates/.ldap_domain
: the ldap domainldap_passwd
: the password for the ldap administrator (in clear text)ldap_test_username
: a test login to createldap_test_password
: the password to create for the test userviticonnect_shared_secret
: the shared secret allowing viticonnect to query the api
sudo docker run -it -p 8080:80 -p 389:389 -v /data/ldap:/var/lib/ldap cas_viticonnect
Client Viticonnect API provides to the viticonnect server the following identifiers : SIRET, CVI, Accises, PPM, TVA Number and a "Raison sociale"
By default, the simple client viticonnect api retrives these identifiers form the following LDAP fields :
- Raison sociale:
sn
- SIRET:
telephoneNumber
- TVA:
o
- CVI:
description
- Accises:
street
- PPM:
facsimileTelephoneNumber
A bash script creates users using this fields : bin/createuser4viticonnectldap.sh
(create before bin/config.inc
from bin/config.inc.example
)
If you want to change the ldap field used by viticonnect, you can edit viticonnect/config.php
and bin/config.inc