[tests-only] OnAccess scanning (#4641)

* config for on demand scanning

Signed-off-by: jkoberg <jkoberg@owncloud.com>

* bump reva

Signed-off-by: jkoberg <jkoberg@owncloud.com>

Signed-off-by: jkoberg <jkoberg@owncloud.com>
This commit is contained in:
kobergj authored and GitHub committed 2022-09-22 18:53:10 +02:00
1 parent a9d19d1b5f
commit 8b63d2d00a
5 files changed
+8 -1

No files matched your search

+1 -1
View File
@@ -12,7 +12,7 @@ require (
github.com/blevesearch/bleve/v2 v2.3.4
github.com/coreos/go-oidc/v3 v3.4.0
github.com/cs3org/go-cs3apis v0.0.0-20220818202316-e92afdddac6d
github.com/cs3org/reva/v2 v2.10.1-0.20220922122450-24859d43f4b7
github.com/cs3org/reva/v2 v2.10.1-0.20220922135544-ed2be2adc599
github.com/disintegration/imaging v1.6.2
github.com/ggwhite/go-masker v1.0.9
github.com/go-chi/chi/v5 v5.0.7
+2
View File
@@ -296,6 +296,8 @@ github.com/cs3org/go-cs3apis v0.0.0-20220818202316-e92afdddac6d h1:toyZ7IsXlUdEP
github.com/cs3org/go-cs3apis v0.0.0-20220818202316-e92afdddac6d/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY=
github.com/cs3org/reva/v2 v2.10.1-0.20220922122450-24859d43f4b7 h1:A9Eg7+sM4uq65Cd9wBcCy7gwwUbtUiQJcmY89xExBcM=
github.com/cs3org/reva/v2 v2.10.1-0.20220922122450-24859d43f4b7/go.mod h1:r0WPc8zRN0Uir7irndh/RE1Q3J5MHpLUpOyM/WyN9ZI=
github.com/cs3org/reva/v2 v2.10.1-0.20220922135544-ed2be2adc599 h1:Rqlfn1lCXYP/OsCoe48i2BfHFuy6aOq2iR2LT3QkPPw=
github.com/cs3org/reva/v2 v2.10.1-0.20220922135544-ed2be2adc599/go.mod h1:r0WPc8zRN0Uir7irndh/RE1Q3J5MHpLUpOyM/WyN9ZI=
github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8 h1:Z9lwXumT5ACSmJ7WGnFl+OMLLjpz5uR2fyz7dC255FI=
github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8/go.mod h1:4abs/jPXcmJzYoYGF91JF9Uq9s/KL5n1jvFDix8KcqY=
github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=
+1
View File
@@ -63,6 +63,7 @@ func Server(cfg *config.Config) *cli.Command {
ocdav.MachineAuthAPIKey(cfg.MachineAuthAPIKey),
ocdav.Events(cfg.Events.Endpoint, cfg.Events.Cluster),
ocdav.Broker(broker.NoOp{}),
ocdav.ForceRescan(cfg.ForceRescanPeriod, cfg.PollingTimeout),
// ocdav.FavoriteManager() // FIXME needs a proper persistence implementation https://github.com/owncloud/ocis/issues/1228
// ocdav.LockSystem(), // will default to the CS3 lock system
// ocdav.TLSConfig() // tls config for the http server
+3
View File
@@ -38,6 +38,9 @@ type Config struct {
Status Status `yaml:"-"`
Events Events `yaml:"events"`
ForceRescanPeriod string `yaml:"force_rescan_period" env:"FORCE_RESCAN_PERIOD" desc:"The time period after which a file needs to be rescanned before it can be downloaded, use: [s, m or h]. Example: 24h. 0 means rescan on every download. Leave empty for no rescanning."`
PollingTimeout string `yaml:"polling_timeout" env:"STAT_POLLING_TIMEOUT" desc:"[Advanced configuration] The timeout after which the server errors when a rescan has not finished, use: [s, m or h]. Example: 1m. Mandatory when FORCE_RESCAN_PERIOD is set, unused when not set."`
}
type Tracing struct {
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;OCDAV_TRACING_ENABLED" desc:"Activates tracing."`
@@ -56,6 +56,7 @@ func DefaultConfig() *config.Config {
Endpoint: "127.0.0.1:9233",
Cluster: "ocis-cluster",
},
PollingTimeout: "2m",
}
}