mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 09:59:47 -05:00
LDAP_AUTHENTIFICATION_PASSWORD_FILE and OAUTH2_SECRET_FILE were listed in the Dockerfile, snap, docker-compose and start-wekan since #5724, but no code read them, so a password could only be an environment variable. WeKan now reads the file itself, at each login (a rotated secret applies at once), so the password is never in the environment - the point of Docker / Kubernetes secrets. The order is the Admin Panel, the variable, then its file; one trailing line break is dropped. The application code is the same on every platform, so it works in Docker, the snap (files under /var/snap/wekan/common), bundles, AppImage, Flatpak, Mac and Windows. Admin Panel / People shows when the password comes from the file and when the file cannot be read, never the path or content. The path itself is an environment variable only: settable in the Admin Panel next to the LDAP host or the OAuth2 token endpoint, it would let the server read any file and send it there as the password. DEFAULT_AUTHENTICATION_METHOD is a field of the Login pane's settings form. Choosing a method overrides the variable; Default gives it back. Before, the variable rewrote the stored method at every start, so an administrator's choice was lost on restart. The published method is now the override, else the variable, else password. On upgrade, a method chosen with the old dropdown while no variable was set becomes the override, once, so it is not lost. The old dropdown is removed: two controls for one setting on one page. The snap key for the LDAP password file was spelled ldap-authentification-password-file, unlike its siblings and its help text; it is ldap-authentication-password-file now (it had no effect before). MAIL_SERVICE_PASSWORD_FILE, MONGO_PASSWORD_FILE and S3_SECRET_FILE are still not read by WeKan; secrets/README.md says so. Thanks to Roemer, CrashOverride-lab, ww-daniel-mora and xet7 !