Commit Graph

49 Commits

Author SHA1 Message Date
André Duffeck cfb4f45f8d Fix indentation 2022-11-03 13:22:44 +01:00
André Duffeck 12bdf29ac4 Change the default reindex debounce duration to 1s.
Also make it configurable using an env var.
2022-11-03 13:15:54 +01:00
Ralf Haferkamp ee974afebf [full-ci] Introduce TLS Settings for go-micro based grpc services and clients (#4901)
* Introduce TLS Settings for go-micro based grpc services and clients

TLS for the services can be configure by setting the OCIS_MICRO_GRPC_TLS_ENABLED"
"OCIS_MICRO_GRPC_TLS_CERTIFICATE" and "OCIS_MICRO_GRPC_TLS_KEY"
enviroment variables.

TLS for the clients can configured by setting the "OCIS_MICRO_GRPC_CLIENT_TLS_MODE"
and "OCIS_MICRO_GRPC_CLIENT_TLS_CACERT" variables.

By default TLS is disabled.

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

* Unify TLS configuration for all grpc services

All grpc service (whether they're based on reva) or go-micro use the
same set of config vars now.

TLS for the services can be configure by setting the OCIS_GRPC_TLS_ENABLED,
OCIS_GRPC_TLS_CERTIFICATE and OCIS_GRPC_TLS_KEY enviroment variables.

TLS for the clients can configured by setting the OCIS_GRPC_CLIENT_TLS_MODE
and OCIS_MICRO_GRPC_CLIENT_TLS_CACERT variables.

There are no individual per service config vars currently. If really
needed, per service tls configurations can be specified via config file.

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

Co-authored-by: Martin <github@diemattels.at>
2022-11-03 10:17:08 +01:00
Ralf Haferkamp 3d57f5cc21 Introduce TLS Settings for all reva grpc services and clients 2022-10-25 11:50:08 +02:00
Ralf Haferkamp e373e48383 Get rid of duplicated Reva config struct
Consolidate all services to use the Reva config struct for the shared package.
This works because all services (except 'notifications', 'thumbnails' and
'webdav') where using the same config keys and environment variables for
setting the reva gateway.
2022-10-25 11:50:08 +02:00
Michael Barz ec764ea5b1 improve the description of the help texts 2022-10-21 12:50:03 +02:00
David Christofas 45b92fc56f add config option to enable or disable TLS for nats 2022-10-21 12:40:21 +02:00
David Christofas bbcbf69283 fix shareroot path in REPORT responses 2022-10-20 10:26:10 +02:00
Andre Duffeck 5e220920f0 [full-ci] Rescan spaces (#4777)
* Increase the timeout for indexing spaces

* Allow for making queries that are not constrained to a RootID

* Use nano precision for the Mtime

* Add a SpaceDebouncer

The debouncer can be used to delay operations on spaces until things
have settled down to avoid doing the same operation multiple times.

* Do not index subtrees until they have changed (i.e. the mtime differs)

* Also pass a user to the space debouncer func

* Trigger a rescan of the according space when an event is received

* Improve wording/logging

* Add changelog

* Get rid of superfluous GetUserByClaim call

* Fix tests

* Fix reindexing triggered by shares by using the event's SpaceOwner

* Bump reva to pull in the space owner events changes

* Fix changelog

* Fix linter issues

* Fall back to the executant if no owner was received from the event

* Bump reva and go-cs3apis

* Fix go.sum

* Bump core

* Adapt expected failures

* Tweak debounce settings
2022-10-14 17:03:05 +02:00
mmattel 6edb44fa83 Improving the description for several environemt variables 2022-10-13 12:07:46 +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
Jörn Friedrich Dreyer 1bb7d57caf index and return parentid in search report
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2022-10-07 10:52:14 +00: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
Jörn Friedrich Dreyer b257ba6664 Fix cache config and search logging (#4732)
* make share event logging more distinguishable

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

* fix cache stat table config

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

* add changelog

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

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2022-10-04 14:07:11 +02:00
Andre Duffeck eaba396394 Fix unfindable entities (#4651)
* Fix unfindable entities from shares/publicshares

Directories or empty files weren't added to the search index properly
because they were indexed relative to the share instead of the space
root.

Fixes https://github.com/owncloud/ocis/issues/4489

* Add changelog

* Fix tests

* Reuse existing authorized context
2022-09-27 10:39:42 +02:00
Andre Duffeck 68b17eb68d Search dav spaces (#4661)
* Add a Ref option to SearchRequest, e.g. for limiting the search to a space

* Enable REPORT requests for /dav/spaces URLs

* Limit the search to the according space in case of /dav/spaces searches

* Add changelog

* Adapt expected failures

* Comment exported functions
2022-09-27 10:38:15 +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
Jörn Friedrich Dreyer 2d445c6e95 fix search report webdav permissions (#4579)
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2022-09-14 11:22:51 +02:00
jkoberg 2f97fa7036 REPORT: add permissions to personal space
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-09-08 12:31:13 +02:00
jkoberg 3f5585628d adjust REPORT to PROPFIND endpoint
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-09-02 15:02:06 +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
André Duffeck 814342a101 Fix search in received shares
It apparently broke as a fallout of the shareid refactoring.
2022-08-01 13:55:52 +02:00
jkoberg e6ef03fb43 add Makefile
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-07-22 11:25:04 +02:00
jkoberg fdaa55865c add search unit test to ci
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-07-22 11:16:53 +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 7c8a85f54c Merge pull request #4180 from owncloud/fix-search-reva-addr-config
fix search reva addr config parsing
2022-07-15 07:28:56 +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
André Duffeck cfceb854b1 Fix rebase errors 2022-07-13 11:34:24 +02:00
André Duffeck a4ba79dc3e Compile one sorted list of matches and apply the limit if needed 2022-07-13 10:42:52 +02:00
André Duffeck 0fb8721da6 Return the number of total matches 2022-07-13 10:42:50 +02:00
Jörn Friedrich Dreyer 52f11cfd80 fix search reva addr config parsing
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2022-07-12 11:46:31 +00:00
Jörn Friedrich Dreyer 761a09247c log owner when machine auth fails
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2022-07-12 08:58:55 +00: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
Andre Duffeck 24fbb4a389 Merge pull request #4094 from aduffeck/polish-search
Polish search
2022-07-06 08:44:43 +02:00
Jörn Friedrich Dreyer 2e640424cf Merge pull request #4076 from aduffeck/enabled-machine-auth-in-ocdav
[full-ci] Enable machine auth in ocdav
2022-07-05 18:14:41 +00: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
André Duffeck c2b163afe6 Improve description of the machine auth api key config options 2022-07-05 11:05:33 +02:00
Willy Kloucek f02591b5c3 improve startup error logging 2022-07-05 10:12:46 +02:00
André Duffeck b6d374f683 Support specifying a search limit 2022-07-04 16:35:44 +02:00
André Duffeck 57c4f056ef Return proper error codes, e.g. when providing an empty query 2022-07-04 16:35:44 +02:00
Willy Kloucek 9b4c746085 fix malformed desc tags, add missing descriptions and remove static configuration 2022-07-01 11:35:19 +02:00
Willy Kloucek 4d60867cd6 improve *_HTTP_ROOT descriptions 2022-06-29 09:44:12 +02:00
Willy Kloucek 8f3b0c50cd Merge branch 'master' into config-doc-descriptions 2022-06-28 13:03:19 +02:00
Christian Richter f8f1320501 refactor extensions -> services
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-06-27 14:05:36 +02:00
Christian Richter 78064e6bab rename folder extensions -> services
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-06-27 14:05:36 +02:00