Commit Graph

57 Commits

Author SHA1 Message Date
Michael Barz
f84fbdd6ff corrections from code review 2022-10-17 17:22:33 +02:00
Michael Barz
0b7297d1b4 harden drives api and improve logging 2022-10-16 00:38:44 +02:00
David Christofas
4623b6c8e7 Nats tls (#4781)
* use tls for nats connections

* add config options for nats client tls config

* add nats tls config to CI

* add function to create a certpool

* add option to provide a rootCA to validate the server's TLS certificate

* add option to provide a rootCA to validate the server's TLS certificate

* add option to provide a rootCA to validate the server's TLS certificate

* add option to provide a rootCA to validate the server's TLS certificate

* configure nats clients in reva to use tls
2022-10-12 14:56:47 +02:00
Michael Barz
cfd3e9fab7 fix master branch 2022-10-10 17:26:01 +02:00
Michael Barz
dd6c60d548 fix base url for drives webURL 2022-10-10 17:07:32 +02:00
David Christofas
1b0ec2c9d5 update module path of ttlcache (#4738)
The GitHub repository of ttlcache has been moved from ReneKroon to jellydator.
2022-10-04 17:33:53 +02:00
Jörn Friedrich Dreyer
e9e9947f88 bring back CORS env vars (#4723)
* bring back CORS env vars

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

* update CORS descriptions

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

* align writing of 'A comma-separated ...'

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

* fix some desc quotes

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

* Apply suggestions from code review

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

* Apply more suggestions from code review

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

* Apply final suggestions from code review

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

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Co-authored-by: Martin <github@diemattels.at>
2022-10-04 16:56:05 +02:00
Ralf Haferkamp
01650a5023 Use lazy initialization for the default grpc client
This avoids using a public global variable. It allows us to initialize
the default client a bit later (outside of init()). That way we can e.g.
properly initialize the in-memory registry.
2022-09-26 16:25:56 +02:00
Ralf Haferkamp
cc53071f63 Forbid to remove own user account
And admin user is no longer allowed to remove its own user account.
This to prevent admins from locking themselves out.

Fixes: #3713
2022-09-23 09:13:46 +02:00
Juan Pablo Villafañez
6ee4a084a2 Use go-micro store to cache the roles (#4337)
* Use go-micro store to cache the roles

Add custom in-memory implementation

* replace redis with custom etcd implementation

* adjust table name for the cache in the roles manager

* Fix tests

* Fix sonarcloud issues

* Refactor for sonarcloud

* Allow configuration of cache per service

* Reuse parent context in etcd implementation
2022-09-16 15:42:47 +02:00
Michael Barz
a129ea6abe fix unit tests 2022-09-15 10:42:00 +02:00
Michael Barz
23da13b35f add web url to graph api and update reva 2022-09-15 09:30:36 +02:00
Jörn Friedrich Dreyer
d4d2fefb80 forward trace context in graph service (#4582)
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2022-09-14 14:23:15 +02:00
Ralf Haferkamp
f43a233795 Fix home space deletion when deleting user by name
DELETE requess on /graph/v1.0/users also work when specifing a user by
name. For deleting the home space in that case we need to get the User's
id from the backend first.

Fixes: #4195
2022-09-07 18:13:41 +02:00
Ralf Haferkamp
e4f9dfa40e graph: purge home space when deleting a user
previously the homespace was just marked as trashed

Fixes: #4195
2022-09-07 14:25:27 +02:00
Ralf Haferkamp
29f52515e1 graph: Fix Status code when updating the password
Up to now the /me/changePassword endpoint return a 500 Status when
issue a password change with the old password set to the wrong password.
This changes the code to return 400 (Bad Request) with an additional
message that the old password is wrong. This does not seem to weaken the
security of /me/changePassword (i.e. for allowing easier brute-force
attacks) as the endpoint is only available to already authenticated
users (and only for changing their own passwords)

See #4480
2022-09-05 15:57:46 +02:00
David Christofas
2051f0d1e1 Merge pull request #4447 from dragonchaser/delete_userspace
Delete userspace
2022-09-02 14:41:57 +02:00
David Christofas
e36cd4fa7f add returns after rendering errors and simplify loop condition 2022-09-02 11:54:17 +02:00
Ralf Haferkamp
a26b16c41d graph: Add $expand=memberOf support to /me
Fixes: #4283
2022-08-31 07:43:27 +02:00
Christian Richter
6a9d4efef6 add delete home space permission to admin role
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-08-30 11:09:05 +02:00
Christian Richter
05a60fd3a5 add home space deletion on user delete
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-08-26 15:00:55 +02:00
Willy Kloucek
9f2be9f4f9 remove Log prefix from configlog functions 2022-08-22 08:08:18 +02:00
Willy Kloucek
e58eaabdeb move config parse error logging into function to ensure new lines and don't parse config for help 2022-08-18 15:27:28 +02:00
Willy Kloucek
60689c9c1a improve unsupervised description 2022-08-18 10:59:35 +02:00
Willy Kloucek
6154466bbc rename extensions to services (leftover occurences) 2022-08-17 15:36:52 +02:00
Michael Barz
bb9903515f fix unrestricted quota 2022-08-08 19:25:22 +02:00
Michael Barz
df8e64665b Merge pull request #4358 from owncloud/update-graph-api
add expand query for personal drive
2022-08-08 17:45:12 +02:00
Michael Barz
67b52bbd55 add expand query for personal drive 2022-08-08 16:43:59 +02:00
Michael Barz
bde5d69839 add storageID to the special items, improve code 2022-08-08 16:07:19 +02:00
Ralf Haferkamp
23b9437c08 Avoid panics when LDAP users miss required attributes 2022-08-05 16:46:45 +02:00
Ralf Haferkamp
c7359a849f Avoid unneeded extra LDAP query per group
When expanding members of an LDAP group we did two group lookup per
Group. This can be avoided by expanding the members right from the
Group entry of the first query.

This also add some more unit test coverage, especially to the expand/select
group member test cases.
2022-08-05 16:46:45 +02:00
Ralf Haferkamp
8dde4e5b94 Add LDAP query details to debug log 2022-08-05 16:46:45 +02:00
Ralf Haferkamp
d867a8bc7c Don't panic on missing group attributes
Closes #4274
2022-08-05 16:46:45 +02:00
Michael Barz
cb7d024d89 fix listing of drives and quota 2022-08-03 12:50:00 +02:00
Ralf Haferkamp
53751339a6 Use existing mockery mock instead of manual ldap.Client mock 2022-08-02 16:14:39 +02:00
Ralf Haferkamp
fa36a73c54 Add missing new methods to fulfill ldap.Client interface 2022-08-02 15:34:59 +02:00
Michael Barz
cce04f94ff set virtual owner on non-personal spaces 2022-08-01 12:53:24 +02:00
Christian Richter
a030459c70 incorporate requested changes
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-07-29 14:39:19 +02:00
Christian Richter
1e21e23056 add drives output
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-07-29 14:39:19 +02:00
jkoberg
e56632681b update description for event structs
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-07-21 10:27:43 +02:00
Willy Kloucek
7cbd1ad357 make graph service events optional 2022-07-15 07:51:30 +02:00
Ralf Haferkamp
946f3e8feb Remove unused BindEnv code
We dropped this in favour of envdecode a while ago.
2022-07-14 16:34:25 +02:00
Michael Barz
2a113e9f7d use spaceID 2022-07-11 10:44:09 +02:00
mmattel
246377b35b Env variable text fixes 2022-07-07 19:53:27 +05:45
Willy Kloucek
45f25ee845 remove unused GRAPH_SPACES_INSECURE 2022-07-07 15:29:06 +02:00
David Christofas
ce6f85de61 Merge pull request #4117 from owncloud/ldap-escape-dn
escape DN attribute values
2022-07-07 09:25:23 +02:00
David Christofas
2707c2f4b4 escape DN attribute values 2022-07-06 15:16:43 +02:00
Ralf Haferkamp
4a09d8a948 Remove redundant setting of cli.HelpFlag
The help flag is configured automatically by default already. We don't
need to redo that for every single service.

This also addresses one of the finding of "go race" (#4088)
2022-07-05 14:59:06 +02:00
Willy Kloucek
f02591b5c3 improve startup error logging 2022-07-05 10:12:46 +02:00
Ralf Haferkamp
8578f4e4b0 graph: Add descriptions for LDAP related config settings 2022-06-30 14:17:24 +02:00