Commit Graph

301 Commits

Author SHA1 Message Date
Ralf Haferkamp
dc6a4fdc02 Unify LDAP config settings accross services
This adapts the storage service to the recent changes of the LDAP
settings in reva.

Also we define a new set of LDAP env variables that can be shared
between all LDAP related ocis services (graph, idp, storage-auth-basic,
storage-userprovider, storage-groupprovider, idm). This should simplify
the most LDAP based configurations considerably.
2022-04-11 18:17:21 +02:00
David Christofas
81e731ff7b implement user and group audit events 2022-04-11 10:19:15 +02:00
Willy Kloucek
c2ab6b6aa5 update mocks 2022-04-08 14:23:39 +02:00
Willy Kloucek
652a907c24 update ci to check licenses of all languages 2022-04-08 07:41:19 +02:00
Willy Kloucek
29123cdfff hook up licensing in makefile 2022-04-08 07:40:55 +02:00
Jörn Friedrich Dreyer
6b0c35dcd5 Merge pull request #3412 from owncloud/fix-yaml-config
use yaml tag instead of ocisConfig
2022-03-31 14:24:04 +02:00
Michael Barz
27e76ab7a6 fix special urls,prepare changelog, bump version 2022-03-29 17:58:43 +02:00
Willy Kloucek
e224ce03cf use yaml tag instead of ocisConfig 2022-03-29 15:06:58 +02:00
Ralf Haferkamp
24897f8b2d ordering: fix the semantics of Less()
This tries to address a semantic glitch in Less() to actually do a "less
than" operation on strings and timestamps.  It does not change the
actual behaviour of the endpoints that support "orderby". The sorted
results will be the same as before.
2022-03-29 11:47:38 +02:00
Ralf Haferkamp
c29842e697 Add sorting to GraphAPI users and groups
The GraphAPI endpoints for users and groups support ordering now.
User can be ordered by displayName, onPremisesSamAccountName and mail.
Groups can be ordered by displayName.

Example: https://localhost:9200/graph/v1.0/groups?$orderby=displayName asc

