Repository: owncloud/ocis
Pull request #3287 (2022-03-08 09:38:50)

Generate config file documentation
## Description
Adds (default) configuration file examples for all non-storage extensions to owncloud.dev.

## 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: -->
- Similar to https://github.com/owncloud/ocis/pull/3078, but for file configuration

## Motivation and Context
Some changes cannot be configured via environment variables. Therefore we also need to add documentation about the file configuration to the docs.

## 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. -->
- `make -C docs docs-serve`

## Screenshots

![image](https://user-images.githubusercontent.com/34452982/157864031-ef846a10-e7d4-4e28-91c6-63d4d12f0e76.png)


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.


Patch:
diff --git a/.drone.env b/.drone.env
index 26a22530078..68a30862067 100644
--- a/.drone.env
+++ b/.drone.env
@@ -1,5 +1,5 @@
 # The test runner source for API tests
-CORE_COMMITID=a293d131eb9475542c72e048ddd44b8b6cbe2c01
+CORE_COMMITID=4512f46e7196a8c1f1cfc56ec397628cbf540407
 CORE_BRANCH=master
 
 # The test runner source for UI tests
diff --git a/.drone.star b/.drone.star
index a501e467995..7ac4513fe28 100644
--- a/.drone.star
+++ b/.drone.star
@@ -956,16 +956,11 @@ def binaryReleases(ctx):
     return pipelines
 
 def binaryRelease(ctx, name):
-    # uploads binary to https://download.owncloud.com/ocis/ocis/daily/
-    target = "/ocis/%s/daily" % (ctx.repo.name.replace("ocis-", ""))
+    # uploads binary to https://download.owncloud.com/ocis/ocis/testing/
+    target = "/ocis/%s/testing" % (ctx.repo.name.replace("ocis-", ""))
     if ctx.build.event == "tag":
         # uploads binary to eg. https://download.owncloud.com/ocis/ocis/1.0.0-beta9/
-        folder = "stable"
-        buildref = ctx.build.ref.replace("refs/tags/v", "")
-        buildref = buildref.lower()
-        if buildref.find("-") != -1:  # "x.x.x-alpha", "x.x.x-beta", "x.x.x-rc"
-            folder = "testing"
-        target = "/ocis/%s/%s/%s" % (ctx.repo.name.replace("ocis-", ""), folder, buildref)
+        target = "/ocis/%s/%s" % (ctx.repo.name.replace("ocis-", ""), ctx.build.ref.replace("refs/tags/v", ""))
 
     settings = {
         "endpoint": {
diff --git a/.github/settings.yml b/.github/settings.yml
index 684f57c3634..bd5b577fbe9 100644
--- a/.github/settings.yml
+++ b/.github/settings.yml
@@ -10,7 +10,7 @@ repository:
   private: false
   has_issues: true
   has_projects: false
-  has_wiki: false
+  has_wiki: true
   has_downloads: false
 
   default_branch: master
@@ -35,7 +35,7 @@ labels:
     color: "#3F7A62"
   - name: Storage:ownCloudSQL
     color: "#3F7A62"
-
+  
 teams:
   - name: ci
     permission: admin
diff --git a/accounts/cmd/accounts/main.go b/accounts/cmd/accounts/main.go
index 35262ccad86..d7788426bea 100644
--- a/accounts/cmd/accounts/main.go
+++ b/accounts/cmd/accounts/main.go
@@ -4,11 +4,11 @@ import (
 	"os"
 
 	"github.com/owncloud/ocis/accounts/pkg/command"
-	"github.com/owncloud/ocis/accounts/pkg/config"
+	"github.com/owncloud/ocis/accounts/pkg/config/defaults"
 )
 
 func main() {
-	if err := command.Execute(config.DefaultConfig()); err != nil {
+	if err := command.Execute(defaults.DefaultConfig()); err != nil {
 		os.Exit(1)
 	}
 }
diff --git a/accounts/cmd/helper/defaultconfig/main.go b/accounts/cmd/helper/defaultconfig/main.go
new file mode 100644
index 00000000000..e2b574505c0
--- /dev/null
+++ b/accounts/cmd/helper/defaultconfig/main.go
@@ -0,0 +1,27 @@
+package main
+
+import (
+	"fmt"
+
+	accountsdefaults "github.com/owncloud/ocis/accounts/pkg/config/defaults"
+	idpdefaults "github.com/owncloud/ocis/idp/pkg/config/defaults"
+	"gopkg.in/yaml.v2"
+)
+
+func main() {
+
+	fn1 := accountsdefaults.FullDefaultConfig
+	fn2 := idpdefaults.FullDefaultConfig
+
+	b, err := yaml.Marshal(fn1())
+	if err != nil {
+		return
+	}
+	fmt.Println(string(b))
+
+	b, err = yaml.Marshal(fn2())
+	if err != nil {
+		return
+	}
+	fmt.Println(string(b))
+}
diff --git a/accounts/pkg/config/config.go b/accounts/pkg/config/config.go
index 9a4609d7e45..3a3d3dd593a 100644
--- a/accounts/pkg/config/config.go
+++ b/accounts/pkg/config/config.go
@@ -8,9 +8,9 @@ import (
 
 // Config combines all available configuration parts.
 type Config struct {
-	*shared.Commons
+	*shared.Commons `ocisConfig:"-" yaml:"-"`
 
-	Service Service
+	Service Service `ocisConfig:"-" yaml:"-"`
 
 	Tracing *Tracing `ocisConfig:"tracing"`
 	Log     *Log     `ocisConfig:"log"`
@@ -28,7 +28,7 @@ type Config struct {
 	HashDifficulty     int         `ocisConfig:"hash_difficulty" env:"ACCOUNTS_HASH_DIFFICULTY" desc:"The hash difficulty makes sure that validating a password takes at least a certain amount of time."`
 	DemoUsersAndGroups bool        `ocisConfig:"demo_users_and_groups" env:"ACCOUNTS_DEMO_USERS_AND_GROUPS" desc:"If this flag is set the service will setup the demo users and groups."`
 
-	Context context.Context
+	Context context.Context `ocisConfig:"-" yaml:"-"`
 }
 
 // Asset defines the available asset configuration.
diff --git a/accounts/pkg/config/defaultconfig.go b/accounts/pkg/config/defaultconfig.go
deleted file mode 100644
index 394cf2155ff..00000000000
--- a/accounts/pkg/config/defaultconfig.go
+++ /dev/null
@@ -1,68 +0,0 @@
-package config
-
-import (
-	"path"
-
-	"github.com/owncloud/ocis/ocis-pkg/config/defaults"
-)
-
-func DefaultConfig() *Config {
-	return &Config{
-		Debug: Debug{
-			Addr:   "127.0.0.1:9182",
-			Token:  "",
-			Pprof:  false,
-			Zpages: false,
-		},
-		HTTP: HTTP{
-			Addr:      "127.0.0.1:9181",
-			Namespace: "com.owncloud.web",
-			Root:      "/",
-			CacheTTL:  604800, // 7 days
-			CORS: CORS{
-				AllowedOrigins:   []string{"*"},
-				AllowedMethods:   []string{"GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"},
-				AllowedHeaders:   []string{"Authorization", "Origin", "Content-Type", "Accept", "X-Requested-With"},
-				AllowCredentials: true,
-			},
-		},
-		GRPC: GRPC{
-			Addr:      "127.0.0.1:9180",
-			Namespace: "com.owncloud.api",
-		},
-		Service: Service{
-			Name: "accounts",
-		},
-		Asset: Asset{},
-		TokenManager: TokenManager{
-			JWTSecret: "Pive-Fumkiu4",
-		},
-		HashDifficulty:     11,
-		DemoUsersAndGroups: true,
-		Repo: Repo{
-			Backend: "CS3",
-			Disk: Disk{
-				Path: path.Join(defaults.BaseDataPath(), "accounts"),
-			},
-			CS3: CS3{
-				ProviderAddr: "localhost:9215",
-			},
-		},
-		Index: Index{
-			UID: UIDBound{
-				Lower: 0,
-				Upper: 1000,
-			},
-			GID: GIDBound{
-				Lower: 0,
-				Upper: 1000,
-			},
-		},
-		ServiceUser: ServiceUser{
-			UUID:     "95cb8724-03b2-11eb-a0a6-c33ef8ef53ad",
-			Username: "",
-			UID:      0,
-			GID:      0,
-		},
-	}
-}
diff --git a/accounts/pkg/config/defaults/defaultconfig.go b/accounts/pkg/config/defaults/defaultconfig.go
new file mode 100644
index 00000000000..bf62637ece3
--- /dev/null
+++ b/accounts/pkg/config/defaults/defaultconfig.go
@@ -0,0 +1,112 @@
+package defaults
+
+import (
+	"path"
+	"strings"
+
+	"github.com/owncloud/ocis/accounts/pkg/config"
+	"github.com/owncloud/ocis/ocis-pkg/config/defaults"
+)
+
+func FullDefaultConfig() *config.Config {
+	cfg := DefaultConfig()
+
+	EnsureDefaults(cfg)
+	Sanitize(cfg)
+
+	return cfg
+}
+
+func DefaultConfig() *config.Config {
+	return &config.Config{
+		Debug: config.Debug{
+			Addr:   "127.0.0.1:9182",
+			Token:  "",
+			Pprof:  false,
+			Zpages: false,
+		},
+		HTTP: config.HTTP{
+			Addr:      "127.0.0.1:9181",
+			Namespace: "com.owncloud.web",
+			Root:      "/",
+			CacheTTL:  604800, // 7 days
+			CORS: config.CORS{
+				AllowedOrigins:   []string{"*"},
+				AllowedMethods:   []string{"GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"},
+				AllowedHeaders:   []string{"Authorization", "Origin", "Content-Type", "Accept", "X-Requested-With"},
+				AllowCredentials: true,
+			},
+		},
+		GRPC: config.GRPC{
+			Addr:      "127.0.0.1:9180",
+			Namespace: "com.owncloud.api",
+		},
+		Service: config.Service{
+			Name: "accounts",
+		},
+		Asset: config.Asset{},
+		TokenManager: config.TokenManager{
+			JWTSecret: "Pive-Fumkiu4",
+		},
+		HashDifficulty:     11,
+		DemoUsersAndGroups: true,
+		Repo: config.Repo{
+			Backend: "CS3",
+			Disk: config.Disk{
+				Path: path.Join(defaults.BaseDataPath(), "accounts"),
+			},
+			CS3: config.CS3{
+				ProviderAddr: "localhost:9215",
+			},
+		},
+		Index: config.Index{
+			UID: config.UIDBound{
+				Lower: 0,
+				Upper: 1000,
+			},
+			GID: config.GIDBound{
+				Lower: 0,
+				Upper: 1000,
+			},
+		},
+		ServiceUser: config.ServiceUser{
+			UUID:     "95cb8724-03b2-11eb-a0a6-c33ef8ef53ad",
+			Username: "",
+			UID:      0,
+			GID:      0,
+		},
+	}
+}
+
+func EnsureDefaults(cfg *config.Config) {
+	// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
+	if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
+		cfg.Log = &config.Log{
+			Level:  cfg.Commons.Log.Level,
+			Pretty: cfg.Commons.Log.Pretty,
+			Color:  cfg.Commons.Log.Color,
+			File:   cfg.Commons.Log.File,
+		}
+	} else if cfg.Log == nil {
+		cfg.Log = &config.Log{}
+	}
+	// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
+	if cfg.Tracing == nil && cfg.Commons != nil && cfg.Commons.Tracing != nil {
+		cfg.Tracing = &config.Tracing{
+			Enabled:   cfg.Commons.Tracing.Enabled,
+			Type:      cfg.Commons.Tracing.Type,
+			Endpoint:  cfg.Commons.Tracing.Endpoint,
+			Collector: cfg.Commons.Tracing.Collector,
+		}
+	} else if cfg.Tracing == nil {
+		cfg.Tracing = &config.Tracing{}
+	}
+}
+
+func Sanitize(cfg *config.Config) {
+	// sanitize config
+	if cfg.HTTP.Root != "/" {
+		cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
+	}
+	cfg.Repo.Backend = strings.ToLower(cfg.Repo.Backend)
+}
diff --git a/accounts/pkg/config/grpc.go b/accounts/pkg/config/grpc.go
index a89e0ca0059..148fda92505 100644
--- a/accounts/pkg/config/grpc.go
+++ b/accounts/pkg/config/grpc.go
@@ -3,5 +3,5 @@ package config
 // GRPC defines the available grpc configuration.
 type GRPC struct {
 	Addr      string `ocisConfig:"addr" env:"ACCOUNTS_GRPC_ADDR" desc:"The address of the grpc service."`
-	Namespace string
+	Namespace string `ocisConfig:"-" yaml:"-"`
 }
diff --git a/accounts/pkg/config/http.go b/accounts/pkg/config/http.go
index 6a8828ea9a8..a71b095a208 100644
--- a/accounts/pkg/config/http.go
+++ b/accounts/pkg/config/http.go
@@ -3,10 +3,10 @@ package config
 // HTTP defines the available http configuration.
 type HTTP struct {
 	Addr      string `ocisConfig:"addr" env:"ACCOUNTS_HTTP_ADDR" desc:"The address of the http service."`
-	Namespace string
+	Namespace string `ocisConfig:"-" yaml:"-"`
 	Root      string `ocisConfig:"root" env:"ACCOUNTS_HTTP_ROOT" desc:"The root path of the http service."`
 	CacheTTL  int    `ocisConfig:"cache_ttl" env:"ACCOUNTS_CACHE_TTL" desc:"The cache time for the static assets."`
-	CORS      CORS
+	CORS      CORS   `ocisConfig:"cors"`
 }
 
 // CORS defines the available cors configuration.
diff --git a/accounts/pkg/config/parser/parse.go b/accounts/pkg/config/parser/parse.go
index fb801aed28c..f689ee528c1 100644
--- a/accounts/pkg/config/parser/parse.go
+++ b/accounts/pkg/config/parser/parse.go
@@ -2,11 +2,11 @@ package parser
 
 import (
 	"errors"
-	"strings"
 
+	"github.com/owncloud/ocis/accounts/pkg/config"
+	defaults "github.com/owncloud/ocis/accounts/pkg/config/defaults"
 	ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
 
-	"github.com/owncloud/ocis/accounts/pkg/config"
 	"github.com/owncloud/ocis/ocis-pkg/config/envdecode"
 )
 
@@ -17,28 +17,7 @@ func ParseConfig(cfg *config.Config) error {
 		return err
 	}
 
-	// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
-	if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
-		cfg.Log = &config.Log{
-			Level:  cfg.Commons.Log.Level,
-			Pretty: cfg.Commons.Log.Pretty,
-			Color:  cfg.Commons.Log.Color,
-			File:   cfg.Commons.Log.File,
-		}
-	} else if cfg.Log == nil {
-		cfg.Log = &config.Log{}
-	}
-	// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
-	if cfg.Tracing == nil && cfg.Commons != nil && cfg.Commons.Tracing != nil {
-		cfg.Tracing = &config.Tracing{
-			Enabled:   cfg.Commons.Tracing.Enabled,
-			Type:      cfg.Commons.Tracing.Type,
-			Endpoint:  cfg.Commons.Tracing.Endpoint,
-			Collector: cfg.Commons.Tracing.Collector,
-		}
-	} else if cfg.Tracing == nil {
-		cfg.Tracing = &config.Tracing{}
-	}
+	defaults.EnsureDefaults(cfg)
 
 	// load all env variables relevant to the config in the current context.
 	if err := envdecode.Decode(cfg); err != nil {
@@ -48,11 +27,7 @@ func ParseConfig(cfg *config.Config) error {
 		}
 	}
 
-	// sanitize config
-	if cfg.HTTP.Root != "/" {
-		cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
-	}
-	cfg.Repo.Backend = strings.ToLower(cfg.Repo.Backend)
+	defaults.Sanitize(cfg)
 
 	return nil
 }
diff --git a/accounts/pkg/config/service.go b/accounts/pkg/config/service.go
index f98aa3d27e5..c019b73046e 100644
--- a/accounts/pkg/config/service.go
+++ b/accounts/pkg/config/service.go
@@ -2,5 +2,5 @@ package config
 
 // Service defines the available service configuration.
 type Service struct {
-	Name string
+	Name string `ocisConfig:"-" yaml:"-"`
 }
diff --git a/audit/pkg/config/config.go b/audit/pkg/config/config.go
index 2041e52bcc9..33c98abf0f9 100644
--- a/audit/pkg/config/config.go
+++ b/audit/pkg/config/config.go
@@ -8,9 +8,9 @@ import (
 
 // Config combines all available configuration parts.
 type Config struct {
-	*shared.Commons
+	*shared.Commons `ocisConfig:"-" yaml:"-"`
 
-	Service Service
+	Service Service `ocisConfig:"-" yaml:"-"`
 
 	Log   *Log  `ocisConfig:"log"`
 	Debug Debug `ocisConfig:"debug"`
@@ -18,7 +18,7 @@ type Config struct {
 	Events   Events   `ocisConfig:"events"`
 	Auditlog Auditlog `ocisConfig:"auditlog"`
 
-	Context context.Context
+	Context context.Context `ocisConfig:"-" yaml:"-"`
 }
 
 // Events combines the configuration options for the event bus.
diff --git a/audit/pkg/config/service.go b/audit/pkg/config/service.go
index f98aa3d27e5..c019b73046e 100644
--- a/audit/pkg/config/service.go
+++ b/audit/pkg/config/service.go
@@ -2,5 +2,5 @@ package config
 
 // Service defines the available service configuration.
 type Service struct {
-	Name string
+	Name string `ocisConfig:"-" yaml:"-"`
 }
diff --git a/docs/extensions/_includes/.gitignore b/docs/extensions/_includes/.gitignore
index a463a88c512..3b7434f1055 100644
--- a/docs/extensions/_includes/.gitignore
+++ b/docs/extensions/_includes/.gitignore
@@ -1,1 +1,2 @@
 *_configvars.md
+*-example.yaml
\ No newline at end of file
diff --git a/docs/extensions/accounts/configuration.md b/docs/extensions/accounts/configuration.md
index 584b5b18309..8fffa2559a6 100644
--- a/docs/extensions/accounts/configuration.md
+++ b/docs/extensions/accounts/configuration.md
@@ -8,5 +8,8 @@ geekdocFilePath: configuration.md
 geekdocCollapseSection: true
 ---
 
+## Example YAML Config
+
+{{< include file="extensions/_includes/accounts-config-example.yaml"  language="yaml" >}}
 
 {{< include file="extensions/_includes/accounts_configvars.md" >}}
\ No newline at end of file
diff --git a/docs/extensions/glauth/configuration.md b/docs/extensions/glauth/configuration.md
index 7132fe0e50a..e45a0c0aa9d 100644
--- a/docs/extensions/glauth/configuration.md
+++ b/docs/extensions/glauth/configuration.md
@@ -8,5 +8,8 @@ geekdocFilePath: configuration.md
 geekdocCollapseSection: true
 ---
 
+## Example YAML Config
+
+{{< include file="extensions/_includes/glauth-config-example.yaml"  language="yaml" >}}
 
 {{< include file="extensions/_includes/glauth_configvars.md" >}}
\ No newline at end of file
diff --git a/docs/extensions/graph-explorer/configuration.md b/docs/extensions/graph-explorer/configuration.md
index c27fe24673a..a88cabd2d6d 100644
--- a/docs/extensions/graph-explorer/configuration.md
+++ b/docs/extensions/graph-explorer/configuration.md
@@ -8,5 +8,8 @@ geekdocFilePath: configuration.md
 geekdocCollapseSection: true
 ---
 
+## Example YAML Config
+
+{{< include file="extensions/_includes/graph-explorer-config-example.yaml"  language="yaml" >}}
 
 {{< include file="extensions/_includes/graph-explorer_configvars.md" >}}
\ No newline at end of file
diff --git a/docs/extensions/graph/configuration.md b/docs/extensions/graph/configuration.md
index 786dfb13399..dbd212255cb 100644
--- a/docs/extensions/graph/configuration.md
+++ b/docs/extensions/graph/configuration.md
@@ -7,6 +7,8 @@ geekdocEditPath: edit/master/docs/extensions/graph
 geekdocFilePath: configuration.md
 geekdocCollapseSection: true
 ---
+## Example YAML Config
 
+{{< include file="extensions/_includes/graph-config-example.yaml"  language="yaml" >}}
 
 {{< include file="extensions/_includes/graph_configvars.md" >}}
\ No newline at end of file
diff --git a/docs/extensions/idm/configuration.md b/docs/extensions/idm/configuration.md
index 14200bcde07..1595260c784 100644
--- a/docs/extensions/idm/configuration.md
+++ b/docs/extensions/idm/configuration.md
@@ -8,5 +8,8 @@ geekdocFilePath: configuration.md
 geekdocCollapseSection: true
 ---
 
+## Example YAML Config
+
+{{< include file="extensions/_includes/idm-config-example.yaml"  language="yaml" >}}
 
 {{< include file="extensions/_includes/idm_configvars.md" >}}
\ No newline at end of file
diff --git a/docs/extensions/idp/configuration.md b/docs/extensions/idp/configuration.md
index bc6011eac8f..8aa88d203bc 100644
--- a/docs/extensions/idp/configuration.md
+++ b/docs/extensions/idp/configuration.md
@@ -8,5 +8,8 @@ geekdocFilePath: configuration.md
 geekdocCollapseSection: true
 ---
 
+## Example YAML Config
+
+{{< include file="extensions/_includes/idp-config-example.yaml"  language="yaml" >}}
 
 {{< include file="extensions/_includes/idp_configvars.md" >}}
\ No newline at end of file
diff --git a/docs/extensions/nats/configuration.md b/docs/extensions/nats/configuration.md
index 20ba82f34b1..4d414c90dee 100644
--- a/docs/extensions/nats/configuration.md
+++ b/docs/extensions/nats/configuration.md
@@ -8,5 +8,8 @@ geekdocFilePath: configuration.md
 geekdocCollapseSection: true
 ---
 
+## Example YAML Config
+
+{{< include file="extensions/_includes/nats-config-example.yaml"  language="yaml" >}}
 
 {{< include file="extensions/_includes/nats_configvars.md" >}}
\ No newline at end of file
diff --git a/docs/extensions/notifications/configuration.md b/docs/extensions/notifications/configuration.md
index 7da0ba47b65..7e260efbd5b 100644
--- a/docs/extensions/notifications/configuration.md
+++ b/docs/extensions/notifications/configuration.md
@@ -8,5 +8,8 @@ geekdocFilePath: configuration.md
 geekdocCollapseSection: true
 ---
 
+## Example YAML Config
+
+{{< include file="extensions/_includes/notifications-config-example.yaml"  language="yaml" >}}
 
 {{< include file="extensions/_includes/notifications_configvars.md" >}}
\ No newline at end of file
diff --git a/docs/extensions/ocs/configuration.md b/docs/extensions/ocs/configuration.md
index 502fead64e2..af9bd28c453 100644
--- a/docs/extensions/ocs/configuration.md
+++ b/docs/extensions/ocs/configuration.md
@@ -8,5 +8,8 @@ geekdocFilePath: configuration.md
 geekdocCollapseSection: true
 ---
 
+## Example YAML Config
+
+{{< include file="extensions/_includes/ocs-config-example.yaml"  language="yaml" >}}
 
 {{< include file="extensions/_includes/ocs_configvars.md" >}}
\ No newline at end of file
diff --git a/docs/extensions/port-ranges.md b/docs/extensions/port-ranges.md
deleted file mode 100644
index ac28f54c53c..00000000000
--- a/docs/extensions/port-ranges.md
+++ /dev/null
@@ -1,200 +0,0 @@
----
-title: Port Ranges
-date: 2018-05-02T00:00:00+00:00
-weight: 0
-geekdocRepo: https://github.com/owncloud/ocis
-geekdocEditPath: edit/master/docs/extensions
-geekdocFilePath: port-ranges.go
-geekdocCollapseSection: true
----
-
-oCIS extensions often need a port to expose their services to other services or the outside world.
-As users may have many different extensions running on the same machine, we should track port usage in the oCIS ecosystem. In the best case we ensure that each extension uses a non colliding port range, to make life of users easier.
-
-This page tracks the knowingly used port ranges.
-
-Feel free to "reserve" a free port range when you're developing an extension by adding your extension to the list (see the edit button in the top right corner).
-
-If you're developing a non-public extension, we recommend using ports outside of the ranges listed below.
-
-We also suggest to use the last port in your extensions' range as a debug/metrics port.
-
-
-## Allocations
-
-| Port range | Service                                                                       |
-| ---------- | ----------------------------------------------------------------------------- |
-| 9000-9010  | [ocis](https://github.com/owncloud/ocis)                                      |
-| 9100-9104  | [web](https://github.com/owncloud/ocis/tree/master/web)                       |
-| 9105-9109  | [hello](https://github.com/owncloud/ocis-hello)                               |
-| 9110-9114  | [ocs](https://github.com/owncloud/ocis/tree/master/ocs)                       |
-| 9115-9119  | [webdav](https://github.com/owncloud/ocis/tree/master/webdav)                 |
-| 9120-9124  | [graph](https://github.com/owncloud/ocis/tree/master/graph)                   |
-| 9125-9129  | [glauth](https://github.com/owncloud/ocis/tree/master/devldap)                |
-| 9130-9134  | [konnectd](https://github.com/owncloud/ocis/tree/master/konnectd)             |
-| 9135-9139  | [graph-explorer](https://github.com/owncloud/ocis/tree/master/graph-explorer) |
-| 9140-9179  | [reva/storage](https://github.com/owncloud/ocis/tree/master/storage)          |
-| 9180-9184  | [accounts](https://github.com/owncloud/ocis/tree/master/accounts)             |
-| 9185-9189  | [thumbnails](https://github.com/owncloud/ocis/tree/master/thumbnails)         |
-| 9190-9194  | [settings](https://github.com/owncloud/ocis/tree/master/settings)             |
-| 9195-9199  | [store](https://github.com/owncloud/ocis/tree/master/store)                   |
-| 9200-9204  | [proxy](https://github.com/owncloud/ocis/tree/master/proxy)                   |
-| 9205-9209  | [markdown-editor](https://github.com/owncloud/ocis-markdown-editor)           |
-| 9210-9214  | [reva](https://github.com/owncloud/ocis-reva) unused?                         |
-| 9215-9219  | reva metadata storage                                                         |
-| 9220-9224  | FREE                                                                          |
-| 9225-9229  | photoprism (state: PoC)                                                       |
-| 9230-9234  | [nats](https://github.com/owncloud/ocis/tree/master/nats)                     |
-| 9235-9239  | idm TBD                                                                       |
-| 9240-9244  | FREE                                                                          |
-| 9245-9249  | FREE                                                                          |
-| 9250-9254  | oCIS Runtime                                                                  |
-| 9255-9259  | FREE                                                                          |
-| 9260-9264  | FREE                                                                          |
-| 9265-9269  | FREE                                                                          |
-| 9270-9274  | FREE                                                                          |
-| 9275-9279  | FREE                                                                          |
-| 9280-9284  | FREE                                                                          |
-| 9285-9289  | FREE                                                                          |
-| 9290-9294  | FREE                                                                          |
-| 9295-9299  | FREE                                                                          |
-| 9300-9304  | FREE                                                                          |
-| 9305-9309  | FREE                                                                          |
-| 9310-9314  | FREE                                                                          |
-| 9315-9319  | FREE                                                                          |
-| 9320-9324  | FREE                                                                          |
-| 9325-9329  | FREE                                                                          |
-| 9330-9334  | FREE                                                                          |
-| 9335-9339  | FREE                                                                          |
-| 9340-9344  | FREE                                                                          |
-| 9345-9349  | FREE                                                                          |
-| 9350-9354  | FREE                                                                          |
-| 9355-9359  | FREE                                                                          |
-| 9360-9364  | FREE                                                                          |
-| 9365-9369  | FREE                                                                          |
-| 9370-9374  | FREE                                                                          |
-| 9375-9379  | FREE                                                                          |
-| 9380-9384  | FREE                                                                          |
-| 9385-9389  | FREE                                                                          |
-| 9390-9394  | FREE                                                                          |
-| 9395-9399  | FREE                                                                          |
-| 9400-9404  | FREE                                                                          |
-| 9405-9409  | FREE                                                                          |
-| 9410-9414  | FREE                                                                          |
-| 9415-9419  | FREE                                                                          |
-| 9420-9424  | FREE                                                                          |
-| 9425-9429  | FREE                                                                          |
-| 9430-9434  | FREE                                                                          |
-| 9435-9439  | FREE                                                                          |
-| 9440-9444  | FREE                                                                          |
-| 9445-9449  | FREE                                                                          |
-| 9450-9454  | FREE                                                                          |
-| 9455-9459  | FREE                                                                          |
-| 9460-9464  | FREE                                                                          |
-| 9465-9469  | FREE                                                                          |
-| 9470-9474  | FREE                                                                          |
-| 9475-9479  | FREE                                                                          |
-| 9480-9484  | FREE                                                                          |
-| 9485-9489  | FREE                                                                          |
-| 9490-9494  | FREE                                                                          |
-| 9495-9499  | FREE                                                                          |
-| 9500-9504  | FREE                                                                          |
-| 9505-9509  | FREE                                                                          |
-| 9510-9514  | FREE                                                                          |
-| 9515-9519  | FREE                                                                          |
-| 9520-9524  | FREE                                                                          |
-| 9525-9529  | FREE                                                                          |
-| 9530-9534  | FREE                                                                          |
-| 9535-9539  | FREE                                                                          |
-| 9540-9544  | FREE                                                                          |
-| 9545-9549  | FREE                                                                          |
-| 9550-9554  | FREE                                                                          |
-| 9555-9559  | FREE                                                                          |
-| 9560-9564  | FREE                                                                          |
-| 9565-9569  | FREE                                                                          |
-| 9570-9574  | FREE                                                                          |
-| 9575-9579  | FREE                                                                          |
-| 9580-9584  | FREE                                                                          |
-| 9585-9589  | FREE                                                                          |
-| 9590-9594  | FREE                                                                          |
-| 9595-9599  | FREE                                                                          |
-| 9600-9604  | FREE                                                                          |
-| 9605-9609  | FREE                                                                          |
-| 9610-9614  | FREE                                                                          |
-| 9615-9619  | FREE                                                                          |
-| 9620-9624  | FREE                                                                          |
-| 9625-9629  | FREE                                                                          |
-| 9630-9634  | FREE                                                                          |
-| 9635-9639  | FREE                                                                          |
-| 9640-9644  | FREE                                                                          |
-| 9645-9649  | FREE                                                                          |
-| 9650-9654  | FREE                                                                          |
-| 9655-9659  | FREE                                                                          |
-| 9660-9664  | FREE                                                                          |
-| 9665-9669  | FREE                                                                          |
-| 9670-9674  | FREE                                                                          |
-| 9675-9679  | FREE                                                                          |
-| 9680-9684  | FREE                                                                          |
-| 9685-9689  | FREE                                                                          |
-| 9690-9694  | FREE                                                                          |
-| 9695-9699  | FREE                                                                          |
-| 9700-9704  | FREE                                                                          |
-| 9705-9709  | FREE                                                                          |
-| 9710-9714  | FREE                                                                          |
-| 9715-9719  | FREE                                                                          |
-| 9720-9724  | FREE                                                                          |
-| 9725-9729  | FREE                                                                          |
-| 9730-9734  | FREE                                                                          |
-| 9735-9739  | FREE                                                                          |
-| 9740-9744  | FREE                                                                          |
-| 9745-9749  | FREE                                                                          |
-| 9750-9754  | FREE                                                                          |
-| 9755-9759  | FREE                                                                          |
-| 9760-9764  | FREE                                                                          |
-| 9765-9769  | FREE                                                                          |
-| 9770-9774  | FREE                                                                          |
-| 9775-9779  | FREE                                                                          |
-| 9780-9784  | FREE                                                                          |
-| 9785-9789  | FREE                                                                          |
-| 9790-9794  | FREE                                                                          |
-| 9795-9799  | FREE                                                                          |
-| 9800-9804  | FREE                                                                          |
-| 9805-9809  | FREE                                                                          |
-| 9810-9814  | FREE                                                                          |
-| 9815-9819  | FREE                                                                          |
-| 9820-9824  | FREE                                                                          |
-| 9825-9829  | FREE                                                                          |
-| 9830-9834  | FREE                                                                          |
-| 9835-9839  | FREE                                                                          |
-| 9840-9844  | FREE                                                                          |
-| 9845-9849  | FREE                                                                          |
-| 9850-9854  | FREE                                                                          |
-| 9855-9859  | FREE                                                                          |
-| 9860-9864  | FREE                                                                          |
-| 9865-9869  | FREE                                                                          |
-| 9870-9874  | FREE                                                                          |
-| 9875-9879  | FREE                                                                          |
-| 9880-9884  | FREE                                                                          |
-| 9885-9889  | FREE                                                                          |
-| 9890-9894  | FREE                                                                          |
-| 9895-9899  | FREE                                                                          |
-| 9900-9904  | FREE                                                                          |
-| 9905-9909  | FREE                                                                          |
-| 9910-9914  | FREE                                                                          |
-| 9915-9919  | FREE                                                                          |
-| 9920-9924  | FREE                                                                          |
-| 9925-9929  | FREE                                                                          |
-| 9930-9934  | FREE                                                                          |
-| 9935-9939  | FREE                                                                          |
-| 9940-9944  | FREE                                                                          |
-| 9945-9949  | FREE                                                                          |
-| 9950-9954  | FREE                                                                          |
-| 9955-9959  | FREE                                                                          |
-| 9960-9964  | FREE                                                                          |
-| 9965-9969  | FREE                                                                          |
-| 9970-9974  | FREE                                                                          |
-| 9975-9979  | FREE                                                                          |
-| 9980-9984  | FREE                                                                          |
-| 9985-9989  | FREE                                                                          |
-| 9990-9994  | FREE                                                                          |
-| 9995-9999  | FREE                                                                          |
diff --git a/docs/extensions/proxy/configuration.md b/docs/extensions/proxy/configuration.md
index 785922489ac..e127a101553 100644
--- a/docs/extensions/proxy/configuration.md
+++ b/docs/extensions/proxy/configuration.md
@@ -8,5 +8,8 @@ geekdocFilePath: configuration.md
 geekdocCollapseSection: true
 ---
 
+## Example YAML Config
+
+{{< include file="extensions/_includes/proxy-config-example.yaml"  language="yaml" >}}
 
 {{< include file="extensions/_includes/proxy_configvars.md" >}}
\ No newline at end of file
diff --git a/docs/extensions/settings/configuration.md b/docs/extensions/settings/configuration.md
index b20e913a7f5..ac61a75705e 100644
--- a/docs/extensions/settings/configuration.md
+++ b/docs/extensions/settings/configuration.md
@@ -8,5 +8,8 @@ geekdocFilePath: configuration.md
 geekdocCollapseSection: true
 ---
 
+## Example YAML Config
+
+{{< include file="extensions/_includes/settings-config-example.yaml"  language="yaml" >}}
 
 {{< include file="extensions/_includes/settings_configvars.md" >}}
\ No newline at end of file
diff --git a/docs/extensions/store/configuration.md b/docs/extensions/store/configuration.md
index a974e254af4..d556218cf14 100644
--- a/docs/extensions/store/configuration.md
+++ b/docs/extensions/store/configuration.md
@@ -8,5 +8,8 @@ geekdocFilePath: configuration.md
 geekdocCollapseSection: true
 ---
 
+## Example YAML Config
+
+{{< include file="extensions/_includes/store-config-example.yaml"  language="yaml" >}}
 
 {{< include file="extensions/_includes/store_configvars.md" >}}
\ No newline at end of file
diff --git a/docs/extensions/thumbnails/configuration.md b/docs/extensions/thumbnails/configuration.md
index 7b6e85bde53..1f10b136676 100644
--- a/docs/extensions/thumbnails/configuration.md
+++ b/docs/extensions/thumbnails/configuration.md
@@ -8,5 +8,8 @@ geekdocFilePath: configuration.md
 geekdocCollapseSection: true
 ---
 
+## Example YAML Config
+
+{{< include file="extensions/_includes/thumbnails-config-example.yaml"  language="yaml" >}}
 
 {{< include file="extensions/_includes/thumbnails_configvars.md" >}}
\ No newline at end of file
diff --git a/docs/extensions/web/configuration.md b/docs/extensions/web/configuration.md
index d55237fd905..ee3e60d7d8f 100644
--- a/docs/extensions/web/configuration.md
+++ b/docs/extensions/web/configuration.md
@@ -8,5 +8,8 @@ geekdocFilePath: configuration.md
 geekdocCollapseSection: true
 ---
 
+## Example YAML Config
+
+{{< include file="extensions/_includes/web-config-example.yaml"  language="yaml" >}}
 
 {{< include file="extensions/_includes/web_configvars.md" >}}
\ No newline at end of file
diff --git a/docs/extensions/webdav/configuration.md b/docs/extensions/webdav/configuration.md
index 7ae4a048607..53c2820012f 100644
--- a/docs/extensions/webdav/configuration.md
+++ b/docs/extensions/webdav/configuration.md
@@ -8,5 +8,8 @@ geekdocFilePath: configuration.md
 geekdocCollapseSection: true
 ---
 
+## Example YAML Config
+
+{{< include file="extensions/_includes/webdav-config-example.yaml"  language="yaml" >}}
 
 {{< include file="extensions/_includes/webdav_configvars.md" >}}
\ No newline at end of file
diff --git a/docs/helpers/configenvextractor.go b/docs/helpers/configenvextractor.go
index bc504fc32e8..1d5b9f6f81d 100644
--- a/docs/helpers/configenvextractor.go
+++ b/docs/helpers/configenvextractor.go
@@ -6,14 +6,20 @@ import (
 	"log"
 	"os"
 	"os/exec"
+	"path"
 	"path/filepath"
 	"strings"
 	"text/template"
 )
 
+var targets = map[string]string{
+	"example-config-generator.go.tmpl": "output/exampleconfig/example-config-generator.go",
+	"extractor.go.tmpl":                "output/env/runner.go",
+}
+
 func main() {
 	fmt.Println("Getting relevant packages")
-	paths, err := filepath.Glob("../../*/pkg/config/defaultconfig.go")
+	paths, err := filepath.Glob("../../*/pkg/config/defaults/defaultconfig.go")
 	if err != nil {
 		log.Fatal(err)
 	}
@@ -24,27 +30,36 @@ func main() {
 	for i := range paths {
 		paths[i] = replacer.Replace(paths[i])
 	}
-	content, err := ioutil.ReadFile("extractor.go.tmpl")
+
+	for template, output := range targets {
+		GenerateIntermediateCode(template, output, paths)
+		RunIntermediateCode(output)
+	}
+	fmt.Println("Cleaning up")
+	os.RemoveAll("output")
+}
+
+func GenerateIntermediateCode(templatePath string, intermediateCodePath string, paths []string) {
+	content, err := ioutil.ReadFile(templatePath)
 	if err != nil {
 		log.Fatal(err)
 	}
-	fmt.Println("Generating intermediate go code")
+	fmt.Println("Generating intermediate go code for " + intermediateCodePath + " using template " + templatePath)
 	tpl := template.Must(template.New("").Parse(string(content)))
-	os.Mkdir("output", 0700)
-	runner, err := os.Create("output/runner.go")
+	os.MkdirAll(path.Dir(intermediateCodePath), 0700)
+	runner, err := os.Create(intermediateCodePath)
 	if err != nil {
 		log.Fatal(err)
 	}
 	tpl.Execute(runner, paths)
-	fmt.Println("Running intermediate go code")
-	os.Chdir("output")
+}
+
+func RunIntermediateCode(intermediateCodePath string) {
+	fmt.Println("Running intermediate go code for " + intermediateCodePath)
 	os.Setenv("OCIS_BASE_DATA_PATH", "~/.ocis")
-	out, err := exec.Command("go", "run", "runner.go").Output()
+	out, err := exec.Command("go", "run", intermediateCodePath).Output()
 	if err != nil {
 		log.Fatal(err)
 	}
 	fmt.Println(string(out))
-	fmt.Println("Cleaning up")
-	os.Chdir("../")
-	os.RemoveAll("output")
 }
diff --git a/docs/helpers/example-config-generator.go.tmpl b/docs/helpers/example-config-generator.go.tmpl
new file mode 100644
index 00000000000..705a5e875ac
--- /dev/null
+++ b/docs/helpers/example-config-generator.go.tmpl
@@ -0,0 +1,53 @@
+package main
+
+import (
+	"fmt"
+	"log"
+	"os"
+	"path/filepath"
+	"strings"
+
+	"gopkg.in/yaml.v2"
+    {{- range $key, $value := .}}
+    pkg{{$key}} "{{$value}}"
+    {{- end}}
+)
+
+func main() {
+	replacer := strings.NewReplacer(
+		"github.com/owncloud/ocis/", "",
+		"/pkg/config/defaults", "",
+	)
+	cfg := map[string]string{
+	    {{- range $key, $value := .}}
+		replacer.Replace("{{$value}}"): func() string {
+			fmt.Println("Generating example YAML config for {{ $value -}}")
+			c := pkg{{$key}}.DefaultConfig()
+			pkg{{$key}}.EnsureDefaults(c)
+			pkg{{$key}}.Sanitize(c)
+			yml, err := yaml.Marshal(c)
+			if err != nil {
+				log.Fatalf("Marshalling yaml for pkg0 failed: %s\n", err)
+			}
+			return "# Autogenerated\n" + string(yml)
+		}(),
+		{{- end}}
+	}
+	for pkg, yml := range cfg {
+		targetFolders := []string{
+			// TODO: comment in when it is clear how to commit this to the structure of the master|main branch
+			// filepath.Join("../../", pkg, "/config"),
+			"../../docs/extensions/_includes/",
+		}
+		for _, targetFolder := range targetFolders {
+			os.MkdirAll(targetFolder, 0700)
+			targetYamlFile, err := os.Create(filepath.Join(targetFolder, replacer.Replace(pkg) + "-config-example.yaml"))
+			if err != nil {
+				log.Fatalf("Failed to create target file for : %s", err)
+			}
+			defer targetYamlFile.Close()
+			targetYamlFile.WriteString(yml)
+		}
+	}
+}
+
diff --git a/docs/helpers/extractor.go.tmpl b/docs/helpers/extractor.go.tmpl
index 3503ea22749..76ec507b3a9 100644
--- a/docs/helpers/extractor.go.tmpl
+++ b/docs/helpers/extractor.go.tmpl
@@ -23,13 +23,13 @@ type ConfigField struct {
 
 func main() {
 fmt.Println("Generating documentation for environment variables:")
-content, err := ioutil.ReadFile("../../../docs/templates/CONFIGURATION.tmpl")
+content, err := ioutil.ReadFile("../../docs/templates/CONFIGURATION.tmpl")
 if err != nil {
     log.Fatal(err)
 }
 replacer := strings.NewReplacer(
 		"github.com/owncloud/ocis/", "",
-		"/pkg/config", "",
+		"/pkg/config/defaults", "",
 	)
 var fields []ConfigField
 var targetFile *os.File
@@ -41,7 +41,7 @@ m := map[string]interface{}{
 {{- end }}
 }
 
-    targetFolder := "../../../docs/extensions/_includes/"
+    targetFolder := "../../docs/extensions/_includes/"
     for pkg, conf := range m {
 	fields = GetAnnotatedVariables(conf)
 	if len(fields) > 0 {
diff --git a/docs/ocis/deployment/basic-remote-setup.md b/docs/ocis/deployment/basic-remote-setup.md
index 4227a88e1f1..efa76e1fdf5 100644
--- a/docs/ocis/deployment/basic-remote-setup.md
+++ b/docs/ocis/deployment/basic-remote-setup.md
@@ -15,12 +15,10 @@ If you need to access oCIS running in a docker container, on a VM or a remote ma
 
 ## Start the oCIS fullstack server from binary
 
-Upon first start of the oCIS fullstack server with `./bin/ocis server` it will generate a directory tree skeleton in `$HOME/.ocis`. If that is already existing it will not be overwritten as it contains all relevant data for oCIS.
-
-In `$HOME/.ocis/idp` is a file `identifier-registration.yaml`. It is used to configure the built-in identity provider and therefore contains the OpenID Connect issuer and also information about relying parties, for example ownCloud Web and our desktop and mobile applications.
+Upon first start of the oCIS fullstack server with `./bin/ocis server` it will generate a file `identifier-registration.yml` in the config folder in your current working directory. This file is used to configure the built-in identity provider and therefore contains the OpenID Connect issuer and also information about relying parties, for example ownCloud Web and our desktop and mobile applications.
 
 {{< hint warning >}}
-The `identifier-registration.yaml` file will only be generated if it does not exist yet. If you want to change certain environment variables like `OCIS_URL`, please delete this file first before doing so. Otherwise your changes will not be applied correctly and you will run into errors.
+The `identifier-registration.yml` file will only be generated if it does not exist yet. If you want to change certain environment variables like `OCIS_URL`, please delete this file first before doing so. Otherwise your changes will not be applied correctly and you will run into errors.
 {{< /hint >}}
 
 {{< hint warning >}}
diff --git a/docs/ocis/deployment/bridge.md b/docs/ocis/deployment/bridge.md
index 2551ac0440f..b291b1bfde1 100644
--- a/docs/ocis/deployment/bridge.md
+++ b/docs/ocis/deployment/bridge.md
@@ -92,9 +92,9 @@ basedn = "dc=ocis,dc=test"                               # base dn to construct
 
 {{< hint >}}
 There is a bug in the config merging for environment variables, cli flags and config files causing log settings not to be picked up from the config file when specifying `--extensions`. That is why I will
-* configure most of the config in a file,
+* configure most of the config in a file, 
 * adjust logging using `OCIS_LOG_*` environment variables and
-* specify which extension to run using `ocis/bin/ocis server --extensions "comma, separated, list, of, extensions"`.
+* specify which extension to run using `ocis/bin/ocis server --extensions "comma, separated, list, of, extensions"`. 
 {{< /hint >}}
 
 #### Run it!
@@ -129,7 +129,7 @@ To configure LDAP to use our glauth we add this section to the config file:
 ```toml
 [storage.reva.ldap]
 idp = "https://ocis.ocis.test"
-basedn = "dc=ocis,dc=test"
+basedn = "dc=ocis,dc=test" 
 binddn = "cn=admin,dc=ocis,dc=test" # an admin user in your oc10
 bindpassword = "secret"
 userschema = { uid = "uid", displayname = "givenname" } # TODO make glauth return an ownclouduuid and displayname attribute
@@ -158,7 +158,7 @@ Please use `exit` or `Ctrl-D` to exit this program.
 username: jfd
 password: OK
 >> whoami
-id:<idp:"https://ocis.ocis.test" opaque_id:"jfd" type:USER_TYPE_PRIMARY > username:"jfd" mail:"jfd@butonic.de" display_name:"J\303\266rn" uid_number:99 gid_number:99
+id:<idp:"https://ocis.ocis.test" opaque_id:"jfd" type:USER_TYPE_PRIMARY > username:"jfd" mail:"jfd@butonic.de" display_name:"J\303\266rn" uid_number:99 gid_number:99 
 >> exit
 ```
 
diff --git a/glauth/cmd/glauth/main.go b/glauth/cmd/glauth/main.go
index 6a2a83249d4..4ecc5b53d99 100644
--- a/glauth/cmd/glauth/main.go
+++ b/glauth/cmd/glauth/main.go
@@ -4,11 +4,11 @@ import (
 	"os"
 
 	"github.com/owncloud/ocis/glauth/pkg/command"
-	"github.com/owncloud/ocis/glauth/pkg/config"
+	"github.com/owncloud/ocis/glauth/pkg/config/defaults"
 )
 
 func main() {
-	if err := command.Execute(config.DefaultConfig()); err != nil {
+	if err := command.Execute(defaults.DefaultConfig()); err != nil {
 		os.Exit(1)
 	}
 }
diff --git a/glauth/pkg/config/config.go b/glauth/pkg/config/config.go
index 7de14cf6875..2628e18ae64 100644
--- a/glauth/pkg/config/config.go
+++ b/glauth/pkg/config/config.go
@@ -8,9 +8,9 @@ import (
 
 // Config combines all available configuration parts.
 type Config struct {
-	*shared.Commons
+	*shared.Commons `ocisConfig:"-" yaml:"-"`
 
-	Service Service
+	Service Service `ocisConfig:"-" yaml:"-"`
 
 	Tracing *Tracing `ocisConfig:"tracing"`
 	Log     *Log     `ocisConfig:"log"`
@@ -24,7 +24,7 @@ type Config struct {
 
 	RoleBundleUUID string `ocisConfig:"role_bundle_uuid" env:"GLAUTH_ROLE_BUNDLE_ID"`
 
-	Context context.Context
+	Context context.Context `ocisConfig:"-" yaml:"-"`
 }
 
 // Backend defined the available backend configuration.
diff --git a/glauth/pkg/config/defaultconfig.go b/glauth/pkg/config/defaultconfig.go
deleted file mode 100644
index 503321d8eec..00000000000
--- a/glauth/pkg/config/defaultconfig.go
+++ /dev/null
@@ -1,51 +0,0 @@
-package config
-
-import (
-	"path"
-
-	"github.com/owncloud/ocis/ocis-pkg/config/defaults"
-)
-
-func DefaultConfig() *Config {
-	return &Config{
-		Debug: Debug{
-			Addr: "127.0.0.1:9129",
-		},
-		Service: Service{
-			Name: "glauth",
-		},
-		Ldap: Ldap{
-			Enabled:   true,
-			Addr:      "127.0.0.1:9125",
-			Namespace: "com.owncloud.ldap",
-		},
-		Ldaps: Ldaps{
-			Enabled:   true,
-			Addr:      "127.0.0.1:9126",
-			Namespace: "com.owncloud.ldaps",
-			Cert:      path.Join(defaults.BaseDataPath(), "ldap", "ldap.crt"),
-			Key:       path.Join(defaults.BaseDataPath(), "ldap", "ldap.key"),
-		},
-		Backend: Backend{
-			Datastore:   "accounts",
-			BaseDN:      "dc=ocis,dc=test",
-			Insecure:    false,
-			NameFormat:  "cn",
-			GroupFormat: "ou",
-			Servers:     nil,
-			SSHKeyAttr:  "sshPublicKey",
-			UseGraphAPI: true,
-		},
-		Fallback: FallbackBackend{
-			Datastore:   "",
-			BaseDN:      "dc=ocis,dc=test",
-			Insecure:    false,
-			NameFormat:  "cn",
-			GroupFormat: "ou",
-			Servers:     nil,
-			SSHKeyAttr:  "sshPublicKey",
-			UseGraphAPI: true,
-		},
-		RoleBundleUUID: "71881883-1768-46bd-a24d-a356a2afdf7f", // BundleUUIDRoleAdmin
-	}
-}
diff --git a/glauth/pkg/config/defaults/defaultconfig.go b/glauth/pkg/config/defaults/defaultconfig.go
new file mode 100644
index 00000000000..12774c48883
--- /dev/null
+++ b/glauth/pkg/config/defaults/defaultconfig.go
@@ -0,0 +1,90 @@
+package defaults
+
+import (
+	"path"
+
+	"github.com/owncloud/ocis/glauth/pkg/config"
+	"github.com/owncloud/ocis/ocis-pkg/config/defaults"
+)
+
+func FullDefaultConfig() *config.Config {
+	cfg := DefaultConfig()
+
+	EnsureDefaults(cfg)
+	Sanitize(cfg)
+
+	return cfg
+}
+
+func DefaultConfig() *config.Config {
+	return &config.Config{
+		Debug: config.Debug{
+			Addr: "127.0.0.1:9129",
+		},
+		Service: config.Service{
+			Name: "glauth",
+		},
+		Ldap: config.Ldap{
+			Enabled:   true,
+			Addr:      "127.0.0.1:9125",
+			Namespace: "com.owncloud.ldap",
+		},
+		Ldaps: config.Ldaps{
+			Enabled:   true,
+			Addr:      "127.0.0.1:9126",
+			Namespace: "com.owncloud.ldaps",
+			Cert:      path.Join(defaults.BaseDataPath(), "ldap", "ldap.crt"),
+			Key:       path.Join(defaults.BaseDataPath(), "ldap", "ldap.key"),
+		},
+		Backend: config.Backend{
+			Datastore:   "accounts",
+			BaseDN:      "dc=ocis,dc=test",
+			Insecure:    false,
+			NameFormat:  "cn",
+			GroupFormat: "ou",
+			Servers:     nil,
+			SSHKeyAttr:  "sshPublicKey",
+			UseGraphAPI: true,
+		},
+		Fallback: config.FallbackBackend{
+			Datastore:   "",
+			BaseDN:      "dc=ocis,dc=test",
+			Insecure:    false,
+			NameFormat:  "cn",
+			GroupFormat: "ou",
+			Servers:     nil,
+			SSHKeyAttr:  "sshPublicKey",
+			UseGraphAPI: true,
+		},
+		RoleBundleUUID: "71881883-1768-46bd-a24d-a356a2afdf7f", // BundleUUIDRoleAdmin
+	}
+}
+
+func EnsureDefaults(cfg *config.Config) {
+	// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
+	if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
+		cfg.Log = &config.Log{
+			Level:  cfg.Commons.Log.Level,
+			Pretty: cfg.Commons.Log.Pretty,
+			Color:  cfg.Commons.Log.Color,
+			File:   cfg.Commons.Log.File,
+		}
+	} else if cfg.Log == nil {
+		cfg.Log = &config.Log{}
+	}
+	// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
+	if cfg.Tracing == nil && cfg.Commons != nil && cfg.Commons.Tracing != nil {
+		cfg.Tracing = &config.Tracing{
+			Enabled:   cfg.Commons.Tracing.Enabled,
+			Type:      cfg.Commons.Tracing.Type,
+			Endpoint:  cfg.Commons.Tracing.Endpoint,
+			Collector: cfg.Commons.Tracing.Collector,
+		}
+	} else if cfg.Tracing == nil {
+		cfg.Tracing = &config.Tracing{}
+	}
+}
+
+func Sanitize(cfg *config.Config) {
+	// nothing to santizie here atm
+}
diff --git a/glauth/pkg/config/ldap.go b/glauth/pkg/config/ldap.go
index b0780084a6f..0c4602cf7e0 100644
--- a/glauth/pkg/config/ldap.go
+++ b/glauth/pkg/config/ldap.go
@@ -4,5 +4,5 @@ package config
 type Ldap struct {
 	Enabled   bool   `ocisConfig:"enabled" env:"GLAUTH_LDAP_ENABLED"`
 	Addr      string `ocisConfig:"addr" env:"GLAUTH_LDAP_ADDR"`
-	Namespace string
+	Namespace string `ocisConfig:"-" yaml:"-"`
 }
diff --git a/glauth/pkg/config/ldaps.go b/glauth/pkg/config/ldaps.go
index 2c09f2530b7..927b493d1f2 100644
--- a/glauth/pkg/config/ldaps.go
+++ b/glauth/pkg/config/ldaps.go
@@ -4,7 +4,7 @@ package config
 type Ldaps struct {
 	Enabled   bool   `ocisConfig:"enabled" env:"GLAUTH_LDAPS_ENABLED"`
 	Addr      string `ocisConfig:"addr" env:"GLAUTH_LDAPS_ADDR"`
-	Namespace string
+	Namespace string `ocisConfig:"-" yaml:"-"`
 	Cert      string `ocisConfig:"cert" env:"GLAUTH_LDAPS_CERT"`
 	Key       string `ocisConfig:"key" env:"GLAUTH_LDAPS_KEY"`
 }
diff --git a/glauth/pkg/config/parser/parse.go b/glauth/pkg/config/parser/parse.go
index de91a182325..1d9326a7270 100644
--- a/glauth/pkg/config/parser/parse.go
+++ b/glauth/pkg/config/parser/parse.go
@@ -4,6 +4,7 @@ import (
 	"errors"
 
 	"github.com/owncloud/ocis/glauth/pkg/config"
+	"github.com/owncloud/ocis/glauth/pkg/config/defaults"
 	ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
 
 	"github.com/owncloud/ocis/ocis-pkg/config/envdecode"
@@ -16,29 +17,7 @@ func ParseConfig(cfg *config.Config) error {
 		return err
 	}
 
-	// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
-	if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
-		cfg.Log = &config.Log{
-			Level:  cfg.Commons.Log.Level,
-			Pretty: cfg.Commons.Log.Pretty,
-			Color:  cfg.Commons.Log.Color,
-			File:   cfg.Commons.Log.File,
-		}
-	} else if cfg.Log == nil {
-		cfg.Log = &config.Log{}
-	}
-	// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
-	if cfg.Tracing == nil && cfg.Commons != nil && cfg.Commons.Tracing != nil {
-		cfg.Tracing = &config.Tracing{
-			Enabled:   cfg.Commons.Tracing.Enabled,
-			Type:      cfg.Commons.Tracing.Type,
-			Endpoint:  cfg.Commons.Tracing.Endpoint,
-			Collector: cfg.Commons.Tracing.Collector,
-		}
-	} else if cfg.Tracing == nil {
-		cfg.Tracing = &config.Tracing{}
-	}
-
+	defaults.EnsureDefaults(cfg)
 	// load all env variables relevant to the config in the current context.
 	if err := envdecode.Decode(cfg); err != nil {
 		// no environment variable set for this config is an expected "error"
@@ -48,6 +27,6 @@ func ParseConfig(cfg *config.Config) error {
 	}
 
 	// sanitize config
-
+	defaults.Sanitize(cfg)
 	return nil
 }
diff --git a/glauth/pkg/config/service.go b/glauth/pkg/config/service.go
index f98aa3d27e5..c019b73046e 100644
--- a/glauth/pkg/config/service.go
+++ b/glauth/pkg/config/service.go
@@ -2,5 +2,5 @@ package config
 
 // Service defines the available service configuration.
 type Service struct {
-	Name string
+	Name string `ocisConfig:"-" yaml:"-"`
 }
diff --git a/go.mod b/go.mod
index 829dead3e48..acf0186c9e9 100644
--- a/go.mod
+++ b/go.mod
@@ -59,7 +59,7 @@ require (
 	github.com/prometheus/client_golang v1.12.1
 	github.com/rs/zerolog v1.26.1
 	github.com/sirupsen/logrus v1.8.1
-	github.com/spf13/cobra v1.4.0
+	github.com/spf13/cobra v1.3.0
 	github.com/stretchr/testify v1.7.0
 	github.com/test-go/testify v1.1.4
 	github.com/thejerf/suture/v4 v4.0.2
@@ -76,7 +76,7 @@ require (
 	golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd
 	golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b
 	google.golang.org/genproto v0.0.0-20220302033224-9aa15565e42a
-	google.golang.org/grpc v1.45.0
+	google.golang.org/grpc v1.44.0
 	google.golang.org/protobuf v1.27.1
 	gopkg.in/yaml.v2 v2.4.0
 	gotest.tools/v3 v3.1.0
diff --git a/go.sum b/go.sum
index ac07e635c50..f68bd403f32 100644
--- a/go.sum
+++ b/go.sum
@@ -1346,9 +1346,8 @@ github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3
 github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU=
 github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI=
 github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk=
+github.com/spf13/cobra v1.3.0 h1:R7cSvGu+Vv+qX0gW5R/85dx2kmmJT5z5NM8ifdYjdn0=
 github.com/spf13/cobra v1.3.0/go.mod h1:BrRVncBjOJa/eUcVVm9CE+oC6as8k+VYr4NY7WCi9V4=
-github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q=
-github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g=
 github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
 github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
 github.com/spf13/pflag v1.0.0/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
@@ -2114,9 +2113,8 @@ google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9K
 google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
 google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k=
 google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
+google.golang.org/grpc v1.44.0 h1:weqSxi/TMs1SqFRMHCtBgXRs8k3X39QIDEZ0pRcttUg=
 google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
-google.golang.org/grpc v1.45.0 h1:NEpgUqV3Z+ZjkqMsxMg11IaDrXY4RY6CQukSGK0uI1M=
-google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ=
 google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
 google.golang.org/grpc/examples v0.0.0-20210902184326-c93e472777b9/go.mod h1:gID3PKrg7pWKntu9Ss6zTLJ0ttC0X9IHgREOCZwbCVU=
 google.golang.org/grpc/examples v0.0.0-20211102180624-670c133e568e h1:m7aQHHqd0q89mRwhwS9Bx2rjyl/hsFAeta+uGrHsQaU=
diff --git a/graph-explorer/cmd/graph-explorer/main.go b/graph-explorer/cmd/graph-explorer/main.go
index a8357cb1f2e..aca5c050f63 100644
--- a/graph-explorer/cmd/graph-explorer/main.go
+++ b/graph-explorer/cmd/graph-explorer/main.go
@@ -4,11 +4,11 @@ import (
 	"os"
 
 	"github.com/owncloud/ocis/graph-explorer/pkg/command"
-	"github.com/owncloud/ocis/graph-explorer/pkg/config"
+	"github.com/owncloud/ocis/graph-explorer/pkg/config/defaults"
 )
 
 func main() {
-	if err := command.Execute(config.DefaultConfig()); err != nil {
+	if err := command.Execute(defaults.DefaultConfig()); err != nil {
 		os.Exit(1)
 	}
 }
diff --git a/graph-explorer/pkg/config/config.go b/graph-explorer/pkg/config/config.go
index 2d70fd664a6..82f90fc246a 100644
--- a/graph-explorer/pkg/config/config.go
+++ b/graph-explorer/pkg/config/config.go
@@ -8,9 +8,9 @@ import (
 
 // Config combines all available configuration parts.
 type Config struct {
-	*shared.Commons
+	*shared.Commons `ocisConfig:"-" yaml:"-"`
 
-	Service Service
+	Service Service `ocisConfig:"-" yaml:"-"`
 
 	Tracing *Tracing `ocisConfig:"tracing"`
 	Log     *Log     `ocisConfig:"log"`
@@ -20,7 +20,7 @@ type Config struct {
 
 	GraphExplorer GraphExplorer `ocisConfig:"graph_explorer"`
 
-	Context context.Context
+	Context context.Context `ocisConfig:"-" yaml:"-"`
 }
 
 // GraphExplorer defines the available graph-explorer configuration.
diff --git a/graph-explorer/pkg/config/defaultconfig.go b/graph-explorer/pkg/config/defaultconfig.go
deleted file mode 100644
index 454cb239a6f..00000000000
--- a/graph-explorer/pkg/config/defaultconfig.go
+++ /dev/null
@@ -1,26 +0,0 @@
-package config
-
-func DefaultConfig() *Config {
-	return &Config{
-		Debug: Debug{
-			Addr:   "127.0.0.1:9136",
-			Token:  "",
-			Pprof:  false,
-			Zpages: false,
-		},
-		HTTP: HTTP{
-			Addr:      "127.0.0.1:9135",
-			Root:      "/graph-explorer",
-			Namespace: "com.owncloud.web",
-		},
-		Service: Service{
-			Name: "graph-explorer",
-		},
-		GraphExplorer: GraphExplorer{
-			ClientID:     "ocis-explorer.js",
-			Issuer:       "https://localhost:9200",
-			GraphURLBase: "https://localhost:9200",
-			GraphURLPath: "/graph",
-		},
-	}
-}
diff --git a/graph-explorer/pkg/config/defaults/defaultconfig.go b/graph-explorer/pkg/config/defaults/defaultconfig.go
new file mode 100644
index 00000000000..860d0fdf396
--- /dev/null
+++ b/graph-explorer/pkg/config/defaults/defaultconfig.go
@@ -0,0 +1,73 @@
+package defaults
+
+import (
+	"strings"
+
+	"github.com/owncloud/ocis/graph-explorer/pkg/config"
+)
+
+func FullDefaultConfig() *config.Config {
+	cfg := DefaultConfig()
+
+	EnsureDefaults(cfg)
+	Sanitize(cfg)
+
+	return cfg
+}
+
+func DefaultConfig() *config.Config {
+	return &config.Config{
+		Debug: config.Debug{
+			Addr:   "127.0.0.1:9136",
+			Token:  "",
+			Pprof:  false,
+			Zpages: false,
+		},
+		HTTP: config.HTTP{
+			Addr:      "127.0.0.1:9135",
+			Root:      "/graph-explorer",
+			Namespace: "com.owncloud.web",
+		},
+		Service: config.Service{
+			Name: "graph-explorer",
+		},
+		GraphExplorer: config.GraphExplorer{
+			ClientID:     "ocis-explorer.js",
+			Issuer:       "https://localhost:9200",
+			GraphURLBase: "https://localhost:9200",
+			GraphURLPath: "/graph",
+		},
+	}
+}
+
+func EnsureDefaults(cfg *config.Config) {
+	// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
+	if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
+		cfg.Log = &config.Log{
+			Level:  cfg.Commons.Log.Level,
+			Pretty: cfg.Commons.Log.Pretty,
+			Color:  cfg.Commons.Log.Color,
+			File:   cfg.Commons.Log.File,
+		}
+	} else if cfg.Log == nil {
+		cfg.Log = &config.Log{}
+	}
+	// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
+	if cfg.Tracing == nil && cfg.Commons != nil && cfg.Commons.Tracing != nil {
+		cfg.Tracing = &config.Tracing{
+			Enabled:   cfg.Commons.Tracing.Enabled,
+			Type:      cfg.Commons.Tracing.Type,
+			Endpoint:  cfg.Commons.Tracing.Endpoint,
+			Collector: cfg.Commons.Tracing.Collector,
+		}
+	} else if cfg.Tracing == nil {
+		cfg.Tracing = &config.Tracing{}
+	}
+}
+
+func Sanitize(cfg *config.Config) {
+	// sanitize config
+	if cfg.HTTP.Root == "/" {
+		cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/graph-explorer")
+	}
+}
diff --git a/graph-explorer/pkg/config/http.go b/graph-explorer/pkg/config/http.go
index 8990a455e24..040f808db75 100644
--- a/graph-explorer/pkg/config/http.go
+++ b/graph-explorer/pkg/config/http.go
@@ -4,7 +4,7 @@ package config
 type HTTP struct {
 	Addr      string `ocisConfig:"addr" env:"GRAPH_EXPLORER_HTTP_ADDR"`
 	Root      string `ocisConfig:"root" env:"GRAPH_EXPLORER_HTTP_ROOT"`
-	Namespace string
+	Namespace string `ocisConfig:"-" yaml:"-"`
 }
 
 // CORS defines the available cors configuration.
diff --git a/graph-explorer/pkg/config/parser/parse.go b/graph-explorer/pkg/config/parser/parse.go
index c9127c292f6..b9801ba948d 100644
--- a/graph-explorer/pkg/config/parser/parse.go
+++ b/graph-explorer/pkg/config/parser/parse.go
@@ -2,9 +2,9 @@ package parser
 
 import (
 	"errors"
-	"strings"
 
 	"github.com/owncloud/ocis/graph-explorer/pkg/config"
+	"github.com/owncloud/ocis/graph-explorer/pkg/config/defaults"
 	ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
 
 	"github.com/owncloud/ocis/ocis-pkg/config/envdecode"
@@ -17,28 +17,7 @@ func ParseConfig(cfg *config.Config) error {
 		return err
 	}
 
-	// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
-	if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
-		cfg.Log = &config.Log{
-			Level:  cfg.Commons.Log.Level,
-			Pretty: cfg.Commons.Log.Pretty,
-			Color:  cfg.Commons.Log.Color,
-			File:   cfg.Commons.Log.File,
-		}
-	} else if cfg.Log == nil {
-		cfg.Log = &config.Log{}
-	}
-	// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
-	if cfg.Tracing == nil && cfg.Commons != nil && cfg.Commons.Tracing != nil {
-		cfg.Tracing = &config.Tracing{
-			Enabled:   cfg.Commons.Tracing.Enabled,
-			Type:      cfg.Commons.Tracing.Type,
-			Endpoint:  cfg.Commons.Tracing.Endpoint,
-			Collector: cfg.Commons.Tracing.Collector,
-		}
-	} else if cfg.Tracing == nil {
-		cfg.Tracing = &config.Tracing{}
-	}
+	defaults.EnsureDefaults(cfg)
 
 	// load all env variables relevant to the config in the current context.
 	if err := envdecode.Decode(cfg); err != nil {
@@ -49,9 +28,7 @@ func ParseConfig(cfg *config.Config) error {
 	}
 
 	// sanitize config
-	if cfg.HTTP.Root != "/" {
-		cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
-	}
+	defaults.Sanitize(cfg)
 
 	return nil
 }
diff --git a/graph-explorer/pkg/config/service.go b/graph-explorer/pkg/config/service.go
index f98aa3d27e5..c019b73046e 100644
--- a/graph-explorer/pkg/config/service.go
+++ b/graph-explorer/pkg/config/service.go
@@ -2,5 +2,5 @@ package config
 
 // Service defines the available service configuration.
 type Service struct {
-	Name string
+	Name string `ocisConfig:"-" yaml:"-"`
 }
diff --git a/graph/cmd/graph/main.go b/graph/cmd/graph/main.go
index ec85f23718e..ddce12e82a7 100644
--- a/graph/cmd/graph/main.go
+++ b/graph/cmd/graph/main.go
@@ -4,11 +4,11 @@ import (
 	"os"
 
 	"github.com/owncloud/ocis/graph/pkg/command"
-	"github.com/owncloud/ocis/graph/pkg/config"
+	"github.com/owncloud/ocis/graph/pkg/config/defaults"
 )
 
 func main() {
-	if err := command.Execute(config.DefaultConfig()); err != nil {
+	if err := command.Execute(defaults.DefaultConfig()); err != nil {
 		os.Exit(1)
 	}
 }
diff --git a/graph/pkg/config/config.go b/graph/pkg/config/config.go
index 88e4c11669b..6a46eb0cb98 100644
--- a/graph/pkg/config/config.go
+++ b/graph/pkg/config/config.go
@@ -8,9 +8,9 @@ import (
 
 // Config combines all available configuration parts.
 type Config struct {
-	*shared.Commons
+	*shared.Commons `ocisConfig:"-" yaml:"-"`
 
-	Service Service
+	Service Service `ocisConfig:"-" yaml:"-"`
 
 	Tracing *Tracing `ocisConfig:"tracing"`
 	Log     *Log     `ocisConfig:"log"`
@@ -24,7 +24,7 @@ type Config struct {
 	Spaces   Spaces   `ocisConfig:"spaces"`
 	Identity Identity `ocisConfig:"identity"`
 
-	Context context.Context
+	Context context.Context `ocisConfig:"-" yaml:"-"`
 }
 
 type Spaces struct {
diff --git a/graph/pkg/config/defaultconfig.go b/graph/pkg/config/defaultconfig.go
deleted file mode 100644
index 134f3419b65..00000000000
--- a/graph/pkg/config/defaultconfig.go
+++ /dev/null
@@ -1,55 +0,0 @@
-package config
-
-func DefaultConfig() *Config {
-	return &Config{
-		Debug: Debug{
-			Addr:  "127.0.0.1:9124",
-			Token: "",
-		},
-		HTTP: HTTP{
-			Addr:      "127.0.0.1:9120",
-			Namespace: "com.owncloud.graph",
-			Root:      "/graph",
-		},
-		Service: Service{
-			Name: "graph",
-		},
-		Reva: Reva{
-			Address: "127.0.0.1:9142",
-		},
-		TokenManager: TokenManager{
-			JWTSecret: "Pive-Fumkiu4",
-		},
-		Spaces: Spaces{
-			WebDavBase:   "https://localhost:9200",
-			WebDavPath:   "/dav/spaces/",
-			DefaultQuota: "1000000000",
-			Insecure:     false,
-		},
-		Identity: Identity{
-			Backend: "cs3",
-			LDAP: LDAP{
-				URI:                      "ldap://localhost:9125",
-				Insecure:                 false,
-				BindDN:                   "",
-				BindPassword:             "",
-				UseServerUUID:            false,
-				WriteEnabled:             false,
-				UserBaseDN:               "ou=users,dc=ocis,dc=test",
-				UserSearchScope:          "sub",
-				UserFilter:               "(objectClass=inetOrgPerson)",
-				UserEmailAttribute:       "mail",
-				UserDisplayNameAttribute: "displayName",
-				UserNameAttribute:        "uid",
-				// FIXME: switch this to some more widely available attribute by default
-				//        ideally this needs to	be constant for the lifetime of a users
-				UserIDAttribute:    "owncloudUUID",
-				GroupBaseDN:        "ou=groups,dc=ocis,dc=test",
-				GroupSearchScope:   "sub",
-				GroupFilter:        "(objectclass=groupOfNames)",
-				GroupNameAttribute: "cn",
-				GroupIDAttribute:   "owncloudUUID",
-			},
-		},
-	}
-}
diff --git a/graph/pkg/config/defaults/defaultconfig.go b/graph/pkg/config/defaults/defaultconfig.go
new file mode 100644
index 00000000000..9c2eba50cb8
--- /dev/null
+++ b/graph/pkg/config/defaults/defaultconfig.go
@@ -0,0 +1,93 @@
+package defaults
+
+import (
+	"strings"
+
+	"github.com/owncloud/ocis/graph/pkg/config"
+)
+
+func DefaultConfig() *config.Config {
+	return &config.Config{
+		Debug: config.Debug{
+			Addr:  "127.0.0.1:9124",
+			Token: "",
+		},
+		HTTP: config.HTTP{
+			Addr:      "127.0.0.1:9120",
+			Namespace: "com.owncloud.graph",
+			Root:      "/graph",
+		},
+		Service: config.Service{
+			Name: "graph",
+		},
+		Reva: config.Reva{
+			Address: "127.0.0.1:9142",
+		},
+		TokenManager: config.TokenManager{
+			JWTSecret: "Pive-Fumkiu4",
+		},
+		Spaces: config.Spaces{
+			WebDavBase:   "https://localhost:9200",
+			WebDavPath:   "/dav/spaces/",
+			DefaultQuota: "1000000000",
+			Insecure:     false,
+		},
+		Identity: config.Identity{
+			Backend: "cs3",
+			LDAP: config.LDAP{
+				URI:                      "ldap://localhost:9125",
+				Insecure:                 false,
+				BindDN:                   "",
+				BindPassword:             "",
+				UseServerUUID:            false,
+				WriteEnabled:             false,
+				UserBaseDN:               "ou=users,dc=ocis,dc=test",
+				UserSearchScope:          "sub",
+				UserFilter:               "(objectClass=inetOrgPerson)",
+				UserEmailAttribute:       "mail",
+				UserDisplayNameAttribute: "displayName",
+				UserNameAttribute:        "uid",
+				// FIXME: switch this to some more widely available attribute by default
+				//        ideally this needs to	be constant for the lifetime of a users
+				UserIDAttribute:    "owncloudUUID",
+				GroupBaseDN:        "ou=groups,dc=ocis,dc=test",
+				GroupSearchScope:   "sub",
+				GroupFilter:        "(objectclass=groupOfNames)",
+				GroupNameAttribute: "cn",
+				GroupIDAttribute:   "owncloudUUID",
+			},
+		},
+	}
+}
+
+func EnsureDefaults(cfg *config.Config) {
+	// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
+	if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
+		cfg.Log = &config.Log{
+			Level:  cfg.Commons.Log.Level,
+			Pretty: cfg.Commons.Log.Pretty,
+			Color:  cfg.Commons.Log.Color,
+			File:   cfg.Commons.Log.File,
+		}
+	} else if cfg.Log == nil {
+		cfg.Log = &config.Log{}
+	}
+	// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
+	if cfg.Tracing == nil && cfg.Commons != nil && cfg.Commons.Tracing != nil {
+		cfg.Tracing = &config.Tracing{
+			Enabled:   cfg.Commons.Tracing.Enabled,
+			Type:      cfg.Commons.Tracing.Type,
+			Endpoint:  cfg.Commons.Tracing.Endpoint,
+			Collector: cfg.Commons.Tracing.Collector,
+		}
+	} else if cfg.Tracing == nil {
+		cfg.Tracing = &config.Tracing{}
+	}
+}
+
+func Sanitize(cfg *config.Config) {
+	// sanitize config
+	if cfg.HTTP.Root != "/" {
+		cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
+	}
+}
diff --git a/graph/pkg/config/http.go b/graph/pkg/config/http.go
index 64351105b09..3ce0de1b777 100644
--- a/graph/pkg/config/http.go
+++ b/graph/pkg/config/http.go
@@ -3,6 +3,6 @@ package config
 // HTTP defines the available http configuration.
 type HTTP struct {
 	Addr      string `ocisConfig:"addr" env:"GRAPH_HTTP_ADDR"`
-	Namespace string
+	Namespace string `ocisConfig:"-" yaml:"-"`
 	Root      string `ocisConfig:"root" env:"GRAPH_HTTP_ROOT"`
 }
diff --git a/graph/pkg/config/parser/parse.go b/graph/pkg/config/parser/parse.go
index 367089f8523..a1892f0950f 100644
--- a/graph/pkg/config/parser/parse.go
+++ b/graph/pkg/config/parser/parse.go
@@ -2,9 +2,9 @@ package parser
 
 import (
 	"errors"
-	"strings"
 
 	"github.com/owncloud/ocis/graph/pkg/config"
+	"github.com/owncloud/ocis/graph/pkg/config/defaults"
 	ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
 
 	"github.com/owncloud/ocis/ocis-pkg/config/envdecode"
@@ -17,28 +17,7 @@ func ParseConfig(cfg *config.Config) error {
 		return err
 	}
 
-	// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
-	if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
-		cfg.Log = &config.Log{
-			Level:  cfg.Commons.Log.Level,
-			Pretty: cfg.Commons.Log.Pretty,
-			Color:  cfg.Commons.Log.Color,
-			File:   cfg.Commons.Log.File,
-		}
-	} else if cfg.Log == nil {
-		cfg.Log = &config.Log{}
-	}
-	// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
-	if cfg.Tracing == nil && cfg.Commons != nil && cfg.Commons.Tracing != nil {
-		cfg.Tracing = &config.Tracing{
-			Enabled:   cfg.Commons.Tracing.Enabled,
-			Type:      cfg.Commons.Tracing.Type,
-			Endpoint:  cfg.Commons.Tracing.Endpoint,
-			Collector: cfg.Commons.Tracing.Collector,
-		}
-	} else if cfg.Tracing == nil {
-		cfg.Tracing = &config.Tracing{}
-	}
+	defaults.EnsureDefaults(cfg)
 
 	// load all env variables relevant to the config in the current context.
 	if err := envdecode.Decode(cfg); err != nil {
@@ -48,10 +27,7 @@ func ParseConfig(cfg *config.Config) error {
 		}
 	}
 
-	// sanitize config
-	if cfg.HTTP.Root != "/" {
-		cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
-	}
+	defaults.Sanitize(cfg)
 
 	return nil
 }
diff --git a/graph/pkg/config/service.go b/graph/pkg/config/service.go
index f98aa3d27e5..c019b73046e 100644
--- a/graph/pkg/config/service.go
+++ b/graph/pkg/config/service.go
@@ -2,5 +2,5 @@ package config
 
 // Service defines the available service configuration.
 type Service struct {
-	Name string
+	Name string `ocisConfig:"-" yaml:"-"`
 }
diff --git a/idm/cmd/idm/main.go b/idm/cmd/idm/main.go
index 680d58dafb4..7463a99c78a 100644
--- a/idm/cmd/idm/main.go
+++ b/idm/cmd/idm/main.go
@@ -4,11 +4,11 @@ import (
 	"os"
 
 	"github.com/owncloud/ocis/idm/pkg/command"
-	"github.com/owncloud/ocis/idm/pkg/config"
+	"github.com/owncloud/ocis/idm/pkg/config/defaults"
 )
 
 func main() {
-	if err := command.Execute(config.DefaultConfig()); err != nil {
+	if err := command.Execute(defaults.DefaultConfig()); err != nil {
 		os.Exit(1)
 	}
 }
diff --git a/idm/pkg/config/config.go b/idm/pkg/config/config.go
index 44a97887c89..4917a554291 100644
--- a/idm/pkg/config/config.go
+++ b/idm/pkg/config/config.go
@@ -8,9 +8,9 @@ import (
 
 // Config combines all available configuration parts.
 type Config struct {
-	*shared.Commons
+	*shared.Commons `ocisConfig:"-" yaml:"-"`
 
-	Service Service
+	Service Service `ocisConfig:"-" yaml:"-"`
 
 	Tracing *Tracing `ocisConfig:"tracing"`
 	Log     *Log     `ocisConfig:"log"`
@@ -21,7 +21,7 @@ type Config struct {
 
 	ServiceUserPasswords ServiceUserPasswords `ocisConfig:"service_user_passwords"`
 
-	Context context.Context
+	Context context.Context `ocisConfig:"-" yaml:"-"`
 }
 
 type Settings struct {
diff --git a/idm/pkg/config/defaults/defaultconfig.go b/idm/pkg/config/defaults/defaultconfig.go
new file mode 100644
index 00000000000..b1042376aa3
--- /dev/null
+++ b/idm/pkg/config/defaults/defaultconfig.go
@@ -0,0 +1,60 @@
+package defaults
+
+import (
+	"path"
+
+	"github.com/owncloud/ocis/idm/pkg/config"
+	"github.com/owncloud/ocis/ocis-pkg/config/defaults"
+)
+
+func FullDefaultConfig() *config.Config {
+	cfg := DefaultConfig()
+
+	EnsureDefaults(cfg)
+	Sanitize(cfg)
+
+	return cfg
+}
+
+func DefaultConfig() *config.Config {
+	return &config.Config{
+		Service: config.Service{
+			Name: "idm",
+		},
+		IDM: config.Settings{
+			LDAPSAddr:    "127.0.0.1:9235",
+			Cert:         path.Join(defaults.BaseDataPath(), "idm", "ldap.crt"),
+			Key:          path.Join(defaults.BaseDataPath(), "idm", "ldap.key"),
+			DatabasePath: path.Join(defaults.BaseDataPath(), "idm", "ocis.boltdb"),
+		},
+	}
+}
+
+func EnsureDefaults(cfg *config.Config) {
+	// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
+	if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
+		cfg.Log = &config.Log{
+			Level:  cfg.Commons.Log.Level,
+			Pretty: cfg.Commons.Log.Pretty,
+			Color:  cfg.Commons.Log.Color,
+			File:   cfg.Commons.Log.File,
+		}
+	} else if cfg.Log == nil {
+		cfg.Log = &config.Log{}
+	}
+	// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
+	if cfg.Tracing == nil && cfg.Commons != nil && cfg.Commons.Tracing != nil {
+		cfg.Tracing = &config.Tracing{
+			Enabled:   cfg.Commons.Tracing.Enabled,
+			Type:      cfg.Commons.Tracing.Type,
+			Endpoint:  cfg.Commons.Tracing.Endpoint,
+			Collector: cfg.Commons.Tracing.Collector,
+		}
+	} else if cfg.Tracing == nil {
+		cfg.Tracing = &config.Tracing{}
+	}
+}
+
+func Sanitize(cfg *config.Config) {
+	// nothing to sanitize here
+}
diff --git a/idm/pkg/config/parser/parse.go b/idm/pkg/config/parser/parse.go
index 22b3429cc18..9847623cfca 100644
--- a/idm/pkg/config/parser/parse.go
+++ b/idm/pkg/config/parser/parse.go
@@ -4,6 +4,7 @@ import (
 	"errors"
 
 	"github.com/owncloud/ocis/idm/pkg/config"
+	"github.com/owncloud/ocis/idm/pkg/config/defaults"
 	ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
 
 	"github.com/owncloud/ocis/ocis-pkg/config/envdecode"
@@ -16,29 +17,7 @@ func ParseConfig(cfg *config.Config) error {
 		return err
 	}
 
-	// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
-	if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
-		cfg.Log = &config.Log{
-			Level:  cfg.Commons.Log.Level,
-			Pretty: cfg.Commons.Log.Pretty,
-			Color:  cfg.Commons.Log.Color,
-			File:   cfg.Commons.Log.File,
-		}
-	} else if cfg.Log == nil {
-		cfg.Log = &config.Log{}
-	}
-	// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
-	if cfg.Tracing == nil && cfg.Commons != nil && cfg.Commons.Tracing != nil {
-		cfg.Tracing = &config.Tracing{
-			Enabled:   cfg.Commons.Tracing.Enabled,
-			Type:      cfg.Commons.Tracing.Type,
-			Endpoint:  cfg.Commons.Tracing.Endpoint,
-			Collector: cfg.Commons.Tracing.Collector,
-		}
-	} else if cfg.Tracing == nil {
-		cfg.Tracing = &config.Tracing{}
-	}
-
+	defaults.EnsureDefaults(cfg)
 	// load all env variables relevant to the config in the current context.
 	if err := envdecode.Decode(cfg); err != nil {
 		// no environment variable set for this config is an expected "error"
@@ -47,5 +26,7 @@ func ParseConfig(cfg *config.Config) error {
 		}
 	}
 
+	defaults.Sanitize(cfg)
+
 	return nil
 }
diff --git a/idm/pkg/config/service.go b/idm/pkg/config/service.go
index f98aa3d27e5..c019b73046e 100644
--- a/idm/pkg/config/service.go
+++ b/idm/pkg/config/service.go
@@ -2,5 +2,5 @@ package config
 
 // Service defines the available service configuration.
 type Service struct {
-	Name string
+	Name string `ocisConfig:"-" yaml:"-"`
 }
diff --git a/idp/cmd/idp/main.go b/idp/cmd/idp/main.go
index c60ac2f401a..f2faebb0681 100644
--- a/idp/cmd/idp/main.go
+++ b/idp/cmd/idp/main.go
@@ -4,11 +4,11 @@ import (
 	"os"
 
 	"github.com/owncloud/ocis/idp/pkg/command"
-	"github.com/owncloud/ocis/idp/pkg/config"
+	"github.com/owncloud/ocis/idp/pkg/config/defaults"
 )
 
 func main() {
-	if err := command.Execute(config.DefaultConfig()); err != nil {
+	if err := command.Execute(defaults.DefaultConfig()); err != nil {
 		os.Exit(1)
 	}
 }
diff --git a/idp/pkg/config/config.go b/idp/pkg/config/config.go
index 4e5e4b0d136..a8ca6e384bf 100644
--- a/idp/pkg/config/config.go
+++ b/idp/pkg/config/config.go
@@ -8,9 +8,9 @@ import (
 
 // Config combines all available configuration parts.
 type Config struct {
-	*shared.Commons
+	*shared.Commons `ocisConfig:"-" yaml:"-"`
 
-	Service Service
+	Service Service `ocisConfig:"-" yaml:"-"`
 
 	Tracing *Tracing `ocisConfig:"tracing"`
 	Log     *Log     `ocisConfig:"log"`
@@ -22,7 +22,7 @@ type Config struct {
 	IDP   Settings `ocisConfig:"idp"`
 	Ldap  Ldap     `ocisConfig:"ldap"`
 
-	Context context.Context
+	Context context.Context `ocisConfig:"-" yaml:"-"`
 }
 
 // Ldap defines the available LDAP configuration.
diff --git a/idp/pkg/config/defaultconfig.go b/idp/pkg/config/defaults/defaultconfig.go
similarity index 62%
rename from idp/pkg/config/defaultconfig.go
rename to idp/pkg/config/defaults/defaultconfig.go
index 823291596b4..e965278665b 100644
--- a/idp/pkg/config/defaultconfig.go
+++ b/idp/pkg/config/defaults/defaultconfig.go
@@ -1,17 +1,28 @@
-package config
+package defaults
 
 import (
 	"path"
+	"strings"
 
+	"github.com/owncloud/ocis/idp/pkg/config"
 	"github.com/owncloud/ocis/ocis-pkg/config/defaults"
 )
 
-func DefaultConfig() *Config {
-	return &Config{
-		Debug: Debug{
+func FullDefaultConfig() *config.Config {
+	cfg := DefaultConfig()
+
+	EnsureDefaults(cfg)
+	Sanitize(cfg)
+
+	return cfg
+}
+
+func DefaultConfig() *config.Config {
+	return &config.Config{
+		Debug: config.Debug{
 			Addr: "127.0.0.1:9134",
 		},
-		HTTP: HTTP{
+		HTTP: config.HTTP{
 			Addr:      "127.0.0.1:9130",
 			Root:      "/",
 			Namespace: "com.owncloud.web",
@@ -19,11 +30,11 @@ func DefaultConfig() *Config {
 			TLSKey:    path.Join(defaults.BaseDataPath(), "idp", "server.key"),
 			TLS:       false,
 		},
-		Service: Service{
+		Service: config.Service{
 			Name: "idp",
 		},
-		Asset: Asset{},
-		IDP: Settings{
+		Asset: config.Asset{},
+		IDP: config.Settings{
 			Iss:                               "https://localhost:9200",
 			IdentityManager:                   "ldap",
 			URIBasePath:                       "",
@@ -56,7 +67,7 @@ func DefaultConfig() *Config {
 			RefreshTokenDurationSeconds:       60 * 60 * 24 * 365 * 3, // 1 year
 			DyamicClientSecretDurationSeconds: 0,
 		},
-		Ldap: Ldap{
+		Ldap: config.Ldap{
 			URI:               "ldap://localhost:9125",
 			BindDN:            "cn=idp,ou=sysusers,dc=ocis,dc=test",
 			BindPassword:      "idp",
@@ -71,3 +82,35 @@ func DefaultConfig() *Config {
 		},
 	}
 }
+
+func EnsureDefaults(cfg *config.Config) {
+	// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
+	if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
+		cfg.Log = &config.Log{
+			Level:  cfg.Commons.Log.Level,
+			Pretty: cfg.Commons.Log.Pretty,
+			Color:  cfg.Commons.Log.Color,
+			File:   cfg.Commons.Log.File,
+		}
+	} else if cfg.Log == nil {
+		cfg.Log = &config.Log{}
+	}
+	// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
+	if cfg.Tracing == nil && cfg.Commons != nil && cfg.Commons.Tracing != nil {
+		cfg.Tracing = &config.Tracing{
+			Enabled:   cfg.Commons.Tracing.Enabled,
+			Type:      cfg.Commons.Tracing.Type,
+			Endpoint:  cfg.Commons.Tracing.Endpoint,
+			Collector: cfg.Commons.Tracing.Collector,
+		}
+	} else if cfg.Tracing == nil {
+		cfg.Tracing = &config.Tracing{}
+	}
+}
+
+func Sanitize(cfg *config.Config) {
+	// sanitize config
+	if cfg.HTTP.Root != "/" {
+		cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
+	}
+}
diff --git a/idp/pkg/config/http.go b/idp/pkg/config/http.go
index 4d528e027ce..b76b48f56e8 100644
--- a/idp/pkg/config/http.go
+++ b/idp/pkg/config/http.go
@@ -4,7 +4,7 @@ package config
 type HTTP struct {
 	Addr      string `ocisConfig:"addr" env:"IDP_HTTP_ADDR"`
 	Root      string `ocisConfig:"root" env:"IDP_HTTP_ROOT"`
-	Namespace string
+	Namespace string `ocisConfig:"-" yaml:"-"`
 	TLSCert   string `ocisConfig:"tls_cert" env:"IDP_TRANSPORT_TLS_CERT"`
 	TLSKey    string `ocisConfig:"tls_key" env:"IDP_TRANSPORT_TLS_KEY"`
 	TLS       bool   `ocisConfig:"tls" env:"IDP_TLS"`
diff --git a/idp/pkg/config/log.go b/idp/pkg/config/log.go
index 39ba2d9e513..4183ee357ae 100644
--- a/idp/pkg/config/log.go
+++ b/idp/pkg/config/log.go
@@ -2,8 +2,8 @@ package config
 
 // Log defines the available log configuration.
 type Log struct {
-	Level  string `mapstructure:"level" env:"OCIS_LOG_LEVEL;IDP_LOG_LEVEL"`
-	Pretty bool   `mapstructure:"pretty" env:"OCIS_LOG_PRETTY;IDP_LOG_PRETTY"`
-	Color  bool   `mapstructure:"color" env:"OCIS_LOG_COLOR;IDP_LOG_COLOR"`
-	File   string `mapstructure:"file" env:"OCIS_LOG_FILE;IDP_LOG_FILE"`
+	Level  string `ocisConfig:"level" env:"OCIS_LOG_LEVEL;IDP_LOG_LEVEL"`
+	Pretty bool   `ocisConfig:"pretty" env:"OCIS_LOG_PRETTY;IDP_LOG_PRETTY"`
+	Color  bool   `ocisConfig:"color" env:"OCIS_LOG_COLOR;IDP_LOG_COLOR"`
+	File   string `ocisConfig:"file" env:"OCIS_LOG_FILE;IDP_LOG_FILE"`
 }
diff --git a/idp/pkg/config/parser/parse.go b/idp/pkg/config/parser/parse.go
index d5561337e53..07732d41ec6 100644
--- a/idp/pkg/config/parser/parse.go
+++ b/idp/pkg/config/parser/parse.go
@@ -2,9 +2,9 @@ package parser
 
 import (
 	"errors"
-	"strings"
 
 	"github.com/owncloud/ocis/idp/pkg/config"
+	"github.com/owncloud/ocis/idp/pkg/config/defaults"
 	ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
 
 	"github.com/owncloud/ocis/ocis-pkg/config/envdecode"
@@ -17,28 +17,7 @@ func ParseConfig(cfg *config.Config) error {
 		return err
 	}
 
-	// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
-	if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
-		cfg.Log = &config.Log{
-			Level:  cfg.Commons.Log.Level,
-			Pretty: cfg.Commons.Log.Pretty,
-			Color:  cfg.Commons.Log.Color,
-			File:   cfg.Commons.Log.File,
-		}
-	} else if cfg.Log == nil {
-		cfg.Log = &config.Log{}
-	}
-	// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
-	if cfg.Tracing == nil && cfg.Commons != nil && cfg.Commons.Tracing != nil {
-		cfg.Tracing = &config.Tracing{
-			Enabled:   cfg.Commons.Tracing.Enabled,
-			Type:      cfg.Commons.Tracing.Type,
-			Endpoint:  cfg.Commons.Tracing.Endpoint,
-			Collector: cfg.Commons.Tracing.Collector,
-		}
-	} else if cfg.Tracing == nil {
-		cfg.Tracing = &config.Tracing{}
-	}
+	defaults.EnsureDefaults(cfg)
 
 	// load all env variables relevant to the config in the current context.
 	if err := envdecode.Decode(cfg); err != nil {
@@ -48,10 +27,7 @@ func ParseConfig(cfg *config.Config) error {
 		}
 	}
 
-	// sanitize config
-	if cfg.HTTP.Root != "/" {
-		cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
-	}
+	defaults.Sanitize(cfg)
 
 	return nil
 }
diff --git a/idp/pkg/config/service.go b/idp/pkg/config/service.go
index f98aa3d27e5..c019b73046e 100644
--- a/idp/pkg/config/service.go
+++ b/idp/pkg/config/service.go
@@ -2,5 +2,5 @@ package config
 
 // Service defines the available service configuration.
 type Service struct {
-	Name string
+	Name string `ocisConfig:"-" yaml:"-"`
 }
diff --git a/nats/cmd/nats/main.go b/nats/cmd/nats/main.go
index 2c6cdac1e7c..a117af3cb09 100644
--- a/nats/cmd/nats/main.go
+++ b/nats/cmd/nats/main.go
@@ -4,11 +4,11 @@ import (
 	"os"
 
 	"github.com/owncloud/ocis/nats/pkg/command"
-	"github.com/owncloud/ocis/nats/pkg/config"
+	"github.com/owncloud/ocis/nats/pkg/config/defaults"
 )
 
 func main() {
-	if err := command.Execute(config.DefaultConfig()); err != nil {
+	if err := command.Execute(defaults.DefaultConfig()); err != nil {
 		os.Exit(1)
 	}
 }
diff --git a/nats/pkg/config/config.go b/nats/pkg/config/config.go
index af3257f34be..bc8d670fc34 100644
--- a/nats/pkg/config/config.go
+++ b/nats/pkg/config/config.go
@@ -8,16 +8,16 @@ import (
 
 // Config combines all available configuration parts.
 type Config struct {
-	*shared.Commons
+	*shared.Commons `ocisConfig:"-" yaml:"-"`
 
-	Service Service
+	Service Service `ocisConfig:"-" yaml:"-"`
 
 	Log   *Log  `ocisConfig:"log"`
 	Debug Debug `ocisConfig:"debug"`
 
 	Nats Nats `ociConfig:"nats"`
 
-	Context context.Context
+	Context context.Context `ocisConfig:"-" yaml:"-"`
 }
 
 // Nats is the nats config
diff --git a/nats/pkg/config/defaultconfig.go b/nats/pkg/config/defaultconfig.go
deleted file mode 100644
index de1238e7619..00000000000
--- a/nats/pkg/config/defaultconfig.go
+++ /dev/null
@@ -1,16 +0,0 @@
-package config
-
-// NOTE: Most of this configuration is not needed to keep it as simple as possible
-// TODO: Clean up unneeded configuration
-
-func DefaultConfig() *Config {
-	return &Config{
-		Service: Service{
-			Name: "nats",
-		},
-		Nats: Nats{
-			Host: "127.0.0.1",
-			Port: 9233,
-		},
-	}
-}
diff --git a/nats/pkg/config/defaults/defaultconfig.go b/nats/pkg/config/defaults/defaultconfig.go
new file mode 100644
index 00000000000..03f5167b3e0
--- /dev/null
+++ b/nats/pkg/config/defaults/defaultconfig.go
@@ -0,0 +1,45 @@
+package defaults
+
+import "github.com/owncloud/ocis/nats/pkg/config"
+
+// NOTE: Most of this configuration is not needed to keep it as simple as possible
+// TODO: Clean up unneeded configuration
+
+func FullDefaultConfig() *config.Config {
+	cfg := DefaultConfig()
+
+	EnsureDefaults(cfg)
+	Sanitize(cfg)
+
+	return cfg
+}
+
+func DefaultConfig() *config.Config {
+	return &config.Config{
+		Service: config.Service{
+			Name: "nats",
+		},
+		Nats: config.Nats{
+			Host: "127.0.0.1",
+			Port: 9233,
+		},
+	}
+}
+
+func EnsureDefaults(cfg *config.Config) {
+	// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
+	if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
+		cfg.Log = &config.Log{
+			Level:  cfg.Commons.Log.Level,
+			Pretty: cfg.Commons.Log.Pretty,
+			Color:  cfg.Commons.Log.Color,
+			File:   cfg.Commons.Log.File,
+		}
+	} else if cfg.Log == nil {
+		cfg.Log = &config.Log{}
+	}
+}
+
+func Sanitize(cfg *config.Config) {
+	// nothing to sanitize here atm
+}
diff --git a/nats/pkg/config/parser/parse.go b/nats/pkg/config/parser/parse.go
index 04e4e2b0a0f..fb198fac2ce 100644
--- a/nats/pkg/config/parser/parse.go
+++ b/nats/pkg/config/parser/parse.go
@@ -4,6 +4,7 @@ import (
 	"errors"
 
 	"github.com/owncloud/ocis/nats/pkg/config"
+	"github.com/owncloud/ocis/nats/pkg/config/defaults"
 	ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
 
 	"github.com/owncloud/ocis/ocis-pkg/config/envdecode"
@@ -16,17 +17,7 @@ func ParseConfig(cfg *config.Config) error {
 		return err
 	}
 
-	// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
-	if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
-		cfg.Log = &config.Log{
-			Level:  cfg.Commons.Log.Level,
-			Pretty: cfg.Commons.Log.Pretty,
-			Color:  cfg.Commons.Log.Color,
-			File:   cfg.Commons.Log.File,
-		}
-	} else if cfg.Log == nil {
-		cfg.Log = &config.Log{}
-	}
+	defaults.EnsureDefaults(cfg)
 
 	// load all env variables relevant to the config in the current context.
 	if err := envdecode.Decode(cfg); err != nil {
@@ -36,5 +27,7 @@ func ParseConfig(cfg *config.Config) error {
 		}
 	}
 
+	defaults.Sanitize(cfg)
+
 	return nil
 }
diff --git a/nats/pkg/config/service.go b/nats/pkg/config/service.go
index f98aa3d27e5..c019b73046e 100644
--- a/nats/pkg/config/service.go
+++ b/nats/pkg/config/service.go
@@ -2,5 +2,5 @@ package config
 
 // Service defines the available service configuration.
 type Service struct {
-	Name string
+	Name string `ocisConfig:"-" yaml:"-"`
 }
diff --git a/notifications/cmd/notifications/main.go b/notifications/cmd/notifications/main.go
index 6b43234330b..29d60a18ba0 100644
--- a/notifications/cmd/notifications/main.go
+++ b/notifications/cmd/notifications/main.go
@@ -4,11 +4,11 @@ import (
 	"os"
 
 	"github.com/owncloud/ocis/notifications/pkg/command"
-	"github.com/owncloud/ocis/notifications/pkg/config"
+	"github.com/owncloud/ocis/notifications/pkg/config/defaults"
 )
 
 func main() {
-	if err := command.Execute(config.DefaultConfig()); err != nil {
+	if err := command.Execute(defaults.DefaultConfig()); err != nil {
 		os.Exit(1)
 	}
 }
diff --git a/notifications/pkg/config/config.go b/notifications/pkg/config/config.go
index 8ac7da5d8f6..bda3539d69f 100644
--- a/notifications/pkg/config/config.go
+++ b/notifications/pkg/config/config.go
@@ -8,16 +8,16 @@ import (
 
 // Config combines all available configuration parts.
 type Config struct {
-	*shared.Commons
+	*shared.Commons `ocisConfig:"-" yaml:"-"`
 
-	Service Service
+	Service Service `ocisConfig:"-" yaml:"-"`
 
 	Log   *Log  `ocisConfig:"log"`
 	Debug Debug `ocisConfig:"debug"`
 
 	Notifications Notifications `ocisConfig:"notifications"`
 
-	Context context.Context
+	Context context.Context `ocisConfig:"-" yaml:"-"`
 }
 
 // Notifications definces the config options for the notifications service.
diff --git a/notifications/pkg/config/defaultconfig.go b/notifications/pkg/config/defaultconfig.go
deleted file mode 100644
index d5fb6e34987..00000000000
--- a/notifications/pkg/config/defaultconfig.go
+++ /dev/null
@@ -1,27 +0,0 @@
-package config
-
-// NOTE: Most of this configuration is not needed to keep it as simple as possible
-// TODO: Clean up unneeded configuration
-
-func DefaultConfig() *Config {
-	return &Config{
-		Service: Service{
-			Name: "notifications",
-		},
-		Notifications: Notifications{
-			SMTP: SMTP{
-				Host:     "127.0.0.1",
-				Port:     "1025",
-				Sender:   "god@example.com",
-				Password: "godisdead",
-			},
-			Events: Events{
-				Endpoint:      "127.0.0.1:9233",
-				Cluster:       "test-cluster",
-				ConsumerGroup: "notifications",
-			},
-			RevaGateway:       "127.0.0.1:9142",
-			MachineAuthSecret: "change-me-please",
-		},
-	}
-}
diff --git a/notifications/pkg/config/defaults/defaultconfig.go b/notifications/pkg/config/defaults/defaultconfig.go
new file mode 100644
index 00000000000..22647168c55
--- /dev/null
+++ b/notifications/pkg/config/defaults/defaultconfig.go
@@ -0,0 +1,56 @@
+package defaults
+
+import "github.com/owncloud/ocis/notifications/pkg/config"
+
+func FullDefaultConfig() *config.Config {
+	cfg := DefaultConfig()
+
+	EnsureDefaults(cfg)
+	Sanitize(cfg)
+
+	return cfg
+}
+
+// NOTE: Most of this configuration is not needed to keep it as simple as possible
+// TODO: Clean up unneeded configuration
+
+func DefaultConfig() *config.Config {
+	return &config.Config{
+		Service: config.Service{
+			Name: "notifications",
+		},
+		Notifications: config.Notifications{
+			SMTP: config.SMTP{
+				Host:     "127.0.0.1",
+				Port:     "1025",
+				Sender:   "god@example.com",
+				Password: "godisdead",
+			},
+			Events: config.Events{
+				Endpoint:      "127.0.0.1:9233",
+				Cluster:       "test-cluster",
+				ConsumerGroup: "notifications",
+			},
+			RevaGateway:       "127.0.0.1:9142",
+			MachineAuthSecret: "change-me-please",
+		},
+	}
+}
+
+func EnsureDefaults(cfg *config.Config) {
+	// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
+	if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
+		cfg.Log = &config.Log{
+			Level:  cfg.Commons.Log.Level,
+			Pretty: cfg.Commons.Log.Pretty,
+			Color:  cfg.Commons.Log.Color,
+			File:   cfg.Commons.Log.File,
+		}
+	} else if cfg.Log == nil {
+		cfg.Log = &config.Log{}
+	}
+}
+
+func Sanitize(cfg *config.Config) {
+	// nothing to sanitize here atm
+}
diff --git a/notifications/pkg/config/parser/parse.go b/notifications/pkg/config/parser/parse.go
index 5bc4e6e5713..36231a708b9 100644
--- a/notifications/pkg/config/parser/parse.go
+++ b/notifications/pkg/config/parser/parse.go
@@ -4,6 +4,7 @@ import (
 	"errors"
 
 	"github.com/owncloud/ocis/notifications/pkg/config"
+	"github.com/owncloud/ocis/notifications/pkg/config/defaults"
 	ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
 
 	"github.com/owncloud/ocis/ocis-pkg/config/envdecode"
@@ -16,17 +17,7 @@ func ParseConfig(cfg *config.Config) error {
 		return err
 	}
 
-	// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
-	if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
-		cfg.Log = &config.Log{
-			Level:  cfg.Commons.Log.Level,
-			Pretty: cfg.Commons.Log.Pretty,
-			Color:  cfg.Commons.Log.Color,
-			File:   cfg.Commons.Log.File,
-		}
-	} else if cfg.Log == nil {
-		cfg.Log = &config.Log{}
-	}
+	defaults.EnsureDefaults(cfg)
 
 	// load all env variables relevant to the config in the current context.
 	if err := envdecode.Decode(cfg); err != nil {
@@ -36,5 +27,7 @@ func ParseConfig(cfg *config.Config) error {
 		}
 	}
 
+	defaults.Sanitize(cfg)
+
 	return nil
 }
diff --git a/notifications/pkg/config/service.go b/notifications/pkg/config/service.go
index f98aa3d27e5..c019b73046e 100644
--- a/notifications/pkg/config/service.go
+++ b/notifications/pkg/config/service.go
@@ -2,5 +2,5 @@ package config
 
 // Service defines the available service configuration.
 type Service struct {
-	Name string
+	Name string `ocisConfig:"-" yaml:"-"`
 }
diff --git a/ocis-pkg/config/defaultconfig.go b/ocis-pkg/config/defaultconfig.go
index 64e4df1829c..9767f2d9335 100644
--- a/ocis-pkg/config/defaultconfig.go
+++ b/ocis-pkg/config/defaultconfig.go
@@ -1,23 +1,23 @@
 package config
 
 import (
-	accounts "github.com/owncloud/ocis/accounts/pkg/config"
+	accounts "github.com/owncloud/ocis/accounts/pkg/config/defaults"
 	audit "github.com/owncloud/ocis/audit/pkg/config"
-	glauth "github.com/owncloud/ocis/glauth/pkg/config"
-	graphExplorer "github.com/owncloud/ocis/graph-explorer/pkg/config"
-	graph "github.com/owncloud/ocis/graph/pkg/config"
-	idm "github.com/owncloud/ocis/idm/pkg/config"
-	idp "github.com/owncloud/ocis/idp/pkg/config"
-	nats "github.com/owncloud/ocis/nats/pkg/config"
-	notifications "github.com/owncloud/ocis/notifications/pkg/config"
-	ocs "github.com/owncloud/ocis/ocs/pkg/config"
-	proxy "github.com/owncloud/ocis/proxy/pkg/config"
-	settings "github.com/owncloud/ocis/settings/pkg/config"
-	storage "github.com/owncloud/ocis/storage/pkg/config"
-	store "github.com/owncloud/ocis/store/pkg/config"
-	thumbnails "github.com/owncloud/ocis/thumbnails/pkg/config"
-	web "github.com/owncloud/ocis/web/pkg/config"
-	webdav "github.com/owncloud/ocis/webdav/pkg/config"
+	glauth "github.com/owncloud/ocis/glauth/pkg/config/defaults"
+	graphExplorer "github.com/owncloud/ocis/graph-explorer/pkg/config/defaults"
+	graph "github.com/owncloud/ocis/graph/pkg/config/defaults"
+	idm "github.com/owncloud/ocis/idm/pkg/config/defaults"
+	idp "github.com/owncloud/ocis/idp/pkg/config/defaults"
+	nats "github.com/owncloud/ocis/nats/pkg/config/defaults"
+	notifications "github.com/owncloud/ocis/notifications/pkg/config/defaults"
+	ocs "github.com/owncloud/ocis/ocs/pkg/config/defaults"
+	proxy "github.com/owncloud/ocis/proxy/pkg/config/defaults"
+	settings "github.com/owncloud/ocis/settings/pkg/config/defaults"
+	storage "github.com/owncloud/ocis/storage/pkg/config/defaults"
+	store "github.com/owncloud/ocis/store/pkg/config/defaults"
+	thumbnails "github.com/owncloud/ocis/thumbnails/pkg/config/defaults"
+	web "github.com/owncloud/ocis/web/pkg/config/defaults"
+	webdav "github.com/owncloud/ocis/webdav/pkg/config/defaults"
 )
 
 func DefaultConfig() *Config {
diff --git a/ocs/cmd/ocs/main.go b/ocs/cmd/ocs/main.go
index ca3ea14b364..22f6a011ed9 100644
--- a/ocs/cmd/ocs/main.go
+++ b/ocs/cmd/ocs/main.go
@@ -4,11 +4,11 @@ import (
 	"os"
 
 	"github.com/owncloud/ocis/ocs/pkg/command"
-	"github.com/owncloud/ocis/ocs/pkg/config"
+	"github.com/owncloud/ocis/ocs/pkg/config/defaults"
 )
 
 func main() {
-	if err := command.Execute(config.DefaultConfig()); err != nil {
+	if err := command.Execute(defaults.DefaultConfig()); err != nil {
 		os.Exit(1)
 	}
 }
diff --git a/ocs/pkg/config/config.go b/ocs/pkg/config/config.go
index 2c9693adcad..3659d08f3ec 100644
--- a/ocs/pkg/config/config.go
+++ b/ocs/pkg/config/config.go
@@ -8,9 +8,9 @@ import (
 
 // Config combines all available configuration parts.
 type Config struct {
-	*shared.Commons
+	*shared.Commons `ocisConfig:"-" yaml:"-"`
 
-	Service Service
+	Service Service `ocisConfig:"-" yaml:"-"`
 
 	Tracing *Tracing `ocisConfig:"tracing"`
 	Log     *Log     `ocisConfig:"log"`
@@ -27,7 +27,7 @@ type Config struct {
 	StorageUsersDriver string `ocisConfig:"storage_users_driver" env:"STORAGE_USERS_DRIVER;OCS_STORAGE_USERS_DRIVER"`
 	MachineAuthAPIKey  string `ocisConfig:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY;OCS_MACHINE_AUTH_API_KEY"`
 
-	Context context.Context
+	Context context.Context `ocisConfig:"-" yaml:"-"`
 }
 
 // IdentityManagement keeps track of the OIDC address. This is because Reva requisite of uniqueness for users
diff --git a/ocs/pkg/config/defaultconfig.go b/ocs/pkg/config/defaultconfig.go
deleted file mode 100644
index 0ed8378ba44..00000000000
--- a/ocs/pkg/config/defaultconfig.go
+++ /dev/null
@@ -1,37 +0,0 @@
-package config
-
-func DefaultConfig() *Config {
-	return &Config{
-		Debug: Debug{
-			Addr:   "127.0.0.1:9114",
-			Token:  "",
-			Pprof:  false,
-			Zpages: false,
-		},
-		HTTP: HTTP{
-			Addr:      "127.0.0.1:9110",
-			Root:      "/ocs",
-			Namespace: "com.owncloud.web",
-			CORS: CORS{
-				AllowedOrigins:   []string{"*"},
-				AllowedMethods:   []string{"GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"},
-				AllowedHeaders:   []string{"Authorization", "Origin", "Content-Type", "Accept", "X-Requested-With"},
-				AllowCredentials: true,
-			},
-		},
-		Service: Service{
-			Name: "ocs",
-		},
-
-		TokenManager: TokenManager{
-			JWTSecret: "Pive-Fumkiu4",
-		},
-		AccountBackend:     "accounts",
-		Reva:               Reva{Address: "127.0.0.1:9142"},
-		StorageUsersDriver: "ocis",
-		MachineAuthAPIKey:  "change-me-please",
-		IdentityManagement: IdentityManagement{
-			Address: "https://localhost:9200",
-		},
-	}
-}
diff --git a/ocs/pkg/config/defaults/defaultconfig.go b/ocs/pkg/config/defaults/defaultconfig.go
new file mode 100644
index 00000000000..9c57e897f0d
--- /dev/null
+++ b/ocs/pkg/config/defaults/defaultconfig.go
@@ -0,0 +1,87 @@
+package defaults
+
+import (
+	"strings"
+
+	"github.com/owncloud/ocis/ocs/pkg/config"
+)
+
+func FullDefaultConfig() *config.Config {
+	cfg := DefaultConfig()
+
+	EnsureDefaults(cfg)
+	Sanitize(cfg)
+
+	return cfg
+}
+
+func DefaultConfig() *config.Config {
+	return &config.Config{
+		Debug: config.Debug{
+			Addr:   "127.0.0.1:9114",
+			Token:  "",
+			Pprof:  false,
+			Zpages: false,
+		},
+		HTTP: config.HTTP{
+			Addr:      "127.0.0.1:9110",
+			Root:      "/ocs",
+			Namespace: "com.owncloud.web",
+			CORS: config.CORS{
+				AllowedOrigins:   []string{"*"},
+				AllowedMethods:   []string{"GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"},
+				AllowedHeaders:   []string{"Authorization", "Origin", "Content-Type", "Accept", "X-Requested-With"},
+				AllowCredentials: true,
+			},
+		},
+		Service: config.Service{
+			Name: "ocs",
+		},
+
+		TokenManager: config.TokenManager{
+			JWTSecret: "Pive-Fumkiu4",
+		},
+		AccountBackend: "accounts",
+		Reva: config.Reva{
+			Address: "127.0.0.1:9142",
+		},
+		StorageUsersDriver: "ocis",
+		MachineAuthAPIKey:  "change-me-please",
+		IdentityManagement: config.IdentityManagement{
+			Address: "https://localhost:9200",
+		},
+	}
+}
+
+func EnsureDefaults(cfg *config.Config) {
+	// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
+	if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
+		cfg.Log = &config.Log{
+			Level:  cfg.Commons.Log.Level,
+			Pretty: cfg.Commons.Log.Pretty,
+			Color:  cfg.Commons.Log.Color,
+			File:   cfg.Commons.Log.File,
+		}
+	} else if cfg.Log == nil {
+		cfg.Log = &config.Log{}
+	}
+	// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
+	if cfg.Tracing == nil && cfg.Commons != nil && cfg.Commons.Tracing != nil {
+		cfg.Tracing = &config.Tracing{
+			Enabled:   cfg.Commons.Tracing.Enabled,
+			Type:      cfg.Commons.Tracing.Type,
+			Endpoint:  cfg.Commons.Tracing.Endpoint,
+			Collector: cfg.Commons.Tracing.Collector,
+		}
+	} else if cfg.Tracing == nil {
+		cfg.Tracing = &config.Tracing{}
+	}
+
+}
+
+func Sanitize(cfg *config.Config) {
+	// sanitize config
+	if cfg.HTTP.Root != "/" {
+		cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
+	}
+}
diff --git a/ocs/pkg/config/http.go b/ocs/pkg/config/http.go
index b965e78b3bd..d951aed8310 100644
--- a/ocs/pkg/config/http.go
+++ b/ocs/pkg/config/http.go
@@ -4,8 +4,8 @@ package config
 type HTTP struct {
 	Addr      string `ocisConfig:"addr" env:"OCS_HTTP_ADDR"`
 	Root      string `ocisConfig:"root" env:"OCS_HTTP_ROOT"`
-	Namespace string
-	CORS      CORS `ocisConfig:"cors"`
+	Namespace string `ocisConfig:"-" yaml:"-"`
+	CORS      CORS   `ocisConfig:"cors"`
 }
 
 // CORS defines the available cors configuration.
diff --git a/ocs/pkg/config/parser/parse.go b/ocs/pkg/config/parser/parse.go
index 96f4205dfcd..f5cbc34cbd9 100644
--- a/ocs/pkg/config/parser/parse.go
+++ b/ocs/pkg/config/parser/parse.go
@@ -2,10 +2,10 @@ package parser
 
 import (
 	"errors"
-	"strings"
 
 	ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
 	"github.com/owncloud/ocis/ocs/pkg/config"
+	"github.com/owncloud/ocis/ocs/pkg/config/defaults"
 
 	"github.com/owncloud/ocis/ocis-pkg/config/envdecode"
 )
@@ -17,28 +17,7 @@ func ParseConfig(cfg *config.Config) error {
 		return err
 	}
 
-	// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
-	if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
-		cfg.Log = &config.Log{
-			Level:  cfg.Commons.Log.Level,
-			Pretty: cfg.Commons.Log.Pretty,
-			Color:  cfg.Commons.Log.Color,
-			File:   cfg.Commons.Log.File,
-		}
-	} else if cfg.Log == nil {
-		cfg.Log = &config.Log{}
-	}
-	// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
-	if cfg.Tracing == nil && cfg.Commons != nil && cfg.Commons.Tracing != nil {
-		cfg.Tracing = &config.Tracing{
-			Enabled:   cfg.Commons.Tracing.Enabled,
-			Type:      cfg.Commons.Tracing.Type,
-			Endpoint:  cfg.Commons.Tracing.Endpoint,
-			Collector: cfg.Commons.Tracing.Collector,
-		}
-	} else if cfg.Tracing == nil {
-		cfg.Tracing = &config.Tracing{}
-	}
+	defaults.EnsureDefaults(cfg)
 
 	// load all env variables relevant to the config in the current context.
 	if err := envdecode.Decode(cfg); err != nil {
@@ -48,10 +27,7 @@ func ParseConfig(cfg *config.Config) error {
 		}
 	}
 
-	// sanitize config
-	if cfg.HTTP.Root != "/" {
-		cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
-	}
+	defaults.Sanitize(cfg)
 
 	return nil
 }
diff --git a/ocs/pkg/config/service.go b/ocs/pkg/config/service.go
index f98aa3d27e5..c019b73046e 100644
--- a/ocs/pkg/config/service.go
+++ b/ocs/pkg/config/service.go
@@ -2,5 +2,5 @@ package config
 
 // Service defines the available service configuration.
 type Service struct {
-	Name string
+	Name string `ocisConfig:"-" yaml:"-"`
 }
diff --git a/proxy/cmd/proxy/main.go b/proxy/cmd/proxy/main.go
index f67b685f344..144059b2292 100644
--- a/proxy/cmd/proxy/main.go
+++ b/proxy/cmd/proxy/main.go
@@ -4,11 +4,11 @@ import (
 	"os"
 
 	"github.com/owncloud/ocis/proxy/pkg/command"
-	"github.com/owncloud/ocis/proxy/pkg/config"
+	"github.com/owncloud/ocis/proxy/pkg/config/defaults"
 )
 
 func main() {
-	if err := command.Execute(config.DefaultConfig()); err != nil {
+	if err := command.Execute(defaults.DefaultConfig()); err != nil {
 		os.Exit(1)
 	}
 }
diff --git a/proxy/pkg/config/config.go b/proxy/pkg/config/config.go
index 277b7dff2d2..6cda66b8f3f 100644
--- a/proxy/pkg/config/config.go
+++ b/proxy/pkg/config/config.go
@@ -8,9 +8,9 @@ import (
 
 // Config combines all available configuration parts.
 type Config struct {
-	*shared.Commons
+	*shared.Commons `ocisConfig:"-" yaml:"-"`
 
-	Service Service
+	Service Service `ocisConfig:"-" yaml:"-"`
 
 	Tracing *Tracing `ocisConfig:"tracing"`
 	Log     *Log     `ocisConfig:"log"`
@@ -34,7 +34,7 @@ type Config struct {
 	InsecureBackends      bool            `ocisConfig:"insecure_backends" env:"PROXY_INSECURE_BACKENDS"`
 	AuthMiddleware        AuthMiddleware  `ocisConfig:"auth_middleware"`
 
-	Context context.Context
+	Context context.Context `ocisConfig:"-" yaml:"-"`
 }
 
 // Policy enables us to use multiple directors.
diff --git a/proxy/pkg/config/defaultconfig.go b/proxy/pkg/config/defaults/defaultconfig.go
similarity index 71%
rename from proxy/pkg/config/defaultconfig.go
rename to proxy/pkg/config/defaults/defaultconfig.go
index 12bcbe806d6..eaa328b5a0c 100644
--- a/proxy/pkg/config/defaultconfig.go
+++ b/proxy/pkg/config/defaults/defaultconfig.go
@@ -1,18 +1,20 @@
-package config
+package defaults
 
 import (
 	"path"
+	"strings"
 
 	"github.com/owncloud/ocis/ocis-pkg/config/defaults"
+	"github.com/owncloud/ocis/proxy/pkg/config"
 )
 
-func DefaultConfig() *Config {
-	return &Config{
-		Debug: Debug{
+func DefaultConfig() *config.Config {
+	return &config.Config{
+		Debug: config.Debug{
 			Addr:  "127.0.0.1:9205",
 			Token: "",
 		},
-		HTTP: HTTP{
+		HTTP: config.HTTP{
 			Addr:      "0.0.0.0:9200",
 			Root:      "/",
 			Namespace: "com.owncloud.web",
@@ -20,26 +22,26 @@ func DefaultConfig() *Config {
 			TLSKey:    path.Join(defaults.BaseDataPath(), "proxy", "server.key"),
 			TLS:       true,
 		},
-		Service: Service{
+		Service: config.Service{
 			Name: "proxy",
 		},
-		OIDC: OIDC{
+		OIDC: config.OIDC{
 			Issuer:   "https://localhost:9200",
 			Insecure: true,
 			//Insecure: true,
-			UserinfoCache: UserinfoCache{
+			UserinfoCache: config.UserinfoCache{
 				Size: 1024,
 				TTL:  10,
 			},
 		},
-		TokenManager: TokenManager{
+		TokenManager: config.TokenManager{
 			JWTSecret: "Pive-Fumkiu4",
 		},
 		PolicySelector: nil,
-		Reva: Reva{
+		Reva: config.Reva{
 			Address: "127.0.0.1:9142",
 		},
-		PreSignedURL: PreSignedURL{
+		PreSignedURL: config.PreSignedURL{
 			AllowedHTTPMethods: []string{"GET"},
 			Enabled:            true,
 		},
@@ -55,11 +57,11 @@ func DefaultConfig() *Config {
 	}
 }
 
-func DefaultPolicies() []Policy {
-	return []Policy{
+func DefaultPolicies() []config.Policy {
+	return []config.Policy{
 		{
 			Name: "ocis",
-			Routes: []Route{
+			Routes: []config.Route{
 				{
 					Endpoint: "/",
 					Backend:  "http://localhost:9100",
@@ -81,7 +83,7 @@ func DefaultPolicies() []Policy {
 					Backend:  "http://localhost:9140",
 				},
 				{
-					Type:     RegexRoute,
+					Type:     config.RegexRoute,
 					Endpoint: "/ocs/v[12].php/cloud/(users?|groups)", // we have `user`, `users` and `groups` in ocis-ocs
 					Backend:  "http://localhost:9110",
 				},
@@ -90,7 +92,7 @@ func DefaultPolicies() []Policy {
 					Backend:  "http://localhost:9140",
 				},
 				{
-					Type:     QueryRoute,
+					Type:     config.QueryRoute,
 					Endpoint: "/remote.php/?preview=1",
 					Backend:  "http://localhost:9115",
 				},
@@ -152,7 +154,7 @@ func DefaultPolicies() []Policy {
 		},
 		{
 			Name: "oc10",
-			Routes: []Route{
+			Routes: []config.Route{
 				{
 					Endpoint: "/",
 					Backend:  "http://localhost:9100",
@@ -212,3 +214,40 @@ func DefaultPolicies() []Policy {
 		},
 	}
 }
+
+func EnsureDefaults(cfg *config.Config) {
+	// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
+	if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
+		cfg.Log = &config.Log{
+			Level:  cfg.Commons.Log.Level,
+			Pretty: cfg.Commons.Log.Pretty,
+			Color:  cfg.Commons.Log.Color,
+			File:   cfg.Commons.Log.File,
+		}
+	} else if cfg.Log == nil {
+		cfg.Log = &config.Log{}
+	}
+	// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
+	if cfg.Tracing == nil && cfg.Commons != nil && cfg.Commons.Tracing != nil {
+		cfg.Tracing = &config.Tracing{
+			Enabled:   cfg.Commons.Tracing.Enabled,
+			Type:      cfg.Commons.Tracing.Type,
+			Endpoint:  cfg.Commons.Tracing.Endpoint,
+			Collector: cfg.Commons.Tracing.Collector,
+		}
+	} else if cfg.Tracing == nil {
+		cfg.Tracing = &config.Tracing{}
+	}
+
+}
+
+func Sanitize(cfg *config.Config) {
+	// sanitize config
+	if cfg.Policies == nil {
+		cfg.Policies = DefaultPolicies()
+	}
+
+	if cfg.HTTP.Root != "/" {
+		cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
+	}
+}
diff --git a/proxy/pkg/config/http.go b/proxy/pkg/config/http.go
index 8ab55306323..3253894149c 100644
--- a/proxy/pkg/config/http.go
+++ b/proxy/pkg/config/http.go
@@ -4,7 +4,7 @@ package config
 type HTTP struct {
 	Addr      string `ocisConfig:"addr" env:"PROXY_HTTP_ADDR"`
 	Root      string `ocisConfig:"root" env:"PROXY_HTTP_ROOT"`
-	Namespace string
+	Namespace string `ocisConfig:"-" yaml:"-"`
 	TLSCert   string `ocisConfig:"tls_cert" env:"PROXY_TRANSPORT_TLS_CERT"`
 	TLSKey    string `ocisConfig:"tls_key" env:"PROXY_TRANSPORT_TLS_KEY"`
 	TLS       bool   `ocisConfig:"tls" env:"PROXY_TLS"`
diff --git a/proxy/pkg/config/parser/parse.go b/proxy/pkg/config/parser/parse.go
index 55105cfcbc7..ef6d2cec4d1 100644
--- a/proxy/pkg/config/parser/parse.go
+++ b/proxy/pkg/config/parser/parse.go
@@ -2,10 +2,10 @@ package parser
 
 import (
 	"errors"
-	"strings"
 
 	ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
 	"github.com/owncloud/ocis/proxy/pkg/config"
+	"github.com/owncloud/ocis/proxy/pkg/config/defaults"
 
 	"github.com/owncloud/ocis/ocis-pkg/config/envdecode"
 )
@@ -17,29 +17,7 @@ func ParseConfig(cfg *config.Config) error {
 		return err
 	}
 
-	// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
-	if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
-		cfg.Log = &config.Log{
-			Level:  cfg.Commons.Log.Level,
-			Pretty: cfg.Commons.Log.Pretty,
-			Color:  cfg.Commons.Log.Color,
-			File:   cfg.Commons.Log.File,
-		}
-	} else if cfg.Log == nil {
-		cfg.Log = &config.Log{}
-	}
-	// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
-	if cfg.Tracing == nil && cfg.Commons != nil && cfg.Commons.Tracing != nil {
-		cfg.Tracing = &config.Tracing{
-			Enabled:   cfg.Commons.Tracing.Enabled,
-			Type:      cfg.Commons.Tracing.Type,
-			Endpoint:  cfg.Commons.Tracing.Endpoint,
-			Collector: cfg.Commons.Tracing.Collector,
-		}
-	} else if cfg.Tracing == nil {
-		cfg.Tracing = &config.Tracing{}
-	}
-
+	defaults.EnsureDefaults(cfg)
 	// load all env variables relevant to the config in the current context.
 	if err := envdecode.Decode(cfg); err != nil {
 		// no environment variable set for this config is an expected "error"
@@ -48,15 +26,7 @@ func ParseConfig(cfg *config.Config) error {
 		}
 	}
 
-	// sanitize config
-
-	if cfg.Policies == nil {
-		cfg.Policies = config.DefaultPolicies()
-	}
-
-	if cfg.HTTP.Root != "/" {
-		cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
-	}
+	defaults.Sanitize(cfg)
 
 	return nil
 }
diff --git a/proxy/pkg/config/service.go b/proxy/pkg/config/service.go
index f98aa3d27e5..c019b73046e 100644
--- a/proxy/pkg/config/service.go
+++ b/proxy/pkg/config/service.go
@@ -2,5 +2,5 @@ package config
 
 // Service defines the available service configuration.
 type Service struct {
-	Name string
+	Name string `ocisConfig:"-" yaml:"-"`
 }
diff --git a/settings/cmd/settings/main.go b/settings/cmd/settings/main.go
index cfee45c6987..ce7ff878f4f 100644
--- a/settings/cmd/settings/main.go
+++ b/settings/cmd/settings/main.go
@@ -4,11 +4,11 @@ import (
 	"os"
 
 	"github.com/owncloud/ocis/settings/pkg/command"
-	"github.com/owncloud/ocis/settings/pkg/config"
+	"github.com/owncloud/ocis/settings/pkg/config/defaults"
 )
 
 func main() {
-	if err := command.Execute(config.DefaultConfig()); err != nil {
+	if err := command.Execute(defaults.DefaultConfig()); err != nil {
 		os.Exit(1)
 	}
 }
diff --git a/settings/pkg/config/config.go b/settings/pkg/config/config.go
index 8e9e5f1efff..ef0e3d31a9d 100644
--- a/settings/pkg/config/config.go
+++ b/settings/pkg/config/config.go
@@ -8,9 +8,9 @@ import (
 
 // Config combines all available configuration parts.
 type Config struct {
-	*shared.Commons
+	*shared.Commons `ocisConfig:"-" yaml:"-"`
 
-	Service Service
+	Service Service `ocisConfig:"-" yaml:"-"`
 
 	Tracing *Tracing `ocisConfig:"tracing"`
 	Log     *Log     `ocisConfig:"log"`
@@ -23,7 +23,7 @@ type Config struct {
 	Asset        Asset        `ocisConfig:"asset"`
 	TokenManager TokenManager `ocisConfig:"token_manager"`
 
-	Context context.Context
+	Context context.Context `ocisConfig:"-" yaml:"-"`
 }
 
 // Asset defines the available asset configuration.
diff --git a/settings/pkg/config/defaultconfig.go b/settings/pkg/config/defaultconfig.go
deleted file mode 100644
index 7f72e50a300..00000000000
--- a/settings/pkg/config/defaultconfig.go
+++ /dev/null
@@ -1,44 +0,0 @@
-package config
-
-import (
-	"path"
-
-	"github.com/owncloud/ocis/ocis-pkg/config/defaults"
-)
-
-func DefaultConfig() *Config {
-	return &Config{
-		Service: Service{
-			Name: "settings",
-		},
-		Debug: Debug{
-			Addr:   "127.0.0.1:9194",
-			Token:  "",
-			Pprof:  false,
-			Zpages: false,
-		},
-		HTTP: HTTP{
-			Addr:      "127.0.0.1:9190",
-			Namespace: "com.owncloud.web",
-			Root:      "/",
-			CacheTTL:  604800, // 7 days
-			CORS: CORS{
-				AllowedOrigins:   []string{"*"},
-				AllowedMethods:   []string{"GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"},
-				AllowedHeaders:   []string{"Authorization", "Origin", "Content-Type", "Accept", "X-Requested-With"},
-				AllowCredentials: true,
-			},
-		},
-		GRPC: GRPC{
-			Addr:      "127.0.0.1:9191",
-			Namespace: "com.owncloud.api",
-		},
-		DataPath: path.Join(defaults.BaseDataPath(), "settings"),
-		Asset: Asset{
-			Path: "",
-		},
-		TokenManager: TokenManager{
-			JWTSecret: "Pive-Fumkiu4",
-		},
-	}
-}
diff --git a/settings/pkg/config/defaults/defaultconfig.go b/settings/pkg/config/defaults/defaultconfig.go
new file mode 100644
index 00000000000..e86f5b6b2bf
--- /dev/null
+++ b/settings/pkg/config/defaults/defaultconfig.go
@@ -0,0 +1,87 @@
+package defaults
+
+import (
+	"path"
+	"strings"
+
+	"github.com/owncloud/ocis/ocis-pkg/config/defaults"
+	"github.com/owncloud/ocis/settings/pkg/config"
+)
+
+func FullDefaultConfig() *config.Config {
+	cfg := DefaultConfig()
+
+	EnsureDefaults(cfg)
+	Sanitize(cfg)
+
+	return cfg
+}
+
+func DefaultConfig() *config.Config {
+	return &config.Config{
+		Service: config.Service{
+			Name: "settings",
+		},
+		Debug: config.Debug{
+			Addr:   "127.0.0.1:9194",
+			Token:  "",
+			Pprof:  false,
+			Zpages: false,
+		},
+		HTTP: config.HTTP{
+			Addr:      "127.0.0.1:9190",
+			Namespace: "com.owncloud.web",
+			Root:      "/",
+			CacheTTL:  604800, // 7 days
+			CORS: config.CORS{
+				AllowedOrigins:   []string{"*"},
+				AllowedMethods:   []string{"GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"},
+				AllowedHeaders:   []string{"Authorization", "Origin", "Content-Type", "Accept", "X-Requested-With"},
+				AllowCredentials: true,
+			},
+		},
+		GRPC: config.GRPC{
+			Addr:      "127.0.0.1:9191",
+			Namespace: "com.owncloud.api",
+		},
+		DataPath: path.Join(defaults.BaseDataPath(), "settings"),
+		Asset: config.Asset{
+			Path: "",
+		},
+		TokenManager: config.TokenManager{
+			JWTSecret: "Pive-Fumkiu4",
+		},
+	}
+}
+
+func EnsureDefaults(cfg *config.Config) {
+	// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
+	if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
+		cfg.Log = &config.Log{
+			Level:  cfg.Commons.Log.Level,
+			Pretty: cfg.Commons.Log.Pretty,
+			Color:  cfg.Commons.Log.Color,
+			File:   cfg.Commons.Log.File,
+		}
+	} else if cfg.Log == nil {
+		cfg.Log = &config.Log{}
+	}
+	// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
+	if cfg.Tracing == nil && cfg.Commons != nil && cfg.Commons.Tracing != nil {
+		cfg.Tracing = &config.Tracing{
+			Enabled:   cfg.Commons.Tracing.Enabled,
+			Type:      cfg.Commons.Tracing.Type,
+			Endpoint:  cfg.Commons.Tracing.Endpoint,
+			Collector: cfg.Commons.Tracing.Collector,
+		}
+	} else if cfg.Tracing == nil {
+		cfg.Tracing = &config.Tracing{}
+	}
+}
+
+func Sanitize(cfg *config.Config) {
+	// sanitize config
+	if cfg.HTTP.Root != "/" {
+		cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
+	}
+}
diff --git a/settings/pkg/config/grpc.go b/settings/pkg/config/grpc.go
index 016b61fa919..fc399ca6bbe 100644
--- a/settings/pkg/config/grpc.go
+++ b/settings/pkg/config/grpc.go
@@ -3,5 +3,5 @@ package config
 // GRPC defines the available grpc configuration.
 type GRPC struct {
 	Addr      string `ocisConfig:"addr" env:"SETTINGS_GRPC_ADDR"`
-	Namespace string
+	Namespace string `ocisConfig:"-" yaml:"-"`
 }
diff --git a/settings/pkg/config/http.go b/settings/pkg/config/http.go
index f2099febf95..fa23bd1fe2d 100644
--- a/settings/pkg/config/http.go
+++ b/settings/pkg/config/http.go
@@ -3,7 +3,7 @@ package config
 // HTTP defines the available http configuration.
 type HTTP struct {
 	Addr      string `ocisConfig:"addr" env:"SETTINGS_HTTP_ADDR"`
-	Namespace string
+	Namespace string `ocisConfig:"-" yaml:"-"`
 	Root      string `ocisConfig:"root" env:"SETTINGS_HTTP_ROOT"`
 	CacheTTL  int    `ocisConfig:"cache_ttl" env:"SETTINGS_CACHE_TTL"`
 	CORS      CORS   `ocisConfig:"cors"`
diff --git a/settings/pkg/config/parser/parse.go b/settings/pkg/config/parser/parse.go
index f1c7c94362c..ec2926d1466 100644
--- a/settings/pkg/config/parser/parse.go
+++ b/settings/pkg/config/parser/parse.go
@@ -2,10 +2,10 @@ package parser
 
 import (
 	"errors"
-	"strings"
 
 	ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
 	"github.com/owncloud/ocis/settings/pkg/config"
+	"github.com/owncloud/ocis/settings/pkg/config/defaults"
 
 	"github.com/owncloud/ocis/ocis-pkg/config/envdecode"
 )
@@ -17,29 +17,7 @@ func ParseConfig(cfg *config.Config) error {
 		return err
 	}
 
-	// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
-	if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
-		cfg.Log = &config.Log{
-			Level:  cfg.Commons.Log.Level,
-			Pretty: cfg.Commons.Log.Pretty,
-			Color:  cfg.Commons.Log.Color,
-			File:   cfg.Commons.Log.File,
-		}
-	} else if cfg.Log == nil {
-		cfg.Log = &config.Log{}
-	}
-	// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
-	if cfg.Tracing == nil && cfg.Commons != nil && cfg.Commons.Tracing != nil {
-		cfg.Tracing = &config.Tracing{
-			Enabled:   cfg.Commons.Tracing.Enabled,
-			Type:      cfg.Commons.Tracing.Type,
-			Endpoint:  cfg.Commons.Tracing.Endpoint,
-			Collector: cfg.Commons.Tracing.Collector,
-		}
-	} else if cfg.Tracing == nil {
-		cfg.Tracing = &config.Tracing{}
-	}
-
+	defaults.EnsureDefaults(cfg)
 	// load all env variables relevant to the config in the current context.
 	if err := envdecode.Decode(cfg); err != nil {
 		// no environment variable set for this config is an expected "error"
@@ -48,10 +26,7 @@ func ParseConfig(cfg *config.Config) error {
 		}
 	}
 
-	// sanitize config
-	if cfg.HTTP.Root != "/" {
-		cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
-	}
+	defaults.Sanitize(cfg)
 
 	return nil
 }
diff --git a/settings/pkg/config/service.go b/settings/pkg/config/service.go
index f98aa3d27e5..c019b73046e 100644
--- a/settings/pkg/config/service.go
+++ b/settings/pkg/config/service.go
@@ -2,5 +2,5 @@ package config
 
 // Service defines the available service configuration.
 type Service struct {
-	Name string
+	Name string `ocisConfig:"-" yaml:"-"`
 }
diff --git a/storage/cmd/storage/main.go b/storage/cmd/storage/main.go
index 78ccf99eca9..4503dac725f 100644
--- a/storage/cmd/storage/main.go
+++ b/storage/cmd/storage/main.go
@@ -4,11 +4,11 @@ import (
 	"os"
 
 	"github.com/owncloud/ocis/storage/pkg/command"
-	"github.com/owncloud/ocis/storage/pkg/config"
+	"github.com/owncloud/ocis/storage/pkg/config/defaults"
 )
 
 func main() {
-	if err := command.Execute(config.DefaultConfig()); err != nil {
+	if err := command.Execute(defaults.DefaultConfig()); err != nil {
 		os.Exit(1)
 	}
 }
diff --git a/storage/pkg/config/defaultconfig.go b/storage/pkg/config/defaults/defaultconfig.go
similarity index 81%
rename from storage/pkg/config/defaultconfig.go
rename to storage/pkg/config/defaults/defaultconfig.go
index b66e55f1ac0..142b05db7ff 100644
--- a/storage/pkg/config/defaultconfig.go
+++ b/storage/pkg/config/defaults/defaultconfig.go
@@ -1,10 +1,11 @@
-package config
+package defaults
 
 import (
 	"os"
 	"path"
 
 	"github.com/owncloud/ocis/ocis-pkg/config/defaults"
+	"github.com/owncloud/ocis/storage/pkg/config"
 )
 
 const (
@@ -15,23 +16,32 @@ const (
 	defaultUserLayout       = "{{.Id.OpaqueId}}"
 )
 
-func DefaultConfig() *Config {
-	return &Config{
+func FullDefaultConfig() *config.Config {
+	cfg := DefaultConfig()
+
+	EnsureDefaults(cfg)
+	Sanitize(cfg)
+
+	return cfg
+}
+
+func DefaultConfig() *config.Config {
+	return &config.Config{
 		// log is inherited
-		Debug: Debug{
+		Debug: config.Debug{
 			Addr: "127.0.0.1:9109",
 		},
-		Reva: Reva{
+		Reva: config.Reva{
 			JWTSecret:             "Pive-Fumkiu4",
 			SkipUserGroupsInToken: false,
 			TransferSecret:        "replace-me-with-a-transfer-secret",
 			TransferExpires:       24 * 60 * 60,
-			OIDC: OIDC{
+			OIDC: config.OIDC{
 				Issuer:   defaultPublicURL,
 				Insecure: false,
 				IDClaim:  "preferred_username",
 			},
-			LDAP: LDAP{
+			LDAP: config.LDAP{
 				Hostname:             "localhost",
 				Port:                 9126,
 				CACert:               path.Join(defaults.BaseDataPath(), "ldap", "ldap.crt"),
@@ -49,7 +59,7 @@ func DefaultConfig() *Config {
 				BindDN:               "cn=reva,ou=sysusers,dc=ocis,dc=test",
 				BindPassword:         "reva",
 				IDP:                  defaultPublicURL,
-				UserSchema: LDAPUserSchema{
+				UserSchema: config.LDAPUserSchema{
 					UID:         "ownclouduuid",
 					Mail:        "mail",
 					DisplayName: "displayname",
@@ -57,7 +67,7 @@ func DefaultConfig() *Config {
 					UIDNumber:   "uidnumber",
 					GIDNumber:   "gidnumber",
 				},
-				GroupSchema: LDAPGroupSchema{
+				GroupSchema: config.LDAPGroupSchema{
 					GID:         "cn",
 					Mail:        "mail",
 					DisplayName: "cn",
@@ -65,10 +75,10 @@ func DefaultConfig() *Config {
 					GIDNumber:   "gidnumber",
 				},
 			},
-			UserGroupRest: UserGroupRest{
+			UserGroupRest: config.UserGroupRest{
 				RedisAddress: "localhost:6379",
 			},
-			UserOwnCloudSQL: UserOwnCloudSQL{
+			UserOwnCloudSQL: config.UserOwnCloudSQL{
 				DBUsername:         "owncloud",
 				DBPassword:         "secret",
 				DBHost:             "mysql",
@@ -80,18 +90,18 @@ func DefaultConfig() *Config {
 				JoinOwnCloudUUID:   false,
 				EnableMedialSearch: false,
 			},
-			OCDav: OCDav{
+			OCDav: config.OCDav{
 				WebdavNamespace:   defaultStorageNamespace,
 				DavFilesNamespace: defaultStorageNamespace,
 			},
-			Archiver: Archiver{
+			Archiver: config.Archiver{
 				MaxNumFiles: 10000,
 				MaxSize:     1073741824,
 				ArchiverURL: "/archiver",
 			},
-			UserStorage: StorageConfig{
-				EOS: DriverEOS{
-					DriverCommon: DriverCommon{
+			UserStorage: config.StorageConfig{
+				EOS: config.DriverEOS{
+					DriverCommon: config.DriverCommon{
 						Root:        "/eos/dockertest/reva",
 						ShareFolder: defaultShareFolder,
 						UserLayout:  "{{substr 0 1 .Username}}/{{.Username}}",
@@ -105,14 +115,14 @@ func DefaultConfig() *Config {
 					CacheDirectory:   os.TempDir(),
 					GatewaySVC:       defaultGatewayAddr,
 				},
-				Local: DriverCommon{
+				Local: config.DriverCommon{
 					Root:        path.Join(defaults.BaseDataPath(), "storage", "local", "users"),
 					ShareFolder: defaultShareFolder,
 					UserLayout:  "{{.Username}}",
 					EnableHome:  false,
 				},
-				OwnCloudSQL: DriverOwnCloudSQL{
-					DriverCommon: DriverCommon{
+				OwnCloudSQL: config.DriverOwnCloudSQL{
+					DriverCommon: config.DriverCommon{
 						Root:        path.Join(defaults.BaseDataPath(), "storage", "owncloud"),
 						ShareFolder: defaultShareFolder,
 						UserLayout:  "{{.Username}}",
@@ -125,16 +135,16 @@ func DefaultConfig() *Config {
 					DBPort:        3306,
 					DBName:        "owncloud",
 				},
-				S3: DriverS3{
-					DriverCommon: DriverCommon{},
+				S3: config.DriverS3{
+					DriverCommon: config.DriverCommon{},
 					Region:       "default",
 					AccessKey:    "",
 					SecretKey:    "",
 					Endpoint:     "",
 					Bucket:       "",
 				},
-				S3NG: DriverS3NG{
-					DriverCommon: DriverCommon{
+				S3NG: config.DriverS3NG{
+					DriverCommon: config.DriverCommon{
 						Root:        path.Join(defaults.BaseDataPath(), "storage", "users"),
 						ShareFolder: defaultShareFolder,
 						UserLayout:  defaultUserLayout,
@@ -146,17 +156,17 @@ func DefaultConfig() *Config {
 					Endpoint:  "",
 					Bucket:    "",
 				},
-				OCIS: DriverOCIS{
-					DriverCommon: DriverCommon{
+				OCIS: config.DriverOCIS{
+					DriverCommon: config.DriverCommon{
 						Root:        path.Join(defaults.BaseDataPath(), "storage", "users"),
 						ShareFolder: defaultShareFolder,
 						UserLayout:  defaultUserLayout,
 					},
 				},
 			},
-			MetadataStorage: StorageConfig{
-				EOS: DriverEOS{
-					DriverCommon: DriverCommon{
+			MetadataStorage: config.StorageConfig{
+				EOS: config.DriverEOS{
+					DriverCommon: config.DriverCommon{
 						Root:        "/eos/dockertest/reva",
 						ShareFolder: defaultShareFolder,
 						UserLayout:  "{{substr 0 1 .Username}}/{{.Username}}",
@@ -179,16 +189,16 @@ func DefaultConfig() *Config {
 					SingleUsername:      "",
 					GatewaySVC:          defaultGatewayAddr,
 				},
-				Local: DriverCommon{
+				Local: config.DriverCommon{
 					Root: path.Join(defaults.BaseDataPath(), "storage", "local", "metadata"),
 				},
-				OwnCloudSQL: DriverOwnCloudSQL{},
-				S3: DriverS3{
-					DriverCommon: DriverCommon{},
+				OwnCloudSQL: config.DriverOwnCloudSQL{},
+				S3: config.DriverS3{
+					DriverCommon: config.DriverCommon{},
 					Region:       "default",
 				},
-				S3NG: DriverS3NG{
-					DriverCommon: DriverCommon{
+				S3NG: config.DriverS3NG{
+					DriverCommon: config.DriverCommon{
 						Root:        path.Join(defaults.BaseDataPath(), "storage", "metadata"),
 						ShareFolder: "",
 						UserLayout:  defaultUserLayout,
@@ -200,8 +210,8 @@ func DefaultConfig() *Config {
 					Endpoint:  "",
 					Bucket:    "",
 				},
-				OCIS: DriverOCIS{
-					DriverCommon: DriverCommon{
+				OCIS: config.DriverOCIS{
+					DriverCommon: config.DriverCommon{
 						Root:        path.Join(defaults.BaseDataPath(), "storage", "metadata"),
 						ShareFolder: "",
 						UserLayout:  defaultUserLayout,
@@ -209,8 +219,8 @@ func DefaultConfig() *Config {
 					},
 				},
 			},
-			Frontend: FrontendPort{
-				Port: Port{
+			Frontend: config.FrontendPort{
+				Port: config.Port{
 					MaxCPUs:     "",
 					LogLevel:    "",
 					GRPCNetwork: "",
@@ -241,14 +251,14 @@ func DefaultConfig() *Config {
 				OCSCacheWarmupDriver:       "",
 				OCSAdditionalInfoAttribute: "{{.Mail}}",
 				OCSResourceInfoCacheTTL:    0,
-				Middleware:                 Middleware{},
+				Middleware:                 config.Middleware{},
 			},
-			DataGateway: DataGatewayPort{
-				Port:      Port{},
+			DataGateway: config.DataGatewayPort{
+				Port:      config.Port{},
 				PublicURL: "",
 			},
-			Gateway: Gateway{
-				Port: Port{
+			Gateway: config.Gateway{
+				Port: config.Port{
 					Endpoint:    defaultGatewayAddr,
 					DebugAddr:   "127.0.0.1:9143",
 					GRPCNetwork: "tcp",
@@ -262,17 +272,17 @@ func DefaultConfig() *Config {
 				HomeMapping:                "",
 				EtagCacheTTL:               0,
 			},
-			StorageRegistry: StorageRegistry{
+			StorageRegistry: config.StorageRegistry{
 				Driver:       "spaces",
 				HomeProvider: "/home", // unused for spaces, static currently not supported
 				JSON:         "",
 			},
-			AppRegistry: AppRegistry{
+			AppRegistry: config.AppRegistry{
 				Driver:        "static",
 				MimetypesJSON: "",
 			},
-			Users: Users{
-				Port: Port{
+			Users: config.Users{
+				Port: config.Port{
 					Endpoint:    "localhost:9144",
 					DebugAddr:   "127.0.0.1:9145",
 					GRPCNetwork: "tcp",
@@ -282,8 +292,8 @@ func DefaultConfig() *Config {
 				Driver:                    "ldap",
 				UserGroupsCacheExpiration: 5,
 			},
-			Groups: Groups{
-				Port: Port{
+			Groups: config.Groups{
+				Port: config.Port{
 					Endpoint:    "localhost:9160",
 					DebugAddr:   "127.0.0.1:9161",
 					GRPCNetwork: "tcp",
@@ -293,37 +303,37 @@ func DefaultConfig() *Config {
 				Driver:                      "ldap",
 				GroupMembersCacheExpiration: 5,
 			},
-			AuthProvider: Users{
-				Port:                      Port{},
+			AuthProvider: config.Users{
+				Port:                      config.Port{},
 				Driver:                    "ldap",
 				UserGroupsCacheExpiration: 0,
 			},
-			AuthBasic: Port{
+			AuthBasic: config.Port{
 				GRPCNetwork: "tcp",
 				GRPCAddr:    "127.0.0.1:9146",
 				DebugAddr:   "127.0.0.1:9147",
 				Services:    []string{"authprovider"},
 				Endpoint:    "localhost:9146",
 			},
-			AuthBearer: Port{
+			AuthBearer: config.Port{
 				GRPCNetwork: "tcp",
 				GRPCAddr:    "127.0.0.1:9148",
 				DebugAddr:   "127.0.0.1:9149",
 				Services:    []string{"authprovider"},
 				Endpoint:    "localhost:9148",
 			},
-			AuthMachine: Port{
+			AuthMachine: config.Port{
 				GRPCNetwork: "tcp",
 				GRPCAddr:    "127.0.0.1:9166",
 				DebugAddr:   "127.0.0.1:9167",
 				Services:    []string{"authprovider"},
 				Endpoint:    "localhost:9166",
 			},
-			AuthMachineConfig: AuthMachineConfig{
+			AuthMachineConfig: config.AuthMachineConfig{
 				MachineAuthAPIKey: "change-me-please",
 			},
-			Sharing: Sharing{
-				Port: Port{
+			Sharing: config.Sharing{
+				Port: config.Port{
 					Endpoint:    "localhost:9150",
 					DebugAddr:   "127.0.0.1:9151",
 					GRPCNetwork: "tcp",
@@ -343,13 +353,13 @@ func DefaultConfig() *Config {
 				PublicEnableExpiredSharesCleanup: true,
 				PublicJanitorRunInterval:         60,
 				UserStorageMountID:               "",
-				Events: Events{
+				Events: config.Events{
 					Address:   "127.0.0.1:9233",
 					ClusterID: "test-cluster",
 				},
 			},
-			StorageShares: StoragePort{
-				Port: Port{
+			StorageShares: config.StoragePort{
+				Port: config.Port{
 					Endpoint:    "localhost:9154",
 					DebugAddr:   "127.0.0.1:9156",
 					GRPCNetwork: "tcp",
@@ -361,8 +371,8 @@ func DefaultConfig() *Config {
 				AlternativeID: "1284d238-aa92-42ce-bdc4-0b0000009154",
 				MountID:       "1284d238-aa92-42ce-bdc4-0b0000009157",
 			},
-			StorageUsers: StoragePort{
-				Port: Port{
+			StorageUsers: config.StoragePort{
+				Port: config.Port{
 					Endpoint:    "localhost:9157",
 					DebugAddr:   "127.0.0.1:9159",
 					GRPCNetwork: "tcp",
@@ -376,9 +386,9 @@ func DefaultConfig() *Config {
 				HTTPPrefix:    "data",
 				TempFolder:    path.Join(defaults.BaseDataPath(), "tmp", "users"),
 			},
-			StoragePublicLink: PublicStorage{
-				StoragePort: StoragePort{
-					Port: Port{
+			StoragePublicLink: config.PublicStorage{
+				StoragePort: config.StoragePort{
+					Port: config.Port{
 						Endpoint:    "localhost:9178",
 						DebugAddr:   "127.0.0.1:9179",
 						GRPCNetwork: "tcp",
@@ -389,8 +399,8 @@ func DefaultConfig() *Config {
 				PublicShareProviderAddr: "",
 				UserProviderAddr:        "",
 			},
-			StorageMetadata: StoragePort{
-				Port: Port{
+			StorageMetadata: config.StoragePort{
+				Port: config.Port{
 					GRPCNetwork: "tcp",
 					GRPCAddr:    "127.0.0.1:9215",
 					HTTPNetwork: "tcp",
@@ -401,10 +411,10 @@ func DefaultConfig() *Config {
 				ExposeDataServer: false,
 				DataServerURL:    "http://localhost:9216/data",
 				TempFolder:       path.Join(defaults.BaseDataPath(), "tmp", "metadata"),
-				DataProvider:     DataProvider{},
+				DataProvider:     config.DataProvider{},
 			},
-			AppProvider: AppProvider{
-				Port: Port{
+			AppProvider: config.AppProvider{
+				Port: config.Port{
 					GRPCNetwork: "tcp",
 					GRPCAddr:    "127.0.0.1:9164",
 					DebugAddr:   "127.0.0.1:9165",
@@ -412,12 +422,12 @@ func DefaultConfig() *Config {
 					Services:    []string{"appprovider"},
 				},
 				ExternalAddr: "127.0.0.1:9164",
-				WopiDriver:   WopiDriver{},
+				WopiDriver:   config.WopiDriver{},
 				AppsURL:      "/app/list",
 				OpenURL:      "/app/open",
 				NewURL:       "/app/new",
 			},
-			Permissions: Port{
+			Permissions: config.Port{
 				Endpoint: "localhost:9191",
 			},
 			Configs:                     nil,
@@ -427,10 +437,18 @@ func DefaultConfig() *Config {
 			ChecksumPreferredUploadType: "",
 			DefaultUploadProtocol:       "tus",
 		},
-		Tracing: Tracing{
+		Tracing: config.Tracing{
 			Service: "storage",
 			Type:    "jaeger",
 		},
-		Asset: Asset{},
+		Asset: config.Asset{},
 	}
 }
+
+func EnsureDefaults(cfg *config.Config) {
+	// TODO: IMPLEMENT ME!
+}
+
+func Sanitize(cfg *config.Config) {
+	// TODO: IMPLEMENT ME!
+}
diff --git a/store/cmd/store/main.go b/store/cmd/store/main.go
index f20f59258ee..06cc58efa52 100644
--- a/store/cmd/store/main.go
+++ b/store/cmd/store/main.go
@@ -4,11 +4,11 @@ import (
 	"os"
 
 	"github.com/owncloud/ocis/store/pkg/command"
-	"github.com/owncloud/ocis/store/pkg/config"
+	"github.com/owncloud/ocis/store/pkg/config/defaults"
 )
 
 func main() {
-	if err := command.Execute(config.DefaultConfig()); err != nil {
+	if err := command.Execute(defaults.DefaultConfig()); err != nil {
 		os.Exit(1)
 	}
 }
diff --git a/store/pkg/config/config.go b/store/pkg/config/config.go
index 585fd7424aa..7c8bc6ae11b 100644
--- a/store/pkg/config/config.go
+++ b/store/pkg/config/config.go
@@ -8,9 +8,9 @@ import (
 
 // Config combines all available configuration parts.
 type Config struct {
-	*shared.Commons
+	*shared.Commons `ocisConfig:"-" yaml:"-"`
 
-	Service Service
+	Service Service `ocisConfig:"-" yaml:"-"`
 
 	Tracing *Tracing `ocisConfig:"tracing"`
 	Log     *Log     `ocisConfig:"log"`
@@ -20,5 +20,5 @@ type Config struct {
 
 	Datapath string `ocisConfig:"data_path" env:"STORE_DATA_PATH"`
 
-	Context context.Context
+	Context context.Context `ocisConfig:"-" yaml:"-"`
 }
diff --git a/store/pkg/config/defaultconfig.go b/store/pkg/config/defaultconfig.go
deleted file mode 100644
index c2d42f43017..00000000000
--- a/store/pkg/config/defaultconfig.go
+++ /dev/null
@@ -1,26 +0,0 @@
-package config
-
-import (
-	"path"
-
-	"github.com/owncloud/ocis/ocis-pkg/config/defaults"
-)
-
-func DefaultConfig() *Config {
-	return &Config{
-		Debug: Debug{
-			Addr:   "127.0.0.1:9464",
-			Token:  "",
-			Pprof:  false,
-			Zpages: false,
-		},
-		GRPC: GRPC{
-			Addr:      "127.0.0.1:9460",
-			Namespace: "com.owncloud.api",
-		},
-		Service: Service{
-			Name: "store",
-		},
-		Datapath: path.Join(defaults.BaseDataPath(), "store"),
-	}
-}
diff --git a/store/pkg/config/defaults/defaultconfig.go b/store/pkg/config/defaults/defaultconfig.go
new file mode 100644
index 00000000000..2381ceb4a7e
--- /dev/null
+++ b/store/pkg/config/defaults/defaultconfig.go
@@ -0,0 +1,65 @@
+package defaults
+
+import (
+	"path"
+
+	"github.com/owncloud/ocis/ocis-pkg/config/defaults"
+	"github.com/owncloud/ocis/store/pkg/config"
+)
+
+func FullDefaultConfig() *config.Config {
+	cfg := DefaultConfig()
+
+	EnsureDefaults(cfg)
+	Sanitize(cfg)
+
+	return cfg
+}
+
+func DefaultConfig() *config.Config {
+	return &config.Config{
+		Debug: config.Debug{
+			Addr:   "127.0.0.1:9464",
+			Token:  "",
+			Pprof:  false,
+			Zpages: false,
+		},
+		GRPC: config.GRPC{
+			Addr:      "127.0.0.1:9460",
+			Namespace: "com.owncloud.api",
+		},
+		Service: config.Service{
+			Name: "store",
+		},
+		Datapath: path.Join(defaults.BaseDataPath(), "store"),
+	}
+}
+
+func EnsureDefaults(cfg *config.Config) {
+	// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
+	if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
+		cfg.Log = &config.Log{
+			Level:  cfg.Commons.Log.Level,
+			Pretty: cfg.Commons.Log.Pretty,
+			Color:  cfg.Commons.Log.Color,
+			File:   cfg.Commons.Log.File,
+		}
+	} else if cfg.Log == nil {
+		cfg.Log = &config.Log{}
+	}
+	// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
+	if cfg.Tracing == nil && cfg.Commons != nil && cfg.Commons.Tracing != nil {
+		cfg.Tracing = &config.Tracing{
+			Enabled:   cfg.Commons.Tracing.Enabled,
+			Type:      cfg.Commons.Tracing.Type,
+			Endpoint:  cfg.Commons.Tracing.Endpoint,
+			Collector: cfg.Commons.Tracing.Collector,
+		}
+	} else if cfg.Tracing == nil {
+		cfg.Tracing = &config.Tracing{}
+	}
+}
+
+func Sanitize(cfg *config.Config) {
+	// nothing to sanitize here atm
+}
diff --git a/store/pkg/config/grpc.go b/store/pkg/config/grpc.go
index ed87112dd5f..095e30f6b5e 100644
--- a/store/pkg/config/grpc.go
+++ b/store/pkg/config/grpc.go
@@ -3,5 +3,5 @@ package config
 // GRPC defines the available grpc configuration.
 type GRPC struct {
 	Addr      string `ocisConfig:"addr" env:"STORE_GRPC_ADDR"`
-	Namespace string
+	Namespace string `ocisConfig:"-" yaml:"-"`
 }
diff --git a/store/pkg/config/parser/parse.go b/store/pkg/config/parser/parse.go
index a0f532c9e14..3538a608f4e 100644
--- a/store/pkg/config/parser/parse.go
+++ b/store/pkg/config/parser/parse.go
@@ -5,6 +5,7 @@ import (
 
 	ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
 	"github.com/owncloud/ocis/store/pkg/config"
+	"github.com/owncloud/ocis/store/pkg/config/defaults"
 
 	"github.com/owncloud/ocis/ocis-pkg/config/envdecode"
 )
@@ -16,28 +17,7 @@ func ParseConfig(cfg *config.Config) error {
 		return err
 	}
 
-	// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
-	if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
-		cfg.Log = &config.Log{
-			Level:  cfg.Commons.Log.Level,
-			Pretty: cfg.Commons.Log.Pretty,
-			Color:  cfg.Commons.Log.Color,
-			File:   cfg.Commons.Log.File,
-		}
-	} else if cfg.Log == nil {
-		cfg.Log = &config.Log{}
-	}
-	// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
-	if cfg.Tracing == nil && cfg.Commons != nil && cfg.Commons.Tracing != nil {
-		cfg.Tracing = &config.Tracing{
-			Enabled:   cfg.Commons.Tracing.Enabled,
-			Type:      cfg.Commons.Tracing.Type,
-			Endpoint:  cfg.Commons.Tracing.Endpoint,
-			Collector: cfg.Commons.Tracing.Collector,
-		}
-	} else if cfg.Tracing == nil {
-		cfg.Tracing = &config.Tracing{}
-	}
+	defaults.EnsureDefaults(cfg)
 
 	// load all env variables relevant to the config in the current context.
 	if err := envdecode.Decode(cfg); err != nil {
@@ -48,6 +28,6 @@ func ParseConfig(cfg *config.Config) error {
 	}
 
 	// sanitize config
-
+	defaults.Sanitize(cfg)
 	return nil
 }
diff --git a/store/pkg/config/service.go b/store/pkg/config/service.go
index f98aa3d27e5..c019b73046e 100644
--- a/store/pkg/config/service.go
+++ b/store/pkg/config/service.go
@@ -2,5 +2,5 @@ package config
 
 // Service defines the available service configuration.
 type Service struct {
-	Name string
+	Name string `ocisConfig:"-" yaml:"-"`
 }
diff --git a/thumbnails/cmd/thumbnails/main.go b/thumbnails/cmd/thumbnails/main.go
index 2098a63413b..945b3ec15db 100644
--- a/thumbnails/cmd/thumbnails/main.go
+++ b/thumbnails/cmd/thumbnails/main.go
@@ -4,11 +4,11 @@ import (
 	"os"
 
 	"github.com/owncloud/ocis/thumbnails/pkg/command"
-	"github.com/owncloud/ocis/thumbnails/pkg/config"
+	"github.com/owncloud/ocis/thumbnails/pkg/config/defaults"
 )
 
 func main() {
-	if err := command.Execute(config.DefaultConfig()); err != nil {
+	if err := command.Execute(defaults.DefaultConfig()); err != nil {
 		os.Exit(1)
 	}
 }
diff --git a/thumbnails/pkg/config/config.go b/thumbnails/pkg/config/config.go
index 2311a4e4dd0..fff0d33f48f 100644
--- a/thumbnails/pkg/config/config.go
+++ b/thumbnails/pkg/config/config.go
@@ -8,9 +8,9 @@ import (
 
 // Config combines all available configuration parts.
 type Config struct {
-	*shared.Commons
+	*shared.Commons `ocisConfig:"-" yaml:"-"`
 
-	Service Service
+	Service Service `ocisConfig:"-" yaml:"-"`
 
 	Tracing *Tracing `ocisConfig:"tracing"`
 	Log     *Log     `ocisConfig:"log"`
@@ -21,7 +21,7 @@ type Config struct {
 
 	Thumbnail Thumbnail `ocisConfig:"thumbnail"`
 
-	Context context.Context
+	Context context.Context `ocisConfig:"-" yaml:"-"`
 }
 
 // FileSystemStorage defines the available filesystem storage configuration.
diff --git a/thumbnails/pkg/config/defaultconfig.go b/thumbnails/pkg/config/defaultconfig.go
deleted file mode 100644
index 5e4a3e42323..00000000000
--- a/thumbnails/pkg/config/defaultconfig.go
+++ /dev/null
@@ -1,41 +0,0 @@
-package config
-
-import (
-	"path"
-
-	"github.com/owncloud/ocis/ocis-pkg/config/defaults"
-)
-
-func DefaultConfig() *Config {
-	return &Config{
-		Debug: Debug{
-			Addr:   "127.0.0.1:9189",
-			Token:  "",
-			Pprof:  false,
-			Zpages: false,
-		},
-		GRPC: GRPC{
-			Addr:      "127.0.0.1:9185",
-			Namespace: "com.owncloud.api",
-		},
-		HTTP: HTTP{
-			Addr:      "127.0.0.1:9186",
-			Root:      "/thumbnails",
-			Namespace: "com.owncloud.web",
-		},
-		Service: Service{
-			Name: "thumbnails",
-		},
-		Thumbnail: Thumbnail{
-			Resolutions: []string{"16x16", "32x32", "64x64", "128x128", "1920x1080", "3840x2160", "7680x4320"},
-			FileSystemStorage: FileSystemStorage{
-				RootDirectory: path.Join(defaults.BaseDataPath(), "thumbnails"),
-			},
-			WebdavAllowInsecure: true,
-			RevaGateway:         "127.0.0.1:9142",
-			CS3AllowInsecure:    false,
-			TransferTokenSecret: "changemeplease",
-			DataEndpoint:        "http://127.0.0.1:9186/thumbnails/data",
-		},
-	}
-}
diff --git a/thumbnails/pkg/config/defaults/defaultconfig.go b/thumbnails/pkg/config/defaults/defaultconfig.go
new file mode 100644
index 00000000000..f52e21232d7
--- /dev/null
+++ b/thumbnails/pkg/config/defaults/defaultconfig.go
@@ -0,0 +1,80 @@
+package defaults
+
+import (
+	"path"
+
+	"github.com/owncloud/ocis/ocis-pkg/config/defaults"
+	"github.com/owncloud/ocis/thumbnails/pkg/config"
+)
+
+func FullDefaultConfig() *config.Config {
+	cfg := DefaultConfig()
+
+	EnsureDefaults(cfg)
+	Sanitize(cfg)
+
+	return cfg
+}
+
+func DefaultConfig() *config.Config {
+	return &config.Config{
+		Debug: config.Debug{
+			Addr:   "127.0.0.1:9189",
+			Token:  "",
+			Pprof:  false,
+			Zpages: false,
+		},
+		GRPC: config.GRPC{
+			Addr:      "127.0.0.1:9185",
+			Namespace: "com.owncloud.api",
+		},
+		HTTP: config.HTTP{
+			Addr:      "127.0.0.1:9186",
+			Root:      "/thumbnails",
+			Namespace: "com.owncloud.web",
+		},
+		Service: config.Service{
+			Name: "thumbnails",
+		},
+		Thumbnail: config.Thumbnail{
+			Resolutions: []string{"16x16", "32x32", "64x64", "128x128", "1920x1080", "3840x2160", "7680x4320"},
+			FileSystemStorage: config.FileSystemStorage{
+				RootDirectory: path.Join(defaults.BaseDataPath(), "thumbnails"),
+			},
+			WebdavAllowInsecure: false,
+			RevaGateway:         "127.0.0.1:9142",
+			CS3AllowInsecure:    false,
+			TransferTokenSecret: "changemeplease",
+			DataEndpoint:        "http://127.0.0.1:9186/thumbnails/data",
+		},
+	}
+}
+
+func EnsureDefaults(cfg *config.Config) {
+	// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
+	if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
+		cfg.Log = &config.Log{
+			Level:  cfg.Commons.Log.Level,
+			Pretty: cfg.Commons.Log.Pretty,
+			Color:  cfg.Commons.Log.Color,
+			File:   cfg.Commons.Log.File,
+		}
+	} else if cfg.Log == nil {
+		cfg.Log = &config.Log{}
+	}
+	// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
+	if cfg.Tracing == nil && cfg.Commons != nil && cfg.Commons.Tracing != nil {
+		cfg.Tracing = &config.Tracing{
+			Enabled:   cfg.Commons.Tracing.Enabled,
+			Type:      cfg.Commons.Tracing.Type,
+			Endpoint:  cfg.Commons.Tracing.Endpoint,
+			Collector: cfg.Commons.Tracing.Collector,
+		}
+	} else if cfg.Tracing == nil {
+		cfg.Tracing = &config.Tracing{}
+	}
+}
+
+func Sanitize(cfg *config.Config) {
+	// nothing to sanitize here atm
+}
diff --git a/thumbnails/pkg/config/grpc.go b/thumbnails/pkg/config/grpc.go
index 9682ed12c58..51bacff506d 100644
--- a/thumbnails/pkg/config/grpc.go
+++ b/thumbnails/pkg/config/grpc.go
@@ -3,5 +3,5 @@ package config
 // GRPC defines the available grpc configuration.
 type GRPC struct {
 	Addr      string `ocisConfig:"addr" env:"THUMBNAILS_GRPC_ADDR"`
-	Namespace string
+	Namespace string `ocisConfig:"-" yaml:"-"`
 }
diff --git a/thumbnails/pkg/config/http.go b/thumbnails/pkg/config/http.go
index f3b4d572845..9dc731261fe 100644
--- a/thumbnails/pkg/config/http.go
+++ b/thumbnails/pkg/config/http.go
@@ -4,5 +4,5 @@ package config
 type HTTP struct {
 	Addr      string `ocisConfig:"addr" env:"THUMBNAILS_HTTP_ADDR"`
 	Root      string `ocisConfig:"root" env:"THUMBNAILS_HTTP_ROOT"`
-	Namespace string
+	Namespace string `ocisConfig:"-" yaml:"-"`
 }
diff --git a/thumbnails/pkg/config/parser/parse.go b/thumbnails/pkg/config/parser/parse.go
index 5fa62fb15e7..705425a650a 100644
--- a/thumbnails/pkg/config/parser/parse.go
+++ b/thumbnails/pkg/config/parser/parse.go
@@ -5,6 +5,7 @@ import (
 
 	ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
 	"github.com/owncloud/ocis/thumbnails/pkg/config"
+	"github.com/owncloud/ocis/thumbnails/pkg/config/defaults"
 
 	"github.com/owncloud/ocis/ocis-pkg/config/envdecode"
 )
@@ -16,28 +17,7 @@ func ParseConfig(cfg *config.Config) error {
 		return err
 	}
 
-	// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
-	if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
-		cfg.Log = &config.Log{
-			Level:  cfg.Commons.Log.Level,
-			Pretty: cfg.Commons.Log.Pretty,
-			Color:  cfg.Commons.Log.Color,
-			File:   cfg.Commons.Log.File,
-		}
-	} else if cfg.Log == nil {
-		cfg.Log = &config.Log{}
-	}
-	// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
-	if cfg.Tracing == nil && cfg.Commons != nil && cfg.Commons.Tracing != nil {
-		cfg.Tracing = &config.Tracing{
-			Enabled:   cfg.Commons.Tracing.Enabled,
-			Type:      cfg.Commons.Tracing.Type,
-			Endpoint:  cfg.Commons.Tracing.Endpoint,
-			Collector: cfg.Commons.Tracing.Collector,
-		}
-	} else if cfg.Tracing == nil {
-		cfg.Tracing = &config.Tracing{}
-	}
+	defaults.EnsureDefaults(cfg)
 
 	// load all env variables relevant to the config in the current context.
 	if err := envdecode.Decode(cfg); err != nil {
@@ -48,6 +28,7 @@ func ParseConfig(cfg *config.Config) error {
 	}
 
 	// sanitize config
+	defaults.Sanitize(cfg)
 
 	return nil
 }
diff --git a/thumbnails/pkg/config/service.go b/thumbnails/pkg/config/service.go
index f98aa3d27e5..c019b73046e 100644
--- a/thumbnails/pkg/config/service.go
+++ b/thumbnails/pkg/config/service.go
@@ -2,5 +2,5 @@ package config
 
 // Service defines the available service configuration.
 type Service struct {
-	Name string
+	Name string `ocisConfig:"-" yaml:"-"`
 }
diff --git a/web/cmd/web/main.go b/web/cmd/web/main.go
index 7334862feef..f46816b8c0b 100644
--- a/web/cmd/web/main.go
+++ b/web/cmd/web/main.go
@@ -4,11 +4,11 @@ import (
 	"os"
 
 	"github.com/owncloud/ocis/web/pkg/command"
-	"github.com/owncloud/ocis/web/pkg/config"
+	"github.com/owncloud/ocis/web/pkg/config/defaults"
 )
 
 func main() {
-	if err := command.Execute(config.DefaultConfig()); err != nil {
+	if err := command.Execute(defaults.DefaultConfig()); err != nil {
 		os.Exit(1)
 	}
 }
diff --git a/web/pkg/config/config.go b/web/pkg/config/config.go
index d403136e18d..4b571ba857f 100644
--- a/web/pkg/config/config.go
+++ b/web/pkg/config/config.go
@@ -8,9 +8,9 @@ import (
 
 // Config combines all available configuration parts.
 type Config struct {
-	*shared.Commons
+	*shared.Commons `ocisConfig:"-" yaml:"-"`
 
-	Service Service
+	Service Service `ocisConfig:"-" yaml:"-"`
 
 	Tracing *Tracing `ocisConfig:"tracing"`
 	Log     *Log     `ocisConfig:"log"`
@@ -22,7 +22,7 @@ type Config struct {
 	File  string `ocisConfig:"file" env:"WEB_UI_CONFIG"` // TODO: rename this to a more self explaining string
 	Web   Web    `ocisConfig:"web"`
 
-	Context context.Context
+	Context context.Context `ocisConfig:"-" yaml:"-"`
 }
 
 // Asset defines the available asset configuration.
diff --git a/web/pkg/config/defaultconfig.go b/web/pkg/config/defaultconfig.go
deleted file mode 100644
index 018cac2d0a6..00000000000
--- a/web/pkg/config/defaultconfig.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package config
-
-func DefaultConfig() *Config {
-	return &Config{
-		Debug: Debug{
-			Addr:   "127.0.0.1:9104",
-			Token:  "",
-			Pprof:  false,
-			Zpages: false,
-		},
-		HTTP: HTTP{
-			Addr:      "127.0.0.1:9100",
-			Root:      "/",
-			Namespace: "com.owncloud.web",
-			CacheTTL:  604800, // 7 days
-		},
-		Service: Service{
-			Name: "web",
-		},
-		Asset: Asset{
-			Path: "",
-		},
-		Web: Web{
-			Path:        "",
-			ThemeServer: "https://localhost:9200",
-			ThemePath:   "/themes/owncloud/theme.json",
-			Config: WebConfig{
-				Server:  "https://localhost:9200",
-				Theme:   "",
-				Version: "0.1.0",
-				OpenIDConnect: OIDC{
-					MetadataURL:  "",
-					Authority:    "https://localhost:9200",
-					ClientID:     "web",
-					ResponseType: "code",
-					Scope:        "openid profile email",
-				},
-				Apps: []string{"files", "search", "media-viewer", "external"},
-			},
-		},
-	}
-}
diff --git a/web/pkg/config/defaults/defaultconfig.go b/web/pkg/config/defaults/defaultconfig.go
new file mode 100644
index 00000000000..8e921bbaad6
--- /dev/null
+++ b/web/pkg/config/defaults/defaultconfig.go
@@ -0,0 +1,93 @@
+package defaults
+
+import (
+	"strings"
+
+	"github.com/owncloud/ocis/web/pkg/config"
+)
+
+func FullDefaultConfig() *config.Config {
+	cfg := DefaultConfig()
+
+	EnsureDefaults(cfg)
+	Sanitize(cfg)
+
+	return cfg
+}
+
+func DefaultConfig() *config.Config {
+	return &config.Config{
+		Debug: config.Debug{
+			Addr:   "127.0.0.1:9104",
+			Token:  "",
+			Pprof:  false,
+			Zpages: false,
+		},
+		HTTP: config.HTTP{
+			Addr:      "127.0.0.1:9100",
+			Root:      "/",
+			Namespace: "com.owncloud.web",
+			CacheTTL:  604800, // 7 days
+		},
+		Service: config.Service{
+			Name: "web",
+		},
+		Asset: config.Asset{
+			Path: "",
+		},
+		Web: config.Web{
+			Path:        "",
+			ThemeServer: "https://localhost:9200",
+			ThemePath:   "/themes/owncloud/theme.json",
+			Config: config.WebConfig{
+				Server:  "https://localhost:9200",
+				Theme:   "",
+				Version: "0.1.0",
+				OpenIDConnect: config.OIDC{
+					MetadataURL:  "",
+					Authority:    "https://localhost:9200",
+					ClientID:     "web",
+					ResponseType: "code",
+					Scope:        "openid profile email",
+				},
+				Apps: []string{"files", "search", "media-viewer", "external"},
+			},
+		},
+	}
+}
+
+func EnsureDefaults(cfg *config.Config) {
+	// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
+	if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
+		cfg.Log = &config.Log{
+			Level:  cfg.Commons.Log.Level,
+			Pretty: cfg.Commons.Log.Pretty,
+			Color:  cfg.Commons.Log.Color,
+			File:   cfg.Commons.Log.File,
+		}
+	} else if cfg.Log == nil {
+		cfg.Log = &config.Log{}
+	}
+	// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
+	if cfg.Tracing == nil && cfg.Commons != nil && cfg.Commons.Tracing != nil {
+		cfg.Tracing = &config.Tracing{
+			Enabled:   cfg.Commons.Tracing.Enabled,
+			Type:      cfg.Commons.Tracing.Type,
+			Endpoint:  cfg.Commons.Tracing.Endpoint,
+			Collector: cfg.Commons.Tracing.Collector,
+		}
+	} else if cfg.Tracing == nil {
+		cfg.Tracing = &config.Tracing{}
+	}
+}
+
+func Sanitize(cfg *config.Config) {
+	// sanitize config
+	if cfg.HTTP.Root != "/" {
+		cfg.HTTP.Root = strings.TrimRight(cfg.HTTP.Root, "/")
+	}
+	// build well known openid-configuration endpoint if it is not set
+	if cfg.Web.Config.OpenIDConnect.MetadataURL == "" {
+		cfg.Web.Config.OpenIDConnect.MetadataURL = strings.TrimRight(cfg.Web.Config.OpenIDConnect.Authority, "/") + "/.well-known/openid-configuration"
+	}
+}
diff --git a/web/pkg/config/http.go b/web/pkg/config/http.go
index 317b93497fb..ac074ab2ed0 100644
--- a/web/pkg/config/http.go
+++ b/web/pkg/config/http.go
@@ -3,7 +3,7 @@ package config
 // HTTP defines the available http configuration.
 type HTTP struct {
 	Addr      string `ocisConfig:"addr" env:"WEB_HTTP_ADDR"`
-	Namespace string
+	Namespace string `ocisConfig:"-" yaml:"-"`
 	Root      string `ocisConfig:"root" env:"WEB_HTTP_ROOT"`
 	CacheTTL  int    `ocisConfig:"cache_ttl" env:"WEB_CACHE_TTL"`
 }
diff --git a/web/pkg/config/parser/parse.go b/web/pkg/config/parser/parse.go
index 2151f613e44..2f8fe31d024 100644
--- a/web/pkg/config/parser/parse.go
+++ b/web/pkg/config/parser/parse.go
@@ -2,10 +2,10 @@ package parser
 
 import (
 	"errors"
-	"strings"
 
 	ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
 	"github.com/owncloud/ocis/web/pkg/config"
+	"github.com/owncloud/ocis/web/pkg/config/defaults"
 
 	"github.com/owncloud/ocis/ocis-pkg/config/envdecode"
 )
@@ -17,28 +17,7 @@ func ParseConfig(cfg *config.Config) error {
 		return err
 	}
 
-	// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
-	if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
-		cfg.Log = &config.Log{
-			Level:  cfg.Commons.Log.Level,
-			Pretty: cfg.Commons.Log.Pretty,
-			Color:  cfg.Commons.Log.Color,
-			File:   cfg.Commons.Log.File,
-		}
-	} else if cfg.Log == nil {
-		cfg.Log = &config.Log{}
-	}
-	// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
-	if cfg.Tracing == nil && cfg.Commons != nil && cfg.Commons.Tracing != nil {
-		cfg.Tracing = &config.Tracing{
-			Enabled:   cfg.Commons.Tracing.Enabled,
-			Type:      cfg.Commons.Tracing.Type,
-			Endpoint:  cfg.Commons.Tracing.Endpoint,
-			Collector: cfg.Commons.Tracing.Collector,
-		}
-	} else if cfg.Tracing == nil {
-		cfg.Tracing = &config.Tracing{}
-	}
+	defaults.EnsureDefaults(cfg)
 
 	// load all env variables relevant to the config in the current context.
 	if err := envdecode.Decode(cfg); err != nil {
@@ -48,14 +27,7 @@ func ParseConfig(cfg *config.Config) error {
 		}
 	}
 
-	// sanitize config
-	if cfg.HTTP.Root != "/" {
-		cfg.HTTP.Root = strings.TrimRight(cfg.HTTP.Root, "/")
-	}
-	// build well known openid-configuration endpoint if it is not set
-	if cfg.Web.Config.OpenIDConnect.MetadataURL == "" {
-		cfg.Web.Config.OpenIDConnect.MetadataURL = strings.TrimRight(cfg.Web.Config.OpenIDConnect.Authority, "/") + "/.well-known/openid-configuration"
-	}
+	defaults.Sanitize(cfg)
 
 	return nil
 }
diff --git a/web/pkg/config/service.go b/web/pkg/config/service.go
index f98aa3d27e5..c019b73046e 100644
--- a/web/pkg/config/service.go
+++ b/web/pkg/config/service.go
@@ -2,5 +2,5 @@ package config
 
 // Service defines the available service configuration.
 type Service struct {
-	Name string
+	Name string `ocisConfig:"-" yaml:"-"`
 }
diff --git a/webdav/cmd/webdav/main.go b/webdav/cmd/webdav/main.go
index f03fd520c88..88b1185d712 100644
--- a/webdav/cmd/webdav/main.go
+++ b/webdav/cmd/webdav/main.go
@@ -4,11 +4,11 @@ import (
 	"os"
 
 	"github.com/owncloud/ocis/webdav/pkg/command"
-	"github.com/owncloud/ocis/webdav/pkg/config"
+	"github.com/owncloud/ocis/webdav/pkg/config/defaults"
 )
 
 func main() {
-	if err := command.Execute(config.DefaultConfig()); err != nil {
+	if err := command.Execute(defaults.DefaultConfig()); err != nil {
 		os.Exit(1)
 	}
 }
diff --git a/webdav/pkg/config/config.go b/webdav/pkg/config/config.go
index 04fb193e568..1c64f29233c 100644
--- a/webdav/pkg/config/config.go
+++ b/webdav/pkg/config/config.go
@@ -8,9 +8,9 @@ import (
 
 // Config combines all available configuration parts.
 type Config struct {
-	*shared.Commons
+	*shared.Commons `ocisConfig:"-" yaml:"-"`
 
-	Service Service
+	Service Service `ocisConfig:"-" yaml:"-"`
 
 	Tracing *Tracing `ocisConfig:"tracing"`
 	Log     *Log     `ocisConfig:"log"`
@@ -22,5 +22,5 @@ type Config struct {
 	WebdavNamespace string `ocisConfig:"webdav_namespace" env:"STORAGE_WEBDAV_NAMESPACE"` //TODO: prevent this cross config
 	RevaGateway     string `ocisConfig:"reva_gateway" env:"REVA_GATEWAY"`
 
-	Context context.Context
+	Context context.Context `ocisConfig:"-" yaml:"-"`
 }
diff --git a/webdav/pkg/config/defaultconfig.go b/webdav/pkg/config/defaultconfig.go
deleted file mode 100644
index 3bf74acd258..00000000000
--- a/webdav/pkg/config/defaultconfig.go
+++ /dev/null
@@ -1,29 +0,0 @@
-package config
-
-func DefaultConfig() *Config {
-	return &Config{
-		Debug: Debug{
-			Addr:   "127.0.0.1:9119",
-			Token:  "",
-			Pprof:  false,
-			Zpages: false,
-		},
-		HTTP: HTTP{
-			Addr:      "127.0.0.1:9115",
-			Root:      "/",
-			Namespace: "com.owncloud.web",
-			CORS: CORS{
-				AllowedOrigins:   []string{"*"},
-				AllowedMethods:   []string{"GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"},
-				AllowedHeaders:   []string{"Authorization", "Origin", "Content-Type", "Accept", "X-Requested-With"},
-				AllowCredentials: true,
-			},
-		},
-		Service: Service{
-			Name: "webdav",
-		},
-		OcisPublicURL:   "https://127.0.0.1:9200",
-		WebdavNamespace: "/users/{{.Id.OpaqueId}}",
-		RevaGateway:     "127.0.0.1:9142",
-	}
-}
diff --git a/webdav/pkg/config/defaults/defaultconfig.go b/webdav/pkg/config/defaults/defaultconfig.go
new file mode 100644
index 00000000000..8c2e1647038
--- /dev/null
+++ b/webdav/pkg/config/defaults/defaultconfig.go
@@ -0,0 +1,77 @@
+package defaults
+
+import (
+	"strings"
+
+	"github.com/owncloud/ocis/webdav/pkg/config"
+)
+
+func FullDefaultConfig() *config.Config {
+	cfg := DefaultConfig()
+
+	EnsureDefaults(cfg)
+	Sanitize(cfg)
+
+	return cfg
+}
+
+func DefaultConfig() *config.Config {
+	return &config.Config{
+		Debug: config.Debug{
+			Addr:   "127.0.0.1:9119",
+			Token:  "",
+			Pprof:  false,
+			Zpages: false,
+		},
+		HTTP: config.HTTP{
+			Addr:      "127.0.0.1:9115",
+			Root:      "/",
+			Namespace: "com.owncloud.web",
+			CORS: config.CORS{
+				AllowedOrigins:   []string{"*"},
+				AllowedMethods:   []string{"GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"},
+				AllowedHeaders:   []string{"Authorization", "Origin", "Content-Type", "Accept", "X-Requested-With"},
+				AllowCredentials: true,
+			},
+		},
+		Service: config.Service{
+			Name: "webdav",
+		},
+		OcisPublicURL:   "https://127.0.0.1:9200",
+		WebdavNamespace: "/users/{{.Id.OpaqueId}}",
+		RevaGateway:     "127.0.0.1:9142",
+	}
+}
+
+func EnsureDefaults(cfg *config.Config) {
+	// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
+	if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
+		cfg.Log = &config.Log{
+			Level:  cfg.Commons.Log.Level,
+			Pretty: cfg.Commons.Log.Pretty,
+			Color:  cfg.Commons.Log.Color,
+			File:   cfg.Commons.Log.File,
+		}
+	} else if cfg.Log == nil {
+		cfg.Log = &config.Log{}
+	}
+	// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
+	if cfg.Tracing == nil && cfg.Commons != nil && cfg.Commons.Tracing != nil {
+		cfg.Tracing = &config.Tracing{
+			Enabled:   cfg.Commons.Tracing.Enabled,
+			Type:      cfg.Commons.Tracing.Type,
+			Endpoint:  cfg.Commons.Tracing.Endpoint,
+			Collector: cfg.Commons.Tracing.Collector,
+		}
+	} else if cfg.Tracing == nil {
+		cfg.Tracing = &config.Tracing{}
+	}
+}
+
+func Sanitize(cfg *config.Config) {
+	// sanitize config
+	if cfg.HTTP.Root != "/" {
+		cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
+	}
+
+}
diff --git a/webdav/pkg/config/http.go b/webdav/pkg/config/http.go
index 4ce2f2dcd2f..ebf8332c3ca 100644
--- a/webdav/pkg/config/http.go
+++ b/webdav/pkg/config/http.go
@@ -11,7 +11,7 @@ type CORS struct {
 // HTTP defines the available http configuration.
 type HTTP struct {
 	Addr      string `ocisConfig:"addr" env:"WEBDAV_HTTP_ADDR"`
-	Namespace string
+	Namespace string `ocisConfig:"-" yaml:"-"`
 	Root      string `ocisConfig:"root" env:"WEBDAV_HTTP_ROOT"`
 	CORS      CORS   `ocisConfig:"cors"`
 }
diff --git a/webdav/pkg/config/parser/parse.go b/webdav/pkg/config/parser/parse.go
index 33c893db4a3..629f85220ee 100644
--- a/webdav/pkg/config/parser/parse.go
+++ b/webdav/pkg/config/parser/parse.go
@@ -2,10 +2,10 @@ package parser
 
 import (
 	"errors"
-	"strings"
 
 	ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
 	"github.com/owncloud/ocis/webdav/pkg/config"
+	"github.com/owncloud/ocis/webdav/pkg/config/defaults"
 
 	"github.com/owncloud/ocis/ocis-pkg/config/envdecode"
 )
@@ -17,28 +17,7 @@ func ParseConfig(cfg *config.Config) error {
 		return err
 	}
 
-	// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
-	if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
-		cfg.Log = &config.Log{
-			Level:  cfg.Commons.Log.Level,
-			Pretty: cfg.Commons.Log.Pretty,
-			Color:  cfg.Commons.Log.Color,
-			File:   cfg.Commons.Log.File,
-		}
-	} else if cfg.Log == nil {
-		cfg.Log = &config.Log{}
-	}
-	// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
-	if cfg.Tracing == nil && cfg.Commons != nil && cfg.Commons.Tracing != nil {
-		cfg.Tracing = &config.Tracing{
-			Enabled:   cfg.Commons.Tracing.Enabled,
-			Type:      cfg.Commons.Tracing.Type,
-			Endpoint:  cfg.Commons.Tracing.Endpoint,
-			Collector: cfg.Commons.Tracing.Collector,
-		}
-	} else if cfg.Tracing == nil {
-		cfg.Tracing = &config.Tracing{}
-	}
+	defaults.EnsureDefaults(cfg)
 
 	// load all env variables relevant to the config in the current context.
 	if err := envdecode.Decode(cfg); err != nil {
@@ -48,10 +27,7 @@ func ParseConfig(cfg *config.Config) error {
 		}
 	}
 
-	// sanitize config
-	if cfg.HTTP.Root != "/" {
-		cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
-	}
+	defaults.Sanitize(cfg)
 
 	return nil
 }
diff --git a/webdav/pkg/config/service.go b/webdav/pkg/config/service.go
index f98aa3d27e5..c019b73046e 100644
--- a/webdav/pkg/config/service.go
+++ b/webdav/pkg/config/service.go
@@ -2,5 +2,5 @@ package config
 
 // Service defines the available service configuration.
 type Service struct {
-	Name string
+	Name string `ocisConfig:"-" yaml:"-"`
 }


Test patch:
diff --git a/accounts/pkg/service/v0/accounts_permission_test.go b/accounts/pkg/service/v0/accounts_permission_test.go
index 8c8dbd07865..e349ab6da9a 100644
--- a/accounts/pkg/service/v0/accounts_permission_test.go
+++ b/accounts/pkg/service/v0/accounts_permission_test.go
@@ -13,7 +13,7 @@ import (
 	accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0"
 
 	"github.com/golang/protobuf/ptypes/empty"
-	"github.com/owncloud/ocis/accounts/pkg/config"
+	config "github.com/owncloud/ocis/accounts/pkg/config/defaults"
 	olog "github.com/owncloud/ocis/ocis-pkg/log"
 	"github.com/owncloud/ocis/ocis-pkg/middleware"
 	"github.com/owncloud/ocis/ocis-pkg/roles"
diff --git a/graph/pkg/service/v0/graph_test.go b/graph/pkg/service/v0/graph_test.go
index 3043bacb891..e475af9e3f9 100644
--- a/graph/pkg/service/v0/graph_test.go
+++ b/graph/pkg/service/v0/graph_test.go
@@ -15,7 +15,7 @@ import (
 	. "github.com/onsi/gomega"
 	libregraph "github.com/owncloud/libre-graph-api-go"
 	"github.com/owncloud/ocis/graph/mocks"
-	"github.com/owncloud/ocis/graph/pkg/config"
+	"github.com/owncloud/ocis/graph/pkg/config/defaults"
 	service "github.com/owncloud/ocis/graph/pkg/service/v0"
 	"github.com/owncloud/ocis/graph/pkg/service/v0/errorcode"
 	"github.com/stretchr/testify/mock"
@@ -34,7 +34,7 @@ var _ = Describe("Graph", func() {
 		gatewayClient = &mocks.GatewayClient{}
 		httpClient = &mocks.HTTPClient{}
 		svc = service.NewService(
-			service.Config(config.DefaultConfig()),
+			service.Config(defaults.DefaultConfig()),
 			service.WithGatewayClient(gatewayClient),
 			service.WithHTTPClient(httpClient),
 		)
diff --git a/proxy/pkg/proxy/proxy_test.go b/proxy/pkg/proxy/proxy_test.go
index a0300e64d18..f64362c4915 100644
--- a/proxy/pkg/proxy/proxy_test.go
+++ b/proxy/pkg/proxy/proxy_test.go
@@ -4,7 +4,7 @@ import (
 	"net/url"
 	"testing"
 
-	"github.com/owncloud/ocis/proxy/pkg/config"
+	"github.com/owncloud/ocis/proxy/pkg/config/defaults"
 )
 
 type matchertest struct {
@@ -13,8 +13,8 @@ type matchertest struct {
 }
 
 func TestPrefixRouteMatcher(t *testing.T) {
-	cfg := config.DefaultConfig()
-	cfg.Policies = config.DefaultPolicies()
+	cfg := defaults.DefaultConfig()
+	cfg.Policies = defaults.DefaultPolicies()
 	p := NewMultiHostReverseProxy(Config(cfg))
 
 	table := []matchertest{
@@ -33,8 +33,8 @@ func TestPrefixRouteMatcher(t *testing.T) {
 }
 
 func TestQueryRouteMatcher(t *testing.T) {
-	cfg := config.DefaultConfig()
-	cfg.Policies = config.DefaultPolicies()
+	cfg := defaults.DefaultConfig()
+	cfg.Policies = defaults.DefaultPolicies()
 	p := NewMultiHostReverseProxy(Config(cfg))
 
 	table := []matchertest{
@@ -61,8 +61,8 @@ func TestQueryRouteMatcher(t *testing.T) {
 }
 
 func TestRegexRouteMatcher(t *testing.T) {
-	cfg := config.DefaultConfig()
-	cfg.Policies = config.DefaultPolicies()
+	cfg := defaults.DefaultConfig()
+	cfg.Policies = defaults.DefaultPolicies()
 	p := NewMultiHostReverseProxy(Config(cfg))
 
 	table := []matchertest{
diff --git a/tests/acceptance/expected-failures-API-on-OCIS-storage.md b/tests/acceptance/expected-failures-API-on-OCIS-storage.md
index 055affef0a6..2e6b4260848 100644
--- a/tests/acceptance/expected-failures-API-on-OCIS-storage.md
+++ b/tests/acceptance/expected-failures-API-on-OCIS-storage.md
@@ -140,42 +140,42 @@ Synchronization features like etag propagation, setting mtime and locking files
 - [apiWebdavLocks/folder.feature:138](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/folder.feature#L138)
 - [apiWebdavLocks/folder.feature:144](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/folder.feature#L144)
 - [apiWebdavLocks/folder.feature:143](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/folder.feature#L143)
+- [apiWebdavLocks/folder.feature:160](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/folder.feature#L160)
 - [apiWebdavLocks/folder.feature:161](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/folder.feature#L161)
 - [apiWebdavLocks/folder.feature:162](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/folder.feature#L162)
 - [apiWebdavLocks/folder.feature:163](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/folder.feature#L163)
-- [apiWebdavLocks/folder.feature:164](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/folder.feature#L164)
+- [apiWebdavLocks/folder.feature:168](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/folder.feature#L168)
 - [apiWebdavLocks/folder.feature:169](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/folder.feature#L169)
-- [apiWebdavLocks/folder.feature:170](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/folder.feature#L170)
+- [apiWebdavLocks/publicLink.feature:32](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLink.feature#L32)
 - [apiWebdavLocks/publicLink.feature:33](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLink.feature#L33)
 - [apiWebdavLocks/publicLink.feature:34](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLink.feature#L34)
 - [apiWebdavLocks/publicLink.feature:35](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLink.feature#L35)
-- [apiWebdavLocks/publicLink.feature:36](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLink.feature#L36)
+- [apiWebdavLocks/publicLink.feature:40](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLink.feature#L40)
 - [apiWebdavLocks/publicLink.feature:41](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLink.feature#L41)
 - [apiWebdavLocks/publicLink.feature:42](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLink.feature#L42)
 - [apiWebdavLocks/publicLink.feature:43](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLink.feature#L43)
-- [apiWebdavLocks/publicLink.feature:44](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLink.feature#L44)
+- [apiWebdavLocks/publicLink.feature:59](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLink.feature#L59)
 - [apiWebdavLocks/publicLink.feature:60](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLink.feature#L60)
-- [apiWebdavLocks/publicLink.feature:61](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLink.feature#L61)
+- [apiWebdavLocks/publicLink.feature:77](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLink.feature#L77)
 - [apiWebdavLocks/publicLink.feature:78](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLink.feature#L78)
-- [apiWebdavLocks/publicLink.feature:79](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLink.feature#L79)
+- [apiWebdavLocks/publicLink.feature:97](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLink.feature#L97)
 - [apiWebdavLocks/publicLink.feature:98](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLink.feature#L98)
-- [apiWebdavLocks/publicLink.feature:99](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLink.feature#L99)
+- [apiWebdavLocks/publicLink.feature:116](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLink.feature#L116)
 - [apiWebdavLocks/publicLink.feature:117](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLink.feature#L117)
-- [apiWebdavLocks/publicLink.feature:118](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLink.feature#L118)
+- [apiWebdavLocks/publicLinkLockdiscovery.feature:22](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLinkLockdiscovery.feature#L22)
 - [apiWebdavLocks/publicLinkLockdiscovery.feature:23](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLinkLockdiscovery.feature#L23)
-- [apiWebdavLocks/publicLinkLockdiscovery.feature:24](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLinkLockdiscovery.feature#L24)
-- [apiWebdavLocks/publicLinkLockdiscovery.feature:39](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLinkLockdiscovery.feature#L39)
-- [apiWebdavLocks/publicLinkLockdiscovery.feature:40](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLinkLockdiscovery.feature#L40)
-- [apiWebdavLocks/publicLinkLockdiscovery.feature:55](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLinkLockdiscovery.feature#L55)
-- [apiWebdavLocks/publicLinkLockdiscovery.feature:56](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLinkLockdiscovery.feature#L56)
-- [apiWebdavLocks/publicLinkLockdiscovery.feature:71](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLinkLockdiscovery.feature#L71)
-- [apiWebdavLocks/publicLinkLockdiscovery.feature:72](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLinkLockdiscovery.feature#L72)
-- [apiWebdavLocks/publicLinkLockdiscovery.feature:87](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLinkLockdiscovery.feature#L87)
-- [apiWebdavLocks/publicLinkLockdiscovery.feature:88](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLinkLockdiscovery.feature#L88)
-- [apiWebdavLocks/publicLinkLockdiscovery.feature:103](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLinkLockdiscovery.feature#L103)
-- [apiWebdavLocks/publicLinkLockdiscovery.feature:104](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLinkLockdiscovery.feature#L104)
-- [apiWebdavLocks/publicLinkLockdiscovery.feature:119](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLinkLockdiscovery.feature#L119)
-- [apiWebdavLocks/publicLinkLockdiscovery.feature:120](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLinkLockdiscovery.feature#L120)
+- [apiWebdavLocks/publicLinkLockdiscovery.feature:37](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLinkLockdiscovery.feature#L37)
+- [apiWebdavLocks/publicLinkLockdiscovery.feature:38](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLinkLockdiscovery.feature#L38)
+- [apiWebdavLocks/publicLinkLockdiscovery.feature:52](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLinkLockdiscovery.feature#L52)
+- [apiWebdavLocks/publicLinkLockdiscovery.feature:53](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLinkLockdiscovery.feature#L53)
+- [apiWebdavLocks/publicLinkLockdiscovery.feature:67](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLinkLockdiscovery.feature#L67)
+- [apiWebdavLocks/publicLinkLockdiscovery.feature:68](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLinkLockdiscovery.feature#L68)
+- [apiWebdavLocks/publicLinkLockdiscovery.feature:82](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLinkLockdiscovery.feature#L82)
+- [apiWebdavLocks/publicLinkLockdiscovery.feature:83](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLinkLockdiscovery.feature#L83)
+- [apiWebdavLocks/publicLinkLockdiscovery.feature:97](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLinkLockdiscovery.feature#L97)
+- [apiWebdavLocks/publicLinkLockdiscovery.feature:98](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLinkLockdiscovery.feature#L98)
+- [apiWebdavLocks/publicLinkLockdiscovery.feature:112](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLinkLockdiscovery.feature#L112)
+- [apiWebdavLocks/publicLinkLockdiscovery.feature:113](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/publicLinkLockdiscovery.feature#L113)
 - [apiWebdavLocks/requestsWithToken.feature:73](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/requestsWithToken.feature#L73)
 - [apiWebdavLocks/requestsWithToken.feature:74](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/requestsWithToken.feature#L74)
 - [apiWebdavLocks/requestsWithToken.feature:75](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavLocks/requestsWithToken.feature#L75)
@@ -497,7 +497,7 @@ cannot share a folder with create permission
 - [apiSharePublicLink1/accessToPublicLinkShare.feature:10](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink1/accessToPublicLinkShare.feature#L10)
 - [apiSharePublicLink1/accessToPublicLinkShare.feature:20](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink1/accessToPublicLinkShare.feature#L20)
 - [apiSharePublicLink1/accessToPublicLinkShare.feature:30](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink1/accessToPublicLinkShare.feature#L30)
-- [apiSharePublicLink1/accessToPublicLinkShare.feature:45](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink1/accessToPublicLinkShare.feature#L45)
+- [apiSharePublicLink1/accessToPublicLinkShare.feature:44](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink1/accessToPublicLinkShare.feature#L44)
 - [apiSharePublicLink1/createPublicLinkShare.feature:587](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink1/createPublicLinkShare.feature#L587)
 - [apiSharePublicLink1/createPublicLinkShare.feature:608](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink1/createPublicLinkShare.feature#L608)
 
@@ -516,11 +516,11 @@ cannot share a folder with create permission
 #### [Cannot set/unset maximum and minimum preview dimensions](https://github.com/owncloud/ocis/issues/2070)
 
 - [apiWebdavPreviews/previews.feature:133](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavPreviews/previews.feature#L133)
-- [apiWebdavPreviews/previews.feature:161](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavPreviews/previews.feature#L161)
 - [apiWebdavPreviews/previews.feature:162](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavPreviews/previews.feature#L162)
 - [apiWebdavPreviews/previews.feature:163](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavPreviews/previews.feature#L163)
-- [apiWebdavPreviews/previews.feature:175](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavPreviews/previews.feature#L175)
+- [apiWebdavPreviews/previews.feature:164](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavPreviews/previews.feature#L164)
 - [apiWebdavPreviews/previews.feature:176](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavPreviews/previews.feature#L176)
+- [apiWebdavPreviews/previews.feature:177](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavPreviews/previews.feature#L177)
 
 #### [creating public links with permissions fails](https://github.com/owncloud/product/issues/252)
 
@@ -573,16 +573,17 @@ cannot share a folder with create permission
 #### [Upload-only shares must not overwrite but create a separate file](https://github.com/owncloud/ocis-reva/issues/286)
 
 - [apiSharePublicLink2/uploadToPublicLinkShare.feature:24](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/uploadToPublicLinkShare.feature#L24)
-- [apiSharePublicLink2/uploadToPublicLinkShare.feature:277](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/uploadToPublicLinkShare.feature#L277)
+- [apiSharePublicLink2/uploadToPublicLinkShare.feature:273](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/uploadToPublicLinkShare.feature#L273)
 
 #### [Set quota over settings](https://github.com/owncloud/ocis/issues/1290)
 
-- [apiSharePublicLink2/uploadToPublicLinkShare.feature:160](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/uploadToPublicLinkShare.feature#L160)
-- [apiSharePublicLink2/uploadToPublicLinkShare.feature:179](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/uploadToPublicLinkShare.feature#L179)
+- [apiSharePublicLink2/uploadToPublicLinkShare.feature:158](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/uploadToPublicLinkShare.feature#L158)
+- [apiSharePublicLink2/uploadToPublicLinkShare.feature:177](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/uploadToPublicLinkShare.feature#L177)
 
 #### [various sharing settings cannot be set](https://github.com/owncloud/ocis/issues/1328)
 
-- [apiSharePublicLink2/uploadToPublicLinkShare.feature:198](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/uploadToPublicLinkShare.feature#L198)
+- [apiSharePublicLink2/uploadToPublicLinkShare.feature:196](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/uploadToPublicLinkShare.feature#L196)
+- [apiSharePublicLink2/uploadToPublicLinkShare.feature:215](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/uploadToPublicLinkShare.feature#L215)
 
 #### [Resharing does not work with ocis storage](https://github.com/owncloud/product/issues/265)
 
@@ -728,19 +729,19 @@ _getting and setting quota_
 Scenario Outline: Moving a file into a shared folder as the sharee and as the sharer
 
 - [apiWebdavMove2/moveShareOnOcis.feature:30](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveShareOnOcis.feature#L30)
-- [apiWebdavMove2/moveShareOnOcis.feature:32](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveShareOnOcis.feature#L32)
+- [apiWebdavMove2/moveShareOnOcis.feature:31](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveShareOnOcis.feature#L31)
   Scenario Outline: Moving a file out of a shared folder as the sharee and as the sharer
 - [apiWebdavMove2/moveShareOnOcis.feature:60](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveShareOnOcis.feature#L60)
-- [apiWebdavMove2/moveShareOnOcis.feature:62](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveShareOnOcis.feature#L62)
+- [apiWebdavMove2/moveShareOnOcis.feature:61](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveShareOnOcis.feature#L61)
   Scenario Outline: Moving a folder into a shared folder as the sharee and as the sharer
 - [apiWebdavMove2/moveShareOnOcis.feature:91](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveShareOnOcis.feature#L91)
-- [apiWebdavMove2/moveShareOnOcis.feature:93](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveShareOnOcis.feature#L93)
+- [apiWebdavMove2/moveShareOnOcis.feature:92](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveShareOnOcis.feature#L92)
   Scenario Outline: Moving a folder out of a shared folder as the sharee and as the sharer
-- [apiWebdavMove2/moveShareOnOcis.feature:124](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveShareOnOcis.feature#L124)
-- [apiWebdavMove2/moveShareOnOcis.feature:126](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveShareOnOcis.feature#L126)
+- [apiWebdavMove2/moveShareOnOcis.feature:122](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveShareOnOcis.feature#L122)
+- [apiWebdavMove2/moveShareOnOcis.feature:123](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveShareOnOcis.feature#L123)
   Scenario Outline: Moving a file to a shared folder with no permissions
+- [apiWebdavMove2/moveShareOnOcis.feature:151](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveShareOnOcis.feature#L151)
 - [apiWebdavMove2/moveShareOnOcis.feature:152](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveShareOnOcis.feature#L152)
-- [apiWebdavMove2/moveShareOnOcis.feature:153](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveShareOnOcis.feature#L153)
 
 #### [restoring an older version of a shared file deletes the share](https://github.com/owncloud/ocis/issues/765)
 
@@ -1039,10 +1040,10 @@ special character username not valid
 - [apiProvisioning-v1/editUser.feature:57](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v1/editUser.feature#L57)
 - [apiProvisioning-v1/editUser.feature:129](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v1/editUser.feature#L129)
 - [apiProvisioning-v2/editUser.feature:58](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/editUser.feature#L58)
-- [apiProvisioning-v2/editUser.feature:130](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/editUser.feature#L130)
+- [apiProvisioning-v2/editUser.feature:128](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/editUser.feature#L128)
 - [apiProvisioning-v2/enableUser.feature:40](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/enableUser.feature#L40)
 - [apiProvisioning-v2/enableUser.feature:62](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/enableUser.feature#L62)
-- [apiProvisioning-v2/enableUser.feature:72](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/enableUser.feature#L72)
+- [apiProvisioning-v2/enableUser.feature:70](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v2/enableUser.feature#L70)
 
 #### [user can get info of other users/ cloud/users endpoints not authenticated](https://github.com/owncloud/product/issues/248)
 
@@ -1286,6 +1287,7 @@ And other missing implementation of favorites
 - [apiFavorites/favoritesSharingToShares.feature:83](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiFavorites/favoritesSharingToShares.feature#L83)
 - [apiFavorites/favoritesSharingToShares.feature:108](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiFavorites/favoritesSharingToShares.feature#L108)
 - [apiMain/checksums.feature:211](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiMain/checksums.feature#L211)
+- [apiMain/checksums.feature:233](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiMain/checksums.feature#L233)
 - [apiShareOperationsToShares2/getWebDAVSharePermissions.feature:49](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareOperationsToShares2/getWebDAVSharePermissions.feature#L49)
 - [apiShareOperationsToShares2/getWebDAVSharePermissions.feature:75](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareOperationsToShares2/getWebDAVSharePermissions.feature#L75)
 - [apiShareOperationsToShares2/getWebDAVSharePermissions.feature:94](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareOperationsToShares2/getWebDAVSharePermissions.feature#L94)
@@ -1378,10 +1380,10 @@ And other missing implementation of favorites
 - [apiWebdavMove2/moveShareOnOcis.feature:68](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveShareOnOcis.feature#L68)
 - [apiWebdavMove2/moveShareOnOcis.feature:99](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveShareOnOcis.feature#L99)
 - [apiWebdavMove2/moveShareOnOcis.feature:100](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveShareOnOcis.feature#L100)
-- [apiWebdavMove2/moveShareOnOcis.feature:132](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveShareOnOcis.feature#L132)
-- [apiWebdavMove2/moveShareOnOcis.feature:158](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveShareOnOcis.feature#L158)
-- [apiWebdavMove2/moveShareOnOcis.feature:185](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveShareOnOcis.feature#L185)
-- [apiWebdavMove2/moveShareOnOcis.feature:220](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveShareOnOcis.feature#L220)
+- [apiWebdavMove2/moveShareOnOcis.feature:130](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveShareOnOcis.feature#L130)
+- [apiWebdavMove2/moveShareOnOcis.feature:157](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveShareOnOcis.feature#L157)
+- [apiWebdavMove2/moveShareOnOcis.feature:184](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveShareOnOcis.feature#L184)
+- [apiWebdavMove2/moveShareOnOcis.feature:216](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveShareOnOcis.feature#L216)
 
 #### [WWW-Authenticate header for unauthenticated requests is not clear](https://github.com/owncloud/ocis/issues/2285)
 
@@ -1702,9 +1704,9 @@ Not everything needs to be implemented for ocis. While the oc10 testsuite covers
 - [apiWebdavUpload2/uploadFileToExcludedDirectoryUsingOldChunking.feature:38](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUpload2/uploadFileToExcludedDirectoryUsingOldChunking.feature#L38)
 - [apiWebdavUpload2/uploadFileToExcludedDirectoryUsingOldChunking.feature:39](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUpload2/uploadFileToExcludedDirectoryUsingOldChunking.feature#L39)
 - [apiWebdavUpload2/uploadFileToExcludedDirectoryUsingOldChunking.feature:40](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUpload2/uploadFileToExcludedDirectoryUsingOldChunking.feature#L40)
+- [apiWebdavMove2/moveFile.feature:286](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveFile.feature#L286)
 - [apiWebdavMove2/moveFile.feature:287](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveFile.feature#L287)
-- [apiWebdavMove2/moveFile.feature:288](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveFile.feature#L288)
-- [apiWebdavMove2/moveFile.feature:293](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveFile.feature#L293)
+- [apiWebdavMove2/moveFile.feature:292](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveFile.feature#L292)
 
 #### [cannot set blacklisted file names](https://github.com/owncloud/product/issues/260)
 
@@ -1758,12 +1760,12 @@ Not everything needs to be implemented for ocis. While the oc10 testsuite covers
 
 #### [Cannot download preview of shared received file after the shareowner has changed the file content](https://github.com/owncloud/ocis/issues/2538)
 
-- [apiWebdavPreviews/previews.feature:219](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavPreviews/previews.feature#L219)
-- [apiWebdavPreviews/previews.feature:237](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavPreviews/previews.feature#L237)
+- [apiWebdavPreviews/previews.feature:217](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavPreviews/previews.feature#L217)
+- [apiWebdavPreviews/previews.feature:233](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavPreviews/previews.feature#L233)
 
 #### [Preview of text file with UTF content does not render correctly](https://github.com/owncloud/ocis/issues/2570)
 
-- [apiWebdavPreviews/previews.feature:210](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavPreviews/previews.feature#L210)
+- [apiWebdavPreviews/previews.feature:208](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavPreviews/previews.feature#L208)
 
 #### [Share path in the response is different between share states](https://github.com/owncloud/ocis/issues/2540)
 
@@ -1814,7 +1816,7 @@ Not everything needs to be implemented for ocis. While the oc10 testsuite covers
 - [apiWebdavMove1/moveFolder.feature:27](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove1/moveFolder.feature#L27)
 - [apiWebdavMove1/moveFolder.feature:45](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove1/moveFolder.feature#L45)
 - [apiWebdavMove1/moveFolder.feature:63](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove1/moveFolder.feature#L63)
-- [apiWebdavMove2/moveFile.feature:224](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveFile.feature#L224)
+- [apiWebdavMove2/moveFile.feature:225](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveFile.feature#L225)
 - [apiWebdavMove2/moveFileToBlacklistedName.feature:25](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveFileToBlacklistedName.feature#L25)
 - [apiWebdavMove2/moveFileToBlacklistedName.feature:41](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveFileToBlacklistedName.feature#L41)
 - [apiWebdavMove2/moveFileToBlacklistedName.feature:80](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveFileToBlacklistedName.feature#L80)
@@ -1857,9 +1859,5 @@ Not everything needs to be implemented for ocis. While the oc10 testsuite covers
 #### [OCS response is not returned when a disabled user tries to enable himself](https://github.com/owncloud/ocis/issues/3254)
 
 - [apiProvisioning-v1/enableUser.feature:62](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiProvisioning-v1/enableUser.feature#L62)
-
-#### [Trying to modify a shared file using spaces end-point returns 409 HTTP status code](https://github.com/owncloud/ocis/issues/3241)
-
-- [apiMain/checksums.feature:233](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiMain/checksums.feature#L233)
   Note: always have an empty line at the end of this file.
   The bash script that processes this file requires that the last line has a newline on the end.