Commit Graph

283 Commits

Author SHA1 Message Date
Michael Barz
b354e79bb5 Merge pull request #6189 from owncloud/cache-special-drive-items
cache special drive items until space root changes
2023-05-03 18:16:28 +02:00
Ralf Haferkamp
f1dbe439a1 graph-ldap: Fix possible races when editing group membership in parallel (#6214)
As the standard LDAP groups (groupOfNames) require at least one "member"
value to be present in a group, we have workarounds in place that add an
empty member ("") when creating a new group or when removing the last
member from the group. This can cause a race condition when e.g. multiple
request to remove members from a group an running in parallel, as we need
to read the group before we can construct the modification request. If
some other request modified the group (e.g. deleted the 2nd last member)
after we read it, we create non-working modification request.

These changes try to catch those errors and retry the modification
request once.

Fixes: #6170
2023-05-03 15:30:10 +02:00
Jörn Friedrich Dreyer
4eaa90af54 address code smells
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2023-05-03 12:15:02 +02:00
Jörn Friedrich Dreyer
024e66ffd0 ignore errors when building the cache key hash
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2023-05-03 11:26:46 +02:00
Jörn Friedrich Dreyer
c7bbdd2eae add special nodes to cache key
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2023-05-03 11:09:55 +02:00
Ralf Haferkamp
77e773515d graph/users: gracefully handle PATCH requests with empty bodies
Return as success status code when the PATCH request comes with an empty
body. This is mainly to workaround issues like:
https://github.com/owncloud/web/issues/8946
2023-05-03 09:32:05 +02:00
Ralf Haferkamp
1ad31218ec graph: Allow using binary LDAP UUIDs as user ids
In Active Directories UUID attributes such as "objectGUID" use a binary
syntax (oposed to the standard UUID syntax defined in RFC4530). This
introduces a flag to enable support for binary UUIDs as the id for users
and groups (similar to what the "users" and "groups" services already
support)

Fixes: #5815
2023-05-03 09:32:05 +02:00
Jörn Friedrich Dreyer
13369f8367 only stat if property is set
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2023-05-03 09:18:19 +02:00
Jörn Friedrich Dreyer
92533895c5 some fixes for the tests and noisy logs
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2023-05-03 00:21:57 +02:00
Jörn Friedrich Dreyer
40eba0909d fix mocks for stat based special resource handling
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2023-05-02 22:04:04 +02:00
Jörn Friedrich Dreyer
f2b86d8115 stat based on default paths
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2023-05-02 17:12:49 +02:00
Jörn Friedrich Dreyer
ca638ddc51 cache special drive items until space root changes
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2023-05-02 11:44:27 +02:00
Jörn Friedrich Dreyer
4bfda6183c Read quota from opaque (#6187)
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2023-04-28 15:55:29 +02:00
André Duffeck
0eca2a08f6 Speed up me/drives by gathering space information in parallel 2023-04-28 10:53:24 +02:00
Jörn Friedrich Dreyer
3489de1c42 listing drives sould use the user filter (#6103)
* listing drives shsould use the user filter

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

* fix status code

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

* check correct error

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

* Adapt expected failures

* Bump reva

---------

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Co-authored-by: André Duffeck <andre.duffeck@firondu.de>
2023-04-28 10:06:40 +02:00
Andre Duffeck
129489203b Cleanup and improve the caching config (#6148)
* Cleanup and improve the caching config

* bump reva

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

* disable stat cache

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

* Bump reva

* Linter fixes

---------

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Co-authored-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2023-04-27 12:35:30 +02:00
Martin
9bf4b3eb18 Merge pull request #6119 from owncloud/update_readme_caching
[docs-only] Add caching/storing info to services where missing
2023-04-24 15:13:49 +02:00
Andre Duffeck
77bb3d8bcd [full-ci] Refactor stores (#6019)
* Streamline the store implementation with and into reva

* Adapt to the cache/store refactoring in reva

* Streamline config options and their env vars

* Apply suggestions from code review

Co-authored-by: Martin <github@diemattels.at>

* Use the same database for all stores

* Bump reva

* Configure stat and filemetadata cache separately

* Fix default config

---------

Co-authored-by: Martin <github@diemattels.at>
2023-04-24 15:13:35 +02:00
EParzefall
e2686f90b9 spelling fixes 2023-04-24 13:55:10 +02:00
jkoberg
8f5c255225 return badrequest when exporting gdpr for other user
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-04-24 12:17:05 +02:00
mmattel
84d2d8dae9 [docs-only] Fix texts and typos in README.md files 2023-04-23 10:02:27 +02:00
Prajwol Amatya
e0b6ca0e29 [tests-only][full-ci] api test to get personal drive information of other users (#6018)
* api test to get personal drive information of other users

* fix the broken personal drive listing

* removed scenario from expected failure after issue fixed

---------

Co-authored-by: Michael Barz <mbarz@owncloud.com>
2023-04-21 16:59:16 +05:45
Ralf Haferkamp
70a80125c3 Fix backchannel logout
Use access token to lookup session id. The userinfo endpoint does
not return the session id. Also add some debug logging.

Co-authored-by: Christian Richter <crichter@owncloud.com>
Co-authored-by: Michael Barz <mbarz@owncloud.com>
2023-04-20 18:04:52 +02:00
Daniel Swärd
0d6500a225 graph: Add comment to fix and remove expected test failures
Fixes: #5083
2023-04-20 10:32:40 +02:00
Daniel Swärd
8d789ce24d graph: Try to fix problems with unescaping values. 2023-04-20 09:33:23 +02:00
Michael Barz
8b8859950f Merge pull request #6067 from owncloud/ainmosni/feature/search-keycloak-by-username
Search users by username instead of by email
2023-04-19 22:00:30 +02:00
Martin
0c48a565cf Merge pull request #6079 from owncloud/fix_removal_version
[docs-only] Correct the removal version according semver to 4.0.0
2023-04-19 15:21:13 +02:00
mmattel
8ed34926ef [docs-only] Correct the removal version according semver to 4.0.0 2023-04-19 10:16:06 +02:00
Martin
e58f6d2d7a [docs-only] Update graph readme (GDPR, link to admin docs)
Referencing: https://github.com/owncloud/docs-ocis/pull/457 (Add user triggered GDPR Report)

Linking to the ocis admin documentation because we have more explainaition, images and an example json.
2023-04-19 09:34:31 +02:00
Daniël Franke
30edab9f69 Search users by username instead of by email
As some setups don't have email addresses setup or reuse email
addresses, the keycloak search has to be done by username as that
is guaranteed to always be unique and defined.

This PR changes that.
2023-04-18 11:43:13 +02:00
Daniël Franke
2e8b741530 improve readme
Co-authored-by: Martin <github@diemattels.at>
2023-04-14 15:09:54 +02:00
Daniël Franke
43cf811db1 Format markdown a bit cleaner. 2023-04-14 15:09:54 +02:00
Daniël Franke
ed27261262 Add documentation about keycloak configuration. 2023-04-14 15:09:54 +02:00
Daniël Franke
d81065c1b6 Adds JSON tags to PII report.
This will make the JSON export look a bit prettier.
2023-04-14 15:09:54 +02:00
jkoberg
c9d0e876f7 use mail instead id to get user
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-04-14 15:09:54 +02:00
jkoberg
cf6b1eac25 add events to personalDataExport
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-04-14 15:09:54 +02:00
Daniël Franke
8e32b4f5da Integrate keycloak and events data into graph.
This PR adds the data from keycloak and events into the GDPR export of
the graph service.
2023-04-14 15:09:54 +02:00
mmattel
b2504035e0 fix readme service names 2023-04-12 18:40:41 +02:00
Martin
8dc25a7888 Merge pull request #6020 from owncloud/mmattel-patch-1
[docs-only] Update Graph README.md to properly show the image in owcloud.dev
2023-04-06 11:52:20 +02:00
Martin
1f86a79a15 Update Graph README.md
An image source referenced must be the raw source to be shown properly in owncloud.dev. No impact on showing the readme here.
2023-04-06 10:48:38 +02:00
Ralf Haferkamp
0495e42534 Apply suggestions from code review
Co-authored-by: Martin <github@diemattels.at>
2023-04-06 10:00:20 +02:00
Ralf Haferkamp
359bf13ce6 Apply suggestions from code review
Co-authored-by: Martin <github@diemattels.at>
2023-04-06 09:55:19 +02:00
Daniel Swärd
afbfd2d6b2 Deprecating and renaming many environment variables
Fixes #5767
Fixes #5905
Fixes #5532
2023-04-05 11:05:48 +02:00
kobergj
78ab7d6750 Merge pull request #6009 from 2403905/introduceGlobalVariables
Introduced global OCIS_EVENTS_ENDPOINT and OCIS_EVENTS_CLUSTER #5901
2023-04-05 10:20:48 +02:00
Ralf Haferkamp
120887abcc graph: new config option GRAPH_LDAP_GROUP_CREATE_BASE_DN
By setting GRAPH_LDAP_GROUP_CREATE_BASE_DN a distinct subtree can be
configured where new LDAP groups are created. That subtree needs to be
subordinate to GRAPH_LDAP_GROUP_BASE_DN. All groups outside for
GRAPH_LDAP_GROUP_CREATE_BASE_DN are considered read-only and only groups
below that DN can be updated and deleted.

This is introduced for a pretty specific usecase where most groups are managed
in an external source (e.g. a read-only replica of an LDAP tree). But we still
want to allow the local administrator to create groups in a writeable subtree
attached to that replica.
2023-04-04 15:56:57 +02:00
Roman Perekhod
fcfb2ab9fa Introduced global OCIS_EVENTS_ENDPOINT and OCIS_EVENTS_CLUSTER #5901 2023-04-04 15:43:03 +02:00
mmattel
3c35b95ee2 [docs-only] Fixing the service name in the text used in readme.md 2023-04-04 12:15:59 +02:00
mmattel
255dd06c92 [docs-only] Fix readme.md for caches 2023-04-04 09:15:24 +02:00
Prajwol Amatya
7baac4f050 [tests-only][full-ci] Api test for user trying to set own personal space quota (#5979)
* api test for user trying to set their own personal space quota

* removed duplicate scenarios for set quota

* updated expected scenario

* fix wrong status code

* updated expected failure scenario after wrong status code fix

---------

Co-authored-by: Michael Barz <mbarz@owncloud.com>
2023-04-04 12:41:34 +05:45
Michael Barz
ffe0e71337 add Purge and Restore Headers 2023-04-03 17:29:49 +02:00