Commit graph

20 commits

Author SHA1 Message Date
Jonathan Sambrook 878ac0d192 Filter user loading at startup for "advanced" LDAP
Users are loaded at startup. Currently when using "advanced" LDAP
authentication this is true even if they no longer have a
valid entry in the LDAP server.

This commit uses the existing LDAP filter (specified in config.js's searchDN
used by the "advanced" LDAP mechanism) to weed out any users that no
longer have the relevant LDAP entry.

Local and "simple" LDAP auth mechanisms continue to use the existing
load all users approach. In the "simple" LDAP case this is because we
only have access to the hashed password, and so can't bind to LDAP.
2020-04-23 15:54:09 +01:00
Jonathan Sambrook a0d10989ad Tidy up the auth plugin API mechanism to hide implementation details
The caller doesn't care which plugin is being used, so this commit
consolidates implementation details within auth.js

The motivation for this work is to prepare for extending the auth API
(to allow "advanced" LDAP to query user entry ontological state at start
up), by tidying up rather than duplicating the existing mechanism.
2020-04-23 15:11:35 +01:00
Pavel Djundik 881b3eda19 Run format after updating to prettier 2.0 2020-03-21 22:55:36 +02:00
Pavel Djundik cee3a50ddc Move back to ldapjs dependency
Fixes #3381
2019-09-15 22:42:27 +03:00
Alistair McKinlay 133e7bf710 Format js/vue with prettier 2019-07-19 11:27:40 +01:00
Pavel Djundik 7da036bf34 Add extra logging in ldap 2018-12-12 22:33:30 +02:00
Pavel Djundik 472d618033 Remove log from global 2018-06-15 23:31:06 +03:00
Pavel Djundik fee81e78e1 Replace colors.js with chalk 2018-03-02 20:28:54 +02:00
Jérémie Astori 7a6b560303
Merge pull request #2098 from keegan/master
Enable logging for LDAP users
2018-02-24 12:54:48 -05:00
Keegan 4fe7dc0808 Enable logging for LDAP users 2018-02-23 20:07:08 -05:00
Pavel Djundik 7f82b440a2
Fix log.warn in ldap 2018-02-23 17:52:16 +02:00
Pavel Djundik c733e72e7a Auto-fix code for padding-line-between-statements rule 2018-02-20 09:28:04 +02:00
Pavel Djundik c4f6701d65 Use forked ldapjs to remove dtrace
Fixes #1756
2018-02-06 13:21:59 +02:00
keegan f73132e226
Stop LDAP Auth from succeeding without password 2017-11-21 19:19:24 -05:00
Jérémie Astori 1dc92d8934
Enforce dangling commas with ESLint
¯\_(ツ)_/¯
2017-11-15 01:35:15 -05:00
Pavel Djundik 44acc5cb00 Teardown sockets in tests 2017-10-06 12:53:08 +03:00
Elie Michel 435e14669b Change string formatting style 2017-09-03 23:00:25 +02:00
Elie Michel 00e54e49ac Add tests for LDAP auth plugin 2017-09-03 23:00:24 +02:00
Elie Michel 12ba10f688 Reorganize auth plugins 2017-09-03 23:00:23 +02:00
Élie Michel cfa6db10c7 Make new LDAP options backward compatible
Also draft some kind of plugin system for auth, although it essentially consists in writing a function
and there is no mechanism to automatically fallback from one auth to another
2017-09-03 23:00:23 +02:00