André Duffeck and Christian Richter
b9f48edd87
Try to find users by username or id, just like the ldap backend does
2025-08-05 17:10:59 +02:00
André Duffeck and Christian Richter
926a2c2080
Filter users by tenant, add tenant ids to demo users
2025-08-05 17:10:59 +02:00
06kellyjac
2a3a20693a
build: Modify mockery config to work with v3
...
Maintaining the positioning of the files from v2 to reduce cognitive
load.
Indentation of yaml files now matches `.editorconfig`.
All mock files regenerated.
Added empty `{}` following convention from `mockery init` etc.
Removed directory specification where it would already match.
2025-06-19 16:25:39 +01:00
Ralf Haferkamp
76b16765d8
cleanup: Avoid fetching group membership when not needed
...
Use the new GetUserNoGroups helper to lookup users without resolving
groupmemberships where possible.
Closes : #1005
2025-06-12 09:47:53 +02:00
Jörn Friedrich Dreyer and Ralf Haferkamp
981e8fe5a3
do not automatically expand drive root permissions
...
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de >
2025-06-02 15:17:32 +02:00
Ralf Haferkamp
00ff858f19
graph: move to reva's auto-reconnect LDAP client
...
To reduce code duplication
2025-05-20 17:44:27 +02:00
Ralf Haferkamp
3dc9c0cb9a
Switch to opencloud-eu fork of libre-graph-api-go
2025-05-15 14:11:35 +02:00
Jörn Friedrich Dreyer
3c38a3e3ed
fix mockery warnings
...
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de >
2025-04-29 11:01:17 +02:00
Michael Barz
22fb783724
test: extract go bin
2025-03-13 14:04:14 +01:00
Ralf Haferkamp
2678d0bb89
Bump mockery to 2.53.0
...
Should fix build on go1.24. Also fix ci-go-generate step in multiarch
Dockerfile.
Closes : #289
2025-03-03 16:02:59 +01:00
Ralf Haferkamp
6b08fa51ee
fixup! Bump go-ldap to latest release
2025-02-20 09:24:03 +01:00
Ralf Haferkamp
0d03092669
Bump go-ldap to latest release
...
To be able to build with latest reva again
2025-02-20 09:06:07 +01:00
Ralf Haferkamp
734a1dc76b
Adjust educational LDAP Attribute and Objectclasses
...
This is largely untested and might need further adjustments, but should
be "good enough" to not block us for now.
2025-01-29 11:59:06 +01:00
Ralf Haferkamp
1c96633985
Adjust LDAP base DN in tests to dc=example,dc=org
2025-01-29 11:59:06 +01:00
Ralf Haferkamp
0716b40fa0
Adjust LDAP Schema for new name
2025-01-29 11:58:57 +01:00
André Duffeck
e8d35e1280
Use the opencloud reva from now on
2025-01-21 11:16:38 +01:00
Jörn Friedrich Dreyer and Florian Schade
b07b5a1149
use plain pkg module
...
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de >
2025-01-13 16:42:19 +01:00
Jörn Friedrich Dreyer
8e028f17e9
change module name
...
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de >
2025-01-13 09:58:18 +01:00
Ralf Haferkamp and Ralf Haferkamp
82d2193ad6
fix(graph): Allow to combine $search and $filter in users query
...
This fixes the 'graph/v1.0/users' endpoint to allow a combination of a
memberOf filter in $filter with a search string in $search.
Allowing queries like:
$filter=(memberOf/any(m:m/id eq 509a9dcd-bb37-4f4f-a01a-19dca27d9cfa))&$search="example"
2024-12-02 17:15:21 +01:00
Jörn Friedrich Dreyer
404e3e5580
graph skip fetching members
...
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de >
2024-12-02 10:37:07 +01:00
Ralf Haferkamp
6f90abd22d
fix(ocm): Adjust for recend change for federated user IDs
...
The UserIds as returned by e.g. GetAcceptedUser do already contain
the provider domain in the IDP field now.
Also adjust the provider domain in the OCM config to be really a domain
without URI scheme and path.
2024-11-14 15:51:07 +01:00
Ralf Haferkamp and Ralf Haferkamp
ce663c3a3a
fix(graph): treat LDAP attribute names case-insensitive everywhere
...
There were a couple of places where we were using the case-sensitive
GetAttributeValue method instead of the case-insensitive variant.
Fixes : #10200
2024-10-02 10:48:33 +02:00
Ralf Haferkamp and Ralf Haferkamp
34cc7b2e56
feat(graph): Add $filter support for lastSuccessfulSignInDateTime
...
It is now possible to filter users based on the lastSuccessfulSignInDateTime attribute
using query filter like:
'$filter=signInActivity/lastSuccessfulSignInDateTime le 2021-09-01T00:00:00Z'
Note: This does only work with LDAP servers actually supporting '<=' filters.
The built-in LDAP server (idm) does not support this feature.
2024-09-23 10:49:49 +02:00
Ralf Haferkamp and Ralf Haferkamp
231128950f
feat(graph): expose 'signinactivity' for users
2024-09-23 10:49:49 +02:00
Ralf Haferkamp and Ralf Haferkamp
724755426e
graph: remove some code duplication
2024-09-23 10:49:49 +02:00
Ralf Haferkamp and Ralf Haferkamp
0bd4b90d7f
fix: Make linter happy
2024-09-17 16:02:47 +02:00
Ralf Haferkamp and Ralf Haferkamp
8e158d52bb
graph(oidc): Consume UserSignedIn events in graph service
...
Pass them to the identity backend to update the last sign-in date of the user.
2024-09-17 16:02:47 +02:00
Jörn Friedrich Dreyer
5ab53b2474
bump reva to 9878984ce702
...
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de >
2024-09-05 15:03:05 +02:00
Jörn Friedrich Dreyer
a3c7bd3182
bump libre graph api
...
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de >
2024-08-19 14:20:20 +02:00
Ralf Haferkamp and Ralf Haferkamp
80e8a2ec1a
(fix)graph: Always set UserType in /users responses
...
LDAP users without a UserType attribute get the UserType "Member"
by default. Federated users get the UserType "Federated".
Related #9702
2024-08-12 12:16:16 +02:00
Christian Richter and Jörn Friedrich Dreyer
b529eb8335
add missing errorcheck
...
Signed-off-by: Christian Richter <crichter@owncloud.com >
2024-06-24 12:07:26 +02:00
Jörn Friedrich Dreyer
ab338884c6
rudimentary OCM support in graph
...
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de >
2024-06-24 12:07:21 +02:00
Ralf Haferkamp and Ralf Haferkamp
eace09ca05
graph: Allow to set the identities property on users
...
Previously we only allowed setting the "identities" property on education users.
This changes move the related code to the main user object.
2024-05-13 17:22:37 +02:00
Jörn Friedrich Dreyer
e41472234f
log and trace fixes
...
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de >
2024-04-26 17:03:49 +02:00
Thomas Müller
07f0cd5574
fix: typos, naming clashes, error messages and deprecations
2024-04-03 15:34:36 +02:00
Ralf Haferkamp and Ralf Haferkamp
3d3f8949f5
Bump mockery to 2.40.2
...
to address issues when building with go1.22:
https://github.com/vektra/mockery/pull/753
2024-02-09 11:48:45 +01:00
Ralf Haferkamp and GitHub
07860ef8e7
Fix some fallout of recent mockery changes ( #8341 )
...
* Fix mockery setup for graph service
Add missing interfaces to .mockery.yaml. Use existing mocks from protogen
where possible. Remove remaining //go:generate call.
* Add mockery config for settings service
* Add mockery config for proxy service
2024-02-01 21:09:01 +01:00
Jörn Friedrich Dreyer and GitHub
fad94d2038
bump mockery, add test stub for oidc_auth.go, align mock generation ( #8321 )
...
* bump mockery, add test stub for oidc_auth.go
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de >
* use .mockery.yaml for all mocks
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de >
* drop legacy go:generate mockery
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de >
* align mock placement
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de >
---------
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de >
2024-02-01 10:07:44 +01:00
Ralf Haferkamp and Ralf Haferkamp
a1ed2ce2e5
graph/groups: Handle quoted search terms in GetGroups
...
Fixes : #7990
2023-12-21 13:57:26 +01:00
Ralf Haferkamp and Ralf Haferkamp
8489170715
graph/users: More test coverage for GetUsers search
2023-12-21 13:57:26 +01:00
Juan Pablo Villafáñez and Ralf Haferkamp
1bcc559ed8
fix: adjust min search length if double quotes are used
2023-12-20 17:24:44 +01:00
Juan Pablo Villafáñez and Ralf Haferkamp
34bb4f80ed
fix: double quotes will be trimmed from the search token
2023-12-20 17:24:44 +01:00
Ralf Haferkamp and Ralf Haferkamp
1ace257064
graph/groups: Allow unprivileged users to search for groups
2023-12-07 10:21:45 +01:00
Ralf Haferkamp and Ralf Haferkamp
795989e0aa
graph/users: Use a full substring filter of user search
...
Previously we only did a prefix match.
2023-12-07 10:21:45 +01:00
Florian Schade and GitHub
ad06a192d8
enhancement: add graph beta listPermissions endpoint ( #7753 )
...
* enhancement: add graph beta listPermissions endpoint
besides the new api endpoint it includes several utilities to simplify the graph api development.
* resolve drive and item id from the request path
* generic pointer and value utilities
* space root detection
* update GetDriveAndItemIDParam signature to return a error
* move errorcode package
* enhancement: add generic error code handling
* fix: rebase
2023-11-28 17:06:04 +01:00
Florian Schade
170021a38e
chore: go version bump to 1.21
2023-11-23 14:52:01 +01:00
Ralf Haferkamp and Ralf Haferkamp
6ac5ac534d
Update wrapper and mocks for go-ldap 3.4.6
2023-11-22 15:12:39 +01:00
Ralf Haferkamp and Ralf Haferkamp
c9df9f5f31
graph: Make user and group lookup cache re-usable
...
drives.go implemented a local user/group cache (ttl based) to speed up repeated
user and group lookups. This commit moves the implementation to the 'identity' module
to make it usable outside of drives.go.
2023-11-08 14:45:44 +01:00
Ralf Haferkamp and Ralf Haferkamp
f2599dfa76
graph: Make createGroupModelFromCS3() function public
...
This is useful outside the identity module so make it available
2023-11-08 14:45:44 +01:00
Ralf Haferkamp and Ralf Haferkamp
4465c9385d
graph/education: Fix issues reported by sonarcloud
2023-09-27 15:39:00 +02:00