Sign inSign up

eeacms/eionet-backend

By eeacms

•Updated 4 days ago

EIONET LDAP backend

Image
0

53

eeacms/eionet-backend repository overview

⁠Eionet backend (Plone 6)

Standalone Plone 6 Classic site providing the Eionet LDAP account management tools (formerly /eionet-account-tools on the Eionet Portal). All data lives in the Eionet LDAP server; the site only provides the UI.

Add-ons:

Based on eeacms/plone-backend⁠

⁠Configuration

VariableUsed byDescription
LDAP_SERVERsetup scripthost:port, always connected over ldaps://
LDAP_ADMIN_DN, LDAP_ADMIN_PWsetup scriptBind account with write access
LDAP_SECONDARY_DN, LDAP_SECONDARY_PWsetup scriptRead-only bind account (also used by naaya.ldapdump)
LDAP_DISK_STORAGEadd-onsDirectory for config.yaml, the SQLite dump and countries.json (default /data/ldapdump)
MAILHOST, MAILPORTsetup scriptSMTP for confirmation and reset emails
MAIL_FROM, MAIL_FROM_NAMEsetup scriptSender address and name

Database settings (ZEO_ADDRESS, RELSTORAGE_DSN, …) are those of eeacms/plone-backend⁠. The setup script stores the LDAP settings in each tool, so the LDAP_* variables are only needed when it runs.

⁠Production

⁠Volumes
PathContent
/dataPlone database (filestorage and blobs), unless ZEO/RelStorage is used
/data/ldapdumpconfig.yaml, SQLite cache, countries.json. Must be shared by the backend and the cron jobs
⁠First run

Run once against the production database, with the backend stopped (filestorage) or running (ZEO/RelStorage):

# 1. Create the Classic site (id "Plone")
docker run --rm -v <data>:/data eeacms/eionet-backend create-classic

# 2. Create the tools; pass the LDAP_* and MAIL* variables
docker run --rm -v <data>:/data -e LDAP_SERVER=… -e LDAP_ADMIN_DN=… … \
  eeacms/eionet-backend run /app/scripts/setup_tools.py

Then (re)start the backend: naaya.ldapdump reads config.yaml at start-up. Do not set SITE: the base image's automatic site creation is for development only.

The setup script is idempotent; re-running it keeps existing tools and their settings.

⁠Cron jobs

Same image, same /data/ldapdump volume, run as the plone user:

ScheduleCommandPurpose
nightly/app/bin/python /app/scripts/dump_ldap.pyRefresh the SQLite cache used by User Admin search and duplicate checks
daily/app/bin/update_countriesRefresh countries.json from https://cr.eionet.europa.eu/sparql
⁠Public URL

Serve the site at the domain root with Zope virtual hosting, e.g. /VirtualHostBase/https/<domain>:443/Plone/VirtualHostRoot/, so URLs are https://<domain>/eionet-account-tools. The add-on templates use root-relative links such as /directory/user, which only work with the site at the root.

⁠Tests

docker build -t eeacms/eionet-backend .
./test/run.sh eeacms/eionet-backend

⁠Release

See RELEASE.md⁠.

⁠Develop

See develop⁠.

The Initial Owner of the Original Code is European Environment Agency (EEA). All Rights Reserved.

See LICENSE⁠ for details.

⁠Funding

European Environment Agency (EU)⁠

Tag summary

Content type

Image

Digest

sha256:11e46b215…

Size

294.7 MB

Last updated

4 days ago

docker pull eeacms/eionet-backend