Repository: owncloud/ocis
Pull request #3642 (2022-05-02 10:03:26)

fix ocis config parsing for subcommands
## Description
fixes config parsing for subcommands

## Related Issue
<!--- This project only accepts pull requests related to open issues -->
<!--- If suggesting a new feature or change, please discuss it in an issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!--- Please link to the issue here: -->
- Fixes <issue_link>

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->
- test environment:
- test case 1:
- test case 2:
- ...

## Screenshots (if appropriate):

## 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)
- [ ] 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/ -->
- [ ] Code changes
- [ ] Unit tests added
- [ ] Acceptance tests added
- [ ] Documentation ticket raised: <link> 


update-docs[bot]: Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a [changelog](https://github.com/owncloud/ocis/blob/master/changelog/README.md) item based on your changes.

sonarcloud[bot]: Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=owncloud_ocis&pullRequest=3642)

[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=owncloud_ocis&pullRequest=3642&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=owncloud_ocis&pullRequest=3642&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=owncloud_ocis&pullRequest=3642&resolved=false&types=BUG)  
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=owncloud_ocis&pullRequest=3642&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=owncloud_ocis&pullRequest=3642&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=owncloud_ocis&pullRequest=3642&resolved=false&types=VULNERABILITY)  
[![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=owncloud_ocis&pullRequest=3642&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=owncloud_ocis&pullRequest=3642&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=owncloud_ocis&pullRequest=3642&resolved=false&types=SECURITY_HOTSPOT)  
[![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=owncloud_ocis&pullRequest=3642&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=owncloud_ocis&pullRequest=3642&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=owncloud_ocis&pullRequest=3642&resolved=false&types=CODE_SMELL)

[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=owncloud_ocis&pullRequest=3642&metric=new_coverage&view=list) [0.0% Coverage](https://sonarcloud.io/component_measures?id=owncloud_ocis&pullRequest=3642&metric=new_coverage&view=list)  
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=owncloud_ocis&pullRequest=3642&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=owncloud_ocis&pullRequest=3642&metric=new_duplicated_lines_density&view=list)


ownclouders: :boom: Acceptance test [<strong>Web-Tests-ocis-smoke-ocis-storage-2</strong>](https://drone.owncloud.com/owncloud/ocis/11210/35/1) failed. Further test are cancelled...
<!-- id: pr-3642 -->


Patch:
diff --git a/.drone.star b/.drone.star
index 54021c12d7f..98b27ef5353 100644
--- a/.drone.star
+++ b/.drone.star
@@ -1654,7 +1654,7 @@ def ocisServerWithAccounts(storage, accounts_hash_difficulty = 4, volumes = [],
         "IDP_LDAP_LOGIN_ATTRIBUTE": "uid",
         "PROXY_ACCOUNT_BACKEND_TYPE": "accounts",
         "OCS_ACCOUNT_BACKEND_TYPE": "accounts",
-        "OCIS_RUN_EXTENSIONS": "settings,storage-metadata,graph,graph-explorer,ocs,store,thumbnails,web,webdav,frontend,gateway,user,group,auth-basic,auth-bearer,auth-machine,storage-users,storage-shares,storage-publiclink,appprovider,sharing,proxy,idp,nats,accounts,glauth,ocdav",
+        "OCIS_RUN_EXTENSIONS": "settings,storage-metadata,graph,graph-explorer,ocs,store,thumbnails,web,webdav,storage-frontend,storage-gateway,storage-userprovider,storage-groupprovider,storage-authbasic,storage-authbearer,storage-authmachine,storage-users,storage-shares,storage-public-link,storage-appprovider,storage-sharing,proxy,idp,nats,accounts,glauth,ocdav",
         "OCIS_INSECURE": "true",
         "PROXY_ENABLE_BASIC_AUTH": "true",
         "IDP_INSECURE": "true",
@@ -1784,7 +1784,7 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = [], depends_on =
             "SHARING_USER_SQL_NAME": "owncloud",
             # General oCIS config
             # OCIS_RUN_EXTENSIONS specifies to start all extensions except glauth, idp and accounts. These are replaced by external services
-            "OCIS_RUN_EXTENSIONS": "settings,storage-metadata,graph,graph-explorer,ocs,store,thumbnails,web,webdav,frontend,gateway,user,group,auth-basic,auth-bearer,auth-machine,storage-users,storage-shares,storage-publiclink,appprovider,sharing,proxy,nats,ocdav",
+            "OCIS_RUN_EXTENSIONS": "settings,storage-metadata,graph,graph-explorer,ocs,store,thumbnails,web,webdav,storage-frontend,storage-gateway,storage-userprovider,storage-groupprovider,storage-authbasic,storage-authbearer,storage-authmachine,storage-users,storage-shares,storage-public-link,storage-appprovider,storage-sharing,proxy,nats,ocdav",
             "OCIS_LOG_LEVEL": "info",
             "OCIS_URL": OCIS_URL,
             "OCIS_BASE_DATA_PATH": "/mnt/data/ocis",
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 43c683f8967..85ed33b38b2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,11 +11,8 @@ The following sections list the changes for unreleased.
 * Bugfix - URL encode the webdav url in the graph API: [#3597](https://github.com/owncloud/ocis/pull/3597)
 * Change - Load configuration files just from one directory: [#3587](https://github.com/owncloud/ocis/pull/3587)
 * Change - Introduce `ocis init` and remove all default secrets: [#3551](https://github.com/owncloud/ocis/pull/3551)
-* Change - Reduce drives in graph /me/drives API: [#3629](https://github.com/owncloud/ocis/pull/3629)
 * Change - Switched default configuration to use libregraph/idm: [#3331](https://github.com/owncloud/ocis/pull/3331)
-* Enhancement - Align service naming: [#3606](https://github.com/owncloud/ocis/pull/3606)
 * Enhancement - Add capability for public link single file edit: [#6787](https://github.com/owncloud/web/pull/6787)
-* Enhancement - Added `share_jail` and `projects` feature flags in spaces capability: [#3626](https://github.com/owncloud/ocis/pull/3626)
 * Enhancement - Update linkshare capabilities: [#3579](https://github.com/owncloud/ocis/pull/3579)
 * Enhancement - Update reva to v2.x.x: [#3552](https://github.com/owncloud/ocis/pull/3552)
 
@@ -67,13 +64,6 @@ The following sections list the changes for unreleased.
 
    https://github.com/owncloud/ocis/pull/3551
 
-* Change - Reduce drives in graph /me/drives API: [#3629](https://github.com/owncloud/ocis/pull/3629)
-
-   Reduced the drives in the graph `/me/drives` API to only the drives the user has access to. The
-   endpoint `/drives` will list all drives when the user has the permission.
-
-   https://github.com/owncloud/ocis/pull/3629
-
 * Change - Switched default configuration to use libregraph/idm: [#3331](https://github.com/owncloud/ocis/pull/3331)
 
    We switched the default configuration of oCIS to use the "idm" service (based on
@@ -83,13 +73,6 @@ The following sections list the changes for unreleased.
    https://github.com/owncloud/ocis/pull/3331
    https://github.com/owncloud/ocis/pull/3633
 
-* Enhancement - Align service naming: [#3606](https://github.com/owncloud/ocis/pull/3606)
-
-   We now reflect the configured service names when listing them in the ocis runtime
-
-   https://github.com/owncloud/ocis/issues/3603
-   https://github.com/owncloud/ocis/pull/3606
-
 * Enhancement - Add capability for public link single file edit: [#6787](https://github.com/owncloud/web/pull/6787)
 
    It is now possible to share a single file by link with edit permissions. Therefore we need a
@@ -99,13 +82,6 @@ The following sections list the changes for unreleased.
    https://github.com/owncloud/web/pull/6787
    https://github.com/owncloud/ocis/pull/3538
 
-* Enhancement - Added `share_jail` and `projects` feature flags in spaces capability: [#3626](https://github.com/owncloud/ocis/pull/3626)
-
-   We've added feature flags to the `spaces` capability to indicate to clients which features are
-   supposed to be shown to users.
-
-   https://github.com/owncloud/ocis/pull/3626
-
 * Enhancement - Update linkshare capabilities: [#3579](https://github.com/owncloud/ocis/pull/3579)
 
    We have updated the capabilities regarding password enforcement and expiration dates of
@@ -120,13 +96,11 @@ The following sections list the changes for unreleased.
 
   * TODO
 
-   https://github.com/owncloud/ocis/issues/3621
    https://github.com/owncloud/ocis/pull/3552
    https://github.com/owncloud/ocis/pull/3570
    https://github.com/owncloud/ocis/pull/3601
    https://github.com/owncloud/ocis/pull/3605
    https://github.com/owncloud/ocis/pull/3611
-   https://github.com/owncloud/ocis/pull/3637
 # Changelog for [1.20.0] (2022-04-13)
 
 The following sections list the changes for 1.20.0.
diff --git a/changelog/unreleased/align-service-naming.md b/changelog/unreleased/align-service-naming.md
deleted file mode 100644
index dfcff86e86d..00000000000
--- a/changelog/unreleased/align-service-naming.md
+++ /dev/null
@@ -1,6 +0,0 @@
-Enhancement: align service naming
-
-We now reflect the configured service names when listing them in the ocis runtime
-
-https://github.com/owncloud/ocis/pull/3606
-https://github.com/owncloud/ocis/issues/3603
\ No newline at end of file
diff --git a/changelog/unreleased/graph-me-drives.md b/changelog/unreleased/graph-me-drives.md
deleted file mode 100644
index 3104450cd94..00000000000
--- a/changelog/unreleased/graph-me-drives.md
+++ /dev/null
@@ -1,6 +0,0 @@
-Change: Reduce drives in graph /me/drives API
-
-Reduced the drives in the graph `/me/drives` API to only the drives the user has access to.
-The endpoint `/drives` will list all drives when the user has the permission. 
-
-https://github.com/owncloud/ocis/pull/3629
diff --git a/changelog/unreleased/spaces-capabilities.md b/changelog/unreleased/spaces-capabilities.md
deleted file mode 100644
index f2a90c40767..00000000000
--- a/changelog/unreleased/spaces-capabilities.md
+++ /dev/null
@@ -1,5 +0,0 @@
-Enhancement: Added `share_jail` and `projects` feature flags in spaces capability
-
-We've added feature flags to the `spaces` capability to indicate to clients which features are supposed to be shown to users.
-
-https://github.com/owncloud/ocis/pull/3626
diff --git a/changelog/unreleased/update-reva.md b/changelog/unreleased/update-reva.md
index 06ddac93e1b..0cce56ff613 100644
--- a/changelog/unreleased/update-reva.md
+++ b/changelog/unreleased/update-reva.md
@@ -9,5 +9,3 @@ https://github.com/owncloud/ocis/pull/3570
 https://github.com/owncloud/ocis/pull/3601
 https://github.com/owncloud/ocis/pull/3605
 https://github.com/owncloud/ocis/pull/3611
-https://github.com/owncloud/ocis/issues/3621
-https://github.com/owncloud/ocis/pull/3637
diff --git a/extensions/audit/pkg/types/conversion.go b/extensions/audit/pkg/types/conversion.go
index fbb789ea596..5c3f3f1c85b 100644
--- a/extensions/audit/pkg/types/conversion.go
+++ b/extensions/audit/pkg/types/conversion.go
@@ -234,7 +234,7 @@ func FilesAuditEvent(base AuditEvent, itemid, owner, path string) AuditEventFile
 
 // FileUploaded converts a FileUploaded event to an AuditEventFileCreated
 func FileUploaded(ev events.FileUploaded) AuditEventFileCreated {
-	iid, path, uid := extractFileDetails(ev.Ref, ev.Owner)
+	iid, path, uid := extractFileDetails(ev.FileID, ev.Owner)
 	base := BasicAuditEvent(uid, "", MessageFileCreated(iid), ActionFileCreated)
 	return AuditEventFileCreated{
 		AuditEventFiles: FilesAuditEvent(base, iid, uid, path),
@@ -243,7 +243,7 @@ func FileUploaded(ev events.FileUploaded) AuditEventFileCreated {
 
 // FileDownloaded converts a FileDownloaded event to an AuditEventFileRead
 func FileDownloaded(ev events.FileDownloaded) AuditEventFileRead {
-	iid, path, uid := extractFileDetails(ev.Ref, ev.Owner)
+	iid, path, uid := extractFileDetails(ev.FileID, ev.Owner)
 	base := BasicAuditEvent(uid, "", MessageFileRead(iid), ActionFileRead)
 	return AuditEventFileRead{
 		AuditEventFiles: FilesAuditEvent(base, iid, uid, path),
@@ -252,7 +252,7 @@ func FileDownloaded(ev events.FileDownloaded) AuditEventFileRead {
 
 // ItemMoved converts a ItemMoved event to an AuditEventFileRenamed
 func ItemMoved(ev events.ItemMoved) AuditEventFileRenamed {
-	iid, path, uid := extractFileDetails(ev.Ref, ev.Owner)
+	iid, path, uid := extractFileDetails(ev.FileID, ev.Owner)
 
 	oldpath := ""
 	if ev.OldReference != nil {
@@ -268,7 +268,7 @@ func ItemMoved(ev events.ItemMoved) AuditEventFileRenamed {
 
 // ItemTrashed converts a ItemTrashed event to an AuditEventFileDeleted
 func ItemTrashed(ev events.ItemTrashed) AuditEventFileDeleted {
-	iid, path, uid := extractFileDetails(ev.Ref, ev.Owner)
+	iid, path, uid := extractFileDetails(ev.FileID, ev.Owner)
 	base := BasicAuditEvent(uid, "", MessageFileTrashed(iid), ActionFileTrashed)
 	return AuditEventFileDeleted{
 		AuditEventFiles: FilesAuditEvent(base, iid, uid, path),
@@ -277,7 +277,7 @@ func ItemTrashed(ev events.ItemTrashed) AuditEventFileDeleted {
 
 // ItemPurged converts a ItemPurged event to an AuditEventFilePurged
 func ItemPurged(ev events.ItemPurged) AuditEventFilePurged {
-	iid, path, uid := extractFileDetails(ev.Ref, ev.Owner)
+	iid, path, uid := extractFileDetails(ev.FileID, ev.Owner)
 	base := BasicAuditEvent(uid, "", MessageFilePurged(iid), ActionFilePurged)
 	return AuditEventFilePurged{
 		AuditEventFiles: FilesAuditEvent(base, iid, uid, path),
@@ -286,7 +286,7 @@ func ItemPurged(ev events.ItemPurged) AuditEventFilePurged {
 
 // ItemRestored converts a ItemRestored event to an AuditEventFileRestored
 func ItemRestored(ev events.ItemRestored) AuditEventFileRestored {
-	iid, path, uid := extractFileDetails(ev.Ref, ev.Owner)
+	iid, path, uid := extractFileDetails(ev.FileID, ev.Owner)
 
 	oldpath := ""
 	if ev.OldReference != nil {
@@ -302,7 +302,7 @@ func ItemRestored(ev events.ItemRestored) AuditEventFileRestored {
 
 // FileVersionRestored converts a FileVersionRestored event to an AuditEventFileVersionRestored
 func FileVersionRestored(ev events.FileVersionRestored) AuditEventFileVersionRestored {
-	iid, path, uid := extractFileDetails(ev.Ref, ev.Owner)
+	iid, path, uid := extractFileDetails(ev.FileID, ev.Owner)
 	base := BasicAuditEvent(uid, "", MessageFileVersionRestored(iid, ev.Key), ActionFileVersionRestored)
 	return AuditEventFileVersionRestored{
 		AuditEventFiles: FilesAuditEvent(base, iid, uid, path),
diff --git a/extensions/frontend/pkg/command/command.go b/extensions/frontend/pkg/command/command.go
index b613e8fc76a..96fb5e023c8 100644
--- a/extensions/frontend/pkg/command/command.go
+++ b/extensions/frontend/pkg/command/command.go
@@ -286,10 +286,8 @@ func frontendConfigFromStruct(c *cli.Context, cfg *config.Config, filesCfg map[s
 								},
 							},
 							"spaces": map[string]interface{}{
-								"version":    "0.0.1",
-								"enabled":    cfg.EnableProjectSpaces || cfg.EnableShareJail,
-								"projects":   cfg.EnableProjectSpaces,
-								"share_jail": cfg.EnableShareJail,
+								"version": "0.0.1",
+								"enabled": cfg.EnableProjectSpaces,
 							},
 						},
 						"version": map[string]interface{}{
diff --git a/extensions/frontend/pkg/config/config.go b/extensions/frontend/pkg/config/config.go
index a82e1fd42d1..7006febe774 100644
--- a/extensions/frontend/pkg/config/config.go
+++ b/extensions/frontend/pkg/config/config.go
@@ -23,8 +23,7 @@ type Config struct {
 	SkipUserGroupsInToken bool `yaml:"skip_users_groups_in_token"`
 
 	EnableFavorites          bool   `yaml:"favorites"`
-	EnableProjectSpaces      bool   `yaml:"enable_project_spaces" env:"FRONTEND_ENABLE_PROJECT_SPACES" desc:"Indicates to clients that project spaces are supposed to be made available."`
-	EnableShareJail          bool   `yaml:"enable_share_jail" env:"FRONTEND_ENABLE_SHARE_JAIL" desc:"Indicates to clients that the share jail is supposed to be used."`
+	EnableProjectSpaces      bool   `yaml:"enable_project_spaces"`
 	UploadMaxChunkSize       int    `yaml:"upload_max_chunk_size"`
 	UploadHTTPMethodOverride string `yaml:"upload_http_method_override"`
 	DefaultUploadProtocol    string `yaml:"default_upload_protocol"`
diff --git a/extensions/frontend/pkg/config/defaults/defaultconfig.go b/extensions/frontend/pkg/config/defaults/defaultconfig.go
index a1067f1eb5f..11f7958f1f3 100644
--- a/extensions/frontend/pkg/config/defaults/defaultconfig.go
+++ b/extensions/frontend/pkg/config/defaults/defaultconfig.go
@@ -33,7 +33,6 @@ func DefaultConfig() *config.Config {
 		PublicURL:                "https://localhost:9200",
 		EnableFavorites:          false,
 		EnableProjectSpaces:      true,
-		EnableShareJail:          true,
 		UploadMaxChunkSize:       1e+8,
 		UploadHTTPMethodOverride: "",
 		DefaultUploadProtocol:    "tus",
diff --git a/extensions/graph/pkg/service/v0/drives.go b/extensions/graph/pkg/service/v0/drives.go
index 821e664898e..673f246fa57 100644
--- a/extensions/graph/pkg/service/v0/drives.go
+++ b/extensions/graph/pkg/service/v0/drives.go
@@ -31,19 +31,8 @@ import (
 	merrors "go-micro.dev/v4/errors"
 )
 
-// GetDrives lists all drives the current user has access to
+// GetDrives implements the Service interface.
 func (g Graph) GetDrives(w http.ResponseWriter, r *http.Request) {
-	g.getDrives(w, r, false)
-}
-
-// GetAllDrives lists all drives, including other user's drives, if the current
-// user has the permission.
-func (g Graph) GetAllDrives(w http.ResponseWriter, r *http.Request) {
-	g.getDrives(w, r, true)
-}
-
-// getDrives implements the Service interface.
-func (g Graph) getDrives(w http.ResponseWriter, r *http.Request, unrestricted bool) {
 	sanitizedPath := strings.TrimPrefix(r.URL.Path, "/graph/v1.0/")
 	// Parse the request with odata parser
 	odataReq, err := godata.ParseRequest(r.Context(), sanitizedPath, r.URL.Query())
@@ -52,10 +41,7 @@ func (g Graph) getDrives(w http.ResponseWriter, r *http.Request, unrestricted bo
 		errorcode.InvalidRequest.Render(w, r, http.StatusBadRequest, err.Error())
 		return
 	}
-	g.logger.Debug().
-		Interface("query", r.URL.Query()).
-		Bool("unrestricted", unrestricted).
-		Msg("Calling getDrives")
+	g.logger.Info().Interface("query", r.URL.Query()).Msg("Calling GetDrives")
 	ctx := r.Context()
 
 	filters, err := generateCs3Filters(odataReq)
@@ -64,7 +50,7 @@ func (g Graph) getDrives(w http.ResponseWriter, r *http.Request, unrestricted bo
 		errorcode.NotSupported.Render(w, r, http.StatusNotImplemented, err.Error())
 		return
 	}
-	res, err := g.ListStorageSpacesWithFilters(ctx, filters, unrestricted)
+	res, err := g.ListStorageSpacesWithFilters(ctx, filters)
 	switch {
 	case err != nil:
 		g.logger.Error().Err(err).Msg(ListStorageSpacesTransportErr)
@@ -120,7 +106,7 @@ func (g Graph) GetSingleDrive(w http.ResponseWriter, r *http.Request) {
 	ctx := r.Context()
 
 	filters := []*storageprovider.ListStorageSpacesRequest_Filter{listStorageSpacesIDFilter(driveID)}
-	res, err := g.ListStorageSpacesWithFilters(ctx, filters, true)
+	res, err := g.ListStorageSpacesWithFilters(ctx, filters)
 	switch {
 	case err != nil:
 		g.logger.Error().Err(err).Msg(ListStorageSpacesTransportErr)
@@ -287,8 +273,7 @@ func (g Graph) UpdateDrive(w http.ResponseWriter, r *http.Request) {
 	identifierParts := strings.Split(driveID, "!")
 	switch len(identifierParts) {
 	case 1:
-		sID, _ := resourceid.StorageIDUnwrap(identifierParts[0])
-		root.StorageId, root.OpaqueId = identifierParts[0], sID
+		root.StorageId, root.OpaqueId = identifierParts[0], identifierParts[0]
 	case 2:
 		root.StorageId, root.OpaqueId = identifierParts[0], identifierParts[1]
 	default:
@@ -413,7 +398,7 @@ func (g Graph) formatDrives(ctx context.Context, baseURL *url.URL, storageSpaces
 }
 
 // ListStorageSpacesWithFilters List Storage Spaces using filters
-func (g Graph) ListStorageSpacesWithFilters(ctx context.Context, filters []*storageprovider.ListStorageSpacesRequest_Filter, unrestricted bool) (*storageprovider.ListStorageSpacesResponse, error) {
+func (g Graph) ListStorageSpacesWithFilters(ctx context.Context, filters []*storageprovider.ListStorageSpacesRequest_Filter) (*storageprovider.ListStorageSpacesResponse, error) {
 	client := g.GetGatewayClient()
 
 	permissions := make(map[string]struct{}, 1)
@@ -438,35 +423,17 @@ func (g Graph) ListStorageSpacesWithFilters(ctx context.Context, filters []*stor
 				Decoder: "json",
 				Value:   value,
 			},
-			"unrestricted": {
-				Decoder: "plain",
-				Value:   []byte(strconv.FormatBool(unrestricted)),
-			},
 		}},
 		Filters: filters,
 	})
 	return res, err
 }
 
-func generateSpaceId(id *storageprovider.ResourceId) (spaceID string) {
-	spaceID = id.GetStorageId()
-	// 2nd ID to compare is the opaque ID of the Space Root
-	spaceID2 := id.GetOpaqueId()
-	if strings.Contains(spaceID, "$") {
-		spaceID2, _ = resourceid.StorageIDUnwrap(spaceID)
-	}
-	// Append opaqueID only if it is different from the spaceID2
-	if id.OpaqueId != spaceID2 {
-		spaceID += "!" + id.OpaqueId
-	}
-	return spaceID
-}
-
 func (g Graph) cs3StorageSpaceToDrive(ctx context.Context, baseURL *url.URL, space *storageprovider.StorageSpace) (*libregraph.Drive, error) {
 	if space.Root == nil {
 		return nil, fmt.Errorf("space has no root")
 	}
-	spaceID := generateSpaceId(space.Root)
+	rootID := resourceid.OwnCloudResourceIDWrap(space.Root)
 
 	var permissions []libregraph.Permission
 	if space.Opaque != nil {
@@ -524,14 +491,18 @@ func (g Graph) cs3StorageSpaceToDrive(ctx context.Context, baseURL *url.URL, spa
 		}
 	}
 
+	spaceID := space.Root.StorageId
+	if space.Root.OpaqueId != space.Root.StorageId {
+		spaceID = rootID
+	}
 	drive := &libregraph.Drive{
-		Id:   libregraph.PtrString(spaceID),
+		Id:   &spaceID,
 		Name: &space.Name,
 		//"createdDateTime": "string (timestamp)", // TODO read from StorageSpace ... needs Opaque for now
 		//"description": "string", // TODO read from StorageSpace ... needs Opaque for now
 		DriveType: &space.SpaceType,
 		Root: &libregraph.DriveItem{
-			Id:          libregraph.PtrString(resourceid.OwnCloudResourceIDWrap(space.Root)),
+			Id:          &rootID,
 			Permissions: permissions,
 		},
 	}
@@ -764,10 +735,9 @@ func (g Graph) DeleteDrive(w http.ResponseWriter, r *http.Request) {
 	root := &storageprovider.ResourceId{}
 
 	identifierParts := strings.Split(driveID, "!")
-	sID, _ := resourceid.StorageIDUnwrap(identifierParts[0])
 	switch len(identifierParts) {
 	case 1:
-		root.StorageId, root.OpaqueId = identifierParts[0], sID
+		root.StorageId, root.OpaqueId = identifierParts[0], identifierParts[0]
 	case 2:
 		root.StorageId, root.OpaqueId = identifierParts[0], identifierParts[1]
 	default:
diff --git a/extensions/graph/pkg/service/v0/service.go b/extensions/graph/pkg/service/v0/service.go
index c198834716e..599a558f3b3 100644
--- a/extensions/graph/pkg/service/v0/service.go
+++ b/extensions/graph/pkg/service/v0/service.go
@@ -173,7 +173,7 @@ func NewService(opts ...Option) Service {
 					account.JWTSecret(options.Config.TokenManager.JWTSecret)),
 				)
 				r.Route("/drives", func(r chi.Router) {
-					r.Get("/", svc.GetAllDrives)
+					r.Get("/", svc.GetDrives)
 					r.Post("/", svc.CreateDrive)
 					r.Route("/{driveID}", func(r chi.Router) {
 						r.Patch("/", svc.UpdateDrive)
diff --git a/extensions/group/pkg/config/defaults/defaultconfig.go b/extensions/group/pkg/config/defaults/defaultconfig.go
index 47c10b9f798..373e118a4be 100644
--- a/extensions/group/pkg/config/defaults/defaultconfig.go
+++ b/extensions/group/pkg/config/defaults/defaultconfig.go
@@ -27,7 +27,7 @@ func DefaultConfig() *config.Config {
 			Protocol: "tcp",
 		},
 		Service: config.Service{
-			Name: "group",
+			Name: "user",
 		},
 		GroupMembersCacheExpiration: 5,
 		Reva: &config.Reva{
diff --git a/extensions/storage-shares/pkg/config/defaults/defaultconfig.go b/extensions/storage-shares/pkg/config/defaults/defaultconfig.go
index 40aba54cfdb..75a6127e90c 100644
--- a/extensions/storage-shares/pkg/config/defaults/defaultconfig.go
+++ b/extensions/storage-shares/pkg/config/defaults/defaultconfig.go
@@ -28,7 +28,7 @@ func DefaultConfig() *config.Config {
 			Protocol: "tcp",
 		},
 		Service: config.Service{
-			Name: "storage-shares",
+			Name: "storage-metadata",
 		},
 		Reva: &config.Reva{
 			Address: "127.0.0.1:9142",
diff --git a/go.mod b/go.mod
index 90185fb87ae..abb9d949f2f 100644
--- a/go.mod
+++ b/go.mod
@@ -9,7 +9,7 @@ require (
 	github.com/blevesearch/bleve/v2 v2.3.2
 	github.com/coreos/go-oidc/v3 v3.1.0
 	github.com/cs3org/go-cs3apis v0.0.0-20220412090512-93c5918b4bde
-	github.com/cs3org/reva/v2 v2.0.0-20220502075009-8bcec2e4663e
+	github.com/cs3org/reva/v2 v2.0.0-20220427203355-0164880ac7d3
 	github.com/disintegration/imaging v1.6.2
 	github.com/glauth/glauth/v2 v2.0.0-20211021011345-ef3151c28733
 	github.com/go-chi/chi/v5 v5.0.7
diff --git a/go.sum b/go.sum
index 2ee58f6e4f1..97e90625a25 100644
--- a/go.sum
+++ b/go.sum
@@ -318,8 +318,10 @@ github.com/cs3org/go-cs3apis v0.0.0-20220412090512-93c5918b4bde h1:WrD9O8ZaWvsm0
 github.com/cs3org/go-cs3apis v0.0.0-20220412090512-93c5918b4bde/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY=
 github.com/cs3org/reva v1.18.0 h1:MbPS5ZAa8RzKcTxAVeSDdISB3XXqLIxqB03BTN5ReBY=
 github.com/cs3org/reva v1.18.0/go.mod h1:e5VDUDu4vVWIeVkZcW//n6UZzhGGMa+Tz/whCiX3N6o=
-github.com/cs3org/reva/v2 v2.0.0-20220502075009-8bcec2e4663e h1:ym80MMvfFLHMxt6aiU67kTe/pzRBaSOUNdPkmeKYejk=
-github.com/cs3org/reva/v2 v2.0.0-20220502075009-8bcec2e4663e/go.mod h1:2e/4HcIy54Mic3V7Ow0bz4n5dkZU0dHIZSWomFe5vng=
+github.com/cs3org/reva/v2 v2.0.0-20220427133111-618964eed515 h1:8pPCLxNXVz/q7PMM6Zq1lff3P8SFAu8/CXwB2eA21xc=
+github.com/cs3org/reva/v2 v2.0.0-20220427133111-618964eed515/go.mod h1:2e/4HcIy54Mic3V7Ow0bz4n5dkZU0dHIZSWomFe5vng=
+github.com/cs3org/reva/v2 v2.0.0-20220427203355-0164880ac7d3 h1:6sKjGI0AUW5tBXWBduaBoc+9sNYZWQR894G0oFCbus0=
+github.com/cs3org/reva/v2 v2.0.0-20220427203355-0164880ac7d3/go.mod h1:2e/4HcIy54Mic3V7Ow0bz4n5dkZU0dHIZSWomFe5vng=
 github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8 h1:Z9lwXumT5ACSmJ7WGnFl+OMLLjpz5uR2fyz7dC255FI=
 github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8/go.mod h1:4abs/jPXcmJzYoYGF91JF9Uq9s/KL5n1jvFDix8KcqY=
 github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=
diff --git a/ocis-pkg/config/config.go b/ocis-pkg/config/config.go
index bb61c80cfd2..33b9645d2ea 100644
--- a/ocis-pkg/config/config.go
+++ b/ocis-pkg/config/config.go
@@ -73,7 +73,7 @@ type Config struct {
 	Accounts          *accounts.Config        `yaml:"accounts"`
 	GLAuth            *glauth.Config          `yaml:"glauth"`
 	Graph             *graph.Config           `yaml:"graph"`
-	GraphExplorer     *graphExplorer.Config   `yaml:"graph-explorer"`
+	GraphExplorer     *graphExplorer.Config   `yaml:"graph_explorer"`
 	IDP               *idp.Config             `yaml:"idp"`
 	IDM               *idm.Config             `yaml:"idm"`
 	Nats              *nats.Config            `yaml:"nats"`
@@ -84,17 +84,17 @@ type Config struct {
 	Settings          *settings.Config        `yaml:"settings"`
 	Gateway           *gateway.Config         `yaml:"gateway"`
 	Frontend          *frontend.Config        `yaml:"frontend"`
-	AuthBasic         *authbasic.Config       `yaml:"auth-basic"`
-	AuthBearer        *authbearer.Config      `yaml:"auth-bearer"`
-	AuthMachine       *authmachine.Config     `yaml:"auth-machine"`
+	AuthBasic         *authbasic.Config       `yaml:"auth_basic"`
+	AuthBearer        *authbearer.Config      `yaml:"auth_bearer"`
+	AuthMachine       *authmachine.Config     `yaml:"auth_machine"`
 	User              *user.Config            `yaml:"user"`
 	Group             *group.Config           `yaml:"group"`
-	AppProvider       *appprovider.Config     `yaml:"appprovider"`
+	AppProvider       *appprovider.Config     `yaml:"app_provider"`
 	Sharing           *sharing.Config         `yaml:"sharing"`
-	StorageMetadata   *storagemetadata.Config `yaml:"storage-metadata"`
-	StoragePublicLink *storagepublic.Config   `yaml:"storage-public"`
-	StorageUsers      *storageusers.Config    `yaml:"storage-users"`
-	StorageShares     *storageshares.Config   `yaml:"storage-shares"`
+	StorageMetadata   *storagemetadata.Config `yaml:"storage_metadata"`
+	StoragePublicLink *storagepublic.Config   `yaml:"storage_public"`
+	StorageUsers      *storageusers.Config    `yaml:"storage_users"`
+	StorageShares     *storageshares.Config   `yaml:"storage_shares"`
 	OCDav             *ocdav.Config           `yaml:"ocdav"`
 	Store             *store.Config           `yaml:"store"`
 	Thumbnails        *thumbnails.Config      `yaml:"thumbnails"`
diff --git a/ocis/pkg/command/accounts.go b/ocis/pkg/command/accounts.go
index 8434e0c2f51..e9981b9f540 100644
--- a/ocis/pkg/command/accounts.go
+++ b/ocis/pkg/command/accounts.go
@@ -16,12 +16,13 @@ func AccountsCommand(cfg *config.Config) *cli.Command {
 		Name:     cfg.Accounts.Service.Name,
 		Usage:    subcommandDescription(cfg.Accounts.Service.Name),
 		Category: "extensions",
-		Before: func(ctx *cli.Context) error {
-			err := parser.ParseConfig(cfg)
-			if err != nil {
+		Before: func(c *cli.Context) error {
+			if err := parser.ParseConfig(cfg); err != nil {
 				fmt.Printf("%v", err)
+				return err
 			}
-			return err
+			cfg.Accounts.Commons = cfg.Commons
+			return nil
 		},
 		Subcommands: command.GetCommands(cfg.Accounts),
 	}
diff --git a/ocis/pkg/command/audit.go b/ocis/pkg/command/audit.go
index 884b79fb3eb..03d390e6324 100644
--- a/ocis/pkg/command/audit.go
+++ b/ocis/pkg/command/audit.go
@@ -16,12 +16,13 @@ func AuditCommand(cfg *config.Config) *cli.Command {
 		Name:     "audit",
 		Usage:    "start audit service",
 		Category: "extensions",
-		Before: func(ctx *cli.Context) error {
-			err := parser.ParseConfig(cfg)
-			if err != nil {
+		Before: func(c *cli.Context) error {
+			if err := parser.ParseConfig(cfg); err != nil {
 				fmt.Printf("%v", err)
+				return err
 			}
-			return err
+			cfg.Audit.Commons = cfg.Commons
+			return nil
 		},
 		Subcommands: command.GetCommands(cfg.Audit),
 	}
diff --git a/ocis/pkg/command/glauth.go b/ocis/pkg/command/glauth.go
index bbe5af9e7fc..8a3059efff4 100644
--- a/ocis/pkg/command/glauth.go
+++ b/ocis/pkg/command/glauth.go
@@ -16,12 +16,13 @@ func GLAuthCommand(cfg *config.Config) *cli.Command {
 		Name:     cfg.GLAuth.Service.Name,
 		Usage:    subcommandDescription(cfg.GLAuth.Service.Name),
 		Category: "extensions",
-		Before: func(ctx *cli.Context) error {
-			err := parser.ParseConfig(cfg)
-			if err != nil {
+		Before: func(c *cli.Context) error {
+			if err := parser.ParseConfig(cfg); err != nil {
 				fmt.Printf("%v", err)
+				return err
 			}
-			return err
+			cfg.GLAuth.Commons = cfg.Commons
+			return nil
 		},
 		Subcommands: command.GetCommands(cfg.GLAuth),
 	}
diff --git a/ocis/pkg/command/graph.go b/ocis/pkg/command/graph.go
index 34158e1cc31..89dc41f64cf 100644
--- a/ocis/pkg/command/graph.go
+++ b/ocis/pkg/command/graph.go
@@ -16,12 +16,13 @@ func GraphCommand(cfg *config.Config) *cli.Command {
 		Name:     cfg.Graph.Service.Name,
 		Usage:    subcommandDescription(cfg.Graph.Service.Name),
 		Category: "extensions",
-		Before: func(ctx *cli.Context) error {
-			err := parser.ParseConfig(cfg)
-			if err != nil {
+		Before: func(c *cli.Context) error {
+			if err := parser.ParseConfig(cfg); err != nil {
 				fmt.Printf("%v", err)
+				return err
 			}
-			return err
+			cfg.Graph.Commons = cfg.Commons
+			return nil
 		},
 		Subcommands: command.GetCommands(cfg.Graph),
 	}
diff --git a/ocis/pkg/command/graphexplorer.go b/ocis/pkg/command/graphexplorer.go
index 6e1f890fbd3..ad33cf7b4a2 100644
--- a/ocis/pkg/command/graphexplorer.go
+++ b/ocis/pkg/command/graphexplorer.go
@@ -16,12 +16,13 @@ func GraphExplorerCommand(cfg *config.Config) *cli.Command {
 		Name:     cfg.GraphExplorer.Service.Name,
 		Usage:    subcommandDescription(cfg.GraphExplorer.Service.Name),
 		Category: "extensions",
-		Before: func(ctx *cli.Context) error {
-			err := parser.ParseConfig(cfg)
-			if err != nil {
+		Before: func(c *cli.Context) error {
+			if err := parser.ParseConfig(cfg); err != nil {
 				fmt.Printf("%v", err)
+				return err
 			}
-			return err
+			cfg.GraphExplorer.Commons = cfg.Commons
+			return nil
 		},
 		Subcommands: command.GetCommands(cfg.GraphExplorer),
 	}
diff --git a/ocis/pkg/command/idm.go b/ocis/pkg/command/idm.go
index 86d3cae7778..9a375c8c68f 100644
--- a/ocis/pkg/command/idm.go
+++ b/ocis/pkg/command/idm.go
@@ -16,12 +16,13 @@ func IDMCommand(cfg *config.Config) *cli.Command {
 		Name:     "idm",
 		Usage:    "idm extension commands",
 		Category: "extensions",
-		Before: func(ctx *cli.Context) error {
-			err := parser.ParseConfig(cfg)
-			if err != nil {
+		Before: func(c *cli.Context) error {
+			if err := parser.ParseConfig(cfg); err != nil {
 				fmt.Printf("%v", err)
+				return err
 			}
-			return err
+			cfg.IDM.Commons = cfg.Commons
+			return nil
 		},
 		Subcommands: command.GetCommands(cfg.IDM),
 	}
diff --git a/ocis/pkg/command/idp.go b/ocis/pkg/command/idp.go
index 0f37a98c059..82909ee9a84 100644
--- a/ocis/pkg/command/idp.go
+++ b/ocis/pkg/command/idp.go
@@ -16,12 +16,13 @@ func IDPCommand(cfg *config.Config) *cli.Command {
 		Name:     cfg.IDP.Service.Name,
 		Usage:    subcommandDescription(cfg.IDP.Service.Name),
 		Category: "extensions",
-		Before: func(ctx *cli.Context) error {
-			err := parser.ParseConfig(cfg)
-			if err != nil {
+		Before: func(c *cli.Context) error {
+			if err := parser.ParseConfig(cfg); err != nil {
 				fmt.Printf("%v", err)
+				return err
 			}
-			return err
+			cfg.IDP.Commons = cfg.Commons
+			return nil
 		},
 		Subcommands: command.GetCommands(cfg.IDP),
 	}
diff --git a/ocis/pkg/command/natsserver.go b/ocis/pkg/command/natsserver.go
index 6a46a1cc7a3..48cf8174a8a 100644
--- a/ocis/pkg/command/natsserver.go
+++ b/ocis/pkg/command/natsserver.go
@@ -16,12 +16,13 @@ func NatsServerCommand(cfg *config.Config) *cli.Command {
 		Name:     "nats-server",
 		Usage:    "start nats server",
 		Category: "extensions",
-		Before: func(ctx *cli.Context) error {
-			err := parser.ParseConfig(cfg)
-			if err != nil {
+		Before: func(c *cli.Context) error {
+			if err := parser.ParseConfig(cfg); err != nil {
 				fmt.Printf("%v", err)
+				return err
 			}
-			return err
+			cfg.Nats.Commons = cfg.Commons
+			return nil
 		},
 		Subcommands: command.GetCommands(cfg.Nats),
 	}
diff --git a/ocis/pkg/command/notifications.go b/ocis/pkg/command/notifications.go
index a6f1113d747..ee362dc7ed1 100644
--- a/ocis/pkg/command/notifications.go
+++ b/ocis/pkg/command/notifications.go
@@ -16,12 +16,13 @@ func NotificationsCommand(cfg *config.Config) *cli.Command {
 		Name:     "notifications",
 		Usage:    "start notifications service",
 		Category: "extensions",
-		Before: func(ctx *cli.Context) error {
-			err := parser.ParseConfig(cfg)
-			if err != nil {
+		Before: func(c *cli.Context) error {
+			if err := parser.ParseConfig(cfg); err != nil {
 				fmt.Printf("%v", err)
+				return err
 			}
-			return err
+			cfg.Notifications.Commons = cfg.Commons
+			return nil
 		},
 		Subcommands: command.GetCommands(cfg.Notifications),
 	}
diff --git a/ocis/pkg/command/ocdav.go b/ocis/pkg/command/ocdav.go
index c13e6ee07ff..85fdeb45707 100644
--- a/ocis/pkg/command/ocdav.go
+++ b/ocis/pkg/command/ocdav.go
@@ -1,8 +1,11 @@
 package command
 
 import (
+	"fmt"
+
 	"github.com/owncloud/ocis/extensions/ocdav/pkg/command"
 	"github.com/owncloud/ocis/ocis-pkg/config"
+	"github.com/owncloud/ocis/ocis-pkg/config/parser"
 	"github.com/owncloud/ocis/ocis/pkg/register"
 	"github.com/urfave/cli/v2"
 )
@@ -13,9 +16,14 @@ func OCDavCommand(cfg *config.Config) *cli.Command {
 		Name:     "ocdav",
 		Usage:    "start ocdav",
 		Category: "extensions",
-		// Before: func(ctx *cli.Context) error {
-		// 	return ParseStorageCommon(ctx, cfg)
-		// },
+		Before: func(c *cli.Context) error {
+			if err := parser.ParseConfig(cfg); err != nil {
+				fmt.Printf("%v", err)
+				return err
+			}
+			cfg.OCDav.Commons = cfg.Commons
+			return nil
+		},
 		Action: func(c *cli.Context) error {
 			origCmd := command.OCDav(cfg.OCDav)
 			return handleOriginalAction(c, origCmd)
diff --git a/ocis/pkg/command/ocs.go b/ocis/pkg/command/ocs.go
index fdd76af613c..b2f1b5bd620 100644
--- a/ocis/pkg/command/ocs.go
+++ b/ocis/pkg/command/ocs.go
@@ -16,12 +16,13 @@ func OCSCommand(cfg *config.Config) *cli.Command {
 		Name:     cfg.OCS.Service.Name,
 		Usage:    subcommandDescription(cfg.OCS.Service.Name),
 		Category: "extensions",
-		Before: func(ctx *cli.Context) error {
-			err := parser.ParseConfig(cfg)
-			if err != nil {
+		Before: func(c *cli.Context) error {
+			if err := parser.ParseConfig(cfg); err != nil {
 				fmt.Printf("%v", err)
+				return err
 			}
-			return err
+			cfg.OCS.Commons = cfg.Commons
+			return nil
 		},
 		Subcommands: command.GetCommands(cfg.OCS),
 	}
diff --git a/ocis/pkg/command/proxy.go b/ocis/pkg/command/proxy.go
index a23eec33cf3..219a4c06e15 100644
--- a/ocis/pkg/command/proxy.go
+++ b/ocis/pkg/command/proxy.go
@@ -16,12 +16,13 @@ func ProxyCommand(cfg *config.Config) *cli.Command {
 		Name:     cfg.Proxy.Service.Name,
 		Usage:    subcommandDescription(cfg.Proxy.Service.Name),
 		Category: "extensions",
-		Before: func(ctx *cli.Context) error {
-			err := parser.ParseConfig(cfg)
-			if err != nil {
+		Before: func(c *cli.Context) error {
+			if err := parser.ParseConfig(cfg); err != nil {
 				fmt.Printf("%v", err)
+				return err
 			}
-			return err
+			cfg.Proxy.Commons = cfg.Commons
+			return nil
 		},
 		Subcommands: command.GetCommands(cfg.Proxy),
 	}
diff --git a/ocis/pkg/command/settings.go b/ocis/pkg/command/settings.go
index 33032f30c0b..1a454bf58c0 100644
--- a/ocis/pkg/command/settings.go
+++ b/ocis/pkg/command/settings.go
@@ -16,12 +16,13 @@ func SettingsCommand(cfg *config.Config) *cli.Command {
 		Name:     cfg.Settings.Service.Name,
 		Usage:    subcommandDescription(cfg.Settings.Service.Name),
 		Category: "extensions",
-		Before: func(ctx *cli.Context) error {
-			err := parser.ParseConfig(cfg)
-			if err != nil {
+		Before: func(c *cli.Context) error {
+			if err := parser.ParseConfig(cfg); err != nil {
 				fmt.Printf("%v", err)
+				return err
 			}
-			return err
+			cfg.Settings.Commons = cfg.Commons
+			return nil
 		},
 		Subcommands: command.GetCommands(cfg.Settings),
 	}
diff --git a/ocis/pkg/command/storageappprovider.go b/ocis/pkg/command/storageappprovider.go
index beb494d3416..f44aa55fad3 100644
--- a/ocis/pkg/command/storageappprovider.go
+++ b/ocis/pkg/command/storageappprovider.go
@@ -1,8 +1,11 @@
 package command
 
 import (
+	"fmt"
+
 	"github.com/owncloud/ocis/extensions/appprovider/pkg/command"
 	"github.com/owncloud/ocis/ocis-pkg/config"
+	"github.com/owncloud/ocis/ocis-pkg/config/parser"
 	"github.com/owncloud/ocis/ocis/pkg/register"
 	"github.com/urfave/cli/v2"
 )
@@ -13,6 +16,14 @@ func StorageAppProviderCommand(cfg *config.Config) *cli.Command {
 		Name:     "storage-app-provider",
 		Usage:    "start storage app-provider service",
 		Category: "extensions",
+		Before: func(c *cli.Context) error {
+			if err := parser.ParseConfig(cfg); err != nil {
+				fmt.Printf("%v", err)
+				return err
+			}
+			cfg.AppProvider.Commons = cfg.Commons
+			return nil
+		},
 		Action: func(c *cli.Context) error {
 			origCmd := command.AppProvider(cfg.AppProvider)
 			return handleOriginalAction(c, origCmd)
diff --git a/ocis/pkg/command/storageauthbasic.go b/ocis/pkg/command/storageauthbasic.go
index 26164983f76..4c8dba5cdbb 100644
--- a/ocis/pkg/command/storageauthbasic.go
+++ b/ocis/pkg/command/storageauthbasic.go
@@ -1,8 +1,11 @@
 package command
 
 import (
+	"fmt"
+
 	"github.com/owncloud/ocis/extensions/auth-basic/pkg/command"
 	"github.com/owncloud/ocis/ocis-pkg/config"
+	"github.com/owncloud/ocis/ocis-pkg/config/parser"
 	"github.com/owncloud/ocis/ocis/pkg/register"
 	"github.com/urfave/cli/v2"
 )
@@ -13,6 +16,14 @@ func StorageAuthBasicCommand(cfg *config.Config) *cli.Command {
 		Name:     "storage-auth-basic",
 		Usage:    "start storage auth-basic service",
 		Category: "extensions",
+		Before: func(c *cli.Context) error {
+			if err := parser.ParseConfig(cfg); err != nil {
+				fmt.Printf("%v", err)
+				return err
+			}
+			cfg.AuthBasic.Commons = cfg.Commons
+			return nil
+		},
 		Action: func(c *cli.Context) error {
 			origCmd := command.AuthBasic(cfg.AuthBasic)
 			return handleOriginalAction(c, origCmd)
diff --git a/ocis/pkg/command/storageauthbearer.go b/ocis/pkg/command/storageauthbearer.go
index c3c9855d849..20b641cda48 100644
--- a/ocis/pkg/command/storageauthbearer.go
+++ b/ocis/pkg/command/storageauthbearer.go
@@ -1,8 +1,11 @@
 package command
 
 import (
+	"fmt"
+
 	"github.com/owncloud/ocis/extensions/auth-bearer/pkg/command"
 	"github.com/owncloud/ocis/ocis-pkg/config"
+	"github.com/owncloud/ocis/ocis-pkg/config/parser"
 	"github.com/owncloud/ocis/ocis/pkg/register"
 	"github.com/urfave/cli/v2"
 )
@@ -13,6 +16,14 @@ func StorageAuthBearerCommand(cfg *config.Config) *cli.Command {
 		Name:     "storage-auth-bearer",
 		Usage:    "Start storage auth-bearer service",
 		Category: "extensions",
+		Before: func(c *cli.Context) error {
+			if err := parser.ParseConfig(cfg); err != nil {
+				fmt.Printf("%v", err)
+				return err
+			}
+			cfg.AuthBearer.Commons = cfg.Commons
+			return nil
+		},
 		Action: func(c *cli.Context) error {
 			origCmd := command.AuthBearer(cfg.AuthBearer)
 			return handleOriginalAction(c, origCmd)
diff --git a/ocis/pkg/command/storageauthmachine.go b/ocis/pkg/command/storageauthmachine.go
index bbed4b2c1ea..f42ecb4b558 100644
--- a/ocis/pkg/command/storageauthmachine.go
+++ b/ocis/pkg/command/storageauthmachine.go
@@ -1,8 +1,11 @@
 package command
 
 import (
+	"fmt"
+
 	"github.com/owncloud/ocis/extensions/auth-machine/pkg/command"
 	"github.com/owncloud/ocis/ocis-pkg/config"
+	"github.com/owncloud/ocis/ocis-pkg/config/parser"
 	"github.com/owncloud/ocis/ocis/pkg/register"
 	"github.com/urfave/cli/v2"
 )
@@ -13,6 +16,14 @@ func StorageAuthMachineCommand(cfg *config.Config) *cli.Command {
 		Name:     "storage-auth-machine",
 		Usage:    "start storage auth-machine service",
 		Category: "extensions",
+		Before: func(c *cli.Context) error {
+			if err := parser.ParseConfig(cfg); err != nil {
+				fmt.Printf("%v", err)
+				return err
+			}
+			cfg.AuthMachine.Commons = cfg.Commons
+			return nil
+		},
 		Action: func(c *cli.Context) error {
 			origCmd := command.AuthMachine(cfg.AuthMachine)
 			return handleOriginalAction(c, origCmd)
diff --git a/ocis/pkg/command/storagefrontend.go b/ocis/pkg/command/storagefrontend.go
index 4d37589feee..05252414a9f 100644
--- a/ocis/pkg/command/storagefrontend.go
+++ b/ocis/pkg/command/storagefrontend.go
@@ -1,8 +1,11 @@
 package command
 
 import (
+	"fmt"
+
 	"github.com/owncloud/ocis/extensions/frontend/pkg/command"
 	"github.com/owncloud/ocis/ocis-pkg/config"
+	"github.com/owncloud/ocis/ocis-pkg/config/parser"
 	"github.com/owncloud/ocis/ocis/pkg/register"
 	"github.com/urfave/cli/v2"
 )
@@ -13,6 +16,14 @@ func StorageFrontendCommand(cfg *config.Config) *cli.Command {
 		Name:     "storage-frontend",
 		Usage:    "start storage frontend",
 		Category: "extensions",
+		Before: func(c *cli.Context) error {
+			if err := parser.ParseConfig(cfg); err != nil {
+				fmt.Printf("%v", err)
+				return err
+			}
+			cfg.Frontend.Commons = cfg.Commons
+			return nil
+		},
 		Action: func(c *cli.Context) error {
 			origCmd := command.Frontend(cfg.Frontend)
 			return handleOriginalAction(c, origCmd)
diff --git a/ocis/pkg/command/storagegateway.go b/ocis/pkg/command/storagegateway.go
index f69adc3053b..17047b60686 100644
--- a/ocis/pkg/command/storagegateway.go
+++ b/ocis/pkg/command/storagegateway.go
@@ -1,8 +1,11 @@
 package command
 
 import (
+	"fmt"
+
 	"github.com/owncloud/ocis/extensions/gateway/pkg/command"
 	"github.com/owncloud/ocis/ocis-pkg/config"
+	"github.com/owncloud/ocis/ocis-pkg/config/parser"
 	"github.com/owncloud/ocis/ocis/pkg/register"
 	"github.com/urfave/cli/v2"
 )
@@ -13,10 +16,14 @@ func StorageGatewayCommand(cfg *config.Config) *cli.Command {
 		Name:     "storage-gateway",
 		Usage:    "start storage gateway",
 		Category: "extensions",
-		//Flags:    flagset.GatewayWithConfig(cfg.Storage),
-		// Before: func(ctx *cli.Context) error {
-		// 	return ParseStorageCommon(ctx, cfg)
-		// },
+		Before: func(c *cli.Context) error {
+			if err := parser.ParseConfig(cfg); err != nil {
+				fmt.Printf("%v", err)
+				return err
+			}
+			cfg.Gateway.Commons = cfg.Commons
+			return nil
+		},
 		Action: func(c *cli.Context) error {
 			origCmd := command.Gateway(cfg.Gateway)
 			return handleOriginalAction(c, origCmd)
diff --git a/ocis/pkg/command/storagegroupprovider.go b/ocis/pkg/command/storagegroupprovider.go
index 2e39709ee14..c93de96c110 100644
--- a/ocis/pkg/command/storagegroupprovider.go
+++ b/ocis/pkg/command/storagegroupprovider.go
@@ -1,8 +1,11 @@
 package command
 
 import (
+	"fmt"
+
 	"github.com/owncloud/ocis/extensions/group/pkg/command"
 	"github.com/owncloud/ocis/ocis-pkg/config"
+	"github.com/owncloud/ocis/ocis-pkg/config/parser"
 	"github.com/owncloud/ocis/ocis/pkg/register"
 	"github.com/urfave/cli/v2"
 )
@@ -13,6 +16,14 @@ func StorageGroupProviderCommand(cfg *config.Config) *cli.Command {
 		Name:     "storage-groupprovider",
 		Usage:    "start storage groupprovider service",
 		Category: "extensions",
+		Before: func(c *cli.Context) error {
+			if err := parser.ParseConfig(cfg); err != nil {
+				fmt.Printf("%v", err)
+				return err
+			}
+			cfg.Group.Commons = cfg.Commons
+			return nil
+		},
 		Action: func(c *cli.Context) error {
 			origCmd := command.Groups(cfg.Group)
 			return handleOriginalAction(c, origCmd)
diff --git a/ocis/pkg/command/storagemetadata.go b/ocis/pkg/command/storagemetadata.go
index 2e87bea4f07..2965c36cfcb 100644
--- a/ocis/pkg/command/storagemetadata.go
+++ b/ocis/pkg/command/storagemetadata.go
@@ -1,8 +1,11 @@
 package command
 
 import (
+	"fmt"
+
 	"github.com/owncloud/ocis/extensions/storage-metadata/pkg/command"
 	"github.com/owncloud/ocis/ocis-pkg/config"
+	"github.com/owncloud/ocis/ocis-pkg/config/parser"
 	"github.com/owncloud/ocis/ocis/pkg/register"
 	"github.com/urfave/cli/v2"
 )
@@ -13,6 +16,14 @@ func StorageMetadataCommand(cfg *config.Config) *cli.Command {
 		Name:     "storage-metadata",
 		Usage:    "start storage and data service for metadata",
 		Category: "extensions",
+		Before: func(c *cli.Context) error {
+			if err := parser.ParseConfig(cfg); err != nil {
+				fmt.Printf("%v", err)
+				return err
+			}
+			cfg.StorageMetadata.Commons = cfg.Commons
+			return nil
+		},
 		Action: func(c *cli.Context) error {
 			origCmd := command.StorageMetadata(cfg.StorageMetadata)
 			return handleOriginalAction(c, origCmd)
diff --git a/ocis/pkg/command/storagepubliclink.go b/ocis/pkg/command/storagepubliclink.go
index 06a99d0a7a2..fe2f8b75e80 100644
--- a/ocis/pkg/command/storagepubliclink.go
+++ b/ocis/pkg/command/storagepubliclink.go
@@ -1,8 +1,11 @@
 package command
 
 import (
+	"fmt"
+
 	"github.com/owncloud/ocis/extensions/storage-publiclink/pkg/command"
 	"github.com/owncloud/ocis/ocis-pkg/config"
+	"github.com/owncloud/ocis/ocis-pkg/config/parser"
 	"github.com/owncloud/ocis/ocis/pkg/register"
 	"github.com/urfave/cli/v2"
 )
@@ -13,6 +16,14 @@ func StoragePublicLinkCommand(cfg *config.Config) *cli.Command {
 		Name:     "storage-public-link",
 		Usage:    "start storage public link storage",
 		Category: "extensions",
+		Before: func(c *cli.Context) error {
+			if err := parser.ParseConfig(cfg); err != nil {
+				fmt.Printf("%v", err)
+				return err
+			}
+			cfg.StoragePublicLink.Commons = cfg.Commons
+			return nil
+		},
 		Action: func(c *cli.Context) error {
 			origCmd := command.StoragePublicLink(cfg.StoragePublicLink)
 			return handleOriginalAction(c, origCmd)
diff --git a/ocis/pkg/command/storageshares.go b/ocis/pkg/command/storageshares.go
index 04fe859bd0d..62f13c38a82 100644
--- a/ocis/pkg/command/storageshares.go
+++ b/ocis/pkg/command/storageshares.go
@@ -1,8 +1,11 @@
 package command
 
 import (
+	"fmt"
+
 	"github.com/owncloud/ocis/extensions/storage-shares/pkg/command"
 	"github.com/owncloud/ocis/ocis-pkg/config"
+	"github.com/owncloud/ocis/ocis-pkg/config/parser"
 	"github.com/owncloud/ocis/ocis/pkg/register"
 	"github.com/urfave/cli/v2"
 )
@@ -13,6 +16,14 @@ func StorageSharesCommand(cfg *config.Config) *cli.Command {
 		Name:     "storage-shares",
 		Usage:    "start storage and data provider for shares jail",
 		Category: "extensions",
+		Before: func(c *cli.Context) error {
+			if err := parser.ParseConfig(cfg); err != nil {
+				fmt.Printf("%v", err)
+				return err
+			}
+			cfg.StorageShares.Commons = cfg.Commons
+			return nil
+		},
 		Action: func(c *cli.Context) error {
 			origCmd := command.StorageShares(cfg.StorageShares)
 			return handleOriginalAction(c, origCmd)
diff --git a/ocis/pkg/command/storagesharing.go b/ocis/pkg/command/storagesharing.go
index fe9e3cb7960..63c7e2aa064 100644
--- a/ocis/pkg/command/storagesharing.go
+++ b/ocis/pkg/command/storagesharing.go
@@ -1,8 +1,11 @@
 package command
 
 import (
+	"fmt"
+
 	"github.com/owncloud/ocis/extensions/sharing/pkg/command"
 	"github.com/owncloud/ocis/ocis-pkg/config"
+	"github.com/owncloud/ocis/ocis-pkg/config/parser"
 	"github.com/owncloud/ocis/ocis/pkg/register"
 	"github.com/urfave/cli/v2"
 )
@@ -13,6 +16,14 @@ func StorageSharingCommand(cfg *config.Config) *cli.Command {
 		Name:     "storage-sharing",
 		Usage:    "start storage sharing service",
 		Category: "extensions",
+		Before: func(c *cli.Context) error {
+			if err := parser.ParseConfig(cfg); err != nil {
+				fmt.Printf("%v", err)
+				return err
+			}
+			cfg.Sharing.Commons = cfg.Commons
+			return nil
+		},
 		Action: func(c *cli.Context) error {
 			origCmd := command.Sharing(cfg.Sharing)
 			return handleOriginalAction(c, origCmd)
diff --git a/ocis/pkg/command/storageuserprovider.go b/ocis/pkg/command/storageuserprovider.go
index dabef25fb07..5e3af095696 100644
--- a/ocis/pkg/command/storageuserprovider.go
+++ b/ocis/pkg/command/storageuserprovider.go
@@ -1,8 +1,11 @@
 package command
 
 import (
+	"fmt"
+
 	"github.com/owncloud/ocis/extensions/user/pkg/command"
 	"github.com/owncloud/ocis/ocis-pkg/config"
+	"github.com/owncloud/ocis/ocis-pkg/config/parser"
 	"github.com/owncloud/ocis/ocis/pkg/register"
 	"github.com/urfave/cli/v2"
 )
@@ -13,6 +16,14 @@ func StorageUserProviderCommand(cfg *config.Config) *cli.Command {
 		Name:     "storage-userprovider",
 		Usage:    "start storage userprovider service",
 		Category: "extensions",
+		Before: func(c *cli.Context) error {
+			if err := parser.ParseConfig(cfg); err != nil {
+				fmt.Printf("%v", err)
+				return err
+			}
+			cfg.StorageUsers.Commons = cfg.Commons
+			return nil
+		},
 		Action: func(c *cli.Context) error {
 			origCmd := command.User(cfg.User)
 			return handleOriginalAction(c, origCmd)
diff --git a/ocis/pkg/command/store.go b/ocis/pkg/command/store.go
index 12bda770f99..50d1f92cdd0 100644
--- a/ocis/pkg/command/store.go
+++ b/ocis/pkg/command/store.go
@@ -17,12 +17,13 @@ func StoreCommand(cfg *config.Config) *cli.Command {
 		Name:     cfg.Store.Service.Name,
 		Usage:    subcommandDescription(cfg.Store.Service.Name),
 		Category: "extensions",
-		Before: func(ctx *cli.Context) error {
-			err := parser.ParseConfig(cfg)
-			if err != nil {
+		Before: func(c *cli.Context) error {
+			if err := parser.ParseConfig(cfg); err != nil {
 				fmt.Printf("%v", err)
+				return err
 			}
-			return err
+			cfg.Store.Commons = cfg.Commons
+			return nil
 		},
 		Subcommands: command.GetCommands(cfg.Store),
 	}
diff --git a/ocis/pkg/command/thumbnails.go b/ocis/pkg/command/thumbnails.go
index ca6e693a02d..6b888fb177e 100644
--- a/ocis/pkg/command/thumbnails.go
+++ b/ocis/pkg/command/thumbnails.go
@@ -16,12 +16,13 @@ func ThumbnailsCommand(cfg *config.Config) *cli.Command {
 		Name:     cfg.Thumbnails.Service.Name,
 		Usage:    subcommandDescription(cfg.Thumbnails.Service.Name),
 		Category: "extensions",
-		Before: func(ctx *cli.Context) error {
-			err := parser.ParseConfig(cfg)
-			if err != nil {
+		Before: func(c *cli.Context) error {
+			if err := parser.ParseConfig(cfg); err != nil {
 				fmt.Printf("%v", err)
+				return err
 			}
-			return err
+			cfg.Thumbnails.Commons = cfg.Commons
+			return nil
 		},
 		Subcommands: command.GetCommands(cfg.Thumbnails),
 	}
diff --git a/ocis/pkg/command/web.go b/ocis/pkg/command/web.go
index 70499da3fe7..d3e93e4b070 100644
--- a/ocis/pkg/command/web.go
+++ b/ocis/pkg/command/web.go
@@ -16,12 +16,13 @@ func WebCommand(cfg *config.Config) *cli.Command {
 		Name:     cfg.Web.Service.Name,
 		Usage:    subcommandDescription(cfg.Web.Service.Name),
 		Category: "extensions",
-		Before: func(ctx *cli.Context) error {
-			err := parser.ParseConfig(cfg)
-			if err != nil {
+		Before: func(c *cli.Context) error {
+			if err := parser.ParseConfig(cfg); err != nil {
 				fmt.Printf("%v", err)
+				return err
 			}
-			return err
+			cfg.Web.Commons = cfg.Commons
+			return nil
 		},
 		Subcommands: command.GetCommands(cfg.Web),
 	}
diff --git a/ocis/pkg/command/webdav.go b/ocis/pkg/command/webdav.go
index a87145ab4e8..693f237d8a8 100644
--- a/ocis/pkg/command/webdav.go
+++ b/ocis/pkg/command/webdav.go
@@ -17,12 +17,13 @@ func WebDAVCommand(cfg *config.Config) *cli.Command {
 		Name:     cfg.WebDAV.Service.Name,
 		Usage:    subcommandDescription(cfg.WebDAV.Service.Name),
 		Category: "extensions",
-		Before: func(ctx *cli.Context) error {
-			err := parser.ParseConfig(cfg)
-			if err != nil {
+		Before: func(c *cli.Context) error {
+			if err := parser.ParseConfig(cfg); err != nil {
 				fmt.Printf("%v", err)
+				return err
 			}
-			return err
+			cfg.WebDAV.Commons = cfg.Commons
+			return nil
 		},
 		Subcommands: command.GetCommands(cfg.WebDAV),
 	}
diff --git a/ocis/pkg/runtime/service/service.go b/ocis/pkg/runtime/service/service.go
index 19a1cf02e50..cd237edc2e1 100644
--- a/ocis/pkg/runtime/service/service.go
+++ b/ocis/pkg/runtime/service/service.go
@@ -106,37 +106,37 @@ func NewService(options ...Option) (*Service, error) {
 		cfg:          opts.Config,
 	}
 
-	s.ServicesRegistry[opts.Config.Settings.Service.Name] = settings.NewSutureService
-	s.ServicesRegistry[opts.Config.Nats.Service.Name] = nats.NewSutureService
-	s.ServicesRegistry[opts.Config.StorageMetadata.Service.Name] = storagemetadata.NewStorageMetadata
-	s.ServicesRegistry[opts.Config.GLAuth.Service.Name] = glauth.NewSutureService
-	s.ServicesRegistry[opts.Config.Graph.Service.Name] = graph.NewSutureService
-	s.ServicesRegistry[opts.Config.GraphExplorer.Service.Name] = graphExplorer.NewSutureService
-	s.ServicesRegistry[opts.Config.IDM.Service.Name] = idm.NewSutureService
-	s.ServicesRegistry[opts.Config.OCS.Service.Name] = ocs.NewSutureService
-	s.ServicesRegistry[opts.Config.Store.Service.Name] = store.NewSutureService
-	s.ServicesRegistry[opts.Config.Thumbnails.Service.Name] = thumbnails.NewSutureService
-	s.ServicesRegistry[opts.Config.Web.Service.Name] = web.NewSutureService
-	s.ServicesRegistry[opts.Config.WebDAV.Service.Name] = webdav.NewSutureService
-	s.ServicesRegistry[opts.Config.Frontend.Service.Name] = frontend.NewFrontend
-	s.ServicesRegistry[opts.Config.OCDav.Service.Name] = ocdav.NewOCDav
-	s.ServicesRegistry[opts.Config.Gateway.Service.Name] = gateway.NewGateway
-	s.ServicesRegistry[opts.Config.User.Service.Name] = user.NewUserProvider
-	s.ServicesRegistry[opts.Config.Group.Service.Name] = group.NewGroupProvider
-	s.ServicesRegistry[opts.Config.AuthBasic.Service.Name] = authbasic.NewAuthBasic
-	s.ServicesRegistry[opts.Config.AuthBearer.Service.Name] = authbearer.NewAuthBearer
-	s.ServicesRegistry[opts.Config.AuthMachine.Service.Name] = authmachine.NewAuthMachine
-	s.ServicesRegistry[opts.Config.StorageUsers.Service.Name] = storageusers.NewStorageUsers
-	s.ServicesRegistry[opts.Config.StorageShares.Service.Name] = storageshares.NewStorageShares
-	s.ServicesRegistry[opts.Config.StoragePublicLink.Service.Name] = storagepublic.NewStoragePublicLink
-	s.ServicesRegistry[opts.Config.AppProvider.Service.Name] = appprovider.NewAppProvider
-	s.ServicesRegistry[opts.Config.Notifications.Service.Name] = notifications.NewSutureService
+	s.ServicesRegistry["settings"] = settings.NewSutureService
+	s.ServicesRegistry["nats"] = nats.NewSutureService
+	s.ServicesRegistry["storage-metadata"] = storagemetadata.NewStorageMetadata
+	s.ServicesRegistry["glauth"] = glauth.NewSutureService
+	s.ServicesRegistry["graph"] = graph.NewSutureService
+	s.ServicesRegistry["graph-explorer"] = graphExplorer.NewSutureService
+	s.ServicesRegistry["idm"] = idm.NewSutureService
+	s.ServicesRegistry["ocs"] = ocs.NewSutureService
+	s.ServicesRegistry["store"] = store.NewSutureService
+	s.ServicesRegistry["thumbnails"] = thumbnails.NewSutureService
+	s.ServicesRegistry["web"] = web.NewSutureService
+	s.ServicesRegistry["webdav"] = webdav.NewSutureService
+	s.ServicesRegistry["storage-frontend"] = frontend.NewFrontend
+	s.ServicesRegistry["ocdav"] = ocdav.NewOCDav
+	s.ServicesRegistry["storage-gateway"] = gateway.NewGateway
+	s.ServicesRegistry["storage-userprovider"] = user.NewUserProvider
+	s.ServicesRegistry["storage-groupprovider"] = group.NewGroupProvider
+	s.ServicesRegistry["storage-authbasic"] = authbasic.NewAuthBasic
+	s.ServicesRegistry["storage-authbearer"] = authbearer.NewAuthBearer
+	s.ServicesRegistry["storage-authmachine"] = authmachine.NewAuthMachine
+	s.ServicesRegistry["storage-users"] = storageusers.NewStorageUsers
+	s.ServicesRegistry["storage-shares"] = storageshares.NewStorageShares
+	s.ServicesRegistry["storage-public-link"] = storagepublic.NewStoragePublicLink
+	s.ServicesRegistry["storage-appprovider"] = appprovider.NewAppProvider
+	s.ServicesRegistry["notifications"] = notifications.NewSutureService
 
 	// populate delayed services
-	s.Delayed[opts.Config.Sharing.Service.Name] = sharing.NewSharing
-	s.Delayed[opts.Config.Accounts.Service.Name] = accounts.NewSutureService
-	s.Delayed[opts.Config.Proxy.Service.Name] = proxy.NewSutureService
-	s.Delayed[opts.Config.IDP.Service.Name] = idp.NewSutureService
+	s.Delayed["storage-sharing"] = sharing.NewSharing
+	s.Delayed["accounts"] = accounts.NewSutureService
+	s.Delayed["proxy"] = proxy.NewSutureService
+	s.Delayed["idp"] = idp.NewSutureService
 
 	return s, nil
 }


Test patch:
diff --git a/extensions/audit/pkg/service/service_test.go b/extensions/audit/pkg/service/service_test.go
index 6d45dfde1a3..6fb5dc1ea0e 100644
--- a/extensions/audit/pkg/service/service_test.go
+++ b/extensions/audit/pkg/service/service_test.go
@@ -297,8 +297,8 @@ var testCases = []struct {
 	}, {
 		Alias: "File created",
 		SystemEvent: events.FileUploaded{
-			Ref:   reference("sto-123", "iid-123", "./item"),
-			Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva
+			FileID: reference("sto-123", "iid-123", "./item"),
+			Owner:  userID("uid-123"), // NOTE: owner not yet implemented in reva
 		},
 		CheckAuditEvent: func(t *testing.T, b []byte) {
 			ev := types.AuditEventFileCreated{}
@@ -312,8 +312,8 @@ var testCases = []struct {
 	}, {
 		Alias: "File read",
 		SystemEvent: events.FileDownloaded{
-			Ref:   reference("sto-123", "iid-123", "./item"),
-			Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva
+			FileID: reference("sto-123", "iid-123", "./item"),
+			Owner:  userID("uid-123"), // NOTE: owner not yet implemented in reva
 		},
 		CheckAuditEvent: func(t *testing.T, b []byte) {
 			ev := types.AuditEventFileRead{}
@@ -327,8 +327,8 @@ var testCases = []struct {
 	}, {
 		Alias: "File trashed",
 		SystemEvent: events.ItemTrashed{
-			Ref:   reference("sto-123", "iid-123", "./item"),
-			Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva
+			FileID: reference("sto-123", "iid-123", "./item"),
+			Owner:  userID("uid-123"), // NOTE: owner not yet implemented in reva
 		},
 		CheckAuditEvent: func(t *testing.T, b []byte) {
 			ev := types.AuditEventFileDeleted{}
@@ -342,7 +342,7 @@ var testCases = []struct {
 	}, {
 		Alias: "File renamed",
 		SystemEvent: events.ItemMoved{
-			Ref:          reference("sto-123", "iid-123", "./item"),
+			FileID:       reference("sto-123", "iid-123", "./item"),
 			OldReference: reference("sto-123", "iid-123", "./anotheritem"),
 			Owner:        userID("uid-123"), // NOTE: owner not yet implemented in reva
 		},
@@ -361,8 +361,8 @@ var testCases = []struct {
 	}, {
 		Alias: "File purged",
 		SystemEvent: events.ItemPurged{
-			Ref:   reference("sto-123", "iid-123", "./item"),
-			Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva
+			FileID: reference("sto-123", "iid-123", "./item"),
+			Owner:  userID("uid-123"), // NOTE: owner not yet implemented in reva
 		},
 		CheckAuditEvent: func(t *testing.T, b []byte) {
 			ev := types.AuditEventFilePurged{}
@@ -376,7 +376,7 @@ var testCases = []struct {
 	}, {
 		Alias: "File restored",
 		SystemEvent: events.ItemRestored{
-			Ref:          reference("sto-123", "iid-123", "./item"),
+			FileID:       reference("sto-123", "iid-123", "./item"),
 			Owner:        userID("uid-123"), // NOTE: owner not yet implemented in reva
 			OldReference: reference("sto-123", "sto-123!iid-123/item", "./oldpath"),
 			Key:          "",
@@ -396,9 +396,9 @@ var testCases = []struct {
 	}, {
 		Alias: "File version restored",
 		SystemEvent: events.FileVersionRestored{
-			Ref:   reference("sto-123", "iid-123", "./item"),
-			Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva
-			Key:   "v1",
+			FileID: reference("sto-123", "iid-123", "./item"),
+			Owner:  userID("uid-123"), // NOTE: owner not yet implemented in reva
+			Key:    "v1",
 		},
 		CheckAuditEvent: func(t *testing.T, b []byte) {
 			ev := types.AuditEventFileVersionRestored{}
diff --git a/extensions/graph/pkg/service/v0/graph_test.go b/extensions/graph/pkg/service/v0/graph_test.go
index 8ad28656ee2..0d52357cf8a 100644
--- a/extensions/graph/pkg/service/v0/graph_test.go
+++ b/extensions/graph/pkg/service/v0/graph_test.go
@@ -201,7 +201,7 @@ var _ = Describe("Graph", func() {
 						Id:        &provider.StorageSpaceId{OpaqueId: "aID!differentID"},
 						SpaceType: "mountpoint",
 						Root: &provider.ResourceId{
-							StorageId: "prID$aID",
+							StorageId: "aID",
 							OpaqueId:  "differentID",
 						},
 						Name: "New Folder",
@@ -246,11 +246,11 @@ var _ = Describe("Graph", func() {
 			value := response["value"][0]
 			Expect(*value.DriveAlias).To(Equal("mountpoint/new-folder"))
 			Expect(*value.DriveType).To(Equal("mountpoint"))
-			Expect(*value.Id).To(Equal("prID$aID!differentID"))
+			Expect(*value.Id).To(Equal("aID!differentID"))
 			Expect(*value.Name).To(Equal("New Folder"))
-			Expect(*value.Root.WebDavUrl).To(Equal("https://localhost:9200/dav/spaces/prID$aID!differentID"))
+			Expect(*value.Root.WebDavUrl).To(Equal("https://localhost:9200/dav/spaces/aID!differentID"))
 			Expect(*value.Root.ETag).To(Equal("101112131415"))
-			Expect(*value.Root.Id).To(Equal("prID$aID!differentID"))
+			Expect(*value.Root.Id).To(Equal("aID!differentID"))
 			Expect(*value.Root.RemoteItem.ETag).To(Equal("123456789"))
 			Expect(*value.Root.RemoteItem.Id).To(Equal("ownerStorageID!opaqueID"))
 			Expect(value.Root.RemoteItem.LastModifiedDateTime.UTC()).To(Equal(time.Unix(1648327606, 0).UTC()))
diff --git a/tests/acceptance/expected-failures-API-on-OCIS-storage.md b/tests/acceptance/expected-failures-API-on-OCIS-storage.md
index 87bdf5ad1b0..8fd9fa56977 100644
--- a/tests/acceptance/expected-failures-API-on-OCIS-storage.md
+++ b/tests/acceptance/expected-failures-API-on-OCIS-storage.md
@@ -1847,6 +1847,10 @@ Not everything needs to be implemented for ocis. While the oc10 testsuite covers
 #### [OCS status code zero](https://github.com/owncloud/ocis/issues/3621)
 - [apiShareManagementToShares/moveReceivedShare.feature:32](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareManagementToShares/moveReceivedShare.feature#L32)
 
+#### [share_with_user_type is not set in response](https://github.com/owncloud/ocis/issues/3622)
+- [apiShareManagementBasicToShares/createShareToSharesFolder.feature:37](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareManagementBasicToShares/createShareToSharesFolder.feature#L37)
+- [apiShareManagementBasicToShares/createShareToSharesFolder.feature:38](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareManagementBasicToShares/createShareToSharesFolder.feature#L38)
+
 #### [HTTP status code differ while listing the contents of another user's trash bin](https://github.com/owncloud/ocis/issues/3561)
 - [apiTrashbin/trashbinFilesFolders.feature:199](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiTrashbin/trashbinFilesFolders.feature#L199)
 - [apiTrashbin/trashbinFilesFolders.feature:223](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiTrashbin/trashbinFilesFolders.feature#L223)
diff --git a/tests/acceptance/expected-failures-graphAPI-on-OCIS-storage.md b/tests/acceptance/expected-failures-graphAPI-on-OCIS-storage.md
index f513a93f0a1..85c610d51c3 100644
--- a/tests/acceptance/expected-failures-graphAPI-on-OCIS-storage.md
+++ b/tests/acceptance/expected-failures-graphAPI-on-OCIS-storage.md
@@ -1639,6 +1639,10 @@ Not everything needs to be implemented for ocis. While the oc10 testsuite covers
 #### [OCS status code zero](https://github.com/owncloud/ocis/issues/3621)
 - [apiShareManagementToShares/moveReceivedShare.feature:32](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareManagementToShares/moveReceivedShare.feature#L32)
 
+#### [share_with_user_type is not set in response](https://github.com/owncloud/ocis/issues/3622)
+- [apiShareManagementBasicToShares/createShareToSharesFolder.feature:37](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareManagementBasicToShares/createShareToSharesFolder.feature#L37)
+- [apiShareManagementBasicToShares/createShareToSharesFolder.feature:38](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareManagementBasicToShares/createShareToSharesFolder.feature#L38)
+
 #### [HTTP status code differ while listing the contents of another user's trash bin](https://github.com/owncloud/ocis/issues/3561)
 - [apiTrashbin/trashbinFilesFolders.feature:199](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiTrashbin/trashbinFilesFolders.feature#L199)
 - [apiTrashbin/trashbinFilesFolders.feature:223](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiTrashbin/trashbinFilesFolders.feature#L223)
diff --git a/tests/acceptance/features/bootstrap/SpacesContext.php b/tests/acceptance/features/bootstrap/SpacesContext.php
index 5f9c23357d0..61d8f20b0d3 100644
--- a/tests/acceptance/features/bootstrap/SpacesContext.php
+++ b/tests/acceptance/features/bootstrap/SpacesContext.php
@@ -220,24 +220,6 @@ class SpacesContext implements Context {
 		return $spaces[$spaceName];
 	}
 
-	/**
-	 * The method finds available spaces to the manager user and returns the space by spaceName
-	 *
-	 * @param string $user
-	 * @param string $spaceName
-	 *
-	 * @return array
-	 */
-	public function getSpaceByNameManager(string $user, string $spaceName): array {
-		$this->theUserListsAllAvailableSpacesUsingTheGraphApi($user);
-
-		$spaces = $this->getAvailableSpaces();
-		Assert::assertIsArray($spaces[$spaceName], "Space with name $spaceName for user $user not found");
-		Assert::assertNotEmpty($spaces[$spaceName]["root"]["webDavUrl"], "WebDavUrl for space with name $spaceName for user $user not found");
-
-		return $spaces[$spaceName];
-	}
-
 	/**
 	 * The method finds file by fileName and spaceName and returns data of file wich contains in responseHeader
 	 * fileName contains the path, if the file is in the folder
@@ -367,7 +349,7 @@ class SpacesContext implements Context {
 	/**
 	 * The method first disables and then deletes spaces
 	 * @param  string $driveType
-	 *
+	 * 
 	 * @return void
 	 *
 	 * @throws Exception
@@ -428,33 +410,6 @@ class SpacesContext implements Context {
 		return HttpRequestHelper::get($fullUrl, $xRequestId, $user, $password, $headers, $body);
 	}
 
-	/**
-	 * Send Graph List All Spaces Request
-	 *
-	 * @param  string $user
-	 * @param  string $password
-	 * @param  string $urlArguments
-	 * @param  string $xRequestId
-	 * @param  array  $body
-	 * @param  array  $headers
-	 *
-	 * @return ResponseInterface
-	 *
-	 * @throws GuzzleException
-	 */
-	public function listAllSpacesRequest(
-		string $user,
-		string $password,
-		string $urlArguments = '',
-		string $xRequestId = '',
-		array  $body = [],
-		array  $headers = []
-	): ResponseInterface {
-		$fullUrl = $this->baseUrl . "/graph/v1.0/drives/" . $urlArguments;
-
-		return HttpRequestHelper::get($fullUrl, $xRequestId, $user, $password, $headers, $body);
-	}
-
 	/**
 	 * Send Graph List Single Space Request
 	 *
@@ -575,24 +530,6 @@ class SpacesContext implements Context {
 		$this->rememberTheAvailableSpaces();
 	}
 
-	/**
-	 *
-	 * @param string $user
-	 *
-	 * @return void
-	 *
-	 * @throws GuzzleException
-	 */
-	public function theUserListsAllAvailableSpacesUsingTheGraphApi(string $user): void {
-		$this->featureContext->setResponse(
-			$this->listAllSpacesRequest(
-				$user,
-				$this->featureContext->getPasswordForUser($user)
-			)
-		);
-		$this->rememberTheAvailableSpaces();
-	}
-
 	/**
 	 * @When /^user "([^"]*)" lists all available spaces via the GraphApi with query "([^"]*)"$/
 	 *
@@ -1208,7 +1145,7 @@ class SpacesContext implements Context {
 		$results = [];
 		if ($multistatusResults !== null) {
 			foreach ($multistatusResults as $multistatusResult) {
-				$entryPath = \urldecode($multistatusResult['value'][0]['value']);
+				$entryPath = $multistatusResult['value'][0]['value'];
 				$entryName = \str_replace($topWebDavPath, "", $entryPath);
 				$entryName = \rawurldecode($entryName);
 				$entryName = \trim($entryName, "/");
@@ -2014,7 +1951,7 @@ class SpacesContext implements Context {
 		string $userWithManagerRights = ''
 	): void {
 		if (!empty($userWithManagerRights)) {
-			$space = $this->getSpaceByNameManager($userWithManagerRights, $spaceName);
+			$space = $this->getSpaceByName($userWithManagerRights, $spaceName);
 		} else {
 			$space = $this->getSpaceByName($user, $spaceName);
 		}