Repository: owncloud/ocis
Pull request #8018 (2023-12-19 14:49:06)

feat: allow settings service to store "zh" as language value
## Description
Same old problem: The settings service only allows to save values for the language that are defined in the source code.

## Related Issue
- Works towards https://github.com/owncloud/ocis/issues/7999
- Pre-requisite for https://github.com/owncloud/web/pull/10214

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Technical debt
- [ ] Tests only (no source changes)

## Checklist:
<!-- Tick the checkboxes when done. -->
<!-- Raise documentation ticket in owncloud.github.io/ -->
- [x] Code changes
- [ ] Unit tests added
- [ ] Acceptance tests added
- [ ] Documentation ticket raised: <link> 



Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9e111a49be5..2a17c0e0dc7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -52,14 +52,11 @@ The following sections list the changes for unreleased.
 * Bugfix - Non durable streams for sse service: [#7986](https://github.com/owncloud/ocis/pull/7986)
 * Change - Remove accessDeniedHelpUrl from the config: [#7970](https://github.com/owncloud/ocis/pull/7970)
 * Enhancement - Bump reva: [#7793](https://github.com/owncloud/ocis/pull/7793)
-* Enhancement - Add cli commands for trash-bin: [#7917](https://github.com/owncloud/ocis/pull/7917)
 * Enhancement - Update web to v8.0.0-beta.2: [#7952](https://github.com/owncloud/ocis/pull/7952)
 * Enhancement - Add validation update public share: [#7978](https://github.com/owncloud/ocis/pull/7978)
 * Enhancement - Allow inmemory nats-js-kv stores: [#7979](https://github.com/owncloud/ocis/pull/7979)
 * Enhancement - Use kv store in natsjs registry: [#7987](https://github.com/owncloud/ocis/pull/7987)
-* Enhancement - Allow authentication nats connections: [#7989](https://github.com/owncloud/ocis/pull/7989)
 * Enhancement - Add ocm and sciencemesh services: [#7998](https://github.com/owncloud/ocis/pull/7998)
-* Enhancement - Make nats-js-kv the default registry: [#8011](https://github.com/owncloud/ocis/pull/8011)
 
 ## Details
 
@@ -133,14 +130,6 @@ The following sections list the changes for unreleased.
    https://github.com/owncloud/ocis/pull/7963
    https://github.com/owncloud/ocis/pull/7986
 
-* Enhancement - Add cli commands for trash-bin: [#7917](https://github.com/owncloud/ocis/pull/7917)
-
-   We added the `list` and `restore` commands to the trash-bin items to the CLI
-
-   https://github.com/owncloud/ocis/issues/7845
-   https://github.com/owncloud/ocis/pull/7917
-   https://github.com/cs3org/reva/pull/4392
-
 * Enhancement - Update web to v8.0.0-beta.2: [#7952](https://github.com/owncloud/ocis/pull/7952)
 
    Tags: web
@@ -180,13 +169,6 @@ The following sections list the changes for unreleased.
 
    https://github.com/owncloud/ocis/pull/7987
 
-* Enhancement - Allow authentication nats connections: [#7989](https://github.com/owncloud/ocis/pull/7989)
-
-   Allow events, store and registry implementation to pass username/password to the
-   nats instance
-
-   https://github.com/owncloud/ocis/pull/7989
-
 * Enhancement - Add ocm and sciencemesh services: [#7998](https://github.com/owncloud/ocis/pull/7998)
 
    We added sciencemesh and ocm services to enable federation.
@@ -196,13 +178,6 @@ The following sections list the changes for unreleased.
    https://github.com/owncloud/ocis/pull/7464
    https://github.com/owncloud/ocis/pull/7463
 
-* Enhancement - Make nats-js-kv the default registry: [#8011](https://github.com/owncloud/ocis/pull/8011)
-
-   The previously used default `mdns` is faulty. Deprecated it together with
-   `consul`, `nats` and `etcd` implementations.
-
-   https://github.com/owncloud/ocis/pull/8011
-
 # Changelog for [5.0.0-beta.1] (2023-12-12)
 
 The following sections list the changes for 5.0.0-beta.1.
diff --git a/changelog/unreleased/add-trach-bin-cli.md b/changelog/unreleased/add-trach-bin-cli.md
deleted file mode 100644
index 5b2771035ba..00000000000
--- a/changelog/unreleased/add-trach-bin-cli.md
+++ /dev/null
@@ -1,7 +0,0 @@
-Enhancement: Add cli commands for trash-bin
-
-We added the `list` and `restore` commands to the trash-bin items to the CLI
-
-https://github.com/owncloud/ocis/pull/7917
-https://github.com/cs3org/reva/pull/4392
-https://github.com/owncloud/ocis/issues/7845
diff --git a/changelog/unreleased/default-registry.md b/changelog/unreleased/default-registry.md
deleted file mode 100644
index 407af748107..00000000000
--- a/changelog/unreleased/default-registry.md
+++ /dev/null
@@ -1,5 +0,0 @@
-Enhancement: Make nats-js-kv the default registry
-
-The previously used default `mdns` is faulty. Deprecated it together with `consul`, `nats` and `etcd` implementations.
-
-https://github.com/owncloud/ocis/pull/8011
diff --git a/changelog/unreleased/nats-authentication.md b/changelog/unreleased/nats-authentication.md
deleted file mode 100644
index dce8254d8dd..00000000000
--- a/changelog/unreleased/nats-authentication.md
+++ /dev/null
@@ -1,5 +0,0 @@
-Enhancement: Allow authentication nats connections
-
-Allow events, store and registry implementation to pass username/password to the nats instance
-
-https://github.com/owncloud/ocis/pull/7989
diff --git a/docs/services/general-info/registry.md b/docs/services/general-info/registry.md
deleted file mode 100644
index 5db99e82b31..00000000000
--- a/docs/services/general-info/registry.md
+++ /dev/null
@@ -1,39 +0,0 @@
----
-title: Registry
-date: 2023-12-19T00:00:00+00:00
-weight: 20
-geekdocRepo: https://github.com/owncloud/ocis
-geekdocEditPath: edit/master/docs/services/general-info
-geekdocFilePath: registry.md
-geekdocCollapseSection: true
----
-
-To be able to communicate with each other, services need to register in a common registry.
-
-## Configuration
-
-The type of registry to use can be configured with the `MICRO_REGISTRY` environment variable. Supported values are:
-
-### `memory`
-
-Setting the environment variable to `memory` starts an inmemory registry. This only works with the single binary deployment.
-
-### `nats-js-kv` (Default)
-
-Set the environment variable to `nats-js-kv` or leave it empty to use a nats-js key value store as registry.
-- Note: If not running build-in nats, `MICRO_REGISTRY_ADDRESS` needs to be set to the address of the nats-js cluster, which is the same value as `OCIS_EVENTS_ENDPOINT`.
-- Optional: Use `MICRO_REGISTRY_AUTH_USERNAME` and `MICRO_REGISTRY_AUTH_PASSWORD` to authenticate with the nats cluster.
-### `kubernetes`
-
-When deploying in a kubernetes cluster, the kubernetes registry can be used. Additionally the `MICRO_REGISTRY_ADDRESS` environment
-variable needs to be set to the url of the kubernetes registry.
-
-### Deprecated Registries
-
-These registries are currently working but will be removed in a later version. It is recommended to switch to a supported one.
-
-- `nats`. Uses a registry based on nats streams. Requires `MICRO_REGISTRY_ADDRESS` to bet set.
-- `etcd`. Uses an etcd cluster as registry. Requires `MICRO_REGISTRY_ADDRESS` to bet set.
-- `consul`. Uses `HashiCorp Consul` as registry. Requires `MICRO_REGISTRY_ADDRESS` to bet set.
-- `mdns`.  Uses multicast dns for registration. This type can have unwanted side effects when other devices in the local network use mdns too.
-
diff --git a/go.mod b/go.mod
index b15d8412c15..d71ad8dd651 100644
--- a/go.mod
+++ b/go.mod
@@ -13,7 +13,7 @@ require (
 	github.com/coreos/go-oidc v2.2.1+incompatible
 	github.com/coreos/go-oidc/v3 v3.9.0
 	github.com/cs3org/go-cs3apis v0.0.0-20231023073225-7748710e0781
-	github.com/cs3org/reva/v2 v2.17.1-0.20231219093515-da04bc32d9fb
+	github.com/cs3org/reva/v2 v2.17.1-0.20231218091701-6a3a91e35514
 	github.com/dhowden/tag v0.0.0-20230630033851-978a0926ee25
 	github.com/disintegration/imaging v1.6.2
 	github.com/dutchcoders/go-clamd v0.0.0-20170520113014-b970184f4d9e
@@ -61,7 +61,6 @@ require (
 	github.com/mna/pigeon v1.2.1
 	github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826
 	github.com/nats-io/nats-server/v2 v2.10.7
-	github.com/nats-io/nats.go v1.31.0
 	github.com/oklog/run v1.1.0
 	github.com/olekukonko/tablewriter v0.0.5
 	github.com/onsi/ginkgo v1.16.5
@@ -276,6 +275,7 @@ require (
 	github.com/modern-go/reflect2 v1.0.2 // indirect
 	github.com/mschoch/smat v0.2.0 // indirect
 	github.com/nats-io/jwt/v2 v2.5.3 // indirect
+	github.com/nats-io/nats.go v1.31.0 // indirect
 	github.com/nats-io/nkeys v0.4.6 // indirect
 	github.com/nats-io/nuid v1.0.1 // indirect
 	github.com/nxadm/tail v1.4.8 // indirect
diff --git a/go.sum b/go.sum
index 461b8725af4..1d77dc37b4b 100644
--- a/go.sum
+++ b/go.sum
@@ -1021,8 +1021,8 @@ github.com/crewjam/saml v0.4.14 h1:g9FBNx62osKusnFzs3QTN5L9CVA/Egfgm+stJShzw/c=
 github.com/crewjam/saml v0.4.14/go.mod h1:UVSZCf18jJkk6GpWNVqcyQJMD5HsRugBPf4I1nl2mME=
 github.com/cs3org/go-cs3apis v0.0.0-20231023073225-7748710e0781 h1:BUdwkIlf8IS2FasrrPg8gGPHQPOrQ18MS1Oew2tmGtY=
 github.com/cs3org/go-cs3apis v0.0.0-20231023073225-7748710e0781/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY=
-github.com/cs3org/reva/v2 v2.17.1-0.20231219093515-da04bc32d9fb h1:YH5k1nDJ5tm4gqUykeniDl83Bva5EMH8D2uA++M+ziY=
-github.com/cs3org/reva/v2 v2.17.1-0.20231219093515-da04bc32d9fb/go.mod h1:QW31Q1IQ9ZCJMFv3u8/SdHSyLfCcSVNcRbqIJj+Y+7o=
+github.com/cs3org/reva/v2 v2.17.1-0.20231218091701-6a3a91e35514 h1:ThhcxiI3Iq8sweI6ZGaEkTzFhum+ev0EGGnDiAK8eW8=
+github.com/cs3org/reva/v2 v2.17.1-0.20231218091701-6a3a91e35514/go.mod h1:QW31Q1IQ9ZCJMFv3u8/SdHSyLfCcSVNcRbqIJj+Y+7o=
 github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=
 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
 github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
diff --git a/ocis-pkg/natsjsregistry/options.go b/ocis-pkg/natsjsregistry/options.go
index a6e862a62a2..dfcda616a59 100644
--- a/ocis-pkg/natsjsregistry/options.go
+++ b/ocis-pkg/natsjsregistry/options.go
@@ -10,7 +10,6 @@ import (
 
 type storeOptionsKey struct{}
 type expiryKey struct{}
-type authKey struct{}
 
 // StoreOptions sets the options for the underlying store
 func StoreOptions(opts []store.Option) registry.Option {
@@ -31,13 +30,3 @@ func ServiceExpiry(t time.Duration) registry.Option {
 		o.Context = context.WithValue(o.Context, expiryKey{}, t)
 	}
 }
-
-// Authenticate sets the username/password for the nats connection
-func Authenticate(username, password string) registry.Option {
-	return func(o *registry.Options) {
-		if o.Context == nil {
-			o.Context = context.Background()
-		}
-		o.Context = context.WithValue(o.Context, authKey{}, []string{username, password})
-	}
-}
diff --git a/ocis-pkg/natsjsregistry/registry.go b/ocis-pkg/natsjsregistry/registry.go
index d751229b140..1685515a21a 100644
--- a/ocis-pkg/natsjsregistry/registry.go
+++ b/ocis-pkg/natsjsregistry/registry.go
@@ -8,7 +8,6 @@ import (
 	"time"
 
 	natsjskv "github.com/go-micro/plugins/v4/store/nats-js-kv"
-	"github.com/nats-io/nats.go"
 	"go-micro.dev/v4/registry"
 	"go-micro.dev/v4/store"
 	"go-micro.dev/v4/util/cmd"
@@ -134,11 +133,5 @@ func storeOptions(opts registry.Options) []store.Option {
 	if so, ok := opts.Context.Value(storeOptionsKey{}).([]store.Option); ok {
 		storeoptions = append(storeoptions, so...)
 	}
-	natsOptions := nats.GetDefaultOptions()
-	natsOptions.Name = "nats-js-kv-registry"
-	if auth, ok := opts.Context.Value(authKey{}).([]string); ok {
-		natsOptions.User = auth[0]
-		natsOptions.Password = auth[1]
-	}
-	return append(storeoptions, natsjskv.NatsOptions(natsOptions))
+	return storeoptions
 }
diff --git a/ocis-pkg/registry/registry.go b/ocis-pkg/registry/registry.go
index 3d1b2b80e3f..ed9ece2ae5d 100644
--- a/ocis-pkg/registry/registry.go
+++ b/ocis-pkg/registry/registry.go
@@ -1,7 +1,6 @@
 package registry
 
 import (
-	"fmt"
 	"os"
 	"strings"
 	"sync"
@@ -20,112 +19,72 @@ import (
 )
 
 const (
-	registryEnv         = "MICRO_REGISTRY"
-	registryAddressEnv  = "MICRO_REGISTRY_ADDRESS"
-	registryUsernameEnv = "MICRO_REGISTRY_AUTH_USERNAME"
-	registryPasswordEnv = "MICRO_REGISTRY_AUTH_PASSWORD"
+	registryEnv        = "MICRO_REGISTRY"
+	registryAddressEnv = "MICRO_REGISTRY_ADDRESS"
 )
 
 var (
-	_once sync.Once
-	_reg  mRegistry.Registry
+	once      sync.Once
+	regPlugin string
+	reg       mRegistry.Registry
 )
 
-// Config is the config for a registry
-type Config struct {
-	Type         string   `mapstructure:"type"`
-	Addresses    []string `mapstructure:"addresses"`
-	Username     string   `mapstructure:"username"`
-	Password     string   `mapstructure:"password"`
-	DisableCache bool     `mapstructure:"disable_cache"`
-}
-
-// Option allows configuring the registry
-type Option func(*Config)
-
-// Inmemory overrides env values to use an in-memory registry
-func Inmemory() Option {
-	return func(c *Config) {
-		c.Type = "memory"
+// Configure configures the registry
+func Configure(plugin string) {
+	if reg == nil {
+		regPlugin = plugin
 	}
 }
 
 // GetRegistry returns a configured micro registry based on Micro env vars.
 // It defaults to mDNS, so mind that systems with mDNS disabled by default (i.e SUSE) will have a hard time
 // and it needs to explicitly use etcd. Os awareness for providing a working registry out of the box should be done.
-func GetRegistry(opts ...Option) mRegistry.Registry {
-	_once.Do(func() {
-		cfg := getEnvs(opts...)
+func GetRegistry() mRegistry.Registry {
+	once.Do(func() {
+		addresses := strings.Split(os.Getenv(registryAddressEnv), ",")
+		// prefer env of setting from Configure()
+		plugin := os.Getenv(registryEnv)
+		if plugin == "" {
+			plugin = regPlugin
+		}
 
-		switch cfg.Type {
-		default:
-			fmt.Println("Attention: unknown registry type, using default nats-js-kv")
-			fallthrough
-		case "natsjs", "nats-js", "nats-js-kv": // for backwards compatibility - we will stick with one of those
-			_reg = natsjsregistry.NewRegistry(
-				mRegistry.Addrs(cfg.Addresses...),
-				natsjsregistry.Authenticate(cfg.Username, cfg.Password),
-			)
-		case "kubernetes":
-			_reg = kubernetesr.NewRegistry(
-				mRegistry.Addrs(cfg.Addresses...),
-			)
-		case "memory":
-			_reg = memr.NewRegistry()
-			cfg.DisableCache = true // no cache needed for in-memory registry
+		switch plugin {
 		case "nats":
-			fmt.Println("Attention: nats registry is deprecated, use nats-js-kv instead")
-			_reg = natsr.NewRegistry(
-				mRegistry.Addrs(cfg.Addresses...),
+			reg = natsr.NewRegistry(
+				mRegistry.Addrs(addresses...),
 				natsr.RegisterAction("put"),
 			)
+		case "kubernetes":
+			reg = kubernetesr.NewRegistry(
+				mRegistry.Addrs(addresses...),
+			)
 		case "etcd":
-			fmt.Println("Attention: etcd registry is deprecated, use nats-js-kv instead")
-			_reg = etcdr.NewRegistry(
-				mRegistry.Addrs(cfg.Addresses...),
+			reg = etcdr.NewRegistry(
+				mRegistry.Addrs(addresses...),
 			)
 		case "consul":
-			fmt.Println("Attention: consul registry is deprecated, use nats-js-kv instead")
-			_reg = consulr.NewRegistry(
-				mRegistry.Addrs(cfg.Addresses...),
+			reg = consulr.NewRegistry(
+				mRegistry.Addrs(addresses...),
+			)
+		case "memory":
+			reg = memr.NewRegistry()
+		case "natsjs":
+			reg = natsjsregistry.NewRegistry(
+				mRegistry.Addrs(addresses...),
 			)
-		case "mdns":
-			fmt.Println("Attention: mdns registry is deprecated, use nats-js-kv instead")
-			_reg = mdnsr.NewRegistry()
+		default:
+			reg = mdnsr.NewRegistry()
 		}
 
-		// Disable cache if wanted
-		if !cfg.DisableCache {
-			_reg = cache.New(_reg, cache.WithTTL(30*time.Second))
+		// No cache needed for in-memory registry
+		if plugin != "memory" {
+			reg = cache.New(reg, cache.WithTTL(30*time.Second))
 		}
 
 		// fixme: lazy initialization of reva registry, needs refactor to a explicit call per service
-		_ = rRegistry.Init(_reg)
+		_ = rRegistry.Init(reg)
 	})
 	// always use cached registry to prevent registry
 	// lookup for every request
-	return _reg
-}
-
-func getEnvs(opts ...Option) *Config {
-	cfg := &Config{
-		Type:      "nats-js-kv",
-		Addresses: []string{"127.0.0.1:9233"},
-		Username:  os.Getenv(registryUsernameEnv),
-		Password:  os.Getenv(registryPasswordEnv),
-	}
-
-	if s := os.Getenv(registryEnv); s != "" {
-		cfg.Type = s
-	}
-
-	if s := strings.Split(os.Getenv(registryAddressEnv), ","); len(s) > 0 {
-		cfg.Addresses = s
-	}
-
-	for _, o := range opts {
-		o(cfg)
-	}
-
-	return cfg
+	return reg
 }
diff --git a/ocis/pkg/command/server.go b/ocis/pkg/command/server.go
index 108038ce72d..60d450cf9e2 100644
--- a/ocis/pkg/command/server.go
+++ b/ocis/pkg/command/server.go
@@ -4,6 +4,7 @@ import (
 	"github.com/owncloud/ocis/v2/ocis-pkg/config"
 	"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
 	"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
+	"github.com/owncloud/ocis/v2/ocis-pkg/registry"
 	"github.com/owncloud/ocis/v2/ocis/pkg/register"
 	"github.com/owncloud/ocis/v2/ocis/pkg/runtime"
 	"github.com/urfave/cli/v2"
@@ -20,6 +21,7 @@ func Server(cfg *config.Config) *cli.Command {
 		},
 		Action: func(c *cli.Context) error {
 			// Prefer the in-memory registry as the default when running in single-binary mode
+			registry.Configure("memory")
 			r := runtime.New(cfg)
 			return r.Start()
 		},
diff --git a/services/antivirus/pkg/config/config.go b/services/antivirus/pkg/config/config.go
index 0ec79b25580..a5ab982efbe 100644
--- a/services/antivirus/pkg/config/config.go
+++ b/services/antivirus/pkg/config/config.go
@@ -53,8 +53,6 @@ type Events struct {
 	TLSInsecure          bool   `yaml:"tls_insecure" env:"OCIS_INSECURE;ANTIVIRUS_EVENTS_TLS_INSECURE" desc:"Whether to verify the server TLS certificates."`
 	TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_EVENTS_TLS_ROOT_CA_CERTIFICATE;ANTIVIRUS_EVENTS_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided ANTIVIRUS_EVENTS_TLS_INSECURE will be seen as false."`
 	EnableTLS            bool   `yaml:"enable_tls" env:"OCIS_EVENTS_ENABLE_TLS;ANTIVIRUS_EVENTS_ENABLE_TLS" desc:"Enable TLS for the connection to the events broker. The events broker is the ocis service which receives and delivers events between the services."`
-	AuthUsername         string `yaml:"username" env:"OCIS_EVENTS_AUTH_USERNAME;ANTIVIRUS_EVENTS_AUTH_USERNAME" desc:"The username to authenticate with the events broker. The events broker is the ocis service which receives and delivers events between the services."`
-	AuthPassword         string `yaml:"password" env:"OCIS_EVENTS_AUTH_PASSWORD;ANTIVIRUS_EVENTS_AUTH_PASSWORD" desc:"The password to authenticate with the events broker. The events broker is the ocis service which receives and delivers events between the services."`
 }
 
 // Scanner provides configuration options for the antivirusscanner
diff --git a/services/audit/pkg/config/config.go b/services/audit/pkg/config/config.go
index 0ee9e5493d4..8fd6cc2b629 100644
--- a/services/audit/pkg/config/config.go
+++ b/services/audit/pkg/config/config.go
@@ -29,8 +29,6 @@ type Events struct {
 	TLSInsecure          bool   `yaml:"tls_insecure" env:"OCIS_INSECURE;AUDIT_EVENTS_TLS_INSECURE" desc:"Whether to verify the server TLS certificates."`
 	TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_EVENTS_TLS_ROOT_CA_CERTIFICATE;AUDIT_EVENTS_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided AUDIT_EVENTS_TLS_INSECURE will be seen as false."`
 	EnableTLS            bool   `yaml:"enable_tls" env:"OCIS_EVENTS_ENABLE_TLS;AUDIT_EVENTS_ENABLE_TLS" desc:"Enable TLS for the connection to the events broker. The events broker is the ocis service which receives and delivers events between the services.."`
-	AuthUsername         string `yaml:"username" env:"OCIS_EVENTS_AUTH_USERNAME;AUDIT_EVENTS_AUTH_USERNAME" desc:"The username to authenticate with the events broker. The events broker is the ocis service which receives and delivers events between the services.."`
-	AuthPassword         string `yaml:"password" env:"OCIS_EVENTS_AUTH_PASSWORD;AUDIT_EVENTS_AUTH_PASSWORD" desc:"The password to authenticate with the events broker. The events broker is the ocis service which receives and delivers events between the services.."`
 }
 
 // Auditlog holds audit log information
diff --git a/services/clientlog/pkg/config/config.go b/services/clientlog/pkg/config/config.go
index 921dc273733..929950da905 100644
--- a/services/clientlog/pkg/config/config.go
+++ b/services/clientlog/pkg/config/config.go
@@ -35,8 +35,6 @@ type Events struct {
 	TLSInsecure          bool   `yaml:"tls_insecure" env:"OCIS_INSECURE;CLIENTLOG_EVENTS_TLS_INSECURE" desc:"Whether to verify the server TLS certificates."`
 	TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_EVENTS_TLS_ROOT_CA_CERTIFICATE;CLIENTLOG_EVENTS_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided NOTIFICATIONS_EVENTS_TLS_INSECURE will be seen as false."`
 	EnableTLS            bool   `yaml:"enable_tls" env:"OCIS_EVENTS_ENABLE_TLS;CLIENTLOG_EVENTS_ENABLE_TLS" desc:"Enable TLS for the connection to the events broker. The events broker is the ocis service which receives and delivers events between the services.."`
-	AuthUsername         string `yaml:"username" env:"OCIS_EVENTS_AUTH_USERNAME;CLIENTLOG_EVENTS_AUTH_USERNAME" desc:"The username to authenticate with the events broker. The events broker is the ocis service which receives and delivers events between the services.."`
-	AuthPassword         string `yaml:"password" env:"OCIS_EVENTS_AUTH_PASSWORD;CLIENTLOG_EVENTS_AUTH_PASSWORD" desc:"The password to authenticate with the events broker. The events broker is the ocis service which receives and delivers events between the services.."`
 }
 
 // TokenManager is the config for using the reva token manager
diff --git a/services/eventhistory/pkg/command/server.go b/services/eventhistory/pkg/command/server.go
index 3a942b177f7..da5e53df2bd 100644
--- a/services/eventhistory/pkg/command/server.go
+++ b/services/eventhistory/pkg/command/server.go
@@ -72,7 +72,6 @@ func Server(cfg *config.Config) *cli.Command {
 				microstore.Nodes(cfg.Store.Nodes...),
 				microstore.Database(cfg.Store.Database),
 				microstore.Table(cfg.Store.Table),
-				store.Authentication(cfg.Store.AuthUsername, cfg.Store.AuthPassword),
 			)
 
 			service := grpc.NewService(
diff --git a/services/eventhistory/pkg/config/config.go b/services/eventhistory/pkg/config/config.go
index 84ffa450605..efe297eb99c 100644
--- a/services/eventhistory/pkg/config/config.go
+++ b/services/eventhistory/pkg/config/config.go
@@ -37,14 +37,12 @@ type GRPCConfig struct {
 
 // Store configures the store to use
 type Store struct {
-	Store        string        `yaml:"store" env:"OCIS_PERSISTENT_STORE;EVENTHISTORY_STORE" desc:"The type of the store. Supported values are: 'memory', 'ocmem', 'etcd', 'redis', 'redis-sentinel', 'nats-js', 'noop'. See the text description for details."`
-	Nodes        []string      `yaml:"nodes" env:"OCIS_PERSISTENT_STORE_NODES;EVENTHISTORY_STORE_NODES" desc:"A list of nodes to access the configured store. This has no effect when 'memory' or 'ocmem' stores are configured. Note that the behaviour how nodes are used is dependent on the library of the configured store. See the Environment Variable Types description for more details."`
-	Database     string        `yaml:"database" env:"EVENTHISTORY_STORE_DATABASE" desc:"The database name the configured store should use."`
-	Table        string        `yaml:"table" env:"EVENTHISTORY_STORE_TABLE" desc:"The database table the store should use."`
-	TTL          time.Duration `yaml:"ttl" env:"OCIS_PERSISTENT_STORE_TTL;EVENTHISTORY_STORE_TTL" desc:"Time to live for events in the store. Defaults to '336h' (2 weeks). See the Environment Variable Types description for more details."`
-	Size         int           `yaml:"size" env:"OCIS_PERSISTENT_STORE_SIZE;EVENTHISTORY_STORE_SIZE" desc:"The maximum quantity of items in the store. Only applies when store type 'ocmem' is configured. Defaults to 512 which is derived and used from the ocmem package though no explicit default was set."`
-	AuthUsername string        `yaml:"username" env:"OCIS_PERSISTENT_STORE_AUTH_USERNAME;EVENTHISTORY_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured."`
-	AuthPassword string        `yaml:"password" env:"OCIS_PERSISTENT_STORE_AUTH_PASSWORD;EVENTHISTORY_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured."`
+	Store    string        `yaml:"store" env:"OCIS_PERSISTENT_STORE;EVENTHISTORY_STORE" desc:"The type of the store. Supported values are: 'memory', 'ocmem', 'etcd', 'redis', 'redis-sentinel', 'nats-js', 'noop'. See the text description for details."`
+	Nodes    []string      `yaml:"nodes" env:"OCIS_PERSISTENT_STORE_NODES;EVENTHISTORY_STORE_NODES" desc:"A list of nodes to access the configured store. This has no effect when 'memory' or 'ocmem' stores are configured. Note that the behaviour how nodes are used is dependent on the library of the configured store. See the Environment Variable Types description for more details."`
+	Database string        `yaml:"database" env:"EVENTHISTORY_STORE_DATABASE" desc:"The database name the configured store should use."`
+	Table    string        `yaml:"table" env:"EVENTHISTORY_STORE_TABLE" desc:"The database table the store should use."`
+	TTL      time.Duration `yaml:"ttl" env:"OCIS_PERSISTENT_STORE_TTL;EVENTHISTORY_STORE_TTL" desc:"Time to live for events in the store. Defaults to '336h' (2 weeks). See the Environment Variable Types description for more details."`
+	Size     int           `yaml:"size" env:"OCIS_PERSISTENT_STORE_SIZE;EVENTHISTORY_STORE_SIZE" desc:"The maximum quantity of items in the store. Only applies when store type 'ocmem' is configured. Defaults to 512 which is derived and used from the ocmem package though no explicit default was set."`
 }
 
 // Events combines the configuration options for the event bus.
@@ -54,6 +52,4 @@ type Events struct {
 	TLSInsecure          bool   `yaml:"tls_insecure" env:"OCIS_INSECURE;EVENTHISTORY_EVENTS_TLS_INSECURE" desc:"Whether to verify the server TLS certificates."`
 	TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_EVENTS_TLS_ROOT_CA_CERTIFICATE;EVENTHISTORY_EVENTS_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. Will be seen as empty if NOTIFICATIONS_EVENTS_TLS_INSECURE is provided."`
 	EnableTLS            bool   `yaml:"enable_tls" env:"OCIS_EVENTS_ENABLE_TLS;EVENTHISTORY_EVENTS_ENABLE_TLS" desc:"Enable TLS for the connection to the events broker. The events broker is the ocis service which receives and delivers events between the services.."`
-	AuthUsername         string `yaml:"username" env:"OCIS_EVENTS_AUTH_USERNAME;EVENTHISTORY_EVENTS_AUTH_USERNAME" desc:"The username to authenticate with the events broker. The events broker is the ocis service which receives and delivers events between the services.."`
-	AuthPassword         string `yaml:"password" env:"OCIS_EVENTS_AUTH_PASSWORD;EVENTHISTORY_EVENTS_AUTH_PASSWORD" desc:"The password to authenticate with the events broker. The events broker is the ocis service which receives and delivers events between the services.."`
 }
diff --git a/services/frontend/pkg/config/config.go b/services/frontend/pkg/config/config.go
index 96f295e2cfc..80aa6691cd0 100644
--- a/services/frontend/pkg/config/config.go
+++ b/services/frontend/pkg/config/config.go
@@ -172,8 +172,6 @@ type Events struct {
 	TLSInsecure          bool   `yaml:"tls_insecure" env:"OCIS_INSECURE;FRONTEND_EVENTS_TLS_INSECURE" desc:"Whether to verify the server TLS certificates."`
 	TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"FRONTEND_EVENTS_TLS_ROOT_CA_CERTIFICATE;OCS_EVENTS_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided NOTIFICATIONS_EVENTS_TLS_INSECURE will be seen as false."`
 	EnableTLS            bool   `yaml:"enable_tls" env:"OCIS_EVENTS_ENABLE_TLS;FRONTEND_EVENTS_ENABLE_TLS" desc:"Enable TLS for the connection to the events broker. The events broker is the ocis service which receives and delivers events between the services.."`
-	AuthUsername         string `yaml:"username" env:"OCIS_EVENTS_AUTH_USERNAME;FRONTEND_EVENTS_AUTH_USERNAME" desc:"The username to authenticate with the events broker. The events broker is the ocis service which receives and delivers events between the services.."`
-	AuthPassword         string `yaml:"password" env:"OCIS_EVENTS_AUTH_PASSWORD;FRONTEND_EVENTS_AUTH_PASSWORD" desc:"The password to authenticate with the events broker. The events broker is the ocis service which receives and delivers events between the services.."`
 }
 
 // ServiceAccount is the configuration for the used service account
diff --git a/services/gateway/pkg/config/config.go b/services/gateway/pkg/config/config.go
index e676f59ec4b..4240be1b80d 100644
--- a/services/gateway/pkg/config/config.go
+++ b/services/gateway/pkg/config/config.go
@@ -70,7 +70,7 @@ type Debug struct {
 }
 
 type GRPCConfig struct {
-	Addr      string                 `yaml:"addr" env:"OCIS_GATEWAY_GRPC_ADDR;GATEWAY_GRPC_ADDR" desc:"The bind address of the GRPC service."`
+	Addr      string                 `yaml:"addr" env:"GATEWAY_GRPC_ADDR" desc:"The bind address of the GRPC service."`
 	TLS       *shared.GRPCServiceTLS `yaml:"tls"`
 	Namespace string                 `yaml:"-"`
 	Protocol  string                 `yaml:"protocol" env:"GATEWAY_GRPC_PROTOCOL" desc:"The transport protocol of the GRPC service."`
diff --git a/services/graph/pkg/config/cache.go b/services/graph/pkg/config/cache.go
index d33980ac699..f6923ce4dbd 100644
--- a/services/graph/pkg/config/cache.go
+++ b/services/graph/pkg/config/cache.go
@@ -11,6 +11,4 @@ type Cache struct {
 	TTL                time.Duration `yaml:"ttl" env:"OCIS_CACHE_TTL;GRAPH_CACHE_TTL" desc:"Time to live for cache records in the graph. Defaults to '336h' (2 weeks). See the Environment Variable Types description for more details."`
 	Size               int           `yaml:"size" env:"OCIS_CACHE_SIZE;GRAPH_CACHE_SIZE" desc:"The maximum quantity of items in the store. Only applies when store type 'ocmem' is configured. Defaults to 512 which is derived from the ocmem package though not exclicitely set as default."`
 	DisablePersistence bool          `yaml:"disable_persistence" env:"OCIS_CACHE_DISABLE_PERSISTENCE;GRAPH_CACHE_DISABLE_PERSISTENCE" desc:"Disables persistence of the cache. Only applies when store type 'nats-js-kv' is configured. Defaults to false."`
-	AuthUsername       string        `yaml:"username" env:"OCIS_CACHE_AUTH_USERNAME;GRAPH_CACHE_AUTH_USERNAME" desc:"The username to authenticate with the cache. Only applies when store type 'nats-js-kv' is configured."`
-	AuthPassword       string        `yaml:"password" env:"OCIS_CACHE_AUTH_PASSWORD;GRAPH_CACHE_AUTH_PASSWORD" desc:"The password to authenticate with the cache. Only applies when store type 'nats-js-kv' is configured."`
 }
diff --git a/services/graph/pkg/config/config.go b/services/graph/pkg/config/config.go
index c6518e228f7..27a151bcf83 100644
--- a/services/graph/pkg/config/config.go
+++ b/services/graph/pkg/config/config.go
@@ -121,8 +121,6 @@ type Events struct {
 	TLSInsecure          bool   `yaml:"tls_insecure" env:"OCIS_INSECURE;GRAPH_EVENTS_TLS_INSECURE" desc:"Whether to verify the server TLS certificates."`
 	TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_EVENTS_TLS_ROOT_CA_CERTIFICATE;GRAPH_EVENTS_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided GRAPH_EVENTS_TLS_INSECURE will be seen as false."`
 	EnableTLS            bool   `yaml:"enable_tls" env:"OCIS_EVENTS_ENABLE_TLS;GRAPH_EVENTS_ENABLE_TLS" desc:"Enable TLS for the connection to the events broker. The events broker is the ocis service which receives and delivers events between the services.."`
-	AuthUsername         string `yaml:"username" env:"OCIS_EVENTS_AUTH_USERNAME;GRAPH_EVENTS_AUTH_USERNAME" desc:"The username to authenticate with the events broker. The events broker is the ocis service which receives and delivers events between the services.."`
-	AuthPassword         string `yaml:"password" env:"OCIS_EVENTS_AUTH_PASSWORD;GRAPH_EVENTS_AUTH_PASSWORD" desc:"The password to authenticate with the events broker. The events broker is the ocis service which receives and delivers events between the services.."`
 }
 
 // CORS defines the available cors configuration.
diff --git a/services/graph/pkg/service/v0/service.go b/services/graph/pkg/service/v0/service.go
index e64e41a3d8c..7ec332e55d7 100644
--- a/services/graph/pkg/service/v0/service.go
+++ b/services/graph/pkg/service/v0/service.go
@@ -187,7 +187,6 @@ func NewService(opts ...Option) (Graph, error) {
 			microstore.Database(options.Config.Cache.Database),
 			microstore.Table(options.Config.Cache.Table),
 			store.DisablePersistence(options.Config.Cache.DisablePersistence),
-			store.Authentication(options.Config.Cache.AuthUsername, options.Config.Cache.AuthPassword),
 		}
 		m := roles.NewManager(
 			roles.StoreOptions(storeOptions),
diff --git a/services/notifications/pkg/config/config.go b/services/notifications/pkg/config/config.go
index 8ea2ec17432..324ab210cea 100644
--- a/services/notifications/pkg/config/config.go
+++ b/services/notifications/pkg/config/config.go
@@ -56,8 +56,6 @@ type Events struct {
 	TLSInsecure          bool   `yaml:"tls_insecure" env:"OCIS_INSECURE;NOTIFICATIONS_EVENTS_TLS_INSECURE" desc:"Whether to verify the server TLS certificates."`
 	TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_EVENTS_TLS_ROOT_CA_CERTIFICATE;NOTIFICATIONS_EVENTS_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided NOTIFICATIONS_EVENTS_TLS_INSECURE will be seen as false."`
 	EnableTLS            bool   `yaml:"enable_tls" env:"OCIS_EVENTS_ENABLE_TLS;NOTIFICATIONS_EVENTS_ENABLE_TLS" desc:"Enable TLS for the connection to the events broker. The events broker is the ocis service which receives and delivers events between the services.."`
-	AuthUsername         string `yaml:"username" env:"OCIS_EVENTS_AUTH_USERNAME;NOTIFICATIONS_EVENTS_AUTH_USERNAME" desc:"The username to authenticate with the events broker. The events broker is the ocis service which receives and delivers events between the services.."`
-	AuthPassword         string `yaml:"password" env:"OCIS_EVENTS_AUTH_PASSWORD;NOTIFICATIONS_EVENTS_AUTH_PASSWORD" desc:"The password to authenticate with the events broker. The events broker is the ocis service which receives and delivers events between the services.."`
 }
 
 // ServiceAccount is the configuration for the used service account
diff --git a/services/policies/pkg/config/config.go b/services/policies/pkg/config/config.go
index bf502c8c447..45e76e9e182 100644
--- a/services/policies/pkg/config/config.go
+++ b/services/policies/pkg/config/config.go
@@ -59,8 +59,6 @@ type Events struct {
 	TLSInsecure          bool   `yaml:"tls_insecure" env:"OCIS_INSECURE;POLICIES_EVENTS_TLS_INSECURE" desc:"Whether the server should skip the client certificate verification during the TLS handshake."`
 	TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_EVENTS_TLS_ROOT_CA_CERTIFICATE;POLICIES_EVENTS_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided POLICIES_EVENTS_TLS_INSECURE will be seen as false."`
 	EnableTLS            bool   `yaml:"enable_tls" env:"OCIS_EVENTS_ENABLE_TLS;POLICIES_EVENTS_ENABLE_TLS" desc:"Enable TLS for the connection to the events broker. The events broker is the ocis service which receives and delivers events between the services."`
-	AuthUsername         string `yaml:"username" env:"OCIS_EVENTS_AUTH_USERNAME;POLICIES_EVENTS_AUTH_USERNAME" desc:"The username to authenticate with the events broker. The events broker is the ocis service which receives and delivers events between the services."`
-	AuthPassword         string `yaml:"password" env:"OCIS_EVENTS_AUTH_PASSWORD;POLICIES_EVENTS_AUTH_PASSWORD" desc:"The password to authenticate with the events broker. The events broker is the ocis service which receives and delivers events between the services."`
 }
 
 // Log defines the available log configuration.
diff --git a/services/postprocessing/pkg/command/server.go b/services/postprocessing/pkg/command/server.go
index f8b9095cd91..5e1afecc32b 100644
--- a/services/postprocessing/pkg/command/server.go
+++ b/services/postprocessing/pkg/command/server.go
@@ -66,7 +66,6 @@ func Server(cfg *config.Config) *cli.Command {
 					microstore.Nodes(cfg.Store.Nodes...),
 					microstore.Database(cfg.Store.Database),
 					microstore.Table(cfg.Store.Table),
-					store.Authentication(cfg.Store.AuthUsername, cfg.Store.AuthPassword),
 				)
 
 				svc, err := service.NewPostprocessingService(ctx, bus, logger, st, traceProvider, cfg.Postprocessing)
diff --git a/services/postprocessing/pkg/config/config.go b/services/postprocessing/pkg/config/config.go
index 5cd6168dee0..c7e75b120a1 100644
--- a/services/postprocessing/pkg/config/config.go
+++ b/services/postprocessing/pkg/config/config.go
@@ -41,8 +41,6 @@ type Events struct {
 	TLSInsecure          bool   `yaml:"tls_insecure" env:"OCIS_INSECURE;POSTPROCESSING_EVENTS_TLS_INSECURE" desc:"Whether the ocis server should skip the client certificate verification during the TLS handshake."`
 	TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_EVENTS_TLS_ROOT_CA_CERTIFICATE;POSTPROCESSING_EVENTS_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided POSTPROCESSING_EVENTS_TLS_INSECURE will be seen as false."`
 	EnableTLS            bool   `yaml:"enable_tls" env:"OCIS_EVENTS_ENABLE_TLS;POSTPROCESSING_EVENTS_ENABLE_TLS" desc:"Enable TLS for the connection to the events broker. The events broker is the ocis service which receives and delivers events between the services."`
-	AuthUsername         string `yaml:"username" env:"OCIS_EVENTS_AUTH_USERNAME;POSTPROCESSING_EVENTS_AUTH_USERNAME" desc:"The username to authenticate with the events broker. The events broker is the ocis service which receives and delivers events between the services."`
-	AuthPassword         string `yaml:"password" env:"OCIS_EVENTS_AUTH_PASSWORD;POSTPROCESSING_EVENTS_AUTH_PASSWORD" desc:"The password to authenticate with the events broker. The events broker is the ocis service which receives and delivers events between the services."`
 }
 
 // Debug defines the available debug configuration.
@@ -55,12 +53,10 @@ type Debug struct {
 
 // Store configures the store to use
 type Store struct {
-	Store        string        `yaml:"store" env:"OCIS_PERSISTENT_STORE;POSTPROCESSING_STORE" desc:"The type of the store. Supported values are: 'memory', 'ocmem', 'etcd', 'redis', 'redis-sentinel', 'nats-js', 'noop'. See the text description for details."`
-	Nodes        []string      `yaml:"nodes" env:"OCIS_PERSISTENT_STORE_NODES;POSTPROCESSING_STORE_NODES" desc:"A list of nodes to access the configured store. This has no effect when 'memory' or 'ocmem' stores are configured. Note that the behaviour how nodes are used is dependent on the library of the configured store. See the Environment Variable Types description for more details."`
-	Database     string        `yaml:"database" env:"POSTPROCESSING_STORE_DATABASE" desc:"The database name the configured store should use."`
-	Table        string        `yaml:"table" env:"POSTPROCESSING_STORE_TABLE" desc:"The database table the store should use."`
-	TTL          time.Duration `yaml:"ttl" env:"OCIS_PERSISTENT_STORE_TTL;POSTPROCESSING_STORE_TTL" desc:"Time to live for events in the store. See the Environment Variable Types description for more details."`
-	Size         int           `yaml:"size" env:"OCIS_PERSISTENT_STORE_SIZE;POSTPROCESSING_STORE_SIZE" desc:"The maximum quantity of items in the store. Only applies when store type 'ocmem' is configured. Defaults to 512 which is derived from the ocmem package though not exclicitely set as default."`
-	AuthUsername string        `yaml:"username" env:"OCIS_PERSISTENT_STORE_AUTH_USERNAME;POSTPROCESSING_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured."`
-	AuthPassword string        `yaml:"password" env:"OCIS_PERSISTENT_STORE_AUTH_PASSWORD;POSTPROCESSING_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured."`
+	Store    string        `yaml:"store" env:"OCIS_PERSISTENT_STORE;POSTPROCESSING_STORE" desc:"The type of the store. Supported values are: 'memory', 'ocmem', 'etcd', 'redis', 'redis-sentinel', 'nats-js', 'noop'. See the text description for details."`
+	Nodes    []string      `yaml:"nodes" env:"OCIS_PERSISTENT_STORE_NODES;POSTPROCESSING_STORE_NODES" desc:"A list of nodes to access the configured store. This has no effect when 'memory' or 'ocmem' stores are configured. Note that the behaviour how nodes are used is dependent on the library of the configured store. See the Environment Variable Types description for more details."`
+	Database string        `yaml:"database" env:"POSTPROCESSING_STORE_DATABASE" desc:"The database name the configured store should use."`
+	Table    string        `yaml:"table" env:"POSTPROCESSING_STORE_TABLE" desc:"The database table the store should use."`
+	TTL      time.Duration `yaml:"ttl" env:"OCIS_PERSISTENT_STORE_TTL;POSTPROCESSING_STORE_TTL" desc:"Time to live for events in the store. See the Environment Variable Types description for more details."`
+	Size     int           `yaml:"size" env:"OCIS_PERSISTENT_STORE_SIZE;POSTPROCESSING_STORE_SIZE" desc:"The maximum quantity of items in the store. Only applies when store type 'ocmem' is configured. Defaults to 512 which is derived from the ocmem package though not exclicitely set as default."`
 }
diff --git a/services/proxy/pkg/command/server.go b/services/proxy/pkg/command/server.go
index fc8d9225d01..c684af09ac4 100644
--- a/services/proxy/pkg/command/server.go
+++ b/services/proxy/pkg/command/server.go
@@ -63,7 +63,6 @@ func Server(cfg *config.Config) *cli.Command {
 				microstore.Database(cfg.OIDC.UserinfoCache.Database),
 				microstore.Table(cfg.OIDC.UserinfoCache.Table),
 				store.DisablePersistence(cfg.OIDC.UserinfoCache.DisablePersistence),
-				store.Authentication(cfg.OIDC.UserinfoCache.AuthUsername, cfg.OIDC.UserinfoCache.AuthPassword),
 			)
 
 			logger := logging.Configure(cfg.Service.Name, cfg.Log)
diff --git a/services/proxy/pkg/config/config.go b/services/proxy/pkg/config/config.go
index 8ddb8c6ff43..4ecbcef79ea 100644
--- a/services/proxy/pkg/config/config.go
+++ b/services/proxy/pkg/config/config.go
@@ -130,8 +130,6 @@ type Cache struct {
 	TTL                time.Duration `yaml:"ttl" env:"OCIS_CACHE_TTL;PROXY_OIDC_USERINFO_CACHE_TTL" desc:"Default time to live for user info in the user info cache. Only applied when access tokens has no expiration. See the Environment Variable Types description for more details."`
 	Size               int           `yaml:"size" env:"OCIS_CACHE_SIZE;PROXY_OIDC_USERINFO_CACHE_SIZE" desc:"The maximum quantity of items in the user info cache. Only applies when store type 'ocmem' is configured. Defaults to 512 which is derived from the ocmem package though not exclicitely set as default."`
 	DisablePersistence bool          `yaml:"disable_persistence" env:"OCIS_CACHE_DISABLE_PERSISTENCE;PROXY_OIDC_USERINFO_CACHE_DISABLE_PERSISTENCE" desc:"Disables persistence of the cache. Only applies when store type 'nats-js-kv' is configured. Defaults to false."`
-	AuthUsername       string        `yaml:"username" env:"OCIS_CACHE_AUTH_USERNAME;PROXY_OIDC_USERINFO_CACHE_AUTH_USERNAME" desc:"The username to authenticate with the cache. Only applies when store type 'nats-js-kv' is configured."`
-	AuthPassword       string        `yaml:"password" env:"OCIS_CACHE_AUTH_PASSWORD;PROXY_OIDC_USERINFO_CACHE_AUTH_PASSWORD" desc:"The password to authenticate with the cache. Only applies when store type 'nats-js-kv' is configured."`
 }
 
 // RoleAssignment contains the configuration for how to assign roles to users during login
diff --git a/services/search/pkg/config/search.go b/services/search/pkg/config/search.go
index c7461c65571..8bfe2fa4880 100644
--- a/services/search/pkg/config/search.go
+++ b/services/search/pkg/config/search.go
@@ -11,6 +11,4 @@ type Events struct {
 	TLSInsecure          bool   `yaml:"tls_insecure" env:"OCIS_INSECURE;SEARCH_EVENTS_TLS_INSECURE" desc:"Whether to verify the server TLS certificates."`
 	TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_EVENTS_TLS_ROOT_CA_CERTIFICATE;SEARCH_EVENTS_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided SEARCH_EVENTS_TLS_INSECURE will be seen as false."`
 	EnableTLS            bool   `yaml:"enable_tls" env:"OCIS_EVENTS_ENABLE_TLS;SEARCH_EVENTS_ENABLE_TLS" desc:"Enable TLS for the connection to the events broker. The events broker is the ocis service which receives and delivers events between the services."`
-	AuthUsername         string `yaml:"username" env:"OCIS_EVENTS_AUTH_USERNAME;SEARCH_EVENTS_AUTH_USERNAME" desc:"The username to authenticate with the events broker. The events broker is the ocis service which receives and delivers events between the services."`
-	AuthPassword         string `yaml:"password" env:"OCIS_EVENTS_AUTH_PASSWORD;SEARCH_EVENTS_AUTH_PASSWORD" desc:"The password to authenticate with the events broker. The events broker is the ocis service which receives and delivers events between the services."`
 }
diff --git a/services/search/pkg/service/grpc/v0/service.go b/services/search/pkg/service/grpc/v0/service.go
index 8501ffffa44..1c6fb41c77f 100644
--- a/services/search/pkg/service/grpc/v0/service.go
+++ b/services/search/pkg/service/grpc/v0/service.go
@@ -81,8 +81,6 @@ func NewHandler(opts ...Option) (searchsvc.SearchProviderHandler, func(), error)
 		EnableTLS:            cfg.Events.EnableTLS,
 		TLSInsecure:          cfg.Events.TLSInsecure,
 		TLSRootCACertificate: cfg.Events.TLSRootCACertificate,
-		AuthUsername:         cfg.Events.AuthUsername,
-		AuthPassword:         cfg.Events.AuthPassword,
 	})
 	if err != nil {
 		return nil, teardown, err
diff --git a/services/settings/pkg/config/config.go b/services/settings/pkg/config/config.go
index dfdefe956ac..2a4b4bd0820 100644
--- a/services/settings/pkg/config/config.go
+++ b/services/settings/pkg/config/config.go
@@ -65,6 +65,4 @@ type Cache struct {
 	TTL                time.Duration `yaml:"ttl" env:"OCIS_CACHE_TTL;SETTINGS_CACHE_TTL" desc:"Default time to live for entries in the cache. Only applied when access tokens has no expiration. See the Environment Variable Types description for more details."`
 	Size               int           `yaml:"size" env:"OCIS_CACHE_SIZE;SETTINGS_CACHE_SIZE" desc:"The maximum quantity of items in the cache. Only applies when store type 'ocmem' is configured. Defaults to 512 which is derived from the ocmem package though not exclicitely set as default."`
 	DisablePersistence bool          `yaml:"disable_persistence" env:"OCIS_CACHE_DISABLE_PERSISTENCE;SETTINGS_CACHE_DISABLE_PERSISTENCE" desc:"Disables persistence of the cache. Only applies when store type 'nats-js-kv' is configured. Defaults to false."`
-	AuthUsername       string        `yaml:"username" env:"OCIS_CACHE_AUTH_USERNAME;SETTINGS_CACHE_AUTH_USERNAME" desc:"The username to authenticate with the cache. Only applies when store type 'nats-js-kv' is configured."`
-	AuthPassword       string        `yaml:"password" env:"OCIS_CACHE_AUTH_PASSWORD;SETTINGS_CACHE_AUTH_PASSWORD" desc:"The password to authenticate with the cache. Only applies when store type 'nats-js-kv' is configured."`
 }
diff --git a/services/settings/pkg/store/defaults/defaults.go b/services/settings/pkg/store/defaults/defaults.go
index 91a7ea871a7..9428d3f7c79 100644
--- a/services/settings/pkg/store/defaults/defaults.go
+++ b/services/settings/pkg/store/defaults/defaults.go
@@ -296,6 +296,14 @@ var languageSetting = settingsmsg.Setting_SingleChoiceValue{
 				},
 				DisplayValue: "Türkçe",
 			},
+			{
+				Value: &settingsmsg.ListOptionValue{
+					Option: &settingsmsg.ListOptionValue_StringValue{
+						StringValue: "zh",
+					},
+				},
+				DisplayValue: "汉语",
+			},
 		},
 	},
 }
diff --git a/services/settings/pkg/store/metadata/cache.go b/services/settings/pkg/store/metadata/cache.go
index 80ebd02a5d0..4ded68c1f03 100644
--- a/services/settings/pkg/store/metadata/cache.go
+++ b/services/settings/pkg/store/metadata/cache.go
@@ -140,7 +140,6 @@ func (c *CachedMDC) Init(ctx context.Context, id string) error {
 		microstore.Database(c.cfg.Metadata.Cache.Database),
 		microstore.Table(c.cfg.Metadata.Cache.DirectoryTable),
 		store.DisablePersistence(c.cfg.Metadata.Cache.DisablePersistence),
-		store.Authentication(c.cfg.Metadata.Cache.AuthUsername, c.cfg.Metadata.Cache.AuthPassword),
 	)
 	c.filesCache = store.Create(
 		store.Store(c.cfg.Metadata.Cache.Store),
@@ -150,7 +149,6 @@ func (c *CachedMDC) Init(ctx context.Context, id string) error {
 		microstore.Database(c.cfg.Metadata.Cache.Database),
 		microstore.Table(c.cfg.Metadata.Cache.FileTable),
 		store.DisablePersistence(c.cfg.Metadata.Cache.DisablePersistence),
-		store.Authentication(c.cfg.Metadata.Cache.AuthUsername, c.cfg.Metadata.Cache.AuthPassword),
 	)
 	return c.next.Init(ctx, id)
 }
diff --git a/services/sse/pkg/config/config.go b/services/sse/pkg/config/config.go
index 1401be166f0..aa4f2031cd5 100644
--- a/services/sse/pkg/config/config.go
+++ b/services/sse/pkg/config/config.go
@@ -51,8 +51,6 @@ type Events struct {
 	TLSInsecure          bool   `yaml:"tls_insecure" env:"OCIS_INSECURE;SSE_EVENTS_TLS_INSECURE" desc:"Whether to verify the server TLS certificates."`
 	TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_EVENTS_TLS_ROOT_CA_CERTIFICATE;SSE_EVENTS_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided SSE_EVENTS_TLS_INSECURE will be seen as false."`
 	EnableTLS            bool   `yaml:"enable_tls" env:"OCIS_EVENTS_ENABLE_TLS;SSE_EVENTS_ENABLE_TLS" desc:"Enable TLS for the connection to the events broker. The events broker is the ocis service which receives and delivers events between the services."`
-	AuthUsername         string `yaml:"username" env:"OCIS_EVENTS_AUTH_USERNAME;SSE_EVENTS_AUTH_USERNAME" desc:"The username to authenticate with the events broker. The events broker is the ocis service which receives and delivers events between the services."`
-	AuthPassword         string `yaml:"password" env:"OCIS_EVENTS_AUTH_PASSWORD;SSE_EVENTS_AUTH_PASSWORD" desc:"The password to authenticate with the events broker. The events broker is the ocis service which receives and delivers events between the services."`
 }
 
 // CORS defines the available cors configuration.
diff --git a/services/storage-users/README.md b/services/storage-users/README.md
index e89cbd30a91..1cd9ac1c5d4 100644
--- a/services/storage-users/README.md
+++ b/services/storage-users/README.md
@@ -78,13 +78,12 @@ Cleaned uploads:
 
 <!-- referencing: https://github.com/owncloud/ocis/pull/5500 -->
 
-This command is about the trash-bin to get an overview of items, restore items and purging old items of `project` spaces (spaces that have been created manually) and `personal` spaces.
+This command is about purging old trash-bin items of `project` spaces (spaces that have been created manually) and `personal` spaces.
 
 ```bash
 ocis storage-users trash-bin <command>
 ```
 
-#### Purge-expired
 ```plaintext
 COMMANDS:
    purge-expired     Purge all expired items from the trashbin
@@ -98,66 +97,6 @@ The configuration for the `purge-expired` command is done by using the following
 
 *   `STORAGE_USERS_PURGE_TRASH_BIN_PROJECT_DELETE_BEFORE` has a default value of `30 days`, which means the command will delete all files older than `30 days`. The value is human-readable, valid values are `24h`, `60m`, `60s` etc. `0` is equivalent to disable and prevents the deletion of `project space` trash-bin files.
 
-#### List and Restore Trash-Bins Items
-
-To authenticate the cli command use `OCIS_SERVICE_ACCOUNT_SECRET=<acc-secret>` and `OCIS_SERVICE_ACCOUNT_ID=<acc-id>`. The `storage-users` cli tool uses the default address to establish the connection to the `gateway` service. If the connection is failed check your custom `gateway`
-service `GATEWAY_GRPC_ADDR` configuration and set the same address to `storage-users` variable `OCIS_GATEWAY_GRPC_ADDR` or `STORAGE_USERS_GATEWAY_GRPC_ADDR`. The variable `STORAGE_USERS_CLI_MAX_ATTEMPTS_RENAME_FILE`
-defines a maximum number of attempts to rename a file when the user restores the file with `--option keep-both` to existing destination with the same name.
-
-The ID sources:
--   personal 'spaceID' in a `https://{host}/graph/v1.0/me/drives?$filter=driveType+eq+personal`
--   project 'spaceID' in a `https://{host}/graph/v1.0/me/drives?$filter=driveType+eq+project`
-
-```bash
-NAME:
-   ocis storage-users trash-bin list - Print a list of all trash-bin items of a space.
-
-USAGE:
-   ocis storage-users trash-bin list command [command options] ['spaceID' required]
-
-COMMANDS:
-   help, h  Shows a list of commands or help for one command
-
-OPTIONS:
-   --verbose, -v  Get more verbose output (default: false)
-   --help, -h     show help
-
-```
-
-```bash
-NAME:
-   ocis storage-users trash-bin restore-all - Restore all trash-bin items for a space.
-
-USAGE:
-   ocis storage-users trash-bin restore-all command [command options] ['spaceID' required]
-
-COMMANDS:
-   help, h  Shows a list of commands or help for one command
-
-OPTIONS:
-   --option value, -o value  The restore option defines the behavior for a file to be restored, where the file name already already exists in the target space. Supported values are: 'skip', 'replace' and 'keep-both'. (default: The default value is 'skip' overwriting an existing file)
-   --verbose, -v             Get more verbose output (default: false)
-   --yes, -y                 Automatic yes to prompts. Assume 'yes' as answer to all prompts and run non-interactively. (default: false)
-   --help, -h                show help
-
-```
-
-```bash
-NAME:
-   ocis storage-users trash-bin restore - Restore a trash-bin item by ID.
-
-USAGE:
-   ocis storage-users trash-bin restore command [command options] ['spaceID' required] ['itemID' required]
-
-COMMANDS:
-   help, h  Shows a list of commands or help for one command
-
-OPTIONS:
-   --option value, -o value  The restore option defines the behavior for a file to be restored, where the file name already already exists in the target space. Supported values are: 'skip', 'replace' and 'keep-both'. (default: The default value is 'skip' overwriting an existing file)
-   --verbose, -v             Get more verbose output (default: false)
-   --help, -h                show help
-```
-
 ## Caching
 
 The `storage-users` service caches stat, metadata and uuids of files and folders via the configured store in `STORAGE_USERS_STAT_CACHE_STORE`, `STORAGE_USERS_FILEMETADATA_CACHE_STORE` and `STORAGE_USERS_ID_CACHE_STORE`. Possible stores are:
diff --git a/services/storage-users/pkg/command/trash_bin.go b/services/storage-users/pkg/command/trash_bin.go
index dcdb079594f..8489ff90bc2 100644
--- a/services/storage-users/pkg/command/trash_bin.go
+++ b/services/storage-users/pkg/command/trash_bin.go
@@ -1,59 +1,16 @@
 package command
 
 import (
-	"context"
-	"fmt"
-	"os"
-	"path"
-	"path/filepath"
-	"strconv"
-	"strings"
 	"time"
 
-	gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1"
-	rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1"
-	provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
 	"github.com/cs3org/reva/v2/pkg/events"
-	"github.com/cs3org/reva/v2/pkg/rgrpc/todo/pool"
-	"github.com/cs3org/reva/v2/pkg/storagespace"
-	"github.com/cs3org/reva/v2/pkg/utils"
-	"github.com/mohae/deepcopy"
-	tw "github.com/olekukonko/tablewriter"
 	"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
-	zlog "github.com/owncloud/ocis/v2/ocis-pkg/log"
 	"github.com/owncloud/ocis/v2/services/storage-users/pkg/config"
 	"github.com/owncloud/ocis/v2/services/storage-users/pkg/config/parser"
 	"github.com/owncloud/ocis/v2/services/storage-users/pkg/event"
-	"github.com/rs/zerolog"
 	"github.com/urfave/cli/v2"
 )
 
-const (
-	SKIP = iota
-	REPLACE
-	KEEP_BOTH
-)
-
-var _optionFlagTmpl = cli.StringFlag{
-	Name:        "option",
-	Value:       "skip",
-	Aliases:     []string{"o"},
-	Usage:       "The restore option defines the behavior for a file to be restored, where the file name already already exists in the target space. Supported values are: 'skip', 'replace' and 'keep-both'.",
-	DefaultText: "The default value is 'skip' overwriting an existing file",
-}
-
-var _verboseFlagTmpl = cli.BoolFlag{
-	Name:    "verbose",
-	Aliases: []string{"v"},
-	Usage:   "Get more verbose output",
-}
-
-var _applyYesFlagTmpl = cli.BoolFlag{
-	Name:    "yes",
-	Aliases: []string{"y"},
-	Usage:   "Automatic yes to prompts. Assume 'yes' as answer to all prompts and run non-interactively.",
-}
-
 // TrashBin wraps trash-bin related sub-commands.
 func TrashBin(cfg *config.Config) *cli.Command {
 	return &cli.Command{
@@ -61,9 +18,6 @@ func TrashBin(cfg *config.Config) *cli.Command {
 		Usage: "manage trash-bin's",
 		Subcommands: []*cli.Command{
 			PurgeExpiredResources(cfg),
-			listTrashBinItems(cfg),
-			restoreAllTrashBinItems(cfg),
-			restoreTrashBindItem(cfg),
 		},
 	}
 }
@@ -99,390 +53,3 @@ func PurgeExpiredResources(cfg *config.Config) *cli.Command {
 		},
 	}
 }
-
-func listTrashBinItems(cfg *config.Config) *cli.Command {
-	var verboseVal bool
-	verboseFlag := _verboseFlagTmpl
-	verboseFlag.Destination = &verboseVal
-	return &cli.Command{
-		Name:      "list",
-		Usage:     "Print a list of all trash-bin items of a space.",
-		ArgsUsage: "['spaceID' required]",
-		Flags: []cli.Flag{
-			&verboseFlag,
-		},
-		Before: func(c *cli.Context) error {
-			return configlog.ReturnFatal(parser.ParseConfig(cfg))
-		},
-		Action: func(c *cli.Context) error {
-			log := cliLogger(verboseVal)
-			var spaceID string
-			if c.NArg() > 0 {
-				spaceID = c.Args().Get(0)
-			}
-			if spaceID == "" {
-				_ = cli.ShowSubcommandHelp(c)
-				return fmt.Errorf("spaceID is requered")
-			}
-			log.Info().Msgf("Getting trash-bin items for spaceID: '%s' ...", spaceID)
-
-			ref, err := storagespace.ParseReference(spaceID)
-			if err != nil {
-				return err
-			}
-			client, err := pool.GetGatewayServiceClient(cfg.RevaGatewayGRPCAddr)
-			if err != nil {
-				return fmt.Errorf("error selecting gateway client %w", err)
-			}
-			ctx, err := utils.GetServiceUserContext(cfg.ServiceAccount.ServiceAccountID, client, cfg.ServiceAccount.ServiceAccountSecret)
-			if err != nil {
-				return fmt.Errorf("could not get service user context %w", err)
-			}
-			res, err := listRecycle(ctx, client, ref)
-			if err != nil {
-				return err
-			}
-
-			table := itemsTable(len(res.GetRecycleItems()))
-			for _, item := range res.GetRecycleItems() {
-				table.Append([]string{item.GetKey(), item.GetRef().GetPath(), itemType(item.GetType()), utils.TSToTime(item.GetDeletionTime()).UTC().Format(time.RFC3339)})
-			}
-			table.Render()
-			fmt.Println("Use an itemID to restore an item.")
-			return nil
-		},
-	}
-}
-
-func restoreAllTrashBinItems(cfg *config.Config) *cli.Command {
-	var optionFlagVal string
-	var overwriteOption int
-	optionFlag := _optionFlagTmpl
-	optionFlag.Destination = &optionFlagVal
-	var verboseVal bool
-	verboseFlag := _verboseFlagTmpl
-	verboseFlag.Destination = &verboseVal
-	var applyYesVal bool
-	applyYesFlag := _applyYesFlagTmpl
-	applyYesFlag.Destination = &applyYesVal
-	return &cli.Command{
-		Name:      "restore-all",
-		Usage:     "Restore all trash-bin items for a space.",
-		ArgsUsage: "['spaceID' required]",
-		Flags: []cli.Flag{
-			&optionFlag,
-			&verboseFlag,
-			&applyYesFlag,
-		},
-		Before: func(c *cli.Context) error {
-			return configlog.ReturnFatal(parser.ParseConfig(cfg))
-		},
-		Action: func(c *cli.Context) error {
-			log := cliLogger(verboseVal)
-			var spaceID string
-			if c.NArg() > 0 {
-				spaceID = c.Args().Get(0)
-			}
-			if spaceID == "" {
-				_ = cli.ShowSubcommandHelp(c)
-				return cli.Exit("The spaceID is required", 1)
-			}
-			switch optionFlagVal {
-			case "skip":
-				overwriteOption = SKIP
-			case "replace":
-				overwriteOption = REPLACE
-			case "keep-both":
-				overwriteOption = KEEP_BOTH
-			default:
-				_ = cli.ShowSubcommandHelp(c)
-				return cli.Exit("The option flag is invalid", 1)
-			}
-			log.Info().Msgf("Restoring trash-bin items for spaceID: '%s' ...", spaceID)
-
-			ref, err := storagespace.ParseReference(spaceID)
-			if err != nil {
-				return err
-			}
-			client, err := pool.GetGatewayServiceClient(cfg.RevaGatewayGRPCAddr)
-			if err != nil {
-				return fmt.Errorf("error selecting gateway client %w", err)
-			}
-			ctx, err := utils.GetServiceUserContext(cfg.ServiceAccount.ServiceAccountID, client, cfg.ServiceAccount.ServiceAccountSecret)
-			if err != nil {
-				return fmt.Errorf("could not get service user context %w", err)
-			}
-			res, err := listRecycle(ctx, client, ref)
-			if err != nil {
-				return err
-			}
-
-			if !applyYesVal {
-				for {
-					fmt.Printf("Found %d items that could be restored, continue (Y/n), show the items list (s): ", len(res.GetRecycleItems()))
-					var i string
-					_, err := fmt.Scanf("%s", &i)
-					if err != nil {
-						log.Err(err).Send()
-						continue
-					}
-					if strings.ToLower(i) == "y" {
-						break
-					} else if strings.ToLower(i) == "n" {
-						return nil
-					} else if strings.ToLower(i) == "s" {
-						table := itemsTable(len(res.GetRecycleItems()))
-						for _, item := range res.GetRecycleItems() {
-							table.Append([]string{item.GetKey(), item.GetRef().GetPath(), itemType(item.GetType()), utils.TSToTime(item.GetDeletionTime()).UTC().Format(time.RFC3339)})
-						}
-						table.Render()
-					}
-				}
-			}
-
-			log.Info().Msgf("Run restoring-all with option=%s", optionFlagVal)
-			for _, item := range res.GetRecycleItems() {
-				log.Info().Msgf("restoring itemID: '%s', path: '%s', type: '%s'", item.GetKey(), item.GetRef().GetPath(), itemType(item.GetType()))
-				dstRes, err := restore(ctx, client, ref, item, overwriteOption, cfg.CliMaxAttemptsRenameFile, log)
-				if err != nil {
-					log.Err(err).Msg("trash-bin item restoring error")
-					continue
-				}
-				fmt.Printf("itemID: '%s', path: '%s', restored as '%s'\n", item.GetKey(), item.GetRef().GetPath(), dstRes.GetPath())
-			}
-			return nil
-		},
-	}
-}
-
-func restoreTrashBindItem(cfg *config.Config) *cli.Command {
-	var optionFlagVal string
-	var overwriteOption int
-	optionFlag := _optionFlagTmpl
-	optionFlag.Destination = &optionFlagVal
-	var verboseVal bool
-	verboseFlag := _verboseFlagTmpl
-	verboseFlag.Destination = &verboseVal
-	return &cli.Command{
-		Name:      "restore",
-		Usage:     "Restore a trash-bin item by ID.",
-		ArgsUsage: "['spaceID' required] ['itemID' required]",
-		Flags: []cli.Flag{
-			&optionFlag,
-			&verboseFlag,
-		},
-		Before: func(c *cli.Context) error {
-			return configlog.ReturnFatal(parser.ParseConfig(cfg))
-		},
-		Action: func(c *cli.Context) error {
-			log := cliLogger(verboseVal)
-			var spaceID, itemID string
-			if c.NArg() > 1 {
-				spaceID = c.Args().Get(0)
-				itemID = c.Args().Get(1)
-			}
-			if spaceID == "" {
-				_ = cli.ShowSubcommandHelp(c)
-				return fmt.Errorf("spaceID is requered")
-			}
-			if itemID == "" {
-				_ = cli.ShowSubcommandHelp(c)
-				return fmt.Errorf("itemID is requered")
-			}
-			switch optionFlagVal {
-			case "skip":
-				overwriteOption = SKIP
-			case "replace":
-				overwriteOption = REPLACE
-			case "keep-both":
-				overwriteOption = KEEP_BOTH
-			default:
-				_ = cli.ShowSubcommandHelp(c)
-				return cli.Exit("The option flag is invalid", 1)
-			}
-			log.Info().Msgf("Restoring trash-bin item for spaceID: '%s' itemID: '%s' ...", spaceID, itemID)
-
-			ref, err := storagespace.ParseReference(spaceID)
-			if err != nil {
-				return err
-			}
-			client, err := pool.GetGatewayServiceClient(cfg.RevaGatewayGRPCAddr)
-			if err != nil {
-				return fmt.Errorf("error selecting gateway client %w", err)
-			}
-			ctx, err := utils.GetServiceUserContext(cfg.ServiceAccount.ServiceAccountID, client, cfg.ServiceAccount.ServiceAccountSecret)
-			if err != nil {
-				return fmt.Errorf("could not get service user context %w", err)
-			}
-			res, err := listRecycle(ctx, client, ref)
-			if err != nil {
-				return err
-			}
-
-			var found bool
-			var itemRef *provider.RecycleItem
-			for _, item := range res.GetRecycleItems() {
-				if item.GetKey() == itemID {
-					itemRef = item
-					found = true
-					break
-				}
-			}
-			if !found {
-				return fmt.Errorf("itemID '%s' not found", itemID)
-			}
-			log.Info().Msgf("Run restoring with option=%s", optionFlagVal)
-			log.Info().Msgf("restoring itemID: '%s', path: '%s', type: '%s", itemRef.GetKey(), itemRef.GetRef().GetPath(), itemType(itemRef.GetType()))
-			dstRes, err := restore(ctx, client, ref, itemRef, overwriteOption, cfg.CliMaxAttemptsRenameFile, log)
-			if err != nil {
-				return err
-			}
-			fmt.Printf("itemID: '%s', path: '%s', restored as '%s'\n", itemRef.GetKey(), itemRef.GetRef().GetPath(), dstRes.GetPath())
-			return nil
-		},
-	}
-}
-
-func listRecycle(ctx context.Context, client gateway.GatewayAPIClient, ref provider.Reference) (*provider.ListRecycleResponse, error) {
-	_retrievingErrorMsg := "trash-bin items retrieving error"
-	res, err := client.ListRecycle(ctx, &provider.ListRecycleRequest{Ref: &ref, Key: "/"})
-	if err != nil {
-		return nil, fmt.Errorf("%s %w", _retrievingErrorMsg, err)
-	}
-	if res.Status.Code != rpc.Code_CODE_OK {
-		return nil, fmt.Errorf("%s %s", _retrievingErrorMsg, res.Status.Code)
-	}
-	if len(res.GetRecycleItems()) == 0 {
-		return res, cli.Exit("The trash-bin is empty. Nothing to restore", 0)
-	}
-	return res, nil
-}
-
-func restore(ctx context.Context, client gateway.GatewayAPIClient, ref provider.Reference, item *provider.RecycleItem, overwriteOption int, maxRenameAttempt int, log zlog.Logger) (*provider.Reference, error) {
-	dst, _ := deepcopy.Copy(ref).(provider.Reference)
-	dst.Path = utils.MakeRelativePath(item.GetRef().GetPath())
-	// Restore request
-	req := &provider.RestoreRecycleItemRequest{
-		Ref:        &ref,
-		Key:        path.Join(item.GetKey(), "/"),
-		RestoreRef: &dst,
-	}
-
-	exists, dstStatRes, err := isDestinationExists(ctx, client, dst)
-	if err != nil {
-		return &dst, err
-	}
-
-	if exists {
-		log.Info().Msgf("destination '%s' exists.", dstStatRes.GetInfo().GetPath())
-		switch overwriteOption {
-		case SKIP:
-			return &dst, nil
-		case REPLACE:
-			// delete existing tree
-			delReq := &provider.DeleteRequest{Ref: &dst}
-			delRes, err := client.Delete(ctx, delReq)
-			if err != nil {
-				return &dst, fmt.Errorf("error sending grpc delete request %w", err)
-			}
-			if delRes.Status.Code != rpc.Code_CODE_OK && delRes.Status.Code != rpc.Code_CODE_NOT_FOUND {
-				return &dst, fmt.Errorf("deleting error %w", err)
-			}
-		case KEEP_BOTH:
-			// modify the file name
-			req.RestoreRef, err = resolveDestination(ctx, client, dst, maxRenameAttempt)
-			if err != nil {
-				return &dst, err
-			}
-		}
-	}
-
-	res, err := client.RestoreRecycleItem(ctx, req)
-	if err != nil {
-		return req.RestoreRef, fmt.Errorf("restoring error  %w", err)
-	}
-	if res.Status.Code != rpc.Code_CODE_OK {
-		return req.RestoreRef, fmt.Errorf("can not restore %s", res.Status.Code)
-	}
-	return req.RestoreRef, nil
-}
-
-func resolveDestination(ctx context.Context, client gateway.GatewayAPIClient, dstRef provider.Reference, maxRenameAttempt int) (*provider.Reference, error) {
-	dst := dstRef
-	if maxRenameAttempt < 100 {
-		maxRenameAttempt = 100
-	}
-	for i := 1; i < maxRenameAttempt; i++ {
-		dst.Path = modifyFilename(dstRef.Path, i)
-		exists, _, err := isDestinationExists(ctx, client, dst)
-		if err != nil {
-			return nil, err
-		}
-		if exists {
-			continue
-		}
-		return &dst, nil
-	}
-	return nil, fmt.Errorf("too many attempts to resolve the destination")
-}
-
-func isDestinationExists(ctx context.Context, client gateway.GatewayAPIClient, dst provider.Reference) (bool, *provider.StatResponse, error) {
-	dstStatReq := &provider.StatRequest{Ref: &dst}
-	dstStatRes, err := client.Stat(ctx, dstStatReq)
-	if err != nil {
-		return false, nil, fmt.Errorf("error sending grpc stat request %w", err)
-	}
-	if dstStatRes.GetStatus().GetCode() == rpc.Code_CODE_OK {
-		return true, dstStatRes, nil
-	}
-	if dstStatRes.GetStatus().GetCode() == rpc.Code_CODE_NOT_FOUND {
-		return false, dstStatRes, nil
-	}
-	return false, dstStatRes, fmt.Errorf("stat request failed %s", dstStatRes.GetStatus())
-}
-
-// modify the file name like UI do
-func modifyFilename(filename string, mod int) string {
-	var extension string
-	var found bool
-	expected := []string{".tar.gz", ".tar.bz", ".tar.bz2"}
-	for _, s := range expected {
-		var prefix string
-		prefix, found = strings.CutSuffix(strings.ToLower(filename), s)
-		if found {
-			extension = strings.TrimPrefix(filename, prefix)
-			break
-		}
-	}
-	if !found {
-		extension = filepath.Ext(filename)
-	}
-	name := filename[0 : len(filename)-len(extension)]
-	return fmt.Sprintf("%s (%d)%s", name, mod, extension)
-}
-
-func itemType(it provider.ResourceType) string {
-	var itemType = "file"
-	if it == provider.ResourceType_RESOURCE_TYPE_CONTAINER {
-		itemType = "folder"
-	}
-	return itemType
-}
-
-func itemsTable(total int) *tw.Table {
-	table := tw.NewWriter(os.Stdout)
-	table.SetHeader([]string{"itemID", "path", "type", "delete at"})
-	table.SetAutoFormatHeaders(false)
-	table.SetFooter([]string{"", "", "", "total count: " + strconv.Itoa(total)})
-	return table
-}
-
-func cliLogger(verbose bool) zlog.Logger {
-	logLvl := zerolog.ErrorLevel
-	if verbose {
-		logLvl = zerolog.InfoLevel
-	}
-	zerolog.SetGlobalLevel(zerolog.TraceLevel)
-	output := zerolog.ConsoleWriter{Out: os.Stdout, TimeFormat: time.RFC3339, NoColor: true}
-	return zlog.Logger{zerolog.New(output).With().Timestamp().Logger().Level(logLvl)}
-}
diff --git a/services/storage-users/pkg/config/config.go b/services/storage-users/pkg/config/config.go
index 8e436959647..33b2b601b9c 100644
--- a/services/storage-users/pkg/config/config.go
+++ b/services/storage-users/pkg/config/config.go
@@ -24,11 +24,10 @@ type Config struct {
 	SkipUserGroupsInToken   bool `yaml:"skip_user_groups_in_token" env:"STORAGE_USERS_SKIP_USER_GROUPS_IN_TOKEN" desc:"Disables the loading of user's group memberships from the reva access token."`
 	GracefulShutdownTimeout int  `yaml:"graceful_shutdown_timeout" env:"STORAGE_USERS_GRACEFUL_SHUTDOWN_TIMEOUT" desc:"The number of seconds to wait for the 'storage-users' service to shutdown cleanly before exiting with an error that gets logged. Note: This setting is only applicable when running the 'storage-users' service as a standalone service. See the text description for more details."`
 
-	Driver         string  `yaml:"driver" env:"STORAGE_USERS_DRIVER" desc:"The storage driver which should be used by the service. Defaults to 'ocis', Supported values are: 'ocis', 's3ng' and 'owncloudsql'. The 'ocis' driver stores all data (blob and meta data) in an POSIX compliant volume. The 's3ng' driver stores metadata in a POSIX compliant volume and uploads blobs to the s3 bucket."`
-	Drivers        Drivers `yaml:"drivers"`
-	DataServerURL  string  `yaml:"data_server_url" env:"STORAGE_USERS_DATA_SERVER_URL" desc:"URL of the data server, needs to be reachable by the data gateway provided by the frontend service or the user if directly exposed."`
-	DataGatewayURL string  `yaml:"data_gateway_url" env:"STORAGE_USERS_DATA_GATEWAY_URL" desc:"URL of the data gateway server"`
-
+	Driver            string            `yaml:"driver" env:"STORAGE_USERS_DRIVER" desc:"The storage driver which should be used by the service. Defaults to 'ocis', Supported values are: 'ocis', 's3ng' and 'owncloudsql'. The 'ocis' driver stores all data (blob and meta data) in an POSIX compliant volume. The 's3ng' driver stores metadata in a POSIX compliant volume and uploads blobs to the s3 bucket."`
+	Drivers           Drivers           `yaml:"drivers"`
+	DataServerURL     string            `yaml:"data_server_url" env:"STORAGE_USERS_DATA_SERVER_URL" desc:"URL of the data server, needs to be reachable by the data gateway provided by the frontend service or the user if directly exposed."`
+	DataGatewayURL    string            `yaml:"data_gateway_url" env:"STORAGE_USERS_DATA_GATEWAY_URL" desc:"URL of the data gateway server"`
 	TransferExpires   int64             `yaml:"transfer_expires" env:"STORAGE_USERS_TRANSFER_EXPIRES" desc:"the time after which the token for upload postprocessing expires"`
 	Events            Events            `yaml:"events"`
 	StatCache         StatCache         `yaml:"stat_cache"`
@@ -41,11 +40,6 @@ type Config struct {
 	Tasks             Tasks             `yaml:"tasks"`
 	ServiceAccount    ServiceAccount    `yaml:"service_account"`
 
-	// CLI
-	RevaGatewayGRPCAddr      string `yaml:"gateway_addr" env:"OCIS_GATEWAY_GRPC_ADDR;STORAGE_USERS_GATEWAY_GRPC_ADDR" desc:"The bind address of the gateway GRPC address."`
-	MachineAuthAPIKey        string `yaml:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY" desc:"Machine auth API key used to validate internal requests necessary for the access to resources from other services."`
-	CliMaxAttemptsRenameFile int    `yaml:"max_attempts_rename_file" env:"STORAGE_USERS_CLI_MAX_ATTEMPTS_RENAME_FILE" desc:"The maximum number of attempts to rename a file when a user restores a file to an existing destination with the same name. The minimum value is 100."`
-
 	Supervised bool            `yaml:"-"`
 	Context    context.Context `yaml:"-"`
 }
@@ -178,8 +172,6 @@ type Events struct {
 	TLSRootCaCertPath string `yaml:"tls_root_ca_cert_path" env:"OCIS_EVENTS_TLS_ROOT_CA_CERTIFICATE;STORAGE_USERS_EVENTS_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided STORAGE_USERS_EVENTS_TLS_INSECURE will be seen as false."`
 	EnableTLS         bool   `yaml:"enable_tls" env:"OCIS_EVENTS_ENABLE_TLS;STORAGE_USERS_EVENTS_ENABLE_TLS" desc:"Enable TLS for the connection to the events broker. The events broker is the ocis service which receives and delivers events between the services.."`
 	NumConsumers      int    `yaml:"num_consumers" env:"STORAGE_USERS_EVENTS_NUM_CONSUMERS" desc:"The amount of concurrent event consumers to start. Event consumers are used for post-processing files. Multiple consumers increase parallelisation, but will also increase CPU and memory demands. The setting has no effect when the OCIS_ASYNC_UPLOADS is set to false. The default and minimum value is 1."`
-	AuthUsername      string `yaml:"username" env:"OCIS_EVENTS_AUTH_USERNAME;STORAGE_USERS_EVENTS_AUTH_USERNAME" desc:"The username to authenticate with the events broker. The events broker is the ocis service which receives and delivers events between the services.."`
-	AuthPassword      string `yaml:"password" env:"OCIS_EVENTS_AUTH_PASSWORD;STORAGE_USERS_EVENTS_AUTH_PASSWORD" desc:"The password to authenticate with the events broker. The events broker is the ocis service which receives and delivers events between the services.."`
 }
 
 // StatCache holds cache config
diff --git a/services/storage-users/pkg/config/defaults/defaultconfig.go b/services/storage-users/pkg/config/defaults/defaultconfig.go
index 8bc070c6afc..993f4fd9a94 100644
--- a/services/storage-users/pkg/config/defaults/defaultconfig.go
+++ b/services/storage-users/pkg/config/defaults/defaultconfig.go
@@ -44,7 +44,6 @@ func DefaultConfig() *config.Config {
 		Reva:                    shared.DefaultRevaConfig(),
 		DataServerURL:           "http://localhost:9158/data",
 		DataGatewayURL:          "https://localhost:9200/data",
-		RevaGatewayGRPCAddr:     "127.0.0.1:9142",
 		TransferExpires:         86400,
 		UploadExpiration:        24 * 60 * 60,
 		GracefulShutdownTimeout: 30,
diff --git a/services/storage-users/pkg/event/event.go b/services/storage-users/pkg/event/event.go
index 44d2c1c9bda..ef263085b35 100644
--- a/services/storage-users/pkg/event/event.go
+++ b/services/storage-users/pkg/event/event.go
@@ -14,7 +14,5 @@ func NewStream(cfg *config.Config) (events.Stream, error) {
 		EnableTLS:            cfg.Events.EnableTLS,
 		TLSInsecure:          cfg.Events.TLSInsecure,
 		TLSRootCACertificate: cfg.Events.TLSRootCaCertPath,
-		AuthUsername:         cfg.Events.AuthUsername,
-		AuthPassword:         cfg.Events.AuthPassword,
 	})
 }
diff --git a/services/userlog/pkg/command/server.go b/services/userlog/pkg/command/server.go
index 00637c85db8..5529ef9537d 100644
--- a/services/userlog/pkg/command/server.go
+++ b/services/userlog/pkg/command/server.go
@@ -94,7 +94,6 @@ func Server(cfg *config.Config) *cli.Command {
 				microstore.Nodes(cfg.Persistence.Nodes...),
 				microstore.Database(cfg.Persistence.Database),
 				microstore.Table(cfg.Persistence.Table),
-				store.Authentication(cfg.Persistence.AuthUsername, cfg.Persistence.AuthPassword),
 			)
 
 			tm, err := pool.StringToTLSMode(cfg.GRPCClientTLS.Mode)
diff --git a/services/userlog/pkg/config/config.go b/services/userlog/pkg/config/config.go
index 9afde9a3c73..a0a3048e09b 100644
--- a/services/userlog/pkg/config/config.go
+++ b/services/userlog/pkg/config/config.go
@@ -39,14 +39,12 @@ type Config struct {
 
 // Persistence configures the store to use
 type Persistence struct {
-	Store        string        `yaml:"store" env:"OCIS_PERSISTENT_STORE;USERLOG_STORE" desc:"The type of the store. Supported values are: 'memory', 'ocmem', 'etcd', 'redis', 'redis-sentinel', 'nats-js', 'noop'. See the text description for details."`
-	Nodes        []string      `yaml:"nodes" env:"OCIS_PERSISTENT_STORE_NODES;USERLOG_STORE_NODES" desc:"A list of nodes to access the configured store. This has no effect when 'memory' or 'ocmem' stores are configured. Note that the behaviour how nodes are used is dependent on the library of the configured store. See the Environment Variable Types description for more details."`
-	Database     string        `yaml:"database" env:"USERLOG_STORE_DATABASE" desc:"The database name the configured store should use."`
-	Table        string        `yaml:"table" env:"USERLOG_STORE_TABLE" desc:"The database table the store should use."`
-	TTL          time.Duration `yaml:"ttl" env:"OCIS_PERSISTENT_STORE_TTL;USERLOG_STORE_TTL" desc:"Time to live for events in the store. Defaults to '336h' (2 weeks). See the Environment Variable Types description for more details."`
-	Size         int           `yaml:"size" env:"OCIS_PERSISTENT_STORE_SIZE;USERLOG_STORE_SIZE" desc:"The maximum quantity of items in the store. Only applies when store type 'ocmem' is configured. Defaults to 512 which is derived from the ocmem package though not exclicitely set as default."`
-	AuthUsername string        `yaml:"username" env:"OCIS_PERSISTENT_STORE_AUTH_USERNAME;USERLOG_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured."`
-	AuthPassword string        `yaml:"password" env:"OCIS_PERSISTENT_STORE_AUTH_PASSWORD;USERLOG_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured."`
+	Store    string        `yaml:"store" env:"OCIS_PERSISTENT_STORE;USERLOG_STORE" desc:"The type of the store. Supported values are: 'memory', 'ocmem', 'etcd', 'redis', 'redis-sentinel', 'nats-js', 'noop'. See the text description for details."`
+	Nodes    []string      `yaml:"nodes" env:"OCIS_PERSISTENT_STORE_NODES;USERLOG_STORE_NODES" desc:"A list of nodes to access the configured store. This has no effect when 'memory' or 'ocmem' stores are configured. Note that the behaviour how nodes are used is dependent on the library of the configured store. See the Environment Variable Types description for more details."`
+	Database string        `yaml:"database" env:"USERLOG_STORE_DATABASE" desc:"The database name the configured store should use."`
+	Table    string        `yaml:"table" env:"USERLOG_STORE_TABLE" desc:"The database table the store should use."`
+	TTL      time.Duration `yaml:"ttl" env:"OCIS_PERSISTENT_STORE_TTL;USERLOG_STORE_TTL" desc:"Time to live for events in the store. Defaults to '336h' (2 weeks). See the Environment Variable Types description for more details."`
+	Size     int           `yaml:"size" env:"OCIS_PERSISTENT_STORE_SIZE;USERLOG_STORE_SIZE" desc:"The maximum quantity of items in the store. Only applies when store type 'ocmem' is configured. Defaults to 512 which is derived from the ocmem package though not exclicitely set as default."`
 }
 
 // Events combines the configuration options for the event bus.
@@ -56,8 +54,6 @@ type Events struct {
 	TLSInsecure          bool   `yaml:"tls_insecure" env:"OCIS_INSECURE;USERLOG_EVENTS_TLS_INSECURE" desc:"Whether to verify the server TLS certificates."`
 	TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_EVENTS_TLS_ROOT_CA_CERTIFICATE;USERLOG_EVENTS_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided NOTIFICATIONS_EVENTS_TLS_INSECURE will be seen as false."`
 	EnableTLS            bool   `yaml:"enable_tls" env:"OCIS_EVENTS_ENABLE_TLS;USERLOG_EVENTS_ENABLE_TLS" desc:"Enable TLS for the connection to the events broker. The events broker is the ocis service which receives and delivers events between the services.."`
-	AuthUsername         string `yaml:"username" env:"OCIS_EVENTS_AUTH_USERNAME;USERLOG_EVENTS_AUTH_USERNAME" desc:"The username to authenticate with the events broker. The events broker is the ocis service which receives and delivers events between the services.."`
-	AuthPassword         string `yaml:"password" env:"OCIS_EVENTS_AUTH_PASSWORD;USERLOG_EVENTS_AUTH_PASSWORD" desc:"The password to authenticate with the events broker. The events broker is the ocis service which receives and delivers events between the services.."`
 }
 
 // CORS defines the available cors configuration.
diff --git a/vendor/github.com/cs3org/reva/v2/internal/grpc/interceptors/eventsmiddleware/events.go b/vendor/github.com/cs3org/reva/v2/internal/grpc/interceptors/eventsmiddleware/events.go
index 6b0f9da9b4b..4162503d1db 100644
--- a/vendor/github.com/cs3org/reva/v2/internal/grpc/interceptors/eventsmiddleware/events.go
+++ b/vendor/github.com/cs3org/reva/v2/internal/grpc/interceptors/eventsmiddleware/events.go
@@ -37,7 +37,6 @@ import (
 	"github.com/cs3org/reva/v2/pkg/rgrpc"
 	"github.com/cs3org/reva/v2/pkg/storagespace"
 	"github.com/cs3org/reva/v2/pkg/utils"
-	"github.com/mitchellh/mapstructure"
 )
 
 const (
@@ -224,11 +223,17 @@ func publisherFromConfig(m map[string]interface{}) (events.Publisher, error) {
 	default:
 		return nil, fmt.Errorf("stream type '%s' not supported", typ)
 	case "nats":
-		var cfg stream.NatsConfig
-		if err := mapstructure.Decode(m, &cfg); err != nil {
-			return nil, err
+		var tlsCert string
+		val, ok := m["tls-root-ca-cert"]
+		if ok {
+			tlsCert = val.(string)
 		}
-		name, _ := m["name"].(string)
-		return stream.NatsFromConfig(name, false, cfg)
+		return stream.NatsFromConfig(m["name"].(string), false, stream.NatsConfig{
+			Endpoint:             m["address"].(string),
+			Cluster:              m["clusterID"].(string),
+			EnableTLS:            m["enable-tls"].(bool),
+			TLSInsecure:          m["tls-insecure"].(bool),
+			TLSRootCACertificate: tlsCert,
+		})
 	}
 }
diff --git a/vendor/github.com/cs3org/reva/v2/internal/grpc/services/storageprovider/storageprovider.go b/vendor/github.com/cs3org/reva/v2/internal/grpc/services/storageprovider/storageprovider.go
index 532854a2902..5b1274c0e4a 100644
--- a/vendor/github.com/cs3org/reva/v2/internal/grpc/services/storageprovider/storageprovider.go
+++ b/vendor/github.com/cs3org/reva/v2/internal/grpc/services/storageprovider/storageprovider.go
@@ -76,8 +76,6 @@ type eventconfig struct {
 	TLSInsecure          bool   `mapstructure:"tls_insecure"  docs:"Whether to verify the server TLS certificates."`
 	TLSRootCACertificate string `mapstructure:"tls_root_ca_cert"  docs:"The root CA certificate used to validate the server's TLS certificate."`
 	EnableTLS            bool   `mapstructure:"nats_enable_tls" docs:"events tls switch"`
-	AuthUsername         string `mapstructure:"nats_username" docs:"event stream username"`
-	AuthPassword         string `mapstructure:"nats_password" docs:"event stream password"`
 }
 
 func (c *config) init() {
diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/dataprovider/dataprovider.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/dataprovider/dataprovider.go
index f9c14e7b88c..cb930b95a73 100644
--- a/vendor/github.com/cs3org/reva/v2/internal/http/services/dataprovider/dataprovider.go
+++ b/vendor/github.com/cs3org/reva/v2/internal/http/services/dataprovider/dataprovider.go
@@ -48,8 +48,6 @@ type config struct {
 	NatsTLSInsecure    bool                              `mapstructure:"nats_tls_insecure"`
 	NatsRootCACertPath string                            `mapstructure:"nats_root_ca_cert_path"`
 	NatsEnableTLS      bool                              `mapstructure:"nats_enable_tls"`
-	NatsUsername       string                            `mapstructure:"nats_username"`
-	NatsPassword       string                            `mapstructure:"nats_password"`
 }
 
 func (c *config) init() {
@@ -88,8 +86,6 @@ func New(m map[string]interface{}, log *zerolog.Logger) (global.Service, error)
 			EnableTLS:            conf.NatsEnableTLS,
 			TLSInsecure:          conf.NatsTLSInsecure,
 			TLSRootCACertificate: conf.NatsRootCACertPath,
-			AuthUsername:         conf.NatsUsername,
-			AuthPassword:         conf.NatsPassword,
 		})
 		if err != nil {
 			return nil, err
diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/propfind/propfind.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/propfind/propfind.go
index f9271fbbe91..b2d098fffcf 100644
--- a/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/propfind/propfind.go
+++ b/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/propfind/propfind.go
@@ -1156,7 +1156,7 @@ func mdToPropResponse(ctx context.Context, pf *XML, md *provider.ResourceInfo, p
 			appendToOK(
 				prop.Escaped("oc:id", sid),
 				prop.Escaped("oc:fileid", sid),
-				prop.Escaped("oc:spaceid", storagespace.FormatStorageID(id.StorageId, id.SpaceId)),
+				prop.Escaped("oc:spaceid", id.SpaceId),
 			)
 		}
 
@@ -1296,7 +1296,7 @@ func mdToPropResponse(ctx context.Context, pf *XML, md *provider.ResourceInfo, p
 					}
 				case "spaceid":
 					if id != nil {
-						appendToOK(prop.Escaped("oc:spaceid", storagespace.FormatStorageID(id.StorageId, id.SpaceId)))
+						appendToOK(prop.Escaped("oc:spaceid", id.SpaceId))
 					} else {
 						appendToNotFound(prop.Escaped("oc:spaceid", ""))
 					}
diff --git a/vendor/github.com/cs3org/reva/v2/pkg/events/stream/nats.go b/vendor/github.com/cs3org/reva/v2/pkg/events/stream/nats.go
index 30ffec7ca07..4910d694e23 100644
--- a/vendor/github.com/cs3org/reva/v2/pkg/events/stream/nats.go
+++ b/vendor/github.com/cs3org/reva/v2/pkg/events/stream/nats.go
@@ -17,14 +17,11 @@ import (
 
 // NatsConfig is the configuration needed for a NATS event stream
 type NatsConfig struct {
-	Endpoint             string `mapstructure:"address"`          // Endpoint of the nats server
-	Cluster              string `mapstructure:"clusterID"`        // CluserID of the nats cluster
-	TLSInsecure          bool   `mapstructure:"tls-insecure"`     // Whether to verify TLS certificates
-	TLSRootCACertificate string `mapstructure:"tls-root-ca-cert"` // The root CA certificate used to validate the TLS certificate
-	EnableTLS            bool   `mapstructure:"enable-tls"`       // Enable TLS
-	AuthUsername         string `mapstructure:"username"`         // Username for authentication
-	AuthPassword         string `mapstructure:"password"`         // Password for authentication
-
+	Endpoint             string // Endpoint of the nats server
+	Cluster              string // CluserID of the nats cluster
+	TLSInsecure          bool   // Whether to verify TLS certificates
+	TLSRootCACertificate string // The root CA certificate used to validate the TLS certificate
+	EnableTLS            bool   // Enable TLS
 }
 
 // NatsFromConfig returns a nats stream from the given config
@@ -58,7 +55,6 @@ func NatsFromConfig(connName string, disableDurability bool, cfg NatsConfig) (ev
 		natsjs.ClusterID(cfg.Cluster),
 		natsjs.SynchronousPublish(true),
 		natsjs.Name(connName),
-		natsjs.Authenticate(cfg.AuthUsername, cfg.AuthPassword),
 	}
 
 	if disableDurability {
@@ -66,6 +62,7 @@ func NatsFromConfig(connName string, disableDurability bool, cfg NatsConfig) (ev
 	}
 
 	return Nats(opts...)
+
 }
 
 // nats returns a nats streaming client
diff --git a/vendor/github.com/cs3org/reva/v2/pkg/share/manager/jsoncs3/jsoncs3.go b/vendor/github.com/cs3org/reva/v2/pkg/share/manager/jsoncs3/jsoncs3.go
index be1629119b5..f0fa2cbd51b 100644
--- a/vendor/github.com/cs3org/reva/v2/pkg/share/manager/jsoncs3/jsoncs3.go
+++ b/vendor/github.com/cs3org/reva/v2/pkg/share/manager/jsoncs3/jsoncs3.go
@@ -133,8 +133,6 @@ type EventOptions struct {
 	TLSInsecure          bool   `mapstructure:"tlsinsecure"`
 	TLSRootCACertificate string `mapstructure:"tlsrootcacertificate"`
 	EnableTLS            bool   `mapstructure:"enabletls"`
-	AuthUsername         string `mapstructure:"authusername"`
-	AuthPassword         string `mapstructure:"authpassword"`
 }
 
 // Manager implements a share manager using a cs3 storage backend with local caching
diff --git a/vendor/github.com/cs3org/reva/v2/pkg/storage/cache/cache.go b/vendor/github.com/cs3org/reva/v2/pkg/storage/cache/cache.go
index 0ff7229c423..c02d2462426 100644
--- a/vendor/github.com/cs3org/reva/v2/pkg/storage/cache/cache.go
+++ b/vendor/github.com/cs3org/reva/v2/pkg/storage/cache/cache.go
@@ -51,8 +51,6 @@ type Config struct {
 	TTL                time.Duration `mapstructure:"cache_ttl"`
 	Size               int           `mapstructure:"cache_size"`
 	DisablePersistence bool          `mapstructure:"cache_disable_persistence"`
-	AuthUsername       string        `mapstructure:"cache_auth_username"`
-	AuthPassword       string        `mapstructure:"cache_auth_password"`
 }
 
 // Cache handles key value operations on caches
@@ -242,6 +240,5 @@ func getStore(cfg Config) microstore.Store {
 		store.TTL(cfg.TTL),
 		store.Size(cfg.Size),
 		store.DisablePersistence(cfg.DisablePersistence),
-		store.Authentication(cfg.AuthUsername, cfg.AuthPassword),
 	)
 }
diff --git a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go
index b6ee40d2954..23384d55364 100644
--- a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go
+++ b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go
@@ -145,7 +145,6 @@ func NewDefault(m map[string]interface{}, bs tree.Blobstore, es events.Stream) (
 		microstore.Database(o.IDCache.Database),
 		microstore.Table(o.IDCache.Table),
 		store.DisablePersistence(o.IDCache.DisablePersistence),
-		store.Authentication(o.IDCache.AuthUsername, o.IDCache.AuthPassword),
 	))
 
 	permissionsSelector, err := pool.PermissionsSelector(o.PermissionsSVC, pool.WithTLSMode(o.PermTLSMode))
diff --git a/vendor/github.com/cs3org/reva/v2/pkg/store/options.go b/vendor/github.com/cs3org/reva/v2/pkg/store/options.go
index 75ba99c6bbe..c4e177e5466 100644
--- a/vendor/github.com/cs3org/reva/v2/pkg/store/options.go
+++ b/vendor/github.com/cs3org/reva/v2/pkg/store/options.go
@@ -89,17 +89,3 @@ func DisablePersistence(val bool) store.Option {
 		o.Context = context.WithValue(o.Context, disablePersistanceContextKey{}, val)
 	}
 }
-
-type authenticationContextKey struct{}
-
-// Authentication configures the username and password to use for authentication.
-// Only supported by the `natsjskv` implementation.
-func Authentication(username, password string) store.Option {
-	return func(o *store.Options) {
-		if o.Context == nil {
-			o.Context = context.Background()
-		}
-
-		o.Context = context.WithValue(o.Context, authenticationContextKey{}, []string{username, password})
-	}
-}
diff --git a/vendor/github.com/cs3org/reva/v2/pkg/store/store.go b/vendor/github.com/cs3org/reva/v2/pkg/store/store.go
index f26edff2e2d..67ef00dd2bd 100644
--- a/vendor/github.com/cs3org/reva/v2/pkg/store/store.go
+++ b/vendor/github.com/cs3org/reva/v2/pkg/store/store.go
@@ -127,10 +127,6 @@ func Create(opts ...microstore.Option) microstore.Store {
 		// host, port, clusterid
 		natsOptions := nats.GetDefaultOptions()
 		natsOptions.Name = "TODO" // we can pass in the service name to allow identifying the client, but that requires adding a custom context option
-		if auth, ok := options.Context.Value(authenticationContextKey{}).([]string); ok && len(auth) == 2 {
-			natsOptions.User = auth[0]
-			natsOptions.Password = auth[1]
-		}
 		return natsjs.NewStore(
 			append(opts,
 				natsjs.NatsOptions(natsOptions), // always pass in properly initialized default nats options
@@ -145,10 +141,6 @@ func Create(opts ...microstore.Option) microstore.Store {
 
 		natsOptions := nats.GetDefaultOptions()
 		natsOptions.Name = "TODO" // we can pass in the service name to allow identifying the client, but that requires adding a custom context option
-		if auth, ok := options.Context.Value(authenticationContextKey{}).([]string); ok && len(auth) == 2 {
-			natsOptions.User = auth[0]
-			natsOptions.Password = auth[1]
-		}
 		return natsjskv.NewStore(
 			append(opts,
 				natsjs.NatsOptions(natsOptions), // always pass in properly initialized default nats options
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 34cb3516e70..62e09954899 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -362,7 +362,7 @@ github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1
 github.com/cs3org/go-cs3apis/cs3/storage/registry/v1beta1
 github.com/cs3org/go-cs3apis/cs3/tx/v1beta1
 github.com/cs3org/go-cs3apis/cs3/types/v1beta1
-# github.com/cs3org/reva/v2 v2.17.1-0.20231219093515-da04bc32d9fb
+# github.com/cs3org/reva/v2 v2.17.1-0.20231218091701-6a3a91e35514
 ## explicit; go 1.21
 github.com/cs3org/reva/v2/cmd/revad/internal/grace
 github.com/cs3org/reva/v2/cmd/revad/runtime


Test patch:
diff --git a/services/graph/pkg/service/v0/graph_suite_test.go b/services/graph/pkg/service/v0/graph_suite_test.go
index 70dfcce1450..7b6ed5b234f 100644
--- a/services/graph/pkg/service/v0/graph_suite_test.go
+++ b/services/graph/pkg/service/v0/graph_suite_test.go
@@ -11,7 +11,8 @@ import (
 )
 
 func init() {
-	r := registry.GetRegistry(registry.Inmemory())
+	registry.Configure("memory")
+	r := registry.GetRegistry()
 	service := registry.BuildGRPCService("com.owncloud.api.gateway", "", "", "")
 	service.Nodes = []*mRegistry.Node{{
 		Address: "any",
diff --git a/services/notifications/pkg/service/notification_suite_test.go b/services/notifications/pkg/service/notification_suite_test.go
index 7f282054fb6..dc3c1f42511 100644
--- a/services/notifications/pkg/service/notification_suite_test.go
+++ b/services/notifications/pkg/service/notification_suite_test.go
@@ -11,7 +11,8 @@ import (
 )
 
 func init() {
-	r := registry.GetRegistry(registry.Inmemory())
+	registry.Configure("memory")
+	r := registry.GetRegistry()
 	service := registry.BuildGRPCService("com.owncloud.api.gateway", "", "", "")
 	service.Nodes = []*mRegistry.Node{{
 		Address: "any",
diff --git a/services/search/pkg/search/search_suite_test.go b/services/search/pkg/search/search_suite_test.go
index 9422179fc53..75873d6daaa 100644
--- a/services/search/pkg/search/search_suite_test.go
+++ b/services/search/pkg/search/search_suite_test.go
@@ -11,7 +11,8 @@ import (
 )
 
 func init() {
-	r := registry.GetRegistry(registry.Inmemory())
+	registry.Configure("memory")
+	r := registry.GetRegistry()
 	service := registry.BuildGRPCService("com.owncloud.api.gateway", "", "", "")
 	service.Nodes = []*mRegistry.Node{{
 		Address: "any",
diff --git a/services/storage-users/pkg/command/trash_bin_test.go b/services/storage-users/pkg/command/trash_bin_test.go
deleted file mode 100644
index 26cfd4bc156..00000000000
--- a/services/storage-users/pkg/command/trash_bin_test.go
+++ /dev/null
@@ -1,65 +0,0 @@
-package command
-
-import (
-	"testing"
-)
-
-func Test_modifyFilename(t *testing.T) {
-	type args struct {
-		filename string
-		mod      int
-	}
-	tests := []struct {
-		name string
-		args args
-		want string
-	}{
-		{
-			name: "file",
-			args: args{filename: "file.txt", mod: 1},
-			want: "file (1).txt",
-		},
-		{
-			name: "file with path",
-			args: args{filename: "./file.txt", mod: 1},
-			want: "./file (1).txt",
-		},
-		{
-			name: "file with path 2",
-			args: args{filename: "./subdir/file.tar.gz", mod: 99},
-			want: "./subdir/file (99).tar.gz",
-		},
-		{
-			name: "file with path 3",
-			args: args{filename: "./sub dir/new file.tar.gz", mod: 99},
-			want: "./sub dir/new file (99).tar.gz",
-		},
-		{
-			name: "file without ext",
-			args: args{filename: "./subdir/file", mod: 2},
-			want: "./subdir/file (2)",
-		},
-		{
-			name: "file without ext 2",
-			args: args{filename: "./subdir/file 1", mod: 2},
-			want: "./subdir/file 1 (2)",
-		},
-		{
-			name: "file with emoji",
-			args: args{filename: "./subdir/file 🙂.tar.gz", mod: 3},
-			want: "./subdir/file 🙂 (3).tar.gz",
-		},
-		{
-			name: "file with emoji 2",
-			args: args{filename: "./subdir/file 🙂", mod: 2},
-			want: "./subdir/file 🙂 (2)",
-		},
-	}
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			if got := modifyFilename(tt.args.filename, tt.args.mod); got != tt.want {
-				t.Errorf("modifyFilename() = %v, want %v", got, tt.want)
-			}
-		})
-	}
-}
diff --git a/services/storage-users/pkg/task/task_suite_test.go b/services/storage-users/pkg/task/task_suite_test.go
index ac0c8a44b9d..5b904e7e302 100644
--- a/services/storage-users/pkg/task/task_suite_test.go
+++ b/services/storage-users/pkg/task/task_suite_test.go
@@ -11,7 +11,8 @@ import (
 )
 
 func init() {
-	r := registry.GetRegistry(registry.Inmemory())
+	registry.Configure("memory")
+	r := registry.GetRegistry()
 	service := registry.BuildGRPCService("com.owncloud.api.gateway", "", "", "")
 	service.Nodes = []*mRegistry.Node{{
 		Address: "any",
diff --git a/services/userlog/pkg/service/service_suit_test.go b/services/userlog/pkg/service/service_suit_test.go
index 9da9654d4e9..ab7fb7b1989 100644
--- a/services/userlog/pkg/service/service_suit_test.go
+++ b/services/userlog/pkg/service/service_suit_test.go
@@ -11,7 +11,8 @@ import (
 )
 
 func init() {
-	r := registry.GetRegistry(registry.Inmemory())
+	registry.Configure("memory")
+	r := registry.GetRegistry()
 	service := registry.BuildGRPCService("com.owncloud.api.gateway", "", "", "")
 	service.Nodes = []*mRegistry.Node{{
 		Address: "any",
diff --git a/tests/TestHelpers/GraphHelper.php b/tests/TestHelpers/GraphHelper.php
index 192a36d7e2b..524e9862b02 100644
--- a/tests/TestHelpers/GraphHelper.php
+++ b/tests/TestHelpers/GraphHelper.php
@@ -60,13 +60,6 @@ class GraphHelper {
 		return self::getUUIDv4Regex() . '\\\$' . self::getUUIDv4Regex();
 	}
 
-	/**
-	 * @return string
-	 */
-	public static function getShareIdRegex(): string {
-		return self::getUUIDv4Regex() . ':' . self::getUUIDv4Regex() . ':' . self::getUUIDv4Regex();
-	}
-
 	/**
 	 * Key name can consist of @@@
 	 * This function separate such key and return its actual value from actual drive response which can be used for assertion
@@ -1539,79 +1532,4 @@ class GraphHelper {
 			self::getRequestHeaders()
 		);
 	}
-
-	/**
-	 * Get the role id by name
-	 *
-	 * @param string $role
-	 *
-	 * @return string
-	 *
-	 */
-	public static function getRoleIdByName(
-		string $role
-	): string {
-		switch ($role) {
-			case 'Viewer':
-				return 'b1e2218d-eef8-4d4c-b82d-0f1a1b48f3b5';
-			case 'Space Viewer':
-				return 'a8d5fe5e-96e3-418d-825b-534dbdf22b99';
-			case 'Editor':
-				return 'fb6c3e19-e378-47e5-b277-9732f9de6e21';
-			case 'Space Editor':
-				return '58c63c02-1d89-4572-916a-870abc5a1b7d';
-			case 'File Editor':
-				return '2d00ce52-1fc2-4dbc-8b95-a73b73395f5a';
-			case 'Co Owner':
-				return '3a4ba8e9-6a0d-4235-9140-0e7a34007abe';
-			case 'Uploader':
-				return '1c996275-f1c9-4e71-abdf-a42f6495e960';
-			case 'Manager':
-				return '312c0871-5ef7-4b3a-85b6-0e4074c64049';
-		}
-	}
-
-	/**
-	 * @param string $baseUrl
-	 * @param string $xRequestId
-	 * @param string $user
-	 * @param string $password
-	 * @param string $spaceId
-	 * @param string $itemId
-	 * @param string $shareeId
-	 * @param string|null $role
-	 *
-	 * @return ResponseInterface
-	 * @throws \JsonException
-	 */
-	public static function sendSharingInvitation(
-		string $baseUrl,
-		string $xRequestId,
-		string $user,
-		string $password,
-		string $spaceId,
-		string $itemId,
-		string $shareeId,
-		?string $role
-	): ResponseInterface {
-		$url = self::getBetaFullUrl($baseUrl, "drives/$spaceId/items/$itemId/invite");
-		$body = [];
-
-		$recipients['objectId'] = $shareeId;
-		$body['recipients'] = [$recipients];
-
-		if ($role !== null) {
-			$roleId = self::getRoleIdByName($role);
-			$body['roles'] = [$roleId];
-		}
-
-		return HttpRequestHelper::post(
-			$url,
-			$xRequestId,
-			$user,
-			$password,
-			self::getRequestHeaders(),
-			\json_encode($body)
-		);
-	}
 }
diff --git a/tests/acceptance/features/apiSharingNg/shareInvitations.feature b/tests/acceptance/features/apiSharingNg/shareInvitations.feature
deleted file mode 100644
index 0c42bc79e2b..00000000000
--- a/tests/acceptance/features/apiSharingNg/shareInvitations.feature
+++ /dev/null
@@ -1,98 +0,0 @@
-Feature: Send a sharing invitations
-  As the owner of a resource
-  I want to be able to send invitations to other users
-  So that they can have access to it
-
-  https://owncloud.dev/libre-graph-api/#/drives.permissions/Invite
-
-  Background:
-    Given these users have been created with default attributes and without skeleton files:
-      | username |
-      | Alice    |
-      | Brian    |
-
-
-  Scenario Outline: send sharing invitation to user with different roles via the Graph API
-    Given user "Alice" has uploaded file with content "to share" to "/textfile1.txt"
-    And user "Alice" has created folder "FolderToShare"
-    When user "Alice" sends the following share invitation using the Graph API:
-      | resourceType | <resource-type> |
-      | resource     | <path>          |
-      | space        | Personal        |
-      | sharee       | Brian           |
-      | shareType    | user            |
-      | role         | <role>          |
-    Then the HTTP status code should be "200"
-    And the JSON data of the response should match
-      """
-      {
-        "type": "object",
-        "required": [
-          "value"
-        ],
-        "properties": {
-          "value": {
-            "type": "array",
-            "items": {
-              "type": "object",
-              "required": [
-                "id",
-                "roles",
-                "grantedToV2"
-              ],
-              "properties": {
-                "id": {
-                  "type": "string",
-                  "pattern": "^%share_id_pattern%$"
-                },
-                "roles": {
-                  "type": "array",
-                  "items": {
-                    "type": "string",
-                    "pattern": "^%role_id_pattern%$"
-                  }
-                },
-                "grantedToV2": {
-                  "type": "object",
-                  "required": [
-                    "user"
-                  ],
-                  "properties": {
-                    "user": {
-                      "type": "object",
-                      "required": [
-                        "id",
-                        "displayName"
-                      ],
-                      "properties": {
-                        "id": {
-                          "type": "string",
-                          "pattern": "^%user_id_pattern%$"
-                        },
-                        "displayName": {
-                          "type": "string",
-                          "enum": [
-                            "Brian Murphy"
-                          ]
-                        }
-                      }
-                    }
-                  }
-                }
-              }
-            }
-          }
-        }
-      }
-      """
-    Examples:
-      | role        | resource-type | path           |
-      | Viewer      | file          | /textfile1.txt |
-      | File Editor | file          | /textfile1.txt |
-      | Co Owner    | file          | /textfile1.txt |
-      | Manager     | file          | /textfile1.txt |
-      | Viewer      | folder        | FolderToShare  |
-      | Editor      | folder        | FolderToShare  |
-      | Co Owner    | folder        | FolderToShare  |
-      | Uploader    | folder        | FolderToShare  |
-      | Manager     | folder        | FolderToShare  |
diff --git a/tests/acceptance/features/bootstrap/FeatureContext.php b/tests/acceptance/features/bootstrap/FeatureContext.php
index a927e90c900..39ca02c7f66 100644
--- a/tests/acceptance/features/bootstrap/FeatureContext.php
+++ b/tests/acceptance/features/bootstrap/FeatureContext.php
@@ -2783,22 +2783,6 @@ class FeatureContext extends BehatVariablesContext {
 					$this, "getGroupIdByGroupName"
 				],
 				"parameter" => [$group]
-			],
-			[
-				"code" => "%role_id_pattern%",
-				"function" => [
-					__NAMESPACE__ . '\TestHelpers\GraphHelper',
-					"getUUIDv4Regex"
-				],
-				"parameter" => []
-			],
-			[
-				"code" => "%share_id_pattern%",
-				"function" => [
-					__NAMESPACE__ . '\TestHelpers\GraphHelper',
-					"getShareIdRegex"
-				],
-				"parameter" => []
 			]
 		];
 		if ($user !== null) {
diff --git a/tests/acceptance/features/bootstrap/SharingNgContext.php b/tests/acceptance/features/bootstrap/SharingNgContext.php
index 8ab05cfb87d..c3de67cd570 100644
--- a/tests/acceptance/features/bootstrap/SharingNgContext.php
+++ b/tests/acceptance/features/bootstrap/SharingNgContext.php
@@ -22,7 +22,6 @@
 use Behat\Behat\Context\Context;
 use Behat\Behat\Hook\Scope\BeforeScenarioScope;
 use TestHelpers\GraphHelper;
-use Behat\Gherkin\Node\TableNode;
 
 require_once 'bootstrap.php';
 
@@ -64,7 +63,7 @@ class SharingNgContext implements Context {
 	 */
 	public function theUserPermissionsListOfResource(string $user, string $fileOrFolder, string $resource, string $space):void {
 		$spaceId = ($this->spacesContext->getSpaceByName($user, $space))["id"];
-
+	
 		if ($fileOrFolder === 'folder') {
 			$itemId = $this->spacesContext->getResourceId($user, $space, $resource);
 		} else {
@@ -81,39 +80,4 @@ class SharingNgContext implements Context {
 			)
 		);
 	}
-
-	/**
-	 * @When /^user "([^"]*)" sends the following share invitation using the Graph API:$/
-	 *
-	 * @param string $user
-	 * @param TableNode $table
-	 *
-	 * @return void
-	 * @throws Exception
-	 */
-	public function userSendsTheFollowingShareInvitationUsingTheGraphApi(string $user, TableNode $table) {
-		$rows = $table->getRowsHash();
-		$spaceId = ($this->spacesContext->getSpaceByName($user, $rows['space']))["id"];
-
-		$itemId = ($rows['resourceType'] === 'folder')
-			? $this->spacesContext->getResourceId($user, $rows['space'], $rows['resource'])
-			: $this->spacesContext->getFileId($user, $rows['space'], $rows['resource']);
-
-		$shareeId = ($rows['shareType'] === 'user')
-			? $this->featureContext->getAttributeOfCreatedUser($rows['sharee'], 'id')
-			: $this->featureContext->getAttributeOfCreatedGroup($rows['sharee'], 'id');
-
-		$this->featureContext->setResponse(
-			GraphHelper::sendSharingInvitation(
-				$this->featureContext->getBaseUrl(),
-				$this->featureContext->getStepLineRef(),
-				$user,
-				$this->featureContext->getPasswordForUser($user),
-				$spaceId,
-				$itemId,
-				$shareeId,
-				$rows['role']
-			)
-		);
-	}
 }