Girish Ramakrishnan
6aad89ae6e
demo is just a constant, not a setting
2023-08-04 14:13:30 +05:30
Girish Ramakrishnan
bbc6ba1a35
settings: move service setting into services.js
...
this also introduces getJson/setJson
2023-08-03 11:50:00 +05:30
Girish Ramakrishnan
4a34c390f8
settings: move externaldap setting
2023-08-03 02:43:26 +05:30
Johannes Zellner
65769e5701
ldap uses lower-case attributes
2023-07-31 13:12:39 +02:00
Girish Ramakrishnan
057e4db6c1
use debug instead of console.error
2023-04-30 21:49:34 +02:00
Girish Ramakrishnan
c4f4f3e914
logs: use %o to format error
...
otherwise, they are printed as multi-line and this messes up tail+date formatting
2023-04-16 10:49:59 +02:00
Girish Ramakrishnan
53e9eccf72
unify totp check
...
the totp check is done in several places causing errors like 3552232e99
* ldap (addon)
* accesscontrol (dashboard)
* proxyauth
* directoryserver (exposed ldap)
* externalldap (the connector)
The code also makes externalldap auto-create work now across all the cases where there is a username
2023-03-12 16:01:12 +01:00
Johannes Zellner
41b03e3fef
Ensure ldap client always has an error handler
2023-01-12 14:39:58 +01:00
Johannes Zellner
88eb809c6e
For ldap users created on first login, make sure we also check 2fa if enabled
2022-08-03 18:20:43 +02:00
Johannes Zellner
a2a60ff426
Add support for LDAP cn=...+totptoken=.. support
2022-08-02 15:27:34 +02:00
Johannes Zellner
0cd48bd239
Ensure LDAP usernames are always treated lowercase
2022-04-23 11:21:14 +02:00
Girish Ramakrishnan
7f89dfd261
add once.js
2022-04-15 19:01:35 -05:00
Johannes Zellner
b54c4bb399
Fixup cn attribute for ldap to be according to spec
2022-02-18 17:43:47 +01:00
Johannes Zellner
63fe75ecd2
Reduce noisy externalldap debug()s
2021-11-26 09:55:59 +01:00
Johannes Zellner
92f0f56fae
do not strictly require fallbackEmail on user creation but provide a fallback
2021-10-28 10:29:02 +02:00
Johannes Zellner
cef5c1e78c
Use normal bind()
2021-10-26 18:47:51 +02:00
Johannes Zellner
50ff6b99e0
More external ldap fixes after the test tests the correct thing
2021-10-26 18:04:25 +02:00
Johannes Zellner
84884b969e
Fix external ldap bind
...
See "Losing context" https://masteringjs.io/tutorials/node/promisify
2021-10-26 11:55:58 +02:00
Girish Ramakrishnan
445c83c8b9
make auditsource a class
...
this allows us to use AuditSource for the class and auditSource for
the instances!
2021-09-30 10:13:36 -07:00
Johannes Zellner
48056d7451
If we detect a local user with the same username as found on LDAP/AD we map it
2021-09-13 21:17:41 +02:00
Girish Ramakrishnan
1856caf972
externalldap: async'ify
...
and make the tests work again
2021-09-01 21:33:27 -07:00
Johannes Zellner
8d43015867
Asyncify some external ldap sync code
2021-09-01 14:47:43 +02:00
Girish Ramakrishnan
411cc7daa1
merge settingsdb into settings code
2021-08-19 17:45:40 -07:00
Girish Ramakrishnan
a1c61facdc
merge userdb.js into users.js
2021-07-16 22:33:22 -07:00
Girish Ramakrishnan
e59d0e878d
merge taskdb into tasks.js
2021-07-14 10:37:12 -07:00
Girish Ramakrishnan
ea430b255b
make the tests work
2021-06-29 11:01:46 -07:00
Girish Ramakrishnan
31498afe39
async'ify the groups code
2021-06-29 09:08:45 -07:00
Girish Ramakrishnan
442110a437
lint
2021-05-01 11:21:09 -07:00
Girish Ramakrishnan
1b307632ab
Use debug instead of console.* everywhere
...
No need to patch up console.* anymore
also removes supererror
2020-08-02 12:04:55 -07:00
Johannes Zellner
fbc666f178
Make externalldap sync more robust
2020-07-30 15:08:01 +02:00
Johannes Zellner
d9bf6c0933
also support uniqueMember property next to member for ldap groups
2020-07-01 17:08:17 +02:00
Johannes Zellner
324344d118
Reusue the single correct ldap.createClient call also in auth
2020-07-01 14:59:26 +02:00
Johannes Zellner
5cb71e9443
No need to return externalLdapConfig in getClient()
2020-07-01 14:52:11 +02:00
Johannes Zellner
cca19f00c5
Fallback to mailPrimaryAddress in ldap sync
2020-07-01 14:34:41 +02:00
Johannes Zellner
5199a9342e
Add missing ldap client error handling
2020-06-26 17:55:42 +02:00
Johannes Zellner
3f2496db6f
Support self-signed certs for external ldap/ad
2020-06-25 17:45:59 +02:00
Johannes Zellner
aa011f4add
add ldap group tests and fixes for the found issues
2020-06-07 13:49:01 +02:00
Johannes Zellner
0b2eb8fb9e
Sync users into groups
...
This does not yet remove users from groups
Part of #685
2020-06-05 11:28:57 +02:00
Johannes Zellner
48af17e052
Groups are lowercase on Cloudron
2020-06-05 10:13:19 +02:00
Johannes Zellner
b7b1055530
Avoid the pyramid
2020-06-05 09:26:52 +02:00
Johannes Zellner
cba3674ac0
Stop ldap syncing if we hit some internal error
2020-06-05 09:03:30 +02:00
Johannes Zellner
7c5ff5e4d5
Create user groups for ldap groups
2020-06-04 13:26:13 +02:00
Johannes Zellner
c143450dc6
WIP
2020-06-04 12:59:27 +02:00
Johannes Zellner
c30734f7f3
Show in the logs if group sync is disabled
2020-06-04 12:40:28 +02:00
Johannes Zellner
91f506c17b
Explicitly enable/disable ldap group sync
2020-06-04 12:28:31 +02:00
Johannes Zellner
386aaf6470
Initial code to fetch LDAP groups during sync
2020-06-03 22:12:38 +02:00
Girish Ramakrishnan
d1911be28c
user: load the resource with middleware
2020-02-13 20:59:17 -08:00
Johannes Zellner
9acf49a99e
Fix typo
2019-11-20 18:18:21 +01:00
Johannes Zellner
e3cee37527
Move autocreation logic into external ldap
2019-11-20 18:18:21 +01:00
Johannes Zellner
8fd0461c62
Auto create users on login if present in external ldap source
2019-11-20 18:18:21 +01:00