Commit Graph

14 Commits

Author SHA1 Message Date
Ralf Haferkamp
d57d40a0c1 graph: Fix LDAP retry handling
The reconnect package was missing the retry loop for LDAP Write
Operations (add, delete, mod, modrdn)

Fixes: #2974
2022-01-18 11:17:57 +01:00
Ralf Haferkamp
cb7f9f7922 Introduce write_enabled flag for graph user backend
Defaults to `false` (for now). So the /graph/users endpoints are
read-only by default, which should be the default configured against
and existing external LDAP server.
2022-01-13 16:30:09 +01:00
Ralf Haferkamp
53efa9ca14 Switch to generating our own UUIDs for users
By default the GraphAPI will generate the UUID itself now instead of
relying on the LDAP server to generate a valid entryUUID attribute. This
can been be switched off via the new `use_server_uuid` toggle in the
LDAP config.
2022-01-13 16:30:09 +01:00
Ralf Haferkamp
840c9a7ddd Implement UpdateUser support for the GraphAPI backend 2022-01-13 16:30:09 +01:00
Ralf Haferkamp
4915195d9c Implement DeleteUser support for the Graph LDAP backend 2022-01-13 16:30:09 +01:00
Alex Unger
5d6e361cff Implement CreateUser support for the Graph LDAP backend
This adds basic support for creating users via the GraphAPI
LDAP backend. This currently just maintains the bare minimum
Attributes for the inetOrgPerson objectclass.

Co-authored-by: Ralf Haferkamp <rhaferkamp@owncloud.com>
2022-01-13 16:30:09 +01:00
Michael Barz
4502d4dfcc Update graph api to 0.5.0 2021-12-16 13:39:27 +01:00
Ralf Haferkamp
d21ca0658f graph: Add unit test for LDAP identity backend
This reworks the LDAP backend a bit to allow for mocking the ldap.Client
interface. It also add a couple of unit test for the backend
2021-11-25 14:51:52 +01:00
Ralf Haferkamp
026da000dc LDAP group backend for GraphAPI
This is an initial implementation of the /groups graph endpoint.
Currently it is only showing the ID and Name attributes of the groups.
Listing members is not yet supported.

As the userbackend this is still read-only and doesn't support any
advanced filtering.
2021-11-25 14:51:52 +01:00
Ralf Haferkamp
f253f7bc8e graph: Groups convert CS3 code to its own backend
Until the LDAP backend is ready the existing CS3 code should keep
working.

This also adds the initial stubs for the upcoming LDAP Backend.
2021-11-25 14:51:52 +01:00
Ralf Haferkamp
76390f3d4f Rename userBackend to identityBackend
This is suppoosed to handle Groups and Users so adjust the Name
2021-11-25 14:51:52 +01:00
Ralf Haferkamp
fbdcdf255c LDAP user backend for GraphAPI
This is still read-only and doesn't support any of the advanced
querying options of the graph API.
2021-11-25 14:51:52 +01:00
Ralf Haferkamp
9130cd29f3 Add helper module for LDAP with automatic reconnect
This module basically wraps ldap.Client and allows us to keep
to keep a long running LDAP connection open, which automatically
reconnects on network errors. Allows it allows to easiliy multiplex
multiple Operations on a single connection.
2021-11-25 14:30:22 +01:00
Ralf Haferkamp
61d65daa89 Make identity backend configurable for GraphAPI
In order to gradually switch to a new LDAP backend move
the existing code talking to CS3 into its own backend.
2021-11-25 14:30:22 +01:00