feat: add LDAP/LDAPS authentication

ldap(s) with distinction between admin and user role by group membership

- Add ldapService.ts with bind/search/group-check logic
- Add ldapLoginUser() async wrapper in authService.ts
- Fall back to local login if user not found in LDAP
- Support LDAP_ALLOWED_GROUP for access control
- Support LDAP_ADMIN_GROUP for role mapping
- Support LDAP_TLS_CA for custom CA certificates
- ldapts added as dependency

ENV vars:
  LDAP_URL, LDAP_BIND_DN, LDAP_BIND_PW, LDAP_BASE,
  LDAP_FILTER, LDAP_ADMIN_GROUP, LDAP_ALLOWED_GROUP,
  LDAP_TLS_CA
This commit is contained in:
root
2026-05-20 01:44:25 +02:00
parent bfe6664ac4
commit 177f004740
4 changed files with 179 additions and 2 deletions
+1
View File
@@ -25,6 +25,7 @@
"helmet": "^8.1.0",
"jimp": "^1.6.1",
"jsonwebtoken": "^9.0.2",
"ldapts": "^8.1.7",
"multer": "^2.1.1",
"node-cron": "^4.2.1",
"nodemailer": "^8.0.5",