Commit Graph

11 Commits

Author SHA1 Message Date
Jörn Friedrich Dreyer
59e9f296a4 fix LDAP substring startswith filters
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2020-07-31 17:35:33 +02:00
Jörn Friedrich Dreyer
1a965cfe5e return invalid credentials when user was not found
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2020-07-30 16:13:34 +02:00
Jörn Friedrich Dreyer
692cf503cc validate input and return proper ldap result codes
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2020-07-27 11:24:21 +02:00
Jörn Friedrich Dreyer
ec1b45cc38 query numeric attribute values without quotes
Some LDAP properties like `uidnumber` and `gidnumber` are numeric. When an OS tries to look up a user it will not only try to lookup the user by username, but also by the `uidnumber`: `(&(objectclass=posixAccount)(uidnumber=20000))`. The accounts backend for glauth was sending that as a string query `uid_number eq '20000'` in the ListAccounts query. This PR changes that to `uid_number eq 20000`. The removed quotes allow the parser in ocis-accounts to identify the numeric literal.

Related:
- https://github.com/owncloud/ocis-accounts/pull/68
- https://github.com/owncloud/ocis-glauth/issues/28

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2020-07-24 21:09:19 +02:00
Jörn Friedrich Dreyer
409f497954 handle ownCloudUUID attribute
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2020-07-24 10:39:05 +02:00
Jörn Friedrich Dreyer
fd5e371ee1 Bugfix: ignore case when comparing objectclass values
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2020-07-23 13:32:15 +02:00
David Christofas
70420fc8fc implement group queries
Signed-off-by: David Christofas <dchristofas@owncloud.com>
2020-07-13 12:09:49 +02:00
David Christofas
d8c538f720 refactor to make the code more readable
Signed-off-by: David Christofas <dchristofas@owncloud.com>
2020-07-08 19:14:32 +02:00
Jörn Friedrich Dreyer
9c1fb51906 properly parse filter, update deps
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2020-06-18 16:02:31 +02:00
Jörn Friedrich Dreyer
0d71588498 directly talk to accounts
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2020-06-17 17:25:32 +02:00
Thomas Müller
178b6ccde3 Initial commit 2020-02-21 11:59:19 +01:00