Closes #3360
2022-03-29 11:47:38 +02:00
Ralf Haferkamp
0a22512488 Merge pull request #3406 from rhafer/graph-attr
graph: Fix handling of required attributes for users and groups
2022-03-29 10:21:36 +02:00
Ralf Haferkamp
ec0b3b10af Merge pull request #3376 from rhafer/graph-user-patch
graph: Allow PATCH on user without 'mail' in body
2022-03-29 10:11:19 +02:00
Michael Barz
e573990487 use utc timezone 2022-03-28 17:18:55 +02:00
Michael Barz
88e704ee07 refactor unit test 2022-03-28 17:18:55 +02:00
Michael Barz
35c17d71de add unit test 2022-03-28 17:18:55 +02:00
Michael Barz
88968c948e add remote item and fix mountpoint 2022-03-28 17:18:52 +02:00
Willy Kloucek
7ecb7cc2e1 Merge branch 'master' into update-reva-28-3-2022 2022-03-28 16:20:51 +02:00
David Christofas
2b0d9aa9b0 improve quota handling in the graph API 2022-03-28 13:24:54 +02:00
Willy Kloucek
7f65dfba34 remove example config files 2022-03-28 12:54:28 +02:00
Ralf Haferkamp
6fffe04120 graph: Fix handling of required attributes for users and groups
Fix a possible panic when checking for missing attribute ('err' was used
without actually being set). Return more helpful messages when required
attributes of a user or group are missing.
2022-03-28 11:23:23 +02:00
Ralf Haferkamp
517356f176 graph: Allow PATCH on user without 'mail' in body
Skip the mail validator if 'mail' attribute is not present in the
request.
2022-03-23 15:56:31 +01:00
Ralf Haferkamp
3c16713869 Fix error handling in GetUsers
A missing return statement caused GetUsers to return misleading results
when the identity backend returned an error.
2022-03-22 10:08:32 +01:00
Michael Barz
7a0e28a420 add drive alias to unit tests 2022-03-16 20:15:23 +01:00
Michael Barz
3a59c7ec4c add driveAlias to the graphAPI 2022-03-16 15:38:40 +01:00
Willy Kloucek
67b5458894 fix graph jwt secret from OCS_JWT_SECRET to GRAPH_JWT_SECRET 2022-03-15 15:58:02 +01:00
Willy Kloucek
9a4737d3ed exclude config items not inteded to be used from un/marshalling 2022-03-11 12:12:44 +01:00
Christian Richter
3a34e64dde Fix tests 2022-03-11 08:08:33 +01:00
Christian Richter
9734b000b3 Add defaultconfig to extensions 2022-03-10 14:12:26 +01:00
David Christofas
66f4198e12 include spaces etags in drives listing 2022-03-04 14:23:37 +01:00
Michael Barz
b15db1794a update reva to version 2.0.0 (#3258) 2022-03-03 19:56:04 +01:00
Ralf Haferkamp
06ca18b1fb graph: Assign new user the default user role
Similar to what the accounts service is doing, all new users get
the User role assigned now. Otherwise creating the user's personal space
upon login is not working.
2022-03-02 16:45:25 +01:00
Ralf Haferkamp
fe2501b083 graph: Add some validation for username and email
This copies the validation code from the accounts service, also fixing a
bug in the regex that allowed adding mail addresses with whitespace and
other problematic characters to the domain part of the mail address.

Partial fix for: #3247
2022-03-02 16:45:25 +01:00
Jörn Friedrich Dreyer
beaac40aa6 update reva to include decomposedfs nodes-per-space (#3228)
* update reva to include decomposedfs nodes-per-space

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* check create space with own constraint

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* update reva

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* unexpected passed

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* update reva

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* remove unused variable

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* revert reva commit id

Co-authored-by: Florian Schade <f.schade@icloud.com>
2022-03-02 08:47:53 +01:00
Michael Barz
c58fed9e22 fix ordering of names (#3218) 2022-02-22 20:45:44 +01:00
Ralf Haferkamp
e8e361d32f Add permission checks to users and groups Graph API
Only users with the account management permission should be able to
create, update or delete users. This also restricts access to the APIs
that allow listing all Groups/all Users.

Fixes #3177
2022-02-22 10:53:08 +01:00
Ralf Haferkamp
70a08774bd Fix linter issue (#3211)
Silence the warning about Insecure being true. `Insecure` is not our
default configuration, but need it to work in some cases.
2022-02-21 17:39:05 +01:00
Michael Barz
90a15a8628 add orderby name and lastModifiedDateTime (#3201)
* add orderby name and lastModifiedDateTime

* add unit test for sort

* fix orderby name

* add more tests

* exclude test files from duplication analyzer

* remove flaky test

* order by name if no date is set

* refactor

* add test for wrong parameter name
2022-02-21 15:59:35 +01:00
Michael Barz
3ff984ec80 fix unit test 2022-02-16 23:51:55 +01:00
Michael Barz
efe292738f Show not found error message 2022-02-16 23:39:51 +01:00
Michael Barz
8fd70fd350 change root item ID to match the format 2022-02-16 21:43:23 +01:00
Michael Barz
3167377fca use id wrap and unwrap from reva 2022-02-16 17:40:36 +01:00
Michael Barz
af0a5fac18 Create space with description (#3168)
* send description during create space

* add changelog

* update reva

* add to API test

* only use opaque if not nil

* use forked xattr to fix windows build

Signed-off-by: Michael Barz <mbarz@owncloud.com>
2022-02-15 14:18:27 +01:00
Michael Barz
b1d6be7e1b refactor to reduce complexity 2022-02-11 14:56:05 +01:00
Michael Barz
d3b87fa3a1 fix API tests 2022-02-11 14:56:05 +01:00
Michael Barz
57de630e33 fix unit tests 2022-02-11 14:56:05 +01:00
Michael Barz
abfefd9230 use opaque as space props transport 2022-02-11 14:56:05 +01:00
Michael Barz
fe0bd0d55c use arbitrary metadata 2022-02-11 14:56:05 +01:00
Ralf Haferkamp
8a57545c30 Add "insecure" flag to graph LDAP backend
To allow skipping TLS Certificate verification in development
environments.
2022-02-09 18:29:57 +01:00
David Christofas
cc1c448b23 Merge pull request #3095 from owncloud/drive-permissions
add permissions to the graph drives
2022-02-04 15:42:50 +01:00
David Christofas
5668a43e8e add permissions to the graph drives 2022-02-04 14:49:55 +01:00