Commit Graph

70 Commits

Author SHA1 Message Date
Dennis Sieben
e28603e633 - fixed typos 2023-03-27 08:54:51 +02:00
David Christofas
924c2ca346 add missing comments 2023-03-06 19:01:16 +01:00
David Christofas
63fa35fa50 reduce duplication in configuration code 2023-03-06 16:52:44 +01:00
Jörn Friedrich Dreyer
9b00f02383 bump reva to ec27f5f8feb3
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2023-02-15 15:26:07 +00:00
mmattel
8dda0c6728 create readme.md for seach 2023-02-07 09:51:37 +01:00
mmattel
210cd54817 fix some envvar descriptions 2023-02-03 09:40:35 +01:00
Daniël Franke
d2076941f4 Add tests.
Also update mocks with mockery.
2023-01-23 14:38:12 +01:00
Florian Schade
1afd7c2a4b use event executant to index tags (#5405) 2023-01-13 17:31:34 +01:00
Jörn Friedrich Dreyer
3aa864aecc Remove Staticcheck warnings (#5394)
* remove deprecated ioutil imports

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

* remove duplicate imports

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

* remove unused values

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

* remove some unused types

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

* remove deprecated ioutil import

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

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2023-01-13 15:29:14 +01:00
jkoberg
837eff9017 adjust for tags pkg
Signed-off-by: jkoberg <jkoberg@owncloud.com>

tmp

Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-12-23 10:55:57 +01:00
jkoberg
b29ffeb3a9 use stream pkg instead server pkg
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-12-20 09:53:11 +01:00
Florian Schade
1db03dd512 [full-ci] experimental tags backport (#5227)
* add tags to search service resource
add tags getTags, AssignTags and UnassignTags endpoint to graph
use and prefer search event spaceOwner over executant
add tags to search report response
update libre graph api
update reva

Co-authored-by: David Christofas <dchristofas@owncloud.com>
2022-12-19 15:44:02 +01:00
Florian Schade
2404eff48e [full-ci] experimental search backport (#5221)
* experimental search backport
fix basic extractor resource name
move escapeQuery regex into global variable
minor pr review changes
rename DebounceDuration env variable
add document title and content when rebuilding bleve resource

Co-authored-by: David Christofas <dchristofas@owncloud.com>
2022-12-13 14:22:41 +01:00
Jörn Friedrich Dreyer
b2b4f9893c align revactx package import (#5206)
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2022-12-08 14:45:30 +01:00
Christian Richter
080a37784f Fix tests
Co-authored-by: André Duffeck <aduffeck@firondu.de>
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-11-24 15:11:38 +01:00
Christian Richter
724cf40c0e Add traces to search + indexer
Co-authored-by: André Duffeck <aduffeck@firondu.de?
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-11-24 12:38:09 +01:00
Andre Duffeck
60b979d1d4 Find spaces (#5044)
* Use the node name for the name field in the index instead of the path

* Add changelog

* Fix tests

* Adapt expected failures
2022-11-15 16:52:55 +01:00
Willy Kloucek
d74b879d4f update tooling (#5038)
* update tooling

* update nodejs version
2022-11-11 15:01:45 +01:00
Andre Duffeck
a0762e248e Filter hidden files (#5018)
* Filter hidden files from search results

* Add changelog

* Do not filter hidden files by default

* Set the hidden fields when converting fields to an entity

* Fix test
2022-11-10 17:05:43 +01:00
Andre Duffeck
925790d64b Dont reindex twice (#5001)
* Only reindex a space once at a time

* Add changelog
2022-11-08 15:20:38 +01:00
Jörn Friedrich Dreyer
0f7dba53fb use min tls 1.2 (#4969)
* use min tls 1.2

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-11-03 16:08:56 +01:00
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