From b438fce511686d2451f7c5d4730c97b4a7f59fbd Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Tue, 1 Feb 2022 12:57:41 +0100 Subject: [PATCH 01/19] generate config file for accounts service --- accounts/cmd/helper/defaultconfig/main.go | 23 ++++++++ accounts/pkg/config/config.go | 65 ++++++++++++----------- accounts/pkg/config/debug.go | 8 +-- accounts/pkg/config/grpc.go | 2 +- accounts/pkg/config/http.go | 16 +++--- accounts/pkg/config/log.go | 8 +-- accounts/pkg/config/parser/parse.go | 33 +++++++++--- accounts/pkg/config/tracing.go | 8 +-- 8 files changed, 102 insertions(+), 61 deletions(-) create mode 100644 accounts/cmd/helper/defaultconfig/main.go diff --git a/accounts/cmd/helper/defaultconfig/main.go b/accounts/cmd/helper/defaultconfig/main.go new file mode 100644 index 0000000000..1092497cb7 --- /dev/null +++ b/accounts/cmd/helper/defaultconfig/main.go @@ -0,0 +1,23 @@ +package main + +import ( + "fmt" + + "github.com/owncloud/ocis/accounts/pkg/config" + "github.com/owncloud/ocis/accounts/pkg/config/parser" + "gopkg.in/yaml.v2" +) + +func main() { + + cfg := config.DefaultConfig() + + parser.EnsureDefaults(cfg) + parser.Sanitize(cfg) + + b, err := yaml.Marshal(cfg) + if err != nil { + return + } + fmt.Println(string(b)) +} diff --git a/accounts/pkg/config/config.go b/accounts/pkg/config/config.go index 79024993be..0152e49911 100644 --- a/accounts/pkg/config/config.go +++ b/accounts/pkg/config/config.go @@ -8,78 +8,79 @@ import ( // Config combines all available configuration parts. type Config struct { - *shared.Commons + *shared.Commons `yaml:"-"` - Service Service + Service Service `yaml:"-"` - Tracing *Tracing `ocisConfig:"tracing"` - Log *Log `ocisConfig:"log"` - Debug Debug `ocisConfig:"debug"` + Tracing *Tracing + Log *Log + Debug Debug - HTTP HTTP `ocisConfig:"http"` - GRPC GRPC `ocisConfig:"grpc"` + HTTP HTTP + GRPC GRPC - TokenManager TokenManager `ocisConfig:"token_manager"` + TokenManager TokenManager - Asset Asset `ocisConfig:"asset"` - Repo Repo `ocisConfig:"repo"` - Index Index `ocisConfig:"index"` - ServiceUser ServiceUser `ocisConfig:"service_user"` - HashDifficulty int `ocisConfig:"hash_difficulty" env:"ACCOUNTS_HASH_DIFFICULTY"` - DemoUsersAndGroups bool `ocisConfig:"demo_users_and_groups" env:"ACCOUNTS_DEMO_USERS_AND_GROUPS"` + Asset Asset + Repo Repo + Index Index + ServiceUser ServiceUser + HashDifficulty int `env:"ACCOUNTS_HASH_DIFFICULTY"` + DemoUsersAndGroups bool `env:"ACCOUNTS_DEMO_USERS_AND_GROUPS"` - Context context.Context + Context context.Context `yaml:"-"` } // Asset defines the available asset configuration. type Asset struct { - Path string `ocisConfig:"path" env:"ACCOUNTS_ASSET_PATH"` + Path string `env:"ACCOUNTS_ASSET_PATH"` } // TokenManager is the config for using the reva token manager type TokenManager struct { - JWTSecret string `ocisConfig:"jwt_secret" env:"OCIS_JWT_SECRET;ACCOUNTS_JWT_SECRET"` + JWTSecret string `env:"OCIS_JWT_SECRET;ACCOUNTS_JWT_SECRET"` } // Repo defines which storage implementation is to be used. type Repo struct { - Backend string `ocisConfig:"backend" env:"ACCOUNTS_STORAGE_BACKEND"` - Disk Disk `ocisConfig:"disk"` - CS3 CS3 `ocisConfig:"cs3"` + Backend string `env:"ACCOUNTS_STORAGE_BACKEND"` + Disk Disk + CS3 CS3 } // Disk is the local disk implementation of the storage. type Disk struct { - Path string `ocisConfig:"path" env:"ACCOUNTS_STORAGE_DISK_PATH"` + Path string `env:"ACCOUNTS_STORAGE_DISK_PATH"` } // CS3 is the cs3 implementation of the storage. type CS3 struct { - ProviderAddr string `ocisConfig:"provider_addr" env:"ACCOUNTS_STORAGE_CS3_PROVIDER_ADDR"` + ProviderAddr string `env:"ACCOUNTS_STORAGE_CS3_PROVIDER_ADDR"` + JWTSecret string `env:"ACCOUNTS_STORAGE_CS3_JWT_SECRET"` } // ServiceUser defines the user required for EOS. type ServiceUser struct { - UUID string `ocisConfig:"uuid" env:"ACCOUNTS_SERVICE_USER_UUID"` - Username string `ocisConfig:"username" env:"ACCOUNTS_SERVICE_USER_USERNAME"` - UID int64 `ocisConfig:"uid" env:"ACCOUNTS_SERVICE_USER_UID"` - GID int64 `ocisConfig:"gid" env:"ACCOUNTS_SERVICE_USER_GID"` + UUID string `env:"ACCOUNTS_SERVICE_USER_UUID"` + Username string `env:"ACCOUNTS_SERVICE_USER_USERNAME"` + UID int64 `env:"ACCOUNTS_SERVICE_USER_UID"` + GID int64 `env:"ACCOUNTS_SERVICE_USER_GID"` } // Index defines config for indexes. type Index struct { - UID UIDBound `ocisConfig:"uid"` - GID GIDBound `ocisConfig:"gid"` + UID UIDBound + GID GIDBound } // GIDBound defines a lower and upper bound. type GIDBound struct { - Lower int64 `ocisConfig:"lower" env:"ACCOUNTS_GID_INDEX_LOWER_BOUND"` - Upper int64 `ocisConfig:"upper" env:"ACCOUNTS_GID_INDEX_UPPER_BOUND"` + Lower int64 `env:"ACCOUNTS_GID_INDEX_LOWER_BOUND"` + Upper int64 `env:"ACCOUNTS_GID_INDEX_UPPER_BOUND"` } // UIDBound defines a lower and upper bound. type UIDBound struct { - Lower int64 `ocisConfig:"lower" env:"ACCOUNTS_UID_INDEX_LOWER_BOUND"` - Upper int64 `ocisConfig:"upper" env:"ACCOUNTS_UID_INDEX_UPPER_BOUND"` + Lower int64 `env:"ACCOUNTS_UID_INDEX_LOWER_BOUND"` + Upper int64 `env:"ACCOUNTS_UID_INDEX_UPPER_BOUND"` } diff --git a/accounts/pkg/config/debug.go b/accounts/pkg/config/debug.go index 539b8fabab..fd90aad7ab 100644 --- a/accounts/pkg/config/debug.go +++ b/accounts/pkg/config/debug.go @@ -2,8 +2,8 @@ package config // Debug defines the available debug configuration. type Debug struct { - Addr string `ocisConfig:"addr" env:"ACCOUNTS_DEBUG_ADDR"` - Token string `ocisConfig:"token" env:"ACCOUNTS_DEBUG_TOKEN"` - Pprof bool `ocisConfig:"pprof" env:"ACCOUNTS_DEBUG_PPROF"` - Zpages bool `ocisConfig:"zpages" env:"ACCOUNTS_DEBUG_ZPAGES"` + Addr string `env:"ACCOUNTS_DEBUG_ADDR"` + Token string `env:"ACCOUNTS_DEBUG_TOKEN"` + Pprof bool `env:"ACCOUNTS_DEBUG_PPROF"` + Zpages bool `env:"ACCOUNTS_DEBUG_ZPAGES"` } diff --git a/accounts/pkg/config/grpc.go b/accounts/pkg/config/grpc.go index f16de42f2b..55e66da118 100644 --- a/accounts/pkg/config/grpc.go +++ b/accounts/pkg/config/grpc.go @@ -2,6 +2,6 @@ package config // GRPC defines the available grpc configuration. type GRPC struct { - Addr string `ocisConfig:"addr" env:"ACCOUNTS_GRPC_ADDR"` + Addr string `env:"ACCOUNTS_GRPC_ADDR"` Namespace string } diff --git a/accounts/pkg/config/http.go b/accounts/pkg/config/http.go index c8c7ab628e..c5c2e4975b 100644 --- a/accounts/pkg/config/http.go +++ b/accounts/pkg/config/http.go @@ -2,17 +2,17 @@ package config // HTTP defines the available http configuration. type HTTP struct { - Addr string `ocisConfig:"addr" env:"ACCOUNTS_HTTP_ADDR"` + Addr string `env:"ACCOUNTS_HTTP_ADDR"` Namespace string - Root string `ocisConfig:"root" env:"ACCOUNTS_HTTP_ROOT"` - CacheTTL int `ocisConfig:"cache_ttl" env:"ACCOUNTS_CACHE_TTL"` - CORS CORS `ocisConfig:"cors"` + Root string `env:"ACCOUNTS_HTTP_ROOT"` + CacheTTL int `env:"ACCOUNTS_CACHE_TTL"` + CORS CORS } // CORS defines the available cors configuration. type CORS struct { - AllowedOrigins []string `ocisConfig:"allowed_origins"` - AllowedMethods []string `ocisConfig:"allowed_methods"` - AllowedHeaders []string `ocisConfig:"allowed_headers"` - AllowCredentials bool `ocisConfig:"allowed_credentials"` + AllowedOrigins []string + AllowedMethods []string + AllowedHeaders []string + AllowCredentials bool } diff --git a/accounts/pkg/config/log.go b/accounts/pkg/config/log.go index 6ada8a7dd6..2d20d3005b 100644 --- a/accounts/pkg/config/log.go +++ b/accounts/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;ACCOUNTS_LOG_LEVEL"` - Pretty bool `mapstructure:"pretty" env:"OCIS_LOG_PRETTY;ACCOUNTS_LOG_PRETTY"` - Color bool `mapstructure:"color" env:"OCIS_LOG_COLOR;ACCOUNTS_LOG_COLOR"` - File string `mapstructure:"file" env:"OCIS_LOG_FILE;ACCOUNTS_LOG_FILE"` + Level string `env:"OCIS_LOG_LEVEL;ACCOUNTS_LOG_LEVEL"` + Pretty bool `env:"OCIS_LOG_PRETTY;ACCOUNTS_LOG_PRETTY"` + Color bool `env:"OCIS_LOG_COLOR;ACCOUNTS_LOG_COLOR"` + File string `env:"OCIS_LOG_FILE;ACCOUNTS_LOG_FILE"` } diff --git a/accounts/pkg/config/parser/parse.go b/accounts/pkg/config/parser/parse.go index fb801aed28..e437fa6a07 100644 --- a/accounts/pkg/config/parser/parse.go +++ b/accounts/pkg/config/parser/parse.go @@ -17,6 +17,28 @@ func ParseConfig(cfg *config.Config) error { return err } + err = EnsureDefaults(cfg) + if err != nil { + return err + } + + // 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" + if !errors.Is(err, envdecode.ErrNoTargetFieldsAreSet) { + return err + } + } + + err = Sanitize(cfg) + if err != nil { + return err + } + + return nil +} + +func EnsureDefaults(cfg *config.Config) error { // 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{ @@ -40,19 +62,14 @@ func ParseConfig(cfg *config.Config) error { cfg.Tracing = &config.Tracing{} } - // 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" - if !errors.Is(err, envdecode.ErrNoTargetFieldsAreSet) { - return err - } - } + return nil +} +func Sanitize(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) - return nil } diff --git a/accounts/pkg/config/tracing.go b/accounts/pkg/config/tracing.go index fc673f8246..9a72990858 100644 --- a/accounts/pkg/config/tracing.go +++ b/accounts/pkg/config/tracing.go @@ -2,8 +2,8 @@ package config // Tracing defines the available tracing configuration. type Tracing struct { - Enabled bool `ocisConfig:"enabled" env:"OCIS_TRACING_ENABLED;ACCOUNTS_TRACING_ENABLED"` - Type string `ocisConfig:"type" env:"OCIS_TRACING_TYPE;ACCOUNTS_TRACING_TYPE"` - Endpoint string `ocisConfig:"endpoint" env:"OCIS_TRACING_ENDPOINT;ACCOUNTS_TRACING_ENDPOINT"` - Collector string `ocisConfig:"collector" env:"OCIS_TRACING_COLLECTOR;ACCOUNTS_TRACING_COLLECTOR"` + Enabled bool `env:"OCIS_TRACING_ENABLED;ACCOUNTS_TRACING_ENABLED"` + Type string `env:"OCIS_TRACING_TYPE;ACCOUNTS_TRACING_TYPE"` + Endpoint string `env:"OCIS_TRACING_ENDPOINT;ACCOUNTS_TRACING_ENDPOINT"` + Collector string `env:"OCIS_TRACING_COLLECTOR;ACCOUNTS_TRACING_COLLECTOR"` } From bb6a018e9a5bbaea8f5cb2e0286974b6abd98cd6 Mon Sep 17 00:00:00 2001 From: David Christofas Date: Tue, 1 Mar 2022 13:21:06 +0100 Subject: [PATCH 02/19] config docs prototype --- accounts/cmd/helper/configdoc/main.go | 27 +++++++++++++++ accounts/pkg/config/config.go | 4 +-- docs/templates/CONFIGURATION.tmpl | 5 +++ ocis-pkg/docs/config.go | 38 +++++++++++++++++++++ thumbnails/cmd/helper/configdoc/main.go | 11 ++++++ thumbnails/cmd/helper/defaultconfig/main.go | 23 +++++++++++++ 6 files changed, 106 insertions(+), 2 deletions(-) create mode 100644 accounts/cmd/helper/configdoc/main.go create mode 100644 docs/templates/CONFIGURATION.tmpl create mode 100644 ocis-pkg/docs/config.go create mode 100644 thumbnails/cmd/helper/configdoc/main.go create mode 100644 thumbnails/cmd/helper/defaultconfig/main.go diff --git a/accounts/cmd/helper/configdoc/main.go b/accounts/cmd/helper/configdoc/main.go new file mode 100644 index 0000000000..4866993c29 --- /dev/null +++ b/accounts/cmd/helper/configdoc/main.go @@ -0,0 +1,27 @@ +package main + +import ( + "io/ioutil" + "log" + "os" + + "text/template" + + "github.com/owncloud/ocis/accounts/pkg/config" + "github.com/owncloud/ocis/ocis-pkg/docs" +) + +func main() { + cfg := config.DefaultConfig() + fields := docs.Display(*cfg) + + content, err := ioutil.ReadFile("docs/templates/CONFIGURATION.tmpl") + if err != nil { + log.Fatal(err) + } + tpl := template.Must(template.New("").Parse(string(content))) + tpl.Execute(os.Stdout, fields) + // for _, f := range fields { + // fmt.Printf("%s %s = %v\t%s\n", f.Name, f.Type, f.DefaultValue, f.Description) + // } +} diff --git a/accounts/pkg/config/config.go b/accounts/pkg/config/config.go index 0152e49911..ba182fc34d 100644 --- a/accounts/pkg/config/config.go +++ b/accounts/pkg/config/config.go @@ -25,8 +25,8 @@ type Config struct { Repo Repo Index Index ServiceUser ServiceUser - HashDifficulty int `env:"ACCOUNTS_HASH_DIFFICULTY"` - DemoUsersAndGroups bool `env:"ACCOUNTS_DEMO_USERS_AND_GROUPS"` + HashDifficulty int `env:"ACCOUNTS_HASH_DIFFICULTY" desc:"The hash difficulty makes sure that validating a password takes at least a certain amount of time."` + DemoUsersAndGroups bool `env:"ACCOUNTS_DEMO_USERS_AND_GROUPS" desc:"If this flag is set the service will setup the demo users and groups."` Context context.Context `yaml:"-"` } diff --git a/docs/templates/CONFIGURATION.tmpl b/docs/templates/CONFIGURATION.tmpl new file mode 100644 index 0000000000..da7a6ec8ea --- /dev/null +++ b/docs/templates/CONFIGURATION.tmpl @@ -0,0 +1,5 @@ +| Name | Type | Default Value | Description | +|------|------|---------------|-------------| +{{- range .}} +| {{.Name}} | {{.Type}} | {{.DefaultValue}} | {{.Description}}| +{{- end }} \ No newline at end of file diff --git a/ocis-pkg/docs/config.go b/ocis-pkg/docs/config.go new file mode 100644 index 0000000000..c55ecde7f7 --- /dev/null +++ b/ocis-pkg/docs/config.go @@ -0,0 +1,38 @@ +package docs + +import ( + "fmt" + "reflect" +) + +type ConfigField struct { + Name string + DefaultValue string + Type string + Description string +} + +func Display(s interface{}) []ConfigField { + t := reflect.TypeOf(s) + v := reflect.ValueOf(s) + + var fields []ConfigField + for i := 0; i < t.NumField(); i++ { + field := t.Field(i) + value := v.Field(i) + + switch value.Kind() { + default: + desc := field.Tag.Get("desc") + env, ok := field.Tag.Lookup("env") + if !ok { + continue + } + v := fmt.Sprintf("%v", value.Interface()) + fields = append(fields, ConfigField{Name: env, DefaultValue: v, Description: desc, Type: value.Type().Name()}) + case reflect.Struct: + fields = append(fields, Display(value.Interface())...) + } + } + return fields +} diff --git a/thumbnails/cmd/helper/configdoc/main.go b/thumbnails/cmd/helper/configdoc/main.go new file mode 100644 index 0000000000..5b2de37007 --- /dev/null +++ b/thumbnails/cmd/helper/configdoc/main.go @@ -0,0 +1,11 @@ +package main + +import ( + "github.com/owncloud/ocis/ocis-pkg/docs" + "github.com/owncloud/ocis/thumbnails/pkg/config" +) + +func main() { + cfg := config.DefaultConfig() + docs.Display(*cfg) +} diff --git a/thumbnails/cmd/helper/defaultconfig/main.go b/thumbnails/cmd/helper/defaultconfig/main.go new file mode 100644 index 0000000000..1092497cb7 --- /dev/null +++ b/thumbnails/cmd/helper/defaultconfig/main.go @@ -0,0 +1,23 @@ +package main + +import ( + "fmt" + + "github.com/owncloud/ocis/accounts/pkg/config" + "github.com/owncloud/ocis/accounts/pkg/config/parser" + "gopkg.in/yaml.v2" +) + +func main() { + + cfg := config.DefaultConfig() + + parser.EnsureDefaults(cfg) + parser.Sanitize(cfg) + + b, err := yaml.Marshal(cfg) + if err != nil { + return + } + fmt.Println(string(b)) +} From 4af7f630b9fd99c472e4ca4911ad3f898f6eb218 Mon Sep 17 00:00:00 2001 From: David Christofas Date: Tue, 1 Mar 2022 16:16:58 +0100 Subject: [PATCH 03/19] First version of the envvar docs generator Signed-off-by: Christian Richter --- docs/helpers/configenvextractor.go | 45 ++++++++++++++++++ docs/helpers/extractor.go.tmpl | 73 ++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+) create mode 100644 docs/helpers/configenvextractor.go create mode 100644 docs/helpers/extractor.go.tmpl diff --git a/docs/helpers/configenvextractor.go b/docs/helpers/configenvextractor.go new file mode 100644 index 0000000000..c9b9a401f8 --- /dev/null +++ b/docs/helpers/configenvextractor.go @@ -0,0 +1,45 @@ +package main + +import ( + "fmt" + "io/ioutil" + "log" + "os" + "os/exec" + "path/filepath" + "strings" + "text/template" +) + +func main() { + paths, err := filepath.Glob("../../*/pkg/config/defaultconfig.go") + if err != nil { + log.Fatal(err) + } + replacer := strings.NewReplacer( + "../../", "github.com/owncloud/ocis/", + "/defaultconfig.go", "", + ) + for i := range paths { + paths[i] = replacer.Replace(paths[i]) + } + content, err := ioutil.ReadFile("extractor.go.tmpl") + if err != nil { + log.Fatal(err) + } + tpl := template.Must(template.New("").Parse(string(content))) + os.Mkdir("output", 0700) + runner, err := os.Create("output/runner.go") + if err != nil { + log.Fatal(err) + } + tpl.Execute(runner, paths) + os.Chdir("output") + out, err := exec.Command("go", "run", "runner.go").Output() + if err != nil { + log.Fatal(err) + } + os.Chdir("../") + os.RemoveAll("output") + fmt.Println(string(out)) +} diff --git a/docs/helpers/extractor.go.tmpl b/docs/helpers/extractor.go.tmpl new file mode 100644 index 0000000000..1f9ea96981 --- /dev/null +++ b/docs/helpers/extractor.go.tmpl @@ -0,0 +1,73 @@ +package main + +import ( + "fmt" + "io/ioutil" + "log" + "os" + "reflect" + "strings" + "text/template" + + {{- range $key, $value := .}} + pkg{{$key}} "{{$value}}" + {{- end}}) + +type ConfigField struct { + Name string + DefaultValue string + Type string + Description string +} + +func main() { +content, err := ioutil.ReadFile("../../../docs/templates/CONFIGURATION.tmpl") +if err != nil { + log.Fatal(err) +} +replacer := strings.NewReplacer( + "github.com/owncloud/ocis/", "", + "/pkg/config", "", + ) +var fields []ConfigField +var targetFile *os.File +tpl := template.Must(template.New("").Parse(string(content))) +{{ range $key, $value := .}} + fields = GetAnnotatedVariables(*pkg{{ $key }}.DefaultConfig()) + if len(fields) > 0 { + targetFolder := "../../../docs/extensions/" + replacer.Replace("{{ $value }}") + os.MkdirAll(targetFolder, 0700) + targetFile, err = os.Create(targetFolder + "/configvars.md") + if err != nil { + log.Fatal(err) + } + tpl.Execute(targetFile, fields) + targetFile.Close() + } +{{ end }} +} + +func GetAnnotatedVariables(s interface{}) []ConfigField { + t := reflect.TypeOf(s) + v := reflect.ValueOf(s) + + var fields []ConfigField + for i := 0; i < t.NumField(); i++ { + field := t.Field(i) + value := v.Field(i) + + switch value.Kind() { + default: + desc := field.Tag.Get("desc") + env, ok := field.Tag.Lookup("env") + if !ok { + continue + } + v := fmt.Sprintf("%v", value.Interface()) + fields = append(fields, ConfigField{Name: env, DefaultValue: v, Description: desc, Type: value.Type().Name()}) + case reflect.Struct: + fields = append(fields, GetAnnotatedVariables(value.Interface())...) + } + } + return fields +} From d9bf9203072214ae83e2a880529021849d47db83 Mon Sep 17 00:00:00 2001 From: David Christofas Date: Tue, 1 Mar 2022 16:35:08 +0100 Subject: [PATCH 04/19] remove config docs prototype --- accounts/cmd/helper/configdoc/main.go | 27 --------------- ocis-pkg/docs/config.go | 38 --------------------- thumbnails/cmd/helper/configdoc/main.go | 11 ------ thumbnails/cmd/helper/defaultconfig/main.go | 23 ------------- 4 files changed, 99 deletions(-) delete mode 100644 accounts/cmd/helper/configdoc/main.go delete mode 100644 ocis-pkg/docs/config.go delete mode 100644 thumbnails/cmd/helper/configdoc/main.go delete mode 100644 thumbnails/cmd/helper/defaultconfig/main.go diff --git a/accounts/cmd/helper/configdoc/main.go b/accounts/cmd/helper/configdoc/main.go deleted file mode 100644 index 4866993c29..0000000000 --- a/accounts/cmd/helper/configdoc/main.go +++ /dev/null @@ -1,27 +0,0 @@ -package main - -import ( - "io/ioutil" - "log" - "os" - - "text/template" - - "github.com/owncloud/ocis/accounts/pkg/config" - "github.com/owncloud/ocis/ocis-pkg/docs" -) - -func main() { - cfg := config.DefaultConfig() - fields := docs.Display(*cfg) - - content, err := ioutil.ReadFile("docs/templates/CONFIGURATION.tmpl") - if err != nil { - log.Fatal(err) - } - tpl := template.Must(template.New("").Parse(string(content))) - tpl.Execute(os.Stdout, fields) - // for _, f := range fields { - // fmt.Printf("%s %s = %v\t%s\n", f.Name, f.Type, f.DefaultValue, f.Description) - // } -} diff --git a/ocis-pkg/docs/config.go b/ocis-pkg/docs/config.go deleted file mode 100644 index c55ecde7f7..0000000000 --- a/ocis-pkg/docs/config.go +++ /dev/null @@ -1,38 +0,0 @@ -package docs - -import ( - "fmt" - "reflect" -) - -type ConfigField struct { - Name string - DefaultValue string - Type string - Description string -} - -func Display(s interface{}) []ConfigField { - t := reflect.TypeOf(s) - v := reflect.ValueOf(s) - - var fields []ConfigField - for i := 0; i < t.NumField(); i++ { - field := t.Field(i) - value := v.Field(i) - - switch value.Kind() { - default: - desc := field.Tag.Get("desc") - env, ok := field.Tag.Lookup("env") - if !ok { - continue - } - v := fmt.Sprintf("%v", value.Interface()) - fields = append(fields, ConfigField{Name: env, DefaultValue: v, Description: desc, Type: value.Type().Name()}) - case reflect.Struct: - fields = append(fields, Display(value.Interface())...) - } - } - return fields -} diff --git a/thumbnails/cmd/helper/configdoc/main.go b/thumbnails/cmd/helper/configdoc/main.go deleted file mode 100644 index 5b2de37007..0000000000 --- a/thumbnails/cmd/helper/configdoc/main.go +++ /dev/null @@ -1,11 +0,0 @@ -package main - -import ( - "github.com/owncloud/ocis/ocis-pkg/docs" - "github.com/owncloud/ocis/thumbnails/pkg/config" -) - -func main() { - cfg := config.DefaultConfig() - docs.Display(*cfg) -} diff --git a/thumbnails/cmd/helper/defaultconfig/main.go b/thumbnails/cmd/helper/defaultconfig/main.go deleted file mode 100644 index 1092497cb7..0000000000 --- a/thumbnails/cmd/helper/defaultconfig/main.go +++ /dev/null @@ -1,23 +0,0 @@ -package main - -import ( - "fmt" - - "github.com/owncloud/ocis/accounts/pkg/config" - "github.com/owncloud/ocis/accounts/pkg/config/parser" - "gopkg.in/yaml.v2" -) - -func main() { - - cfg := config.DefaultConfig() - - parser.EnsureDefaults(cfg) - parser.Sanitize(cfg) - - b, err := yaml.Marshal(cfg) - if err != nil { - return - } - fmt.Println(string(b)) -} From 017de20520a29d055a0db4b9667cdfde5a1a8a96 Mon Sep 17 00:00:00 2001 From: David Christofas Date: Tue, 1 Mar 2022 16:49:26 +0100 Subject: [PATCH 05/19] add config descriptions Co-Authored-By: Christian Richter --- accounts/pkg/config/config.go | 27 +++++++++++++-------------- accounts/pkg/config/grpc.go | 2 +- accounts/pkg/config/http.go | 6 +++--- accounts/pkg/config/log.go | 8 ++++---- accounts/pkg/config/tracing.go | 6 +++--- 5 files changed, 24 insertions(+), 25 deletions(-) diff --git a/accounts/pkg/config/config.go b/accounts/pkg/config/config.go index ba182fc34d..ff321826f8 100644 --- a/accounts/pkg/config/config.go +++ b/accounts/pkg/config/config.go @@ -33,38 +33,37 @@ type Config struct { // Asset defines the available asset configuration. type Asset struct { - Path string `env:"ACCOUNTS_ASSET_PATH"` + Path string `env:"ACCOUNTS_ASSET_PATH" desc:"The path to the ui assets."` } // TokenManager is the config for using the reva token manager type TokenManager struct { - JWTSecret string `env:"OCIS_JWT_SECRET;ACCOUNTS_JWT_SECRET"` + JWTSecret string `env:"OCIS_JWT_SECRET;ACCOUNTS_JWT_SECRET" desc:"The secret to mint jwt tokens."` } // Repo defines which storage implementation is to be used. type Repo struct { - Backend string `env:"ACCOUNTS_STORAGE_BACKEND"` + Backend string `env:"ACCOUNTS_STORAGE_BACKEND" desc:"Defines which storage implementation is to be used"` Disk Disk CS3 CS3 } // Disk is the local disk implementation of the storage. type Disk struct { - Path string `env:"ACCOUNTS_STORAGE_DISK_PATH"` + Path string `env:"ACCOUNTS_STORAGE_DISK_PATH" desc:"The path where the accounts data is stored."` } // CS3 is the cs3 implementation of the storage. type CS3 struct { - ProviderAddr string `env:"ACCOUNTS_STORAGE_CS3_PROVIDER_ADDR"` - JWTSecret string `env:"ACCOUNTS_STORAGE_CS3_JWT_SECRET"` + ProviderAddr string `env:"ACCOUNTS_STORAGE_CS3_PROVIDER_ADDR" desc:"The address to the storage provider."` } // ServiceUser defines the user required for EOS. type ServiceUser struct { - UUID string `env:"ACCOUNTS_SERVICE_USER_UUID"` - Username string `env:"ACCOUNTS_SERVICE_USER_USERNAME"` - UID int64 `env:"ACCOUNTS_SERVICE_USER_UID"` - GID int64 `env:"ACCOUNTS_SERVICE_USER_GID"` + UUID string `env:"ACCOUNTS_SERVICE_USER_UUID" desc:"The id of the accounts service user."` + Username string `env:"ACCOUNTS_SERVICE_USER_USERNAME" desc:"The username of the accounts service user."` + UID int64 `env:"ACCOUNTS_SERVICE_USER_UID" desc:"The uid of the accounts service user."` + GID int64 `env:"ACCOUNTS_SERVICE_USER_GID" desc:"The gid of the accounts service user."` } // Index defines config for indexes. @@ -75,12 +74,12 @@ type Index struct { // GIDBound defines a lower and upper bound. type GIDBound struct { - Lower int64 `env:"ACCOUNTS_GID_INDEX_LOWER_BOUND"` - Upper int64 `env:"ACCOUNTS_GID_INDEX_UPPER_BOUND"` + Lower int64 `env:"ACCOUNTS_GID_INDEX_LOWER_BOUND" desc:"The lowest possible gid value for the indexer."` + Upper int64 `env:"ACCOUNTS_GID_INDEX_UPPER_BOUND" desc:"The highest possible gid value for the indexer."` } // UIDBound defines a lower and upper bound. type UIDBound struct { - Lower int64 `env:"ACCOUNTS_UID_INDEX_LOWER_BOUND"` - Upper int64 `env:"ACCOUNTS_UID_INDEX_UPPER_BOUND"` + Lower int64 `env:"ACCOUNTS_UID_INDEX_LOWER_BOUND" desc:"The lowest possible uid value for the indexer."` + Upper int64 `env:"ACCOUNTS_UID_INDEX_UPPER_BOUND" desc:"The highest possible uid value for the indexer."` } diff --git a/accounts/pkg/config/grpc.go b/accounts/pkg/config/grpc.go index 55e66da118..29380f34f0 100644 --- a/accounts/pkg/config/grpc.go +++ b/accounts/pkg/config/grpc.go @@ -2,6 +2,6 @@ package config // GRPC defines the available grpc configuration. type GRPC struct { - Addr string `env:"ACCOUNTS_GRPC_ADDR"` + Addr string `env:"ACCOUNTS_GRPC_ADDR" desc:"The address of the grpc service."` Namespace string } diff --git a/accounts/pkg/config/http.go b/accounts/pkg/config/http.go index c5c2e4975b..3a59ea114f 100644 --- a/accounts/pkg/config/http.go +++ b/accounts/pkg/config/http.go @@ -2,10 +2,10 @@ package config // HTTP defines the available http configuration. type HTTP struct { - Addr string `env:"ACCOUNTS_HTTP_ADDR"` + Addr string `env:"ACCOUNTS_HTTP_ADDR" desc:"The address of the http service."` Namespace string - Root string `env:"ACCOUNTS_HTTP_ROOT"` - CacheTTL int `env:"ACCOUNTS_CACHE_TTL"` + Root string `env:"ACCOUNTS_HTTP_ROOT" desc:"The root path of the http service."` + CacheTTL int `env:"ACCOUNTS_CACHE_TTL" desc:"The cache time for the static assets."` CORS CORS } diff --git a/accounts/pkg/config/log.go b/accounts/pkg/config/log.go index 2d20d3005b..f4546fa608 100644 --- a/accounts/pkg/config/log.go +++ b/accounts/pkg/config/log.go @@ -2,8 +2,8 @@ package config // Log defines the available log configuration. type Log struct { - Level string `env:"OCIS_LOG_LEVEL;ACCOUNTS_LOG_LEVEL"` - Pretty bool `env:"OCIS_LOG_PRETTY;ACCOUNTS_LOG_PRETTY"` - Color bool `env:"OCIS_LOG_COLOR;ACCOUNTS_LOG_COLOR"` - File string `env:"OCIS_LOG_FILE;ACCOUNTS_LOG_FILE"` + Level string `env:"OCIS_LOG_LEVEL;ACCOUNTS_LOG_LEVEL" desc:"The log level."` + Pretty bool `env:"OCIS_LOG_PRETTY;ACCOUNTS_LOG_PRETTY" desc:"Activates pretty log output."` + Color bool `env:"OCIS_LOG_COLOR;ACCOUNTS_LOG_COLOR" desc:"Activates colorized log output."` + File string `env:"OCIS_LOG_FILE;ACCOUNTS_LOG_FILE" desc:"The target log file."` } diff --git a/accounts/pkg/config/tracing.go b/accounts/pkg/config/tracing.go index 9a72990858..8c8b1e0b70 100644 --- a/accounts/pkg/config/tracing.go +++ b/accounts/pkg/config/tracing.go @@ -2,8 +2,8 @@ package config // Tracing defines the available tracing configuration. type Tracing struct { - Enabled bool `env:"OCIS_TRACING_ENABLED;ACCOUNTS_TRACING_ENABLED"` + Enabled bool `env:"OCIS_TRACING_ENABLED;ACCOUNTS_TRACING_ENABLED" desc:"Activates tracing."` Type string `env:"OCIS_TRACING_TYPE;ACCOUNTS_TRACING_TYPE"` - Endpoint string `env:"OCIS_TRACING_ENDPOINT;ACCOUNTS_TRACING_ENDPOINT"` - Collector string `env:"OCIS_TRACING_COLLECTOR;ACCOUNTS_TRACING_COLLECTOR"` + Endpoint string `env:"OCIS_TRACING_ENDPOINT;ACCOUNTS_TRACING_ENDPOINT" desc:"The endpoint to the tracing collector."` + Collector string `env:"OCIS_TRACING_COLLECTOR;ACCOUNTS_TRACING_COLLECTOR" ` } From c53a9220967c5de24f2bb9ef16427bf807539829 Mon Sep 17 00:00:00 2001 From: David Christofas Date: Wed, 2 Mar 2022 12:16:34 +0100 Subject: [PATCH 06/19] include env config options in the docs Co-Authored-By: Christian Richter Co-Authored-By: Willy Kloucek --- docs/extensions/_includes/_index.md | 3 ++ .../_includes/accounts_configvars.md | 27 +++++++++++ .../extensions/_includes/glauth_configvars.md | 15 ++++++ .../_includes/graph-explorer_configvars.md | 14 ++++++ docs/extensions/_includes/graph_configvars.md | 36 ++++++++++++++ docs/extensions/_includes/idm_configvars.md | 13 +++++ docs/extensions/_includes/idp_configvars.md | 47 +++++++++++++++++++ docs/extensions/_includes/nats_configvars.md | 10 ++++ .../_includes/notifications_configvars.md | 17 +++++++ docs/extensions/_includes/ocs_configvars.md | 16 +++++++ docs/extensions/_includes/proxy_configvars.md | 27 +++++++++++ .../_includes/settings_configvars.md | 15 ++++++ docs/extensions/_includes/store_configvars.md | 10 ++++ .../_includes/thumbnails_configvars.md | 14 ++++++ docs/extensions/_includes/web_configvars.md | 24 ++++++++++ .../extensions/_includes/webdav_configvars.md | 13 +++++ docs/extensions/accounts/.gitignore | 1 - docs/extensions/accounts/configuration.md | 12 +++++ docs/extensions/glauth/.gitignore | 1 - docs/extensions/glauth/configuration.md | 12 +++++ docs/extensions/graph-explorer/.gitignore | 1 - .../graph-explorer/configuration.md | 12 +++++ docs/extensions/graph/.gitignore | 1 - docs/extensions/graph/configuration.md | 12 +++++ docs/extensions/idm/_index.md | 16 +++++++ docs/extensions/idm/configuration.md | 12 +++++ docs/extensions/idp/.gitignore | 1 - docs/extensions/idp/configuration.md | 12 +++++ docs/extensions/nats/_index.md | 16 +++++++ docs/extensions/nats/configuration.md | 12 +++++ docs/extensions/notifications/_index.md | 16 +++++++ .../extensions/notifications/configuration.md | 12 +++++ docs/extensions/ocs/.gitignore | 1 - docs/extensions/ocs/configuration.md | 12 +++++ docs/extensions/proxy/.gitignore | 1 - docs/extensions/proxy/configuration.md | 12 +++++ docs/extensions/settings/.gitignore | 1 - docs/extensions/settings/configuration.md | 12 +++++ docs/extensions/storage/.gitignore | 1 - docs/extensions/store/.gitignore | 1 - docs/extensions/store/configuration.md | 12 +++++ docs/extensions/thumbnails/.gitignore | 1 - docs/extensions/thumbnails/configuration.md | 12 +++++ docs/extensions/web/.gitignore | 1 - docs/extensions/web/configuration.md | 12 +++++ docs/extensions/webdav/.gitignore | 1 - docs/extensions/webdav/configuration.md | 12 +++++ docs/helpers/configenvextractor.go | 1 + docs/helpers/extractor.go.tmpl | 35 +++++++++----- docs/templates/CONFIGURATION.tmpl | 2 + 50 files changed, 554 insertions(+), 26 deletions(-) create mode 100644 docs/extensions/_includes/_index.md create mode 100644 docs/extensions/_includes/accounts_configvars.md create mode 100644 docs/extensions/_includes/glauth_configvars.md create mode 100644 docs/extensions/_includes/graph-explorer_configvars.md create mode 100644 docs/extensions/_includes/graph_configvars.md create mode 100644 docs/extensions/_includes/idm_configvars.md create mode 100644 docs/extensions/_includes/idp_configvars.md create mode 100644 docs/extensions/_includes/nats_configvars.md create mode 100644 docs/extensions/_includes/notifications_configvars.md create mode 100644 docs/extensions/_includes/ocs_configvars.md create mode 100644 docs/extensions/_includes/proxy_configvars.md create mode 100644 docs/extensions/_includes/settings_configvars.md create mode 100644 docs/extensions/_includes/store_configvars.md create mode 100644 docs/extensions/_includes/thumbnails_configvars.md create mode 100644 docs/extensions/_includes/web_configvars.md create mode 100644 docs/extensions/_includes/webdav_configvars.md create mode 100644 docs/extensions/accounts/configuration.md create mode 100644 docs/extensions/glauth/configuration.md create mode 100644 docs/extensions/graph-explorer/configuration.md create mode 100644 docs/extensions/graph/configuration.md create mode 100644 docs/extensions/idm/_index.md create mode 100644 docs/extensions/idm/configuration.md create mode 100644 docs/extensions/idp/configuration.md create mode 100644 docs/extensions/nats/_index.md create mode 100644 docs/extensions/nats/configuration.md create mode 100644 docs/extensions/notifications/_index.md create mode 100644 docs/extensions/notifications/configuration.md create mode 100644 docs/extensions/ocs/configuration.md create mode 100644 docs/extensions/proxy/configuration.md create mode 100644 docs/extensions/settings/configuration.md create mode 100644 docs/extensions/store/configuration.md create mode 100644 docs/extensions/thumbnails/configuration.md create mode 100644 docs/extensions/web/configuration.md create mode 100644 docs/extensions/webdav/configuration.md diff --git a/docs/extensions/_includes/_index.md b/docs/extensions/_includes/_index.md new file mode 100644 index 0000000000..b58ce0c82f --- /dev/null +++ b/docs/extensions/_includes/_index.md @@ -0,0 +1,3 @@ +--- +GeekdocHidden: true +--- \ No newline at end of file diff --git a/docs/extensions/_includes/accounts_configvars.md b/docs/extensions/_includes/accounts_configvars.md new file mode 100644 index 0000000000..9599bea405 --- /dev/null +++ b/docs/extensions/_includes/accounts_configvars.md @@ -0,0 +1,27 @@ +## Environment Variables + +| Name | Type | Default Value | Description | +|------|------|---------------|-------------| +| ACCOUNTS_DEBUG_ADDR | string | 127.0.0.1:9182 | | +| ACCOUNTS_DEBUG_TOKEN | string | | | +| ACCOUNTS_DEBUG_PPROF | bool | false | | +| ACCOUNTS_DEBUG_ZPAGES | bool | false | | +| ACCOUNTS_HTTP_ADDR | string | 127.0.0.1:9181 | The address of the http service.| +| ACCOUNTS_HTTP_ROOT | string | / | The root path of the http service.| +| ACCOUNTS_CACHE_TTL | int | 604800 | The cache time for the static assets.| +| ACCOUNTS_GRPC_ADDR | string | 127.0.0.1:9180 | The address of the grpc service.| +| OCIS_JWT_SECRET;ACCOUNTS_JWT_SECRET | string | Pive-Fumkiu4 | The secret to mint jwt tokens.| +| ACCOUNTS_ASSET_PATH | string | | The path to the ui assets.| +| ACCOUNTS_STORAGE_BACKEND | string | CS3 | Defines which storage implementation is to be used| +| ACCOUNTS_STORAGE_DISK_PATH | string | ~/.ocis/accounts | The path where the accounts data is stored.| +| ACCOUNTS_STORAGE_CS3_PROVIDER_ADDR | string | localhost:9215 | The address to the storage provider.| +| ACCOUNTS_UID_INDEX_LOWER_BOUND | int64 | 0 | The lowest possible uid value for the indexer.| +| ACCOUNTS_UID_INDEX_UPPER_BOUND | int64 | 1000 | The highest possible uid value for the indexer.| +| ACCOUNTS_GID_INDEX_LOWER_BOUND | int64 | 0 | The lowest possible gid value for the indexer.| +| ACCOUNTS_GID_INDEX_UPPER_BOUND | int64 | 1000 | The highest possible gid value for the indexer.| +| ACCOUNTS_SERVICE_USER_UUID | string | 95cb8724-03b2-11eb-a0a6-c33ef8ef53ad | The id of the accounts service user.| +| ACCOUNTS_SERVICE_USER_USERNAME | string | | The username of the accounts service user.| +| ACCOUNTS_SERVICE_USER_UID | int64 | 0 | The uid of the accounts service user.| +| ACCOUNTS_SERVICE_USER_GID | int64 | 0 | The gid of the accounts service user.| +| ACCOUNTS_HASH_DIFFICULTY | int | 11 | The hash difficulty makes sure that validating a password takes at least a certain amount of time.| +| ACCOUNTS_DEMO_USERS_AND_GROUPS | bool | true | If this flag is set the service will setup the demo users and groups.| \ No newline at end of file diff --git a/docs/extensions/_includes/glauth_configvars.md b/docs/extensions/_includes/glauth_configvars.md new file mode 100644 index 0000000000..9211ff0dc3 --- /dev/null +++ b/docs/extensions/_includes/glauth_configvars.md @@ -0,0 +1,15 @@ +## Environment Variables + +| Name | Type | Default Value | Description | +|------|------|---------------|-------------| +| GLAUTH_DEBUG_ADDR | string | 127.0.0.1:9129 | | +| GLAUTH_DEBUG_TOKEN | string | | | +| GLAUTH_DEBUG_PPROF | bool | false | | +| GLAUTH_DEBUG_ZPAGES | bool | false | | +| GLAUTH_LDAP_ENABLED | bool | true | | +| GLAUTH_LDAP_ADDR | string | 127.0.0.1:9125 | | +| GLAUTH_LDAPS_ENABLED | bool | true | | +| GLAUTH_LDAPS_ADDR | string | 127.0.0.1:9126 | | +| GLAUTH_LDAPS_CERT | string | ~/.ocis/ldap/ldap.crt | | +| GLAUTH_LDAPS_KEY | string | ~/.ocis/ldap/ldap.key | | +| GLAUTH_ROLE_BUNDLE_ID | string | 71881883-1768-46bd-a24d-a356a2afdf7f | | \ No newline at end of file diff --git a/docs/extensions/_includes/graph-explorer_configvars.md b/docs/extensions/_includes/graph-explorer_configvars.md new file mode 100644 index 0000000000..ebfd855e93 --- /dev/null +++ b/docs/extensions/_includes/graph-explorer_configvars.md @@ -0,0 +1,14 @@ +## Environment Variables + +| Name | Type | Default Value | Description | +|------|------|---------------|-------------| +| GRAPH_EXPLORER_DEBUG_ADDR | string | 127.0.0.1:9136 | | +| GRAPH_EXPLORER_DEBUG_TOKEN | string | | | +| GRAPH_EXPLORER_DEBUG_PPROF | bool | false | | +| GRAPH_EXPLORER_DEBUG_ZPAGES | bool | false | | +| GRAPH_EXPLORER_HTTP_ADDR | string | 127.0.0.1:9135 | | +| GRAPH_EXPLORER_HTTP_ROOT | string | /graph-explorer | | +| GRAPH_EXPLORER_CLIENT_ID | string | ocis-explorer.js | | +| OCIS_URL;GRAPH_EXPLORER_ISSUER | string | https://localhost:9200 | | +| OCIS_URL;GRAPH_EXPLORER_GRAPH_URL_BASE | string | https://localhost:9200 | | +| GRAPH_EXPLORER_GRAPH_URL_PATH | string | /graph | | \ No newline at end of file diff --git a/docs/extensions/_includes/graph_configvars.md b/docs/extensions/_includes/graph_configvars.md new file mode 100644 index 0000000000..06036f1ec5 --- /dev/null +++ b/docs/extensions/_includes/graph_configvars.md @@ -0,0 +1,36 @@ +## Environment Variables + +| Name | Type | Default Value | Description | +|------|------|---------------|-------------| +| GRAPH_DEBUG_ADDR | string | 127.0.0.1:9124 | | +| GRAPH_DEBUG_TOKEN | string | | | +| GRAPH_DEBUG_PPROF | bool | false | | +| GRAPH_DEBUG_ZPAGES | bool | false | | +| GRAPH_HTTP_ADDR | string | 127.0.0.1:9120 | | +| GRAPH_HTTP_ROOT | string | /graph | | +| REVA_GATEWAY | string | 127.0.0.1:9142 | | +| OCIS_JWT_SECRET;OCS_JWT_SECRET | string | Pive-Fumkiu4 | | +| OCIS_URL;GRAPH_SPACES_WEBDAV_BASE | string | https://localhost:9200 | | +| GRAPH_SPACES_WEBDAV_PATH | string | /dav/spaces/ | | +| GRAPH_SPACES_DEFAULT_QUOTA | string | 1000000000 | | +| OCIS_INSECURE;GRAPH_SPACES_INSECURE | bool | false | | +| GRAPH_SPACES_EXTENDED_SPACE_PROPERTIES_CACHE_TTL | int | 0 | | +| GRAPH_IDENTITY_BACKEND | string | cs3 | | +| GRAPH_LDAP_URI | string | ldap://localhost:9125 | | +| OCIS_INSECURE;GRAPH_LDAP_INSECURE | bool | false | | +| GRAPH_LDAP_BIND_DN | string | | | +| GRAPH_LDAP_BIND_PASSWORD | string | | | +| GRAPH_LDAP_SERVER_UUID | bool | false | | +| GRAPH_LDAP_SERVER_WRITE_ENABLED | bool | false | | +| GRAPH_LDAP_USER_BASE_DN | string | ou=users,dc=ocis,dc=test | | +| GRAPH_LDAP_USER_SCOPE | string | sub | | +| GRAPH_LDAP_USER_FILTER | string | (objectClass=inetOrgPerson) | | +| GRAPH_LDAP_USER_EMAIL_ATTRIBUTE | string | mail | | +| GRAPH_LDAP_USER_DISPLAYNAME_ATTRIBUTE | string | displayName | | +| GRAPH_LDAP_USER_NAME_ATTRIBUTE | string | uid | | +| GRAPH_LDAP_USER_UID_ATTRIBUTE | string | owncloudUUID | | +| GRAPH_LDAP_GROUP_BASE_DN | string | ou=groups,dc=ocis,dc=test | | +| GRAPH_LDAP_GROUP_SEARCH_SCOPE | string | sub | | +| GRAPH_LDAP_GROUP_FILTER | string | (objectclass=groupOfNames) | | +| GRAPH_LDAP_GROUP_NAME_ATTRIBUTE | string | cn | | +| GRAPH_LDAP_GROUP_ID_ATTRIBUTE | string | owncloudUUID | | \ No newline at end of file diff --git a/docs/extensions/_includes/idm_configvars.md b/docs/extensions/_includes/idm_configvars.md new file mode 100644 index 0000000000..42f6c3c08b --- /dev/null +++ b/docs/extensions/_includes/idm_configvars.md @@ -0,0 +1,13 @@ +## Environment Variables + +| Name | Type | Default Value | Description | +|------|------|---------------|-------------| +| IDM_DEBUG_ADDR | string | | | +| IDM_DEBUG_TOKEN | string | | | +| IDM_DEBUG_PPROF | bool | false | | +| IDM_DEBUG_ZPAGES | bool | false | | +| IDM_LDAPS_ADDR | string | 127.0.0.1:9235 | | +| IDM_LDAPS_CERT | string | ~/.ocis/idm/ldap.crt | | +| IDM_LDAPS_KEY | string | ~/.ocis/idm/ldap.key | | +| IDM_DATABASE_PATH | string | ~/.ocis/idm/ocis.boltdb | | +| IDM_ADMIN_PASSWORD | string | admin | | \ No newline at end of file diff --git a/docs/extensions/_includes/idp_configvars.md b/docs/extensions/_includes/idp_configvars.md new file mode 100644 index 0000000000..ce0fc6261a --- /dev/null +++ b/docs/extensions/_includes/idp_configvars.md @@ -0,0 +1,47 @@ +## Environment Variables + +| Name | Type | Default Value | Description | +|------|------|---------------|-------------| +| IDP_DEBUG_ADDR | string | 127.0.0.1:9134 | | +| IDP_DEBUG_TOKEN | string | | | +| IDP_DEBUG_PPROF | bool | false | | +| IDP_DEBUG_ZPAGES | bool | false | | +| IDP_HTTP_ADDR | string | 127.0.0.1:9130 | | +| IDP_HTTP_ROOT | string | / | | +| IDP_TRANSPORT_TLS_CERT | string | ~/.ocis/idp/server.crt | | +| IDP_TRANSPORT_TLS_KEY | string | ~/.ocis/idp/server.key | | +| IDP_TLS | bool | false | | +| IDP_ASSET_PATH | string | | | +| OCIS_URL;IDP_ISS | string | https://localhost:9200 | | +| IDP_IDENTITY_MANAGER | string | ldap | | +| IDP_URI_BASE_PATH | string | | | +| IDP_SIGN_IN_URI | string | | | +| IDP_SIGN_OUT_URI | string | | | +| IDP_ENDPOINT_URI | string | | | +| IDP_ENDSESSION_ENDPOINT_URI | string | | | +| IDP_INSECURE | bool | false | | +| IDP_ALLOW_CLIENT_GUESTS | bool | false | | +| IDP_ALLOW_DYNAMIC_CLIENT_REGISTRATION | bool | false | | +| IDP_ENCRYPTION_SECRET | string | | | +| IDP_DISABLE_IDENTIFIER_WEBAPP | bool | true | | +| IDP_IDENTIFIER_CLIENT_PATH | string | ~/.ocis/idp | | +| IDP_IDENTIFIER_REGISTRATION_CONF | string | ~/.ocis/idp/identifier-registration.yaml | | +| IDP_IDENTIFIER_SCOPES_CONF | string | | | +| IDP_SIGNING_KID | string | | | +| IDP_SIGNING_METHOD | string | PS256 | | +| IDP_VALIDATION_KEYS_PATH | string | | | +| IDP_ACCESS_TOKEN_EXPIRATION | uint64 | 600 | | +| IDP_ID_TOKEN_EXPIRATION | uint64 | 3600 | | +| IDP_REFRESH_TOKEN_EXPIRATION | uint64 | 94608000 | | +| | uint64 | 0 | | +| IDP_LDAP_URI | string | ldap://localhost:9125 | | +| IDP_LDAP_BIND_DN | string | cn=idp,ou=sysusers,dc=ocis,dc=test | | +| IDP_LDAP_BIND_PASSWORD | string | idp | | +| IDP_LDAP_BASE_DN | string | ou=users,dc=ocis,dc=test | | +| IDP_LDAP_SCOPE | string | sub | | +| IDP_LDAP_LOGIN_ATTRIBUTE | string | cn | | +| IDP_LDAP_EMAIL_ATTRIBUTE | string | mail | | +| IDP_LDAP_NAME_ATTRIBUTE | string | sn | | +| IDP_LDAP_UUID_ATTRIBUTE | string | uid | | +| IDP_LDAP_UUID_ATTRIBUTE_TYPE | string | text | | +| IDP_LDAP_FILTER | string | (objectClass=posixaccount) | | \ No newline at end of file diff --git a/docs/extensions/_includes/nats_configvars.md b/docs/extensions/_includes/nats_configvars.md new file mode 100644 index 0000000000..4d4bccfddd --- /dev/null +++ b/docs/extensions/_includes/nats_configvars.md @@ -0,0 +1,10 @@ +## Environment Variables + +| Name | Type | Default Value | Description | +|------|------|---------------|-------------| +| NATS_DEBUG_ADDR | string | | | +| NATS_DEBUG_TOKEN | string | | | +| NATS_DEBUG_PPROF | bool | false | | +| NATS_DEBUG_ZPAGES | bool | false | | +| NATS_NATS_HOST | string | 127.0.0.1 | | +| NATS_NATS_PORT | int | 9233 | | \ No newline at end of file diff --git a/docs/extensions/_includes/notifications_configvars.md b/docs/extensions/_includes/notifications_configvars.md new file mode 100644 index 0000000000..f0d3adf8e2 --- /dev/null +++ b/docs/extensions/_includes/notifications_configvars.md @@ -0,0 +1,17 @@ +## Environment Variables + +| Name | Type | Default Value | Description | +|------|------|---------------|-------------| +| NOTIFICATIONS_DEBUG_ADDR | string | | | +| NOTIFICATIONS_DEBUG_TOKEN | string | | | +| NOTIFICATIONS_DEBUG_PPROF | bool | false | | +| NOTIFICATIONS_DEBUG_ZPAGES | bool | false | | +| NOTIFICATIONS_SMTP_HOST | string | 127.0.0.1 | | +| NOTIFICATIONS_SMTP_PORT | string | 1025 | | +| NOTIFICATIONS_SMTP_SENDER | string | god@example.com | | +| NOTIFICATIONS_SMTP_PASSWORD | string | godisdead | | +| NOTIFICATIONS_EVENTS_ENDPOINT | string | 127.0.0.1:9233 | | +| NOTIFICATIONS_EVENTS_CLUSTER | string | test-cluster | | +| NOTIFICATIONS_EVENTS_GROUP | string | notifications | | +| REVA_GATEWAY;NOTIFICATIONS_REVA_GATEWAY | string | 127.0.0.1:9142 | | +| OCIS_MACHINE_AUTH_API_KEY;NOTIFICATIONS_MACHINE_AUTH_API_KEY | string | change-me-please | | \ No newline at end of file diff --git a/docs/extensions/_includes/ocs_configvars.md b/docs/extensions/_includes/ocs_configvars.md new file mode 100644 index 0000000000..0c12be151b --- /dev/null +++ b/docs/extensions/_includes/ocs_configvars.md @@ -0,0 +1,16 @@ +## Environment Variables + +| Name | Type | Default Value | Description | +|------|------|---------------|-------------| +| OCS_DEBUG_ADDR | string | 127.0.0.1:9114 | | +| OCS_DEBUG_TOKEN | string | | | +| OCS_DEBUG_PPROF | bool | false | | +| OCS_DEBUG_ZPAGES | bool | false | | +| OCS_HTTP_ADDR | string | 127.0.0.1:9110 | | +| OCS_HTTP_ROOT | string | /ocs | | +| OCIS_JWT_SECRET;OCS_JWT_SECRET | string | Pive-Fumkiu4 | | +| REVA_GATEWAY | string | 127.0.0.1:9142 | | +| OCIS_URL;OCS_IDM_ADDRESS | string | https://localhost:9200 | | +| OCS_ACCOUNT_BACKEND_TYPE | string | accounts | | +| STORAGE_USERS_DRIVER;OCS_STORAGE_USERS_DRIVER | string | ocis | | +| OCIS_MACHINE_AUTH_API_KEY;OCS_MACHINE_AUTH_API_KEY | string | change-me-please | | \ No newline at end of file diff --git a/docs/extensions/_includes/proxy_configvars.md b/docs/extensions/_includes/proxy_configvars.md new file mode 100644 index 0000000000..a3be1d11aa --- /dev/null +++ b/docs/extensions/_includes/proxy_configvars.md @@ -0,0 +1,27 @@ +## Environment Variables + +| Name | Type | Default Value | Description | +|------|------|---------------|-------------| +| PROXY_DEBUG_ADDR | string | 127.0.0.1:9205 | | +| PROXY_DEBUG_TOKEN | string | | | +| PROXY_DEBUG_PPROF | bool | false | | +| PROXY_DEBUG_ZPAGES | bool | false | | +| PROXY_HTTP_ADDR | string | 0.0.0.0:9200 | | +| PROXY_HTTP_ROOT | string | / | | +| PROXY_TRANSPORT_TLS_CERT | string | ~/.ocis/proxy/server.crt | | +| PROXY_TRANSPORT_TLS_KEY | string | ~/.ocis/proxy/server.key | | +| PROXY_TLS | bool | true | | +| REVA_GATEWAY | string | 127.0.0.1:9142 | | +| OCIS_URL;PROXY_OIDC_ISSUER | string | https://localhost:9200 | | +| OCIS_INSECURE;PROXY_OIDC_INSECURE | bool | true | | +| PROXY_OIDC_USERINFO_CACHE_SIZE | int | 1024 | | +| PROXY_OIDC_USERINFO_CACHE_TTL | int | 10 | | +| OCIS_JWT_SECRET;PROXY_JWT_SECRET | string | Pive-Fumkiu4 | | +| PROXY_ENABLE_PRESIGNEDURLS | bool | true | | +| PROXY_ACCOUNT_BACKEND_TYPE | string | accounts | | +| PROXY_USER_OIDC_CLAIM | string | email | | +| PROXY_USER_CS3_CLAIM | string | mail | | +| OCIS_MACHINE_AUTH_API_KEY;PROXY_MACHINE_AUTH_API_KEY | string | change-me-please | | +| PROXY_AUTOPROVISION_ACCOUNTS | bool | false | | +| PROXY_ENABLE_BASIC_AUTH | bool | false | | +| PROXY_INSECURE_BACKENDS | bool | false | | \ No newline at end of file diff --git a/docs/extensions/_includes/settings_configvars.md b/docs/extensions/_includes/settings_configvars.md new file mode 100644 index 0000000000..c8136208e1 --- /dev/null +++ b/docs/extensions/_includes/settings_configvars.md @@ -0,0 +1,15 @@ +## Environment Variables + +| Name | Type | Default Value | Description | +|------|------|---------------|-------------| +| SETTINGS_DEBUG_ADDR | string | 127.0.0.1:9194 | | +| SETTINGS_DEBUG_TOKEN | string | | | +| SETTINGS_DEBUG_PPROF | bool | false | | +| SETTINGS_DEBUG_ZPAGES | bool | false | | +| SETTINGS_HTTP_ADDR | string | 127.0.0.1:9190 | | +| SETTINGS_HTTP_ROOT | string | / | | +| SETTINGS_CACHE_TTL | int | 604800 | | +| SETTINGS_GRPC_ADDR | string | 127.0.0.1:9191 | | +| SETTINGS_DATA_PATH | string | ~/.ocis/settings | | +| SETTINGS_ASSET_PATH | string | | | +| OCIS_JWT_SECRET;SETTINGS_JWT_SECRET | string | Pive-Fumkiu4 | | \ No newline at end of file diff --git a/docs/extensions/_includes/store_configvars.md b/docs/extensions/_includes/store_configvars.md new file mode 100644 index 0000000000..b0afbd7009 --- /dev/null +++ b/docs/extensions/_includes/store_configvars.md @@ -0,0 +1,10 @@ +## Environment Variables + +| Name | Type | Default Value | Description | +|------|------|---------------|-------------| +| STORE_DEBUG_ADDR | string | 127.0.0.1:9464 | | +| STORE_DEBUG_TOKEN | string | | | +| STORE_DEBUG_PPROF | bool | false | | +| STORE_DEBUG_ZPAGES | bool | false | | +| STORE_GRPC_ADDR | string | 127.0.0.1:9460 | | +| STORE_DATA_PATH | string | ~/.ocis/store | | \ No newline at end of file diff --git a/docs/extensions/_includes/thumbnails_configvars.md b/docs/extensions/_includes/thumbnails_configvars.md new file mode 100644 index 0000000000..7913769115 --- /dev/null +++ b/docs/extensions/_includes/thumbnails_configvars.md @@ -0,0 +1,14 @@ +## Environment Variables + +| Name | Type | Default Value | Description | +|------|------|---------------|-------------| +| THUMBNAILS_DEBUG_ADDR | string | 127.0.0.1:9189 | | +| THUMBNAILS_DEBUG_TOKEN | string | | | +| THUMBNAILS_DEBUG_PPROF | bool | false | | +| THUMBNAILS_DEBUG_ZPAGES | bool | false | | +| THUMBNAILS_GRPC_ADDR | string | 127.0.0.1:9185 | | +| THUMBNAILS_FILESYSTEMSTORAGE_ROOT | string | ~/.ocis/thumbnails | | +| OCIS_INSECURE;THUMBNAILS_WEBDAVSOURCE_INSECURE | bool | true | | +| OCIS_INSECURE;THUMBNAILS_CS3SOURCE_INSECURE | bool | false | | +| REVA_GATEWAY | string | 127.0.0.1:9142 | | +| THUMBNAILS_TXT_FONTMAP_FILE | string | | | \ No newline at end of file diff --git a/docs/extensions/_includes/web_configvars.md b/docs/extensions/_includes/web_configvars.md new file mode 100644 index 0000000000..7385069008 --- /dev/null +++ b/docs/extensions/_includes/web_configvars.md @@ -0,0 +1,24 @@ +## Environment Variables + +| Name | Type | Default Value | Description | +|------|------|---------------|-------------| +| WEB_DEBUG_ADDR | string | 127.0.0.1:9104 | | +| WEB_DEBUG_TOKEN | string | | | +| WEB_DEBUG_PPROF | bool | false | | +| WEB_DEBUG_ZPAGES | bool | false | | +| WEB_HTTP_ADDR | string | 127.0.0.1:9100 | | +| WEB_HTTP_ROOT | string | / | | +| WEB_CACHE_TTL | int | 604800 | | +| WEB_ASSET_PATH | string | | | +| WEB_UI_CONFIG | string | | | +| WEB_UI_PATH | string | | | +| OCIS_URL;WEB_UI_THEME_SERVER | string | https://localhost:9200 | | +| WEB_UI_THEME_PATH | string | /themes/owncloud/theme.json | | +| OCIS_URL;WEB_UI_CONFIG_SERVER | string | https://localhost:9200 | | +| | string | | | +| WEB_UI_CONFIG_VERSION | string | 0.1.0 | | +| WEB_OIDC_METADATA_URL | string | | | +| OCIS_URL;WEB_OIDC_AUTHORITY | string | https://localhost:9200 | | +| WEB_OIDC_CLIENT_ID | string | web | | +| WEB_OIDC_RESPONSE_TYPE | string | code | | +| WEB_OIDC_SCOPE | string | openid profile email | | \ No newline at end of file diff --git a/docs/extensions/_includes/webdav_configvars.md b/docs/extensions/_includes/webdav_configvars.md new file mode 100644 index 0000000000..a4767cfb06 --- /dev/null +++ b/docs/extensions/_includes/webdav_configvars.md @@ -0,0 +1,13 @@ +## Environment Variables + +| Name | Type | Default Value | Description | +|------|------|---------------|-------------| +| WEBDAV_DEBUG_ADDR | string | 127.0.0.1:9119 | | +| WEBDAV_DEBUG_TOKEN | string | | | +| WEBDAV_DEBUG_PPROF | bool | false | | +| WEBDAV_DEBUG_ZPAGES | bool | false | | +| WEBDAV_HTTP_ADDR | string | 127.0.0.1:9115 | | +| WEBDAV_HTTP_ROOT | string | / | | +| OCIS_URL;OCIS_PUBLIC_URL | string | https://127.0.0.1:9200 | | +| STORAGE_WEBDAV_NAMESPACE | string | /users/{{.Id.OpaqueId}} | | +| REVA_GATEWAY | string | 127.0.0.1:9142 | | \ No newline at end of file diff --git a/docs/extensions/accounts/.gitignore b/docs/extensions/accounts/.gitignore index 582a0f8475..63536ebfa2 100644 --- a/docs/extensions/accounts/.gitignore +++ b/docs/extensions/accounts/.gitignore @@ -1,2 +1 @@ -configuration.md grpc.md diff --git a/docs/extensions/accounts/configuration.md b/docs/extensions/accounts/configuration.md new file mode 100644 index 0000000000..584b5b1830 --- /dev/null +++ b/docs/extensions/accounts/configuration.md @@ -0,0 +1,12 @@ +--- +title: Service Configuration +date: 2018-05-02T00:00:00+00:00 +weight: 20 +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs/extensions/accounts +geekdocFilePath: configuration.md +geekdocCollapseSection: true +--- + + +{{< include file="extensions/_includes/accounts_configvars.md" >}} \ No newline at end of file diff --git a/docs/extensions/glauth/.gitignore b/docs/extensions/glauth/.gitignore index 582a0f8475..63536ebfa2 100644 --- a/docs/extensions/glauth/.gitignore +++ b/docs/extensions/glauth/.gitignore @@ -1,2 +1 @@ -configuration.md grpc.md diff --git a/docs/extensions/glauth/configuration.md b/docs/extensions/glauth/configuration.md new file mode 100644 index 0000000000..7132fe0e50 --- /dev/null +++ b/docs/extensions/glauth/configuration.md @@ -0,0 +1,12 @@ +--- +title: Service Configuration +date: 2018-05-02T00:00:00+00:00 +weight: 20 +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs/extensions/glauth +geekdocFilePath: configuration.md +geekdocCollapseSection: true +--- + + +{{< include file="extensions/_includes/glauth_configvars.md" >}} \ No newline at end of file diff --git a/docs/extensions/graph-explorer/.gitignore b/docs/extensions/graph-explorer/.gitignore index b0c8840e2f..e69de29bb2 100644 --- a/docs/extensions/graph-explorer/.gitignore +++ b/docs/extensions/graph-explorer/.gitignore @@ -1 +0,0 @@ -configuration.md diff --git a/docs/extensions/graph-explorer/configuration.md b/docs/extensions/graph-explorer/configuration.md new file mode 100644 index 0000000000..c27fe24673 --- /dev/null +++ b/docs/extensions/graph-explorer/configuration.md @@ -0,0 +1,12 @@ +--- +title: Service Configuration +date: 2018-05-02T00:00:00+00:00 +weight: 20 +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs/extensions/graph-explorer +geekdocFilePath: configuration.md +geekdocCollapseSection: true +--- + + +{{< include file="extensions/_includes/graph-explorer_configvars.md" >}} \ No newline at end of file diff --git a/docs/extensions/graph/.gitignore b/docs/extensions/graph/.gitignore index b0c8840e2f..e69de29bb2 100644 --- a/docs/extensions/graph/.gitignore +++ b/docs/extensions/graph/.gitignore @@ -1 +0,0 @@ -configuration.md diff --git a/docs/extensions/graph/configuration.md b/docs/extensions/graph/configuration.md new file mode 100644 index 0000000000..786dfb1339 --- /dev/null +++ b/docs/extensions/graph/configuration.md @@ -0,0 +1,12 @@ +--- +title: Service Configuration +date: 2018-05-02T00:00:00+00:00 +weight: 20 +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs/extensions/graph +geekdocFilePath: configuration.md +geekdocCollapseSection: true +--- + + +{{< include file="extensions/_includes/graph_configvars.md" >}} \ No newline at end of file diff --git a/docs/extensions/idm/_index.md b/docs/extensions/idm/_index.md new file mode 100644 index 0000000000..19306118e6 --- /dev/null +++ b/docs/extensions/idm/_index.md @@ -0,0 +1,16 @@ +--- +title: IDM +date: 2022-03-02T00:00:00+00:00 +weight: 20 +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs/extensions/idm +geekdocFilePath: _index.md +geekdocCollapseSection: true +--- + +## Abstract + + +## Table of Contents + +{{< toc-tree >}} diff --git a/docs/extensions/idm/configuration.md b/docs/extensions/idm/configuration.md new file mode 100644 index 0000000000..14200bcde0 --- /dev/null +++ b/docs/extensions/idm/configuration.md @@ -0,0 +1,12 @@ +--- +title: Service Configuration +date: 2018-05-02T00:00:00+00:00 +weight: 20 +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs/extensions/idm +geekdocFilePath: configuration.md +geekdocCollapseSection: true +--- + + +{{< include file="extensions/_includes/idm_configvars.md" >}} \ No newline at end of file diff --git a/docs/extensions/idp/.gitignore b/docs/extensions/idp/.gitignore index 582a0f8475..63536ebfa2 100644 --- a/docs/extensions/idp/.gitignore +++ b/docs/extensions/idp/.gitignore @@ -1,2 +1 @@ -configuration.md grpc.md diff --git a/docs/extensions/idp/configuration.md b/docs/extensions/idp/configuration.md new file mode 100644 index 0000000000..bc6011eac8 --- /dev/null +++ b/docs/extensions/idp/configuration.md @@ -0,0 +1,12 @@ +--- +title: Service Configuration +date: 2018-05-02T00:00:00+00:00 +weight: 20 +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs/extensions/idp +geekdocFilePath: configuration.md +geekdocCollapseSection: true +--- + + +{{< include file="extensions/_includes/idp_configvars.md" >}} \ No newline at end of file diff --git a/docs/extensions/nats/_index.md b/docs/extensions/nats/_index.md new file mode 100644 index 0000000000..bd785e2223 --- /dev/null +++ b/docs/extensions/nats/_index.md @@ -0,0 +1,16 @@ +--- +title: NATS +date: 2022-03-02T00:00:00+00:00 +weight: 20 +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs/extensions/nats +geekdocFilePath: _index.md +geekdocCollapseSection: true +--- + +## Abstract + + +## Table of Contents + +{{< toc-tree >}} \ No newline at end of file diff --git a/docs/extensions/nats/configuration.md b/docs/extensions/nats/configuration.md new file mode 100644 index 0000000000..20ba82f34b --- /dev/null +++ b/docs/extensions/nats/configuration.md @@ -0,0 +1,12 @@ +--- +title: Service Configuration +date: 2018-05-02T00:00:00+00:00 +weight: 20 +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs/extensions/nats +geekdocFilePath: configuration.md +geekdocCollapseSection: true +--- + + +{{< include file="extensions/_includes/nats_configvars.md" >}} \ No newline at end of file diff --git a/docs/extensions/notifications/_index.md b/docs/extensions/notifications/_index.md new file mode 100644 index 0000000000..c0ad0f7a59 --- /dev/null +++ b/docs/extensions/notifications/_index.md @@ -0,0 +1,16 @@ +--- +title: Notifications +date: 2022-03-02T00:00:00+00:00 +weight: 20 +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs/extensions/notifications +geekdocFilePath: _index.md +geekdocCollapseSection: true +--- + +## Abstract + + +## Table of Contents + +{{< toc-tree >}} \ No newline at end of file diff --git a/docs/extensions/notifications/configuration.md b/docs/extensions/notifications/configuration.md new file mode 100644 index 0000000000..7da0ba47b6 --- /dev/null +++ b/docs/extensions/notifications/configuration.md @@ -0,0 +1,12 @@ +--- +title: Service Configuration +date: 2018-05-02T00:00:00+00:00 +weight: 20 +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs/extensions/notifications +geekdocFilePath: configuration.md +geekdocCollapseSection: true +--- + + +{{< include file="extensions/_includes/notifications_configvars.md" >}} \ No newline at end of file diff --git a/docs/extensions/ocs/.gitignore b/docs/extensions/ocs/.gitignore index 582a0f8475..63536ebfa2 100644 --- a/docs/extensions/ocs/.gitignore +++ b/docs/extensions/ocs/.gitignore @@ -1,2 +1 @@ -configuration.md grpc.md diff --git a/docs/extensions/ocs/configuration.md b/docs/extensions/ocs/configuration.md new file mode 100644 index 0000000000..502fead64e --- /dev/null +++ b/docs/extensions/ocs/configuration.md @@ -0,0 +1,12 @@ +--- +title: Service Configuration +date: 2018-05-02T00:00:00+00:00 +weight: 20 +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs/extensions/ocs +geekdocFilePath: configuration.md +geekdocCollapseSection: true +--- + + +{{< include file="extensions/_includes/ocs_configvars.md" >}} \ No newline at end of file diff --git a/docs/extensions/proxy/.gitignore b/docs/extensions/proxy/.gitignore index 582a0f8475..63536ebfa2 100644 --- a/docs/extensions/proxy/.gitignore +++ b/docs/extensions/proxy/.gitignore @@ -1,2 +1 @@ -configuration.md grpc.md diff --git a/docs/extensions/proxy/configuration.md b/docs/extensions/proxy/configuration.md new file mode 100644 index 0000000000..785922489a --- /dev/null +++ b/docs/extensions/proxy/configuration.md @@ -0,0 +1,12 @@ +--- +title: Service Configuration +date: 2018-05-02T00:00:00+00:00 +weight: 20 +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs/extensions/proxy +geekdocFilePath: configuration.md +geekdocCollapseSection: true +--- + + +{{< include file="extensions/_includes/proxy_configvars.md" >}} \ No newline at end of file diff --git a/docs/extensions/settings/.gitignore b/docs/extensions/settings/.gitignore index 582a0f8475..63536ebfa2 100644 --- a/docs/extensions/settings/.gitignore +++ b/docs/extensions/settings/.gitignore @@ -1,2 +1 @@ -configuration.md grpc.md diff --git a/docs/extensions/settings/configuration.md b/docs/extensions/settings/configuration.md new file mode 100644 index 0000000000..b20e913a7f --- /dev/null +++ b/docs/extensions/settings/configuration.md @@ -0,0 +1,12 @@ +--- +title: Service Configuration +date: 2018-05-02T00:00:00+00:00 +weight: 20 +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs/extensions/settings +geekdocFilePath: configuration.md +geekdocCollapseSection: true +--- + + +{{< include file="extensions/_includes/settings_configvars.md" >}} \ No newline at end of file diff --git a/docs/extensions/storage/.gitignore b/docs/extensions/storage/.gitignore index 582a0f8475..63536ebfa2 100644 --- a/docs/extensions/storage/.gitignore +++ b/docs/extensions/storage/.gitignore @@ -1,2 +1 @@ -configuration.md grpc.md diff --git a/docs/extensions/store/.gitignore b/docs/extensions/store/.gitignore index 582a0f8475..63536ebfa2 100644 --- a/docs/extensions/store/.gitignore +++ b/docs/extensions/store/.gitignore @@ -1,2 +1 @@ -configuration.md grpc.md diff --git a/docs/extensions/store/configuration.md b/docs/extensions/store/configuration.md new file mode 100644 index 0000000000..a974e254af --- /dev/null +++ b/docs/extensions/store/configuration.md @@ -0,0 +1,12 @@ +--- +title: Service Configuration +date: 2018-05-02T00:00:00+00:00 +weight: 20 +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs/extensions/store +geekdocFilePath: configuration.md +geekdocCollapseSection: true +--- + + +{{< include file="extensions/_includes/store_configvars.md" >}} \ No newline at end of file diff --git a/docs/extensions/thumbnails/.gitignore b/docs/extensions/thumbnails/.gitignore index 582a0f8475..63536ebfa2 100644 --- a/docs/extensions/thumbnails/.gitignore +++ b/docs/extensions/thumbnails/.gitignore @@ -1,2 +1 @@ -configuration.md grpc.md diff --git a/docs/extensions/thumbnails/configuration.md b/docs/extensions/thumbnails/configuration.md new file mode 100644 index 0000000000..7b6e85bde5 --- /dev/null +++ b/docs/extensions/thumbnails/configuration.md @@ -0,0 +1,12 @@ +--- +title: Service Configuration +date: 2018-05-02T00:00:00+00:00 +weight: 20 +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs/extensions/thumbnails +geekdocFilePath: configuration.md +geekdocCollapseSection: true +--- + + +{{< include file="extensions/_includes/thumbnails_configvars.md" >}} \ No newline at end of file diff --git a/docs/extensions/web/.gitignore b/docs/extensions/web/.gitignore index 582a0f8475..63536ebfa2 100644 --- a/docs/extensions/web/.gitignore +++ b/docs/extensions/web/.gitignore @@ -1,2 +1 @@ -configuration.md grpc.md diff --git a/docs/extensions/web/configuration.md b/docs/extensions/web/configuration.md new file mode 100644 index 0000000000..d55237fd90 --- /dev/null +++ b/docs/extensions/web/configuration.md @@ -0,0 +1,12 @@ +--- +title: Service Configuration +date: 2018-05-02T00:00:00+00:00 +weight: 20 +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs/extensions/web +geekdocFilePath: configuration.md +geekdocCollapseSection: true +--- + + +{{< include file="extensions/_includes/web_configvars.md" >}} \ No newline at end of file diff --git a/docs/extensions/webdav/.gitignore b/docs/extensions/webdav/.gitignore index 582a0f8475..63536ebfa2 100644 --- a/docs/extensions/webdav/.gitignore +++ b/docs/extensions/webdav/.gitignore @@ -1,2 +1 @@ -configuration.md grpc.md diff --git a/docs/extensions/webdav/configuration.md b/docs/extensions/webdav/configuration.md new file mode 100644 index 0000000000..7ae4a04860 --- /dev/null +++ b/docs/extensions/webdav/configuration.md @@ -0,0 +1,12 @@ +--- +title: Service Configuration +date: 2018-05-02T00:00:00+00:00 +weight: 20 +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs/extensions/webdav +geekdocFilePath: configuration.md +geekdocCollapseSection: true +--- + + +{{< 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 c9b9a401f8..b932d318f3 100644 --- a/docs/helpers/configenvextractor.go +++ b/docs/helpers/configenvextractor.go @@ -35,6 +35,7 @@ func main() { } tpl.Execute(runner, paths) os.Chdir("output") + os.Setenv("OCIS_BASE_DATA_PATH", "~/.ocis") out, err := exec.Command("go", "run", "runner.go").Output() if err != nil { log.Fatal(err) diff --git a/docs/helpers/extractor.go.tmpl b/docs/helpers/extractor.go.tmpl index 1f9ea96981..b07ee1fa08 100644 --- a/docs/helpers/extractor.go.tmpl +++ b/docs/helpers/extractor.go.tmpl @@ -5,8 +5,9 @@ import ( "io/ioutil" "log" "os" + "path/filepath" "reflect" - "strings" + "strings" "text/template" {{- range $key, $value := .}} @@ -32,19 +33,27 @@ replacer := strings.NewReplacer( var fields []ConfigField var targetFile *os.File tpl := template.Must(template.New("").Parse(string(content))) -{{ range $key, $value := .}} - fields = GetAnnotatedVariables(*pkg{{ $key }}.DefaultConfig()) - if len(fields) > 0 { - targetFolder := "../../../docs/extensions/" + replacer.Replace("{{ $value }}") - os.MkdirAll(targetFolder, 0700) - targetFile, err = os.Create(targetFolder + "/configvars.md") - if err != nil { - log.Fatal(err) - } - tpl.Execute(targetFile, fields) - targetFile.Close() + +m := map[string]interface{}{ +{{- range $key, $value := .}} + "{{$value}}": *pkg{{$key}}.DefaultConfig(), +{{- end }} +} + + targetFolder := "../../../docs/extensions/_includes/" + for pkg, conf := range m { + fields = GetAnnotatedVariables(conf) + if len(fields) > 0 { + targetFile, err = os.Create(filepath.Join(targetFolder, replacer.Replace(pkg) + "_configvars.md")) + if err != nil { + log.Fatalf("Failed to create target file: %s", err) + } + defer targetFile.Close() + if err := tpl.Execute(targetFile, fields); err != nil { + log.Fatalf("Failed to execute template: %s", err) + } + } } -{{ end }} } func GetAnnotatedVariables(s interface{}) []ConfigField { diff --git a/docs/templates/CONFIGURATION.tmpl b/docs/templates/CONFIGURATION.tmpl index da7a6ec8ea..ffa87ae79d 100644 --- a/docs/templates/CONFIGURATION.tmpl +++ b/docs/templates/CONFIGURATION.tmpl @@ -1,3 +1,5 @@ +## Environment Variables + | Name | Type | Default Value | Description | |------|------|---------------|-------------| {{- range .}} From f6656fa6ac66cdc5a67639caedbdb45af283962d Mon Sep 17 00:00:00 2001 From: David Christofas Date: Wed, 2 Mar 2022 14:40:15 +0100 Subject: [PATCH 07/19] include config env extractor to docs-generate step --- docs/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/Makefile b/docs/Makefile index 66ec7e7b93..12121bd84e 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -8,6 +8,7 @@ help: .PHONY: docs-generate docs-generate: ## run docs-generate for all oCIS extensions + @pushd helpers && go run configenvextractor.go; popd @$(MAKE) --no-print-directory -C ../ docs-generate .PHONY: docs-init From 15e1139b8d0a396931507023ddf1dbd2f3a04709 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Wed, 2 Mar 2022 15:11:12 +0100 Subject: [PATCH 08/19] revert ocisConfig changes --- accounts/pkg/config/config.go | 60 +++++++++++++++++------------------ accounts/pkg/config/debug.go | 8 ++--- accounts/pkg/config/grpc.go | 2 +- accounts/pkg/config/http.go | 6 ++-- accounts/pkg/config/log.go | 8 ++--- 5 files changed, 42 insertions(+), 42 deletions(-) diff --git a/accounts/pkg/config/config.go b/accounts/pkg/config/config.go index ff321826f8..78d76ba405 100644 --- a/accounts/pkg/config/config.go +++ b/accounts/pkg/config/config.go @@ -8,78 +8,78 @@ import ( // Config combines all available configuration parts. type Config struct { - *shared.Commons `yaml:"-"` + *shared.Commons - Service Service `yaml:"-"` + Service Service - Tracing *Tracing - Log *Log - Debug Debug + Tracing *Tracing `ocisConfig:"tracing"` + Log *Log `ocisConfig:"log"` + Debug Debug `ocisConfig:"debug"` - HTTP HTTP - GRPC GRPC + HTTP HTTP `ocisConfig:"http"` + GRPC GRPC `ocisConfig:"grpc"` - TokenManager TokenManager + TokenManager TokenManager `ocisConfig:"token_manager"` - Asset Asset - Repo Repo - Index Index - ServiceUser ServiceUser - HashDifficulty int `env:"ACCOUNTS_HASH_DIFFICULTY" desc:"The hash difficulty makes sure that validating a password takes at least a certain amount of time."` - DemoUsersAndGroups bool `env:"ACCOUNTS_DEMO_USERS_AND_GROUPS" desc:"If this flag is set the service will setup the demo users and groups."` + Asset Asset `ocisConfig:"asset"` + Repo Repo `ocisConfig:"repo"` + Index Index `ocisConfig:"index"` + ServiceUser ServiceUser `ocisConfig:"service_user"` + 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 `yaml:"-"` + Context context.Context } // Asset defines the available asset configuration. type Asset struct { - Path string `env:"ACCOUNTS_ASSET_PATH" desc:"The path to the ui assets."` + Path string `ocisConfig:"path" env:"ACCOUNTS_ASSET_PATH" desc:"The path to the ui assets."` } // TokenManager is the config for using the reva token manager type TokenManager struct { - JWTSecret string `env:"OCIS_JWT_SECRET;ACCOUNTS_JWT_SECRET" desc:"The secret to mint jwt tokens."` + JWTSecret string `ocisConfig:"jwt_secret" env:"OCIS_JWT_SECRET;ACCOUNTS_JWT_SECRET" desc:"The secret to mint jwt tokens."` } // Repo defines which storage implementation is to be used. type Repo struct { - Backend string `env:"ACCOUNTS_STORAGE_BACKEND" desc:"Defines which storage implementation is to be used"` + Backend string `ocisConfig:"backend" env:"ACCOUNTS_STORAGE_BACKEND" desc:"Defines which storage implementation is to be used"` Disk Disk CS3 CS3 } // Disk is the local disk implementation of the storage. type Disk struct { - Path string `env:"ACCOUNTS_STORAGE_DISK_PATH" desc:"The path where the accounts data is stored."` + Path string `ocisConfig:"path" env:"ACCOUNTS_STORAGE_DISK_PATH" desc:"The path where the accounts data is stored."` } // CS3 is the cs3 implementation of the storage. type CS3 struct { - ProviderAddr string `env:"ACCOUNTS_STORAGE_CS3_PROVIDER_ADDR" desc:"The address to the storage provider."` + ProviderAddr string `ocisConfig:"provider_addr" env:"ACCOUNTS_STORAGE_CS3_PROVIDER_ADDR" desc:"The address to the storage provider."` } // ServiceUser defines the user required for EOS. type ServiceUser struct { - UUID string `env:"ACCOUNTS_SERVICE_USER_UUID" desc:"The id of the accounts service user."` - Username string `env:"ACCOUNTS_SERVICE_USER_USERNAME" desc:"The username of the accounts service user."` - UID int64 `env:"ACCOUNTS_SERVICE_USER_UID" desc:"The uid of the accounts service user."` - GID int64 `env:"ACCOUNTS_SERVICE_USER_GID" desc:"The gid of the accounts service user."` + UUID string `ocisConfig:"uuid" env:"ACCOUNTS_SERVICE_USER_UUID" desc:"The id of the accounts service user."` + Username string `ocisConfig:"username" env:"ACCOUNTS_SERVICE_USER_USERNAME" desc:"The username of the accounts service user."` + UID int64 `ocisConfig:"uid" env:"ACCOUNTS_SERVICE_USER_UID" desc:"The uid of the accounts service user."` + GID int64 `ocisConfig:"gid" env:"ACCOUNTS_SERVICE_USER_GID" desc:"The gid of the accounts service user."` } // Index defines config for indexes. type Index struct { - UID UIDBound - GID GIDBound + UID UIDBound `ocisConfig:"uid"` + GID GIDBound `ocisConfig:"gid"` } // GIDBound defines a lower and upper bound. type GIDBound struct { - Lower int64 `env:"ACCOUNTS_GID_INDEX_LOWER_BOUND" desc:"The lowest possible gid value for the indexer."` - Upper int64 `env:"ACCOUNTS_GID_INDEX_UPPER_BOUND" desc:"The highest possible gid value for the indexer."` + Lower int64 `ocisConfig:"lower" env:"ACCOUNTS_GID_INDEX_LOWER_BOUND" desc:"The lowest possible gid value for the indexer."` + Upper int64 `ocisConfig:"upper" env:"ACCOUNTS_GID_INDEX_UPPER_BOUND" desc:"The highest possible gid value for the indexer."` } // UIDBound defines a lower and upper bound. type UIDBound struct { - Lower int64 `env:"ACCOUNTS_UID_INDEX_LOWER_BOUND" desc:"The lowest possible uid value for the indexer."` - Upper int64 `env:"ACCOUNTS_UID_INDEX_UPPER_BOUND" desc:"The highest possible uid value for the indexer."` + Lower int64 `ocisConfig:"lower" env:"ACCOUNTS_UID_INDEX_LOWER_BOUND" desc:"The lowest possible uid value for the indexer."` + Upper int64 `ocisConfig:"upper" env:"ACCOUNTS_UID_INDEX_UPPER_BOUND" desc:"The highest possible uid value for the indexer."` } diff --git a/accounts/pkg/config/debug.go b/accounts/pkg/config/debug.go index fd90aad7ab..539b8fabab 100644 --- a/accounts/pkg/config/debug.go +++ b/accounts/pkg/config/debug.go @@ -2,8 +2,8 @@ package config // Debug defines the available debug configuration. type Debug struct { - Addr string `env:"ACCOUNTS_DEBUG_ADDR"` - Token string `env:"ACCOUNTS_DEBUG_TOKEN"` - Pprof bool `env:"ACCOUNTS_DEBUG_PPROF"` - Zpages bool `env:"ACCOUNTS_DEBUG_ZPAGES"` + Addr string `ocisConfig:"addr" env:"ACCOUNTS_DEBUG_ADDR"` + Token string `ocisConfig:"token" env:"ACCOUNTS_DEBUG_TOKEN"` + Pprof bool `ocisConfig:"pprof" env:"ACCOUNTS_DEBUG_PPROF"` + Zpages bool `ocisConfig:"zpages" env:"ACCOUNTS_DEBUG_ZPAGES"` } diff --git a/accounts/pkg/config/grpc.go b/accounts/pkg/config/grpc.go index 29380f34f0..a89e0ca005 100644 --- a/accounts/pkg/config/grpc.go +++ b/accounts/pkg/config/grpc.go @@ -2,6 +2,6 @@ package config // GRPC defines the available grpc configuration. type GRPC struct { - Addr string `env:"ACCOUNTS_GRPC_ADDR" desc:"The address of the grpc service."` + Addr string `ocisConfig:"addr" env:"ACCOUNTS_GRPC_ADDR" desc:"The address of the grpc service."` Namespace string } diff --git a/accounts/pkg/config/http.go b/accounts/pkg/config/http.go index 3a59ea114f..81971eba11 100644 --- a/accounts/pkg/config/http.go +++ b/accounts/pkg/config/http.go @@ -2,10 +2,10 @@ package config // HTTP defines the available http configuration. type HTTP struct { - Addr string `env:"ACCOUNTS_HTTP_ADDR" desc:"The address of the http service."` + Addr string `ocisConfig:"addr" env:"ACCOUNTS_HTTP_ADDR" desc:"The address of the http service."` Namespace string - Root string `env:"ACCOUNTS_HTTP_ROOT" desc:"The root path of the http service."` - CacheTTL int `env:"ACCOUNTS_CACHE_TTL" desc:"The cache time for the static assets."` + 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 } diff --git a/accounts/pkg/config/log.go b/accounts/pkg/config/log.go index f4546fa608..f9548ed777 100644 --- a/accounts/pkg/config/log.go +++ b/accounts/pkg/config/log.go @@ -2,8 +2,8 @@ package config // Log defines the available log configuration. type Log struct { - Level string `env:"OCIS_LOG_LEVEL;ACCOUNTS_LOG_LEVEL" desc:"The log level."` - Pretty bool `env:"OCIS_LOG_PRETTY;ACCOUNTS_LOG_PRETTY" desc:"Activates pretty log output."` - Color bool `env:"OCIS_LOG_COLOR;ACCOUNTS_LOG_COLOR" desc:"Activates colorized log output."` - File string `env:"OCIS_LOG_FILE;ACCOUNTS_LOG_FILE" desc:"The target log file."` + Level string `ocisConfig:"level" env:"OCIS_LOG_LEVEL;ACCOUNTS_LOG_LEVEL" desc:"The log level."` + Pretty bool `ocisConfig:"pretty" env:"OCIS_LOG_PRETTY;ACCOUNTS_LOG_PRETTY" desc:"Activates pretty log output."` + Color bool `ocisConfig:"color" env:"OCIS_LOG_COLOR;ACCOUNTS_LOG_COLOR" desc:"Activates colorized log output."` + File string `ocisConfig:"file" env:"OCIS_LOG_FILE;ACCOUNTS_LOG_FILE" desc:"The target log file."` } From 63818e0fa472851dabe678c6b44a9d6e8a307ce4 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Wed, 2 Mar 2022 15:12:34 +0100 Subject: [PATCH 09/19] revert ocisConfig changes part 2 --- accounts/pkg/config/http.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/accounts/pkg/config/http.go b/accounts/pkg/config/http.go index 81971eba11..6a8828ea9a 100644 --- a/accounts/pkg/config/http.go +++ b/accounts/pkg/config/http.go @@ -11,8 +11,8 @@ type HTTP struct { // CORS defines the available cors configuration. type CORS struct { - AllowedOrigins []string - AllowedMethods []string - AllowedHeaders []string - AllowCredentials bool + AllowedOrigins []string `ocisConfig:"allowed_origins"` + AllowedMethods []string `ocisConfig:"allowed_methods"` + AllowedHeaders []string `ocisConfig:"allowed_headers"` + AllowCredentials bool `ocisConfig:"allowed_credentials"` } From 4f18908016ca5494c1d1d57bd19e82d1fa4f86cc Mon Sep 17 00:00:00 2001 From: Christian Richter Date: Wed, 2 Mar 2022 15:12:55 +0100 Subject: [PATCH 10/19] Add output to configenvextractor --- docs/helpers/configenvextractor.go | 6 +++++- docs/helpers/extractor.go.tmpl | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/helpers/configenvextractor.go b/docs/helpers/configenvextractor.go index b932d318f3..bc504fc32e 100644 --- a/docs/helpers/configenvextractor.go +++ b/docs/helpers/configenvextractor.go @@ -12,6 +12,7 @@ import ( ) func main() { + fmt.Println("Getting relevant packages") paths, err := filepath.Glob("../../*/pkg/config/defaultconfig.go") if err != nil { log.Fatal(err) @@ -27,6 +28,7 @@ func main() { if err != nil { log.Fatal(err) } + fmt.Println("Generating intermediate go code") tpl := template.Must(template.New("").Parse(string(content))) os.Mkdir("output", 0700) runner, err := os.Create("output/runner.go") @@ -34,13 +36,15 @@ func main() { log.Fatal(err) } tpl.Execute(runner, paths) + fmt.Println("Running intermediate go code") os.Chdir("output") os.Setenv("OCIS_BASE_DATA_PATH", "~/.ocis") out, err := exec.Command("go", "run", "runner.go").Output() if err != nil { log.Fatal(err) } + fmt.Println(string(out)) + fmt.Println("Cleaning up") os.Chdir("../") os.RemoveAll("output") - fmt.Println(string(out)) } diff --git a/docs/helpers/extractor.go.tmpl b/docs/helpers/extractor.go.tmpl index b07ee1fa08..3503ea2274 100644 --- a/docs/helpers/extractor.go.tmpl +++ b/docs/helpers/extractor.go.tmpl @@ -22,6 +22,7 @@ type ConfigField struct { } func main() { +fmt.Println("Generating documentation for environment variables:") content, err := ioutil.ReadFile("../../../docs/templates/CONFIGURATION.tmpl") if err != nil { log.Fatal(err) @@ -44,6 +45,7 @@ m := map[string]interface{}{ for pkg, conf := range m { fields = GetAnnotatedVariables(conf) if len(fields) > 0 { + fmt.Printf("... %s\n", pkg) targetFile, err = os.Create(filepath.Join(targetFolder, replacer.Replace(pkg) + "_configvars.md")) if err != nil { log.Fatalf("Failed to create target file: %s", err) @@ -54,6 +56,7 @@ m := map[string]interface{}{ } } } + fmt.Println("done") } func GetAnnotatedVariables(s interface{}) []ConfigField { From 1db1c7b6781720c4ef2e1dd7694dfe2a0eadf880 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Wed, 2 Mar 2022 15:16:44 +0100 Subject: [PATCH 11/19] remove generated configvars files from repo --- docs/extensions/_includes/.gitignore | 1 + .../_includes/accounts_configvars.md | 27 ----------- .../extensions/_includes/glauth_configvars.md | 15 ------ .../_includes/graph-explorer_configvars.md | 14 ------ docs/extensions/_includes/graph_configvars.md | 36 -------------- docs/extensions/_includes/idm_configvars.md | 13 ----- docs/extensions/_includes/idp_configvars.md | 47 ------------------- docs/extensions/_includes/nats_configvars.md | 10 ---- .../_includes/notifications_configvars.md | 17 ------- docs/extensions/_includes/ocs_configvars.md | 16 ------- docs/extensions/_includes/proxy_configvars.md | 27 ----------- .../_includes/settings_configvars.md | 15 ------ docs/extensions/_includes/store_configvars.md | 10 ---- .../_includes/thumbnails_configvars.md | 14 ------ docs/extensions/_includes/web_configvars.md | 24 ---------- .../extensions/_includes/webdav_configvars.md | 13 ----- 16 files changed, 1 insertion(+), 298 deletions(-) create mode 100644 docs/extensions/_includes/.gitignore delete mode 100644 docs/extensions/_includes/accounts_configvars.md delete mode 100644 docs/extensions/_includes/glauth_configvars.md delete mode 100644 docs/extensions/_includes/graph-explorer_configvars.md delete mode 100644 docs/extensions/_includes/graph_configvars.md delete mode 100644 docs/extensions/_includes/idm_configvars.md delete mode 100644 docs/extensions/_includes/idp_configvars.md delete mode 100644 docs/extensions/_includes/nats_configvars.md delete mode 100644 docs/extensions/_includes/notifications_configvars.md delete mode 100644 docs/extensions/_includes/ocs_configvars.md delete mode 100644 docs/extensions/_includes/proxy_configvars.md delete mode 100644 docs/extensions/_includes/settings_configvars.md delete mode 100644 docs/extensions/_includes/store_configvars.md delete mode 100644 docs/extensions/_includes/thumbnails_configvars.md delete mode 100644 docs/extensions/_includes/web_configvars.md delete mode 100644 docs/extensions/_includes/webdav_configvars.md diff --git a/docs/extensions/_includes/.gitignore b/docs/extensions/_includes/.gitignore new file mode 100644 index 0000000000..a463a88c51 --- /dev/null +++ b/docs/extensions/_includes/.gitignore @@ -0,0 +1 @@ +*_configvars.md diff --git a/docs/extensions/_includes/accounts_configvars.md b/docs/extensions/_includes/accounts_configvars.md deleted file mode 100644 index 9599bea405..0000000000 --- a/docs/extensions/_includes/accounts_configvars.md +++ /dev/null @@ -1,27 +0,0 @@ -## Environment Variables - -| Name | Type | Default Value | Description | -|------|------|---------------|-------------| -| ACCOUNTS_DEBUG_ADDR | string | 127.0.0.1:9182 | | -| ACCOUNTS_DEBUG_TOKEN | string | | | -| ACCOUNTS_DEBUG_PPROF | bool | false | | -| ACCOUNTS_DEBUG_ZPAGES | bool | false | | -| ACCOUNTS_HTTP_ADDR | string | 127.0.0.1:9181 | The address of the http service.| -| ACCOUNTS_HTTP_ROOT | string | / | The root path of the http service.| -| ACCOUNTS_CACHE_TTL | int | 604800 | The cache time for the static assets.| -| ACCOUNTS_GRPC_ADDR | string | 127.0.0.1:9180 | The address of the grpc service.| -| OCIS_JWT_SECRET;ACCOUNTS_JWT_SECRET | string | Pive-Fumkiu4 | The secret to mint jwt tokens.| -| ACCOUNTS_ASSET_PATH | string | | The path to the ui assets.| -| ACCOUNTS_STORAGE_BACKEND | string | CS3 | Defines which storage implementation is to be used| -| ACCOUNTS_STORAGE_DISK_PATH | string | ~/.ocis/accounts | The path where the accounts data is stored.| -| ACCOUNTS_STORAGE_CS3_PROVIDER_ADDR | string | localhost:9215 | The address to the storage provider.| -| ACCOUNTS_UID_INDEX_LOWER_BOUND | int64 | 0 | The lowest possible uid value for the indexer.| -| ACCOUNTS_UID_INDEX_UPPER_BOUND | int64 | 1000 | The highest possible uid value for the indexer.| -| ACCOUNTS_GID_INDEX_LOWER_BOUND | int64 | 0 | The lowest possible gid value for the indexer.| -| ACCOUNTS_GID_INDEX_UPPER_BOUND | int64 | 1000 | The highest possible gid value for the indexer.| -| ACCOUNTS_SERVICE_USER_UUID | string | 95cb8724-03b2-11eb-a0a6-c33ef8ef53ad | The id of the accounts service user.| -| ACCOUNTS_SERVICE_USER_USERNAME | string | | The username of the accounts service user.| -| ACCOUNTS_SERVICE_USER_UID | int64 | 0 | The uid of the accounts service user.| -| ACCOUNTS_SERVICE_USER_GID | int64 | 0 | The gid of the accounts service user.| -| ACCOUNTS_HASH_DIFFICULTY | int | 11 | The hash difficulty makes sure that validating a password takes at least a certain amount of time.| -| ACCOUNTS_DEMO_USERS_AND_GROUPS | bool | true | If this flag is set the service will setup the demo users and groups.| \ No newline at end of file diff --git a/docs/extensions/_includes/glauth_configvars.md b/docs/extensions/_includes/glauth_configvars.md deleted file mode 100644 index 9211ff0dc3..0000000000 --- a/docs/extensions/_includes/glauth_configvars.md +++ /dev/null @@ -1,15 +0,0 @@ -## Environment Variables - -| Name | Type | Default Value | Description | -|------|------|---------------|-------------| -| GLAUTH_DEBUG_ADDR | string | 127.0.0.1:9129 | | -| GLAUTH_DEBUG_TOKEN | string | | | -| GLAUTH_DEBUG_PPROF | bool | false | | -| GLAUTH_DEBUG_ZPAGES | bool | false | | -| GLAUTH_LDAP_ENABLED | bool | true | | -| GLAUTH_LDAP_ADDR | string | 127.0.0.1:9125 | | -| GLAUTH_LDAPS_ENABLED | bool | true | | -| GLAUTH_LDAPS_ADDR | string | 127.0.0.1:9126 | | -| GLAUTH_LDAPS_CERT | string | ~/.ocis/ldap/ldap.crt | | -| GLAUTH_LDAPS_KEY | string | ~/.ocis/ldap/ldap.key | | -| GLAUTH_ROLE_BUNDLE_ID | string | 71881883-1768-46bd-a24d-a356a2afdf7f | | \ No newline at end of file diff --git a/docs/extensions/_includes/graph-explorer_configvars.md b/docs/extensions/_includes/graph-explorer_configvars.md deleted file mode 100644 index ebfd855e93..0000000000 --- a/docs/extensions/_includes/graph-explorer_configvars.md +++ /dev/null @@ -1,14 +0,0 @@ -## Environment Variables - -| Name | Type | Default Value | Description | -|------|------|---------------|-------------| -| GRAPH_EXPLORER_DEBUG_ADDR | string | 127.0.0.1:9136 | | -| GRAPH_EXPLORER_DEBUG_TOKEN | string | | | -| GRAPH_EXPLORER_DEBUG_PPROF | bool | false | | -| GRAPH_EXPLORER_DEBUG_ZPAGES | bool | false | | -| GRAPH_EXPLORER_HTTP_ADDR | string | 127.0.0.1:9135 | | -| GRAPH_EXPLORER_HTTP_ROOT | string | /graph-explorer | | -| GRAPH_EXPLORER_CLIENT_ID | string | ocis-explorer.js | | -| OCIS_URL;GRAPH_EXPLORER_ISSUER | string | https://localhost:9200 | | -| OCIS_URL;GRAPH_EXPLORER_GRAPH_URL_BASE | string | https://localhost:9200 | | -| GRAPH_EXPLORER_GRAPH_URL_PATH | string | /graph | | \ No newline at end of file diff --git a/docs/extensions/_includes/graph_configvars.md b/docs/extensions/_includes/graph_configvars.md deleted file mode 100644 index 06036f1ec5..0000000000 --- a/docs/extensions/_includes/graph_configvars.md +++ /dev/null @@ -1,36 +0,0 @@ -## Environment Variables - -| Name | Type | Default Value | Description | -|------|------|---------------|-------------| -| GRAPH_DEBUG_ADDR | string | 127.0.0.1:9124 | | -| GRAPH_DEBUG_TOKEN | string | | | -| GRAPH_DEBUG_PPROF | bool | false | | -| GRAPH_DEBUG_ZPAGES | bool | false | | -| GRAPH_HTTP_ADDR | string | 127.0.0.1:9120 | | -| GRAPH_HTTP_ROOT | string | /graph | | -| REVA_GATEWAY | string | 127.0.0.1:9142 | | -| OCIS_JWT_SECRET;OCS_JWT_SECRET | string | Pive-Fumkiu4 | | -| OCIS_URL;GRAPH_SPACES_WEBDAV_BASE | string | https://localhost:9200 | | -| GRAPH_SPACES_WEBDAV_PATH | string | /dav/spaces/ | | -| GRAPH_SPACES_DEFAULT_QUOTA | string | 1000000000 | | -| OCIS_INSECURE;GRAPH_SPACES_INSECURE | bool | false | | -| GRAPH_SPACES_EXTENDED_SPACE_PROPERTIES_CACHE_TTL | int | 0 | | -| GRAPH_IDENTITY_BACKEND | string | cs3 | | -| GRAPH_LDAP_URI | string | ldap://localhost:9125 | | -| OCIS_INSECURE;GRAPH_LDAP_INSECURE | bool | false | | -| GRAPH_LDAP_BIND_DN | string | | | -| GRAPH_LDAP_BIND_PASSWORD | string | | | -| GRAPH_LDAP_SERVER_UUID | bool | false | | -| GRAPH_LDAP_SERVER_WRITE_ENABLED | bool | false | | -| GRAPH_LDAP_USER_BASE_DN | string | ou=users,dc=ocis,dc=test | | -| GRAPH_LDAP_USER_SCOPE | string | sub | | -| GRAPH_LDAP_USER_FILTER | string | (objectClass=inetOrgPerson) | | -| GRAPH_LDAP_USER_EMAIL_ATTRIBUTE | string | mail | | -| GRAPH_LDAP_USER_DISPLAYNAME_ATTRIBUTE | string | displayName | | -| GRAPH_LDAP_USER_NAME_ATTRIBUTE | string | uid | | -| GRAPH_LDAP_USER_UID_ATTRIBUTE | string | owncloudUUID | | -| GRAPH_LDAP_GROUP_BASE_DN | string | ou=groups,dc=ocis,dc=test | | -| GRAPH_LDAP_GROUP_SEARCH_SCOPE | string | sub | | -| GRAPH_LDAP_GROUP_FILTER | string | (objectclass=groupOfNames) | | -| GRAPH_LDAP_GROUP_NAME_ATTRIBUTE | string | cn | | -| GRAPH_LDAP_GROUP_ID_ATTRIBUTE | string | owncloudUUID | | \ No newline at end of file diff --git a/docs/extensions/_includes/idm_configvars.md b/docs/extensions/_includes/idm_configvars.md deleted file mode 100644 index 42f6c3c08b..0000000000 --- a/docs/extensions/_includes/idm_configvars.md +++ /dev/null @@ -1,13 +0,0 @@ -## Environment Variables - -| Name | Type | Default Value | Description | -|------|------|---------------|-------------| -| IDM_DEBUG_ADDR | string | | | -| IDM_DEBUG_TOKEN | string | | | -| IDM_DEBUG_PPROF | bool | false | | -| IDM_DEBUG_ZPAGES | bool | false | | -| IDM_LDAPS_ADDR | string | 127.0.0.1:9235 | | -| IDM_LDAPS_CERT | string | ~/.ocis/idm/ldap.crt | | -| IDM_LDAPS_KEY | string | ~/.ocis/idm/ldap.key | | -| IDM_DATABASE_PATH | string | ~/.ocis/idm/ocis.boltdb | | -| IDM_ADMIN_PASSWORD | string | admin | | \ No newline at end of file diff --git a/docs/extensions/_includes/idp_configvars.md b/docs/extensions/_includes/idp_configvars.md deleted file mode 100644 index ce0fc6261a..0000000000 --- a/docs/extensions/_includes/idp_configvars.md +++ /dev/null @@ -1,47 +0,0 @@ -## Environment Variables - -| Name | Type | Default Value | Description | -|------|------|---------------|-------------| -| IDP_DEBUG_ADDR | string | 127.0.0.1:9134 | | -| IDP_DEBUG_TOKEN | string | | | -| IDP_DEBUG_PPROF | bool | false | | -| IDP_DEBUG_ZPAGES | bool | false | | -| IDP_HTTP_ADDR | string | 127.0.0.1:9130 | | -| IDP_HTTP_ROOT | string | / | | -| IDP_TRANSPORT_TLS_CERT | string | ~/.ocis/idp/server.crt | | -| IDP_TRANSPORT_TLS_KEY | string | ~/.ocis/idp/server.key | | -| IDP_TLS | bool | false | | -| IDP_ASSET_PATH | string | | | -| OCIS_URL;IDP_ISS | string | https://localhost:9200 | | -| IDP_IDENTITY_MANAGER | string | ldap | | -| IDP_URI_BASE_PATH | string | | | -| IDP_SIGN_IN_URI | string | | | -| IDP_SIGN_OUT_URI | string | | | -| IDP_ENDPOINT_URI | string | | | -| IDP_ENDSESSION_ENDPOINT_URI | string | | | -| IDP_INSECURE | bool | false | | -| IDP_ALLOW_CLIENT_GUESTS | bool | false | | -| IDP_ALLOW_DYNAMIC_CLIENT_REGISTRATION | bool | false | | -| IDP_ENCRYPTION_SECRET | string | | | -| IDP_DISABLE_IDENTIFIER_WEBAPP | bool | true | | -| IDP_IDENTIFIER_CLIENT_PATH | string | ~/.ocis/idp | | -| IDP_IDENTIFIER_REGISTRATION_CONF | string | ~/.ocis/idp/identifier-registration.yaml | | -| IDP_IDENTIFIER_SCOPES_CONF | string | | | -| IDP_SIGNING_KID | string | | | -| IDP_SIGNING_METHOD | string | PS256 | | -| IDP_VALIDATION_KEYS_PATH | string | | | -| IDP_ACCESS_TOKEN_EXPIRATION | uint64 | 600 | | -| IDP_ID_TOKEN_EXPIRATION | uint64 | 3600 | | -| IDP_REFRESH_TOKEN_EXPIRATION | uint64 | 94608000 | | -| | uint64 | 0 | | -| IDP_LDAP_URI | string | ldap://localhost:9125 | | -| IDP_LDAP_BIND_DN | string | cn=idp,ou=sysusers,dc=ocis,dc=test | | -| IDP_LDAP_BIND_PASSWORD | string | idp | | -| IDP_LDAP_BASE_DN | string | ou=users,dc=ocis,dc=test | | -| IDP_LDAP_SCOPE | string | sub | | -| IDP_LDAP_LOGIN_ATTRIBUTE | string | cn | | -| IDP_LDAP_EMAIL_ATTRIBUTE | string | mail | | -| IDP_LDAP_NAME_ATTRIBUTE | string | sn | | -| IDP_LDAP_UUID_ATTRIBUTE | string | uid | | -| IDP_LDAP_UUID_ATTRIBUTE_TYPE | string | text | | -| IDP_LDAP_FILTER | string | (objectClass=posixaccount) | | \ No newline at end of file diff --git a/docs/extensions/_includes/nats_configvars.md b/docs/extensions/_includes/nats_configvars.md deleted file mode 100644 index 4d4bccfddd..0000000000 --- a/docs/extensions/_includes/nats_configvars.md +++ /dev/null @@ -1,10 +0,0 @@ -## Environment Variables - -| Name | Type | Default Value | Description | -|------|------|---------------|-------------| -| NATS_DEBUG_ADDR | string | | | -| NATS_DEBUG_TOKEN | string | | | -| NATS_DEBUG_PPROF | bool | false | | -| NATS_DEBUG_ZPAGES | bool | false | | -| NATS_NATS_HOST | string | 127.0.0.1 | | -| NATS_NATS_PORT | int | 9233 | | \ No newline at end of file diff --git a/docs/extensions/_includes/notifications_configvars.md b/docs/extensions/_includes/notifications_configvars.md deleted file mode 100644 index f0d3adf8e2..0000000000 --- a/docs/extensions/_includes/notifications_configvars.md +++ /dev/null @@ -1,17 +0,0 @@ -## Environment Variables - -| Name | Type | Default Value | Description | -|------|------|---------------|-------------| -| NOTIFICATIONS_DEBUG_ADDR | string | | | -| NOTIFICATIONS_DEBUG_TOKEN | string | | | -| NOTIFICATIONS_DEBUG_PPROF | bool | false | | -| NOTIFICATIONS_DEBUG_ZPAGES | bool | false | | -| NOTIFICATIONS_SMTP_HOST | string | 127.0.0.1 | | -| NOTIFICATIONS_SMTP_PORT | string | 1025 | | -| NOTIFICATIONS_SMTP_SENDER | string | god@example.com | | -| NOTIFICATIONS_SMTP_PASSWORD | string | godisdead | | -| NOTIFICATIONS_EVENTS_ENDPOINT | string | 127.0.0.1:9233 | | -| NOTIFICATIONS_EVENTS_CLUSTER | string | test-cluster | | -| NOTIFICATIONS_EVENTS_GROUP | string | notifications | | -| REVA_GATEWAY;NOTIFICATIONS_REVA_GATEWAY | string | 127.0.0.1:9142 | | -| OCIS_MACHINE_AUTH_API_KEY;NOTIFICATIONS_MACHINE_AUTH_API_KEY | string | change-me-please | | \ No newline at end of file diff --git a/docs/extensions/_includes/ocs_configvars.md b/docs/extensions/_includes/ocs_configvars.md deleted file mode 100644 index 0c12be151b..0000000000 --- a/docs/extensions/_includes/ocs_configvars.md +++ /dev/null @@ -1,16 +0,0 @@ -## Environment Variables - -| Name | Type | Default Value | Description | -|------|------|---------------|-------------| -| OCS_DEBUG_ADDR | string | 127.0.0.1:9114 | | -| OCS_DEBUG_TOKEN | string | | | -| OCS_DEBUG_PPROF | bool | false | | -| OCS_DEBUG_ZPAGES | bool | false | | -| OCS_HTTP_ADDR | string | 127.0.0.1:9110 | | -| OCS_HTTP_ROOT | string | /ocs | | -| OCIS_JWT_SECRET;OCS_JWT_SECRET | string | Pive-Fumkiu4 | | -| REVA_GATEWAY | string | 127.0.0.1:9142 | | -| OCIS_URL;OCS_IDM_ADDRESS | string | https://localhost:9200 | | -| OCS_ACCOUNT_BACKEND_TYPE | string | accounts | | -| STORAGE_USERS_DRIVER;OCS_STORAGE_USERS_DRIVER | string | ocis | | -| OCIS_MACHINE_AUTH_API_KEY;OCS_MACHINE_AUTH_API_KEY | string | change-me-please | | \ No newline at end of file diff --git a/docs/extensions/_includes/proxy_configvars.md b/docs/extensions/_includes/proxy_configvars.md deleted file mode 100644 index a3be1d11aa..0000000000 --- a/docs/extensions/_includes/proxy_configvars.md +++ /dev/null @@ -1,27 +0,0 @@ -## Environment Variables - -| Name | Type | Default Value | Description | -|------|------|---------------|-------------| -| PROXY_DEBUG_ADDR | string | 127.0.0.1:9205 | | -| PROXY_DEBUG_TOKEN | string | | | -| PROXY_DEBUG_PPROF | bool | false | | -| PROXY_DEBUG_ZPAGES | bool | false | | -| PROXY_HTTP_ADDR | string | 0.0.0.0:9200 | | -| PROXY_HTTP_ROOT | string | / | | -| PROXY_TRANSPORT_TLS_CERT | string | ~/.ocis/proxy/server.crt | | -| PROXY_TRANSPORT_TLS_KEY | string | ~/.ocis/proxy/server.key | | -| PROXY_TLS | bool | true | | -| REVA_GATEWAY | string | 127.0.0.1:9142 | | -| OCIS_URL;PROXY_OIDC_ISSUER | string | https://localhost:9200 | | -| OCIS_INSECURE;PROXY_OIDC_INSECURE | bool | true | | -| PROXY_OIDC_USERINFO_CACHE_SIZE | int | 1024 | | -| PROXY_OIDC_USERINFO_CACHE_TTL | int | 10 | | -| OCIS_JWT_SECRET;PROXY_JWT_SECRET | string | Pive-Fumkiu4 | | -| PROXY_ENABLE_PRESIGNEDURLS | bool | true | | -| PROXY_ACCOUNT_BACKEND_TYPE | string | accounts | | -| PROXY_USER_OIDC_CLAIM | string | email | | -| PROXY_USER_CS3_CLAIM | string | mail | | -| OCIS_MACHINE_AUTH_API_KEY;PROXY_MACHINE_AUTH_API_KEY | string | change-me-please | | -| PROXY_AUTOPROVISION_ACCOUNTS | bool | false | | -| PROXY_ENABLE_BASIC_AUTH | bool | false | | -| PROXY_INSECURE_BACKENDS | bool | false | | \ No newline at end of file diff --git a/docs/extensions/_includes/settings_configvars.md b/docs/extensions/_includes/settings_configvars.md deleted file mode 100644 index c8136208e1..0000000000 --- a/docs/extensions/_includes/settings_configvars.md +++ /dev/null @@ -1,15 +0,0 @@ -## Environment Variables - -| Name | Type | Default Value | Description | -|------|------|---------------|-------------| -| SETTINGS_DEBUG_ADDR | string | 127.0.0.1:9194 | | -| SETTINGS_DEBUG_TOKEN | string | | | -| SETTINGS_DEBUG_PPROF | bool | false | | -| SETTINGS_DEBUG_ZPAGES | bool | false | | -| SETTINGS_HTTP_ADDR | string | 127.0.0.1:9190 | | -| SETTINGS_HTTP_ROOT | string | / | | -| SETTINGS_CACHE_TTL | int | 604800 | | -| SETTINGS_GRPC_ADDR | string | 127.0.0.1:9191 | | -| SETTINGS_DATA_PATH | string | ~/.ocis/settings | | -| SETTINGS_ASSET_PATH | string | | | -| OCIS_JWT_SECRET;SETTINGS_JWT_SECRET | string | Pive-Fumkiu4 | | \ No newline at end of file diff --git a/docs/extensions/_includes/store_configvars.md b/docs/extensions/_includes/store_configvars.md deleted file mode 100644 index b0afbd7009..0000000000 --- a/docs/extensions/_includes/store_configvars.md +++ /dev/null @@ -1,10 +0,0 @@ -## Environment Variables - -| Name | Type | Default Value | Description | -|------|------|---------------|-------------| -| STORE_DEBUG_ADDR | string | 127.0.0.1:9464 | | -| STORE_DEBUG_TOKEN | string | | | -| STORE_DEBUG_PPROF | bool | false | | -| STORE_DEBUG_ZPAGES | bool | false | | -| STORE_GRPC_ADDR | string | 127.0.0.1:9460 | | -| STORE_DATA_PATH | string | ~/.ocis/store | | \ No newline at end of file diff --git a/docs/extensions/_includes/thumbnails_configvars.md b/docs/extensions/_includes/thumbnails_configvars.md deleted file mode 100644 index 7913769115..0000000000 --- a/docs/extensions/_includes/thumbnails_configvars.md +++ /dev/null @@ -1,14 +0,0 @@ -## Environment Variables - -| Name | Type | Default Value | Description | -|------|------|---------------|-------------| -| THUMBNAILS_DEBUG_ADDR | string | 127.0.0.1:9189 | | -| THUMBNAILS_DEBUG_TOKEN | string | | | -| THUMBNAILS_DEBUG_PPROF | bool | false | | -| THUMBNAILS_DEBUG_ZPAGES | bool | false | | -| THUMBNAILS_GRPC_ADDR | string | 127.0.0.1:9185 | | -| THUMBNAILS_FILESYSTEMSTORAGE_ROOT | string | ~/.ocis/thumbnails | | -| OCIS_INSECURE;THUMBNAILS_WEBDAVSOURCE_INSECURE | bool | true | | -| OCIS_INSECURE;THUMBNAILS_CS3SOURCE_INSECURE | bool | false | | -| REVA_GATEWAY | string | 127.0.0.1:9142 | | -| THUMBNAILS_TXT_FONTMAP_FILE | string | | | \ No newline at end of file diff --git a/docs/extensions/_includes/web_configvars.md b/docs/extensions/_includes/web_configvars.md deleted file mode 100644 index 7385069008..0000000000 --- a/docs/extensions/_includes/web_configvars.md +++ /dev/null @@ -1,24 +0,0 @@ -## Environment Variables - -| Name | Type | Default Value | Description | -|------|------|---------------|-------------| -| WEB_DEBUG_ADDR | string | 127.0.0.1:9104 | | -| WEB_DEBUG_TOKEN | string | | | -| WEB_DEBUG_PPROF | bool | false | | -| WEB_DEBUG_ZPAGES | bool | false | | -| WEB_HTTP_ADDR | string | 127.0.0.1:9100 | | -| WEB_HTTP_ROOT | string | / | | -| WEB_CACHE_TTL | int | 604800 | | -| WEB_ASSET_PATH | string | | | -| WEB_UI_CONFIG | string | | | -| WEB_UI_PATH | string | | | -| OCIS_URL;WEB_UI_THEME_SERVER | string | https://localhost:9200 | | -| WEB_UI_THEME_PATH | string | /themes/owncloud/theme.json | | -| OCIS_URL;WEB_UI_CONFIG_SERVER | string | https://localhost:9200 | | -| | string | | | -| WEB_UI_CONFIG_VERSION | string | 0.1.0 | | -| WEB_OIDC_METADATA_URL | string | | | -| OCIS_URL;WEB_OIDC_AUTHORITY | string | https://localhost:9200 | | -| WEB_OIDC_CLIENT_ID | string | web | | -| WEB_OIDC_RESPONSE_TYPE | string | code | | -| WEB_OIDC_SCOPE | string | openid profile email | | \ No newline at end of file diff --git a/docs/extensions/_includes/webdav_configvars.md b/docs/extensions/_includes/webdav_configvars.md deleted file mode 100644 index a4767cfb06..0000000000 --- a/docs/extensions/_includes/webdav_configvars.md +++ /dev/null @@ -1,13 +0,0 @@ -## Environment Variables - -| Name | Type | Default Value | Description | -|------|------|---------------|-------------| -| WEBDAV_DEBUG_ADDR | string | 127.0.0.1:9119 | | -| WEBDAV_DEBUG_TOKEN | string | | | -| WEBDAV_DEBUG_PPROF | bool | false | | -| WEBDAV_DEBUG_ZPAGES | bool | false | | -| WEBDAV_HTTP_ADDR | string | 127.0.0.1:9115 | | -| WEBDAV_HTTP_ROOT | string | / | | -| OCIS_URL;OCIS_PUBLIC_URL | string | https://127.0.0.1:9200 | | -| STORAGE_WEBDAV_NAMESPACE | string | /users/{{.Id.OpaqueId}} | | -| REVA_GATEWAY | string | 127.0.0.1:9142 | | \ No newline at end of file From aeeff600116952b06292e56e8c3530d83c041fed Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Wed, 2 Mar 2022 15:18:43 +0100 Subject: [PATCH 12/19] remove config file related code --- accounts/cmd/helper/defaultconfig/main.go | 23 ---------------- accounts/pkg/config/parser/parse.go | 33 ++++++----------------- 2 files changed, 8 insertions(+), 48 deletions(-) delete mode 100644 accounts/cmd/helper/defaultconfig/main.go diff --git a/accounts/cmd/helper/defaultconfig/main.go b/accounts/cmd/helper/defaultconfig/main.go deleted file mode 100644 index 1092497cb7..0000000000 --- a/accounts/cmd/helper/defaultconfig/main.go +++ /dev/null @@ -1,23 +0,0 @@ -package main - -import ( - "fmt" - - "github.com/owncloud/ocis/accounts/pkg/config" - "github.com/owncloud/ocis/accounts/pkg/config/parser" - "gopkg.in/yaml.v2" -) - -func main() { - - cfg := config.DefaultConfig() - - parser.EnsureDefaults(cfg) - parser.Sanitize(cfg) - - b, err := yaml.Marshal(cfg) - if err != nil { - return - } - fmt.Println(string(b)) -} diff --git a/accounts/pkg/config/parser/parse.go b/accounts/pkg/config/parser/parse.go index e437fa6a07..fb801aed28 100644 --- a/accounts/pkg/config/parser/parse.go +++ b/accounts/pkg/config/parser/parse.go @@ -17,28 +17,6 @@ func ParseConfig(cfg *config.Config) error { return err } - err = EnsureDefaults(cfg) - if err != nil { - return err - } - - // 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" - if !errors.Is(err, envdecode.ErrNoTargetFieldsAreSet) { - return err - } - } - - err = Sanitize(cfg) - if err != nil { - return err - } - - return nil -} - -func EnsureDefaults(cfg *config.Config) error { // 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{ @@ -62,14 +40,19 @@ func EnsureDefaults(cfg *config.Config) error { cfg.Tracing = &config.Tracing{} } - return nil -} + // 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" + if !errors.Is(err, envdecode.ErrNoTargetFieldsAreSet) { + return err + } + } -func Sanitize(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) + return nil } From f266f91bc4478d23902cdb81389ba5c718c4bfd7 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Wed, 2 Mar 2022 15:21:47 +0100 Subject: [PATCH 13/19] revert ocisConfig changes part 3 --- accounts/pkg/config/config.go | 4 ++-- accounts/pkg/config/tracing.go | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/accounts/pkg/config/config.go b/accounts/pkg/config/config.go index 78d76ba405..9a4609d7e4 100644 --- a/accounts/pkg/config/config.go +++ b/accounts/pkg/config/config.go @@ -44,8 +44,8 @@ type TokenManager struct { // Repo defines which storage implementation is to be used. type Repo struct { Backend string `ocisConfig:"backend" env:"ACCOUNTS_STORAGE_BACKEND" desc:"Defines which storage implementation is to be used"` - Disk Disk - CS3 CS3 + Disk Disk `ocisConfig:"disk"` + CS3 CS3 `ocisConfig:"cs3"` } // Disk is the local disk implementation of the storage. diff --git a/accounts/pkg/config/tracing.go b/accounts/pkg/config/tracing.go index 8c8b1e0b70..4bd0c79248 100644 --- a/accounts/pkg/config/tracing.go +++ b/accounts/pkg/config/tracing.go @@ -2,8 +2,8 @@ package config // Tracing defines the available tracing configuration. type Tracing struct { - Enabled bool `env:"OCIS_TRACING_ENABLED;ACCOUNTS_TRACING_ENABLED" desc:"Activates tracing."` - Type string `env:"OCIS_TRACING_TYPE;ACCOUNTS_TRACING_TYPE"` - Endpoint string `env:"OCIS_TRACING_ENDPOINT;ACCOUNTS_TRACING_ENDPOINT" desc:"The endpoint to the tracing collector."` - Collector string `env:"OCIS_TRACING_COLLECTOR;ACCOUNTS_TRACING_COLLECTOR" ` + Enabled bool `ocisConfig:"enabled" env:"OCIS_TRACING_ENABLED;ACCOUNTS_TRACING_ENABLED" desc:"Activates tracing."` + Type string `ocisConfig:"type" env:"OCIS_TRACING_TYPE;ACCOUNTS_TRACING_TYPE"` + Endpoint string `ocisConfig:"endpoint" env:"OCIS_TRACING_ENDPOINT;ACCOUNTS_TRACING_ENDPOINT" desc:"The endpoint to the tracing collector."` + Collector string `ocisConfig:"collector" env:"OCIS_TRACING_COLLECTOR;ACCOUNTS_TRACING_COLLECTOR"` } From d5aed899e70796e0101179a4b89f8d9f2effb99d Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Wed, 2 Mar 2022 15:31:58 +0100 Subject: [PATCH 14/19] use docs/docs-generate also in CI --- .drone.star | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.star b/.drone.star index ee45183aff..7ac4513fe2 100644 --- a/.drone.star +++ b/.drone.star @@ -1260,7 +1260,7 @@ def docs(ctx): { "name": "docs-generate", "image": OC_CI_GOLANG, - "commands": ["make -C %s docs-generate" % (module) for module in config["modules"]], + "commands": ["make -C docs docs-generate"], }, { "name": "prepare", From 8ee5ab226e35f487b7e6a94e11a0b9c0a7fbde80 Mon Sep 17 00:00:00 2001 From: Christian Richter Date: Wed, 2 Mar 2022 16:34:20 +0100 Subject: [PATCH 15/19] Add missing weight to header to fix menu sorting --- docs/ocis/adr/0016-files-metadata.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/ocis/adr/0016-files-metadata.md b/docs/ocis/adr/0016-files-metadata.md index b9a3089aa4..55fe7fe61d 100644 --- a/docs/ocis/adr/0016-files-metadata.md +++ b/docs/ocis/adr/0016-files-metadata.md @@ -1,5 +1,10 @@ --- title: "16. Storage for Files Metadata" +weight: 16 +date: 2022-03-02T00:00:00+01:00 +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs/ocis/adr +geekdocFilePath: 0016-files-metadata.md --- * Status: proposed From fe2501b083aee79bf2f80f59c8496ab3a64fe136 Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp Date: Wed, 2 Mar 2022 16:10:20 +0100 Subject: [PATCH 16/19] graph: Add some validation for username and email This copies the validation code from the accounts service, also fixing a bug in the regex that allowed adding mail addresses with whitespace and other problematic characters to the domain part of the mail address. Partial fix for: #3247 --- accounts/pkg/service/v0/accounts.go | 4 +-- graph/pkg/service/v0/users.go | 44 ++++++++++++++++++++++++++++- 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/accounts/pkg/service/v0/accounts.go b/accounts/pkg/service/v0/accounts.go index 2b393cb710..bd28223106 100644 --- a/accounts/pkg/service/v0/accounts.go +++ b/accounts/pkg/service/v0/accounts.go @@ -746,7 +746,7 @@ func validateAccountEmail(serviceID string, a *accountsmsg.Account) error { // We want to allow email addresses as usernames so they show up when using them in ACLs on storages that allow integration with our glauth LDAP service // so we are adding a few restrictions from https://stackoverflow.com/questions/6949667/what-are-the-real-rules-for-linux-usernames-on-centos-6-and-rhel-6 // names should not start with numbers -var usernameRegex = regexp.MustCompile("^[a-zA-Z_][a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]*(@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)*$") +var usernameRegex = regexp.MustCompile("^[a-zA-Z_][a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]*(@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)*$") func isValidUsername(e string) bool { if len(e) < 1 && len(e) > 254 { @@ -756,7 +756,7 @@ func isValidUsername(e string) bool { } // regex from https://www.w3.org/TR/2016/REC-html51-20161101/sec-forms.html#valid-e-mail-address -var emailRegex = regexp.MustCompile("^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$") +var emailRegex = regexp.MustCompile("^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$") func isValidEmail(e string) bool { if len(e) < 3 && len(e) > 254 { diff --git a/graph/pkg/service/v0/users.go b/graph/pkg/service/v0/users.go index 88d87a420e..fcce5dc8f2 100644 --- a/graph/pkg/service/v0/users.go +++ b/graph/pkg/service/v0/users.go @@ -3,8 +3,10 @@ package svc import ( "encoding/json" "errors" + "fmt" "net/http" "net/url" + "regexp" revactx "github.com/cs3org/reva/pkg/ctx" "github.com/go-chi/chi/v5" @@ -56,7 +58,18 @@ func (g Graph) PostUser(w http.ResponseWriter, r *http.Request) { } if isNilOrEmpty(u.DisplayName) || isNilOrEmpty(u.OnPremisesSamAccountName) || isNilOrEmpty(u.Mail) { - errorcode.InvalidRequest.Render(w, r, http.StatusBadRequest, "Missing Required Attribute") + errorcode.InvalidRequest.Render(w, r, http.StatusBadRequest, err.Error()) + return + } + + if !isValidUsername(*u.OnPremisesSamAccountName) { + errorcode.InvalidRequest.Render(w, r, http.StatusBadRequest, + fmt.Sprintf("username '%s' must be at least the local part of an email", *u.OnPremisesSamAccountName)) + return + } + if !isValidEmail(*u.Mail) { + errorcode.InvalidRequest.Render(w, r, http.StatusBadRequest, + fmt.Sprintf("'%s' is not a valid email address", *u.Mail)) return } @@ -151,6 +164,13 @@ func (g Graph) PatchUser(w http.ResponseWriter, r *http.Request) { return } + mail := changes.GetMail() + if !isValidEmail(mail) { + errorcode.InvalidRequest.Render(w, r, http.StatusBadRequest, + fmt.Sprintf("'%s' is not a valid email address", mail)) + return + } + u, err := g.identityBackend.UpdateUser(r.Context(), nameOrID, *changes) if err != nil { var errcode errorcode.Error @@ -169,3 +189,25 @@ func (g Graph) PatchUser(w http.ResponseWriter, r *http.Request) { func isNilOrEmpty(s *string) bool { return s == nil || *s == "" } + +// We want to allow email addresses as usernames so they show up when using them in ACLs on storages that allow integration with our glauth LDAP service +// so we are adding a few restrictions from https://stackoverflow.com/questions/6949667/what-are-the-real-rules-for-linux-usernames-on-centos-6-and-rhel-6 +// names should not start with numbers +var usernameRegex = regexp.MustCompile("^[a-zA-Z_][a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]*(@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)*$") + +func isValidUsername(e string) bool { + if len(e) < 1 && len(e) > 254 { + return false + } + return usernameRegex.MatchString(e) +} + +// regex from https://www.w3.org/TR/2016/REC-html51-20161101/sec-forms.html#valid-e-mail-address +var emailRegex = regexp.MustCompile("^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$") + +func isValidEmail(e string) bool { + if len(e) < 3 && len(e) > 254 { + return false + } + return emailRegex.MatchString(e) +} From 06ca18b1fb93bd8af55562404f5258a8368a499b Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp Date: Wed, 2 Mar 2022 16:16:13 +0100 Subject: [PATCH 17/19] graph: Assign new user the default user role Similar to what the accounts service is doing, all new users get the User role assigned now. Otherwise creating the user's personal space upon login is not working. --- graph/pkg/service/v0/graph.go | 2 ++ graph/pkg/service/v0/service.go | 10 ++++++---- graph/pkg/service/v0/users.go | 15 +++++++++++++++ 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/graph/pkg/service/v0/graph.go b/graph/pkg/service/v0/graph.go index b634384e33..2dd618d09a 100644 --- a/graph/pkg/service/v0/graph.go +++ b/graph/pkg/service/v0/graph.go @@ -11,6 +11,7 @@ import ( "github.com/owncloud/ocis/graph/pkg/config" "github.com/owncloud/ocis/graph/pkg/identity" "github.com/owncloud/ocis/ocis-pkg/log" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v0" "google.golang.org/grpc" ) @@ -66,6 +67,7 @@ type Graph struct { identityBackend identity.Backend gatewayClient GatewayClient httpClient HTTPClient + roleService settingssvc.RoleService spacePropertiesCache *ttlcache.Cache } diff --git a/graph/pkg/service/v0/service.go b/graph/pkg/service/v0/service.go index a2bf0567b8..c77959d963 100644 --- a/graph/pkg/service/v0/service.go +++ b/graph/pkg/service/v0/service.go @@ -116,17 +116,19 @@ func NewService(opts ...Option) Service { svc.httpClient = options.HTTPClient } - roleService := options.RoleService - if roleService == nil { - roleService = settingssvc.NewRoleService("com.owncloud.api.settings", grpc.DefaultClient) + if options.RoleService == nil { + svc.roleService = settingssvc.NewRoleService("com.owncloud.api.settings", grpc.DefaultClient) + } else { + svc.roleService = options.RoleService } + roleManager := options.RoleManager if roleManager == nil { m := roles.NewManager( roles.CacheSize(1024), roles.CacheTTL(time.Hour), roles.Logger(options.Logger), - roles.RoleService(roleService), + roles.RoleService(svc.roleService), ) roleManager = &m } diff --git a/graph/pkg/service/v0/users.go b/graph/pkg/service/v0/users.go index fcce5dc8f2..ebdba6bb8a 100644 --- a/graph/pkg/service/v0/users.go +++ b/graph/pkg/service/v0/users.go @@ -14,6 +14,8 @@ import ( libregraph "github.com/owncloud/libre-graph-api-go" "github.com/owncloud/ocis/graph/pkg/identity" "github.com/owncloud/ocis/graph/pkg/service/v0/errorcode" + settings "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v0" + settingssvc "github.com/owncloud/ocis/settings/pkg/service/v0" ) // GetMe implements the Service interface. @@ -86,6 +88,19 @@ func (g Graph) PostUser(w http.ResponseWriter, r *http.Request) { return } + // All users get the user role by default currently. + // to all new users for now, as create Account request does not have any role field + if g.roleService == nil { + errorcode.GeneralException.Render(w, r, http.StatusInternalServerError, "could not assign role to account: roleService not configured") + return + } + if _, err = g.roleService.AssignRoleToUser(r.Context(), &settings.AssignRoleToUserRequest{ + AccountUuid: *u.Id, + RoleId: settingssvc.BundleUUIDRoleUser, + }); err != nil { + errorcode.GeneralException.Render(w, r, http.StatusInternalServerError, fmt.Sprintf("could not assign role to account %s", err.Error())) + return + } render.Status(r, http.StatusOK) render.JSON(w, r, u) } From 55593b7e9f22875301dc424c64ef8c006c65acc6 Mon Sep 17 00:00:00 2001 From: Florian Schade Date: Wed, 2 Mar 2022 17:52:02 +0100 Subject: [PATCH 18/19] [full-ci] Bump web v5.2.0-rc.x (#3249) * bump web rc.1 * Use web v5.2.0-rc.2 Co-authored-by: Pascal Wengerter --- .drone.env | 4 ++-- accounts/ui/tests/acceptance/pageobjects/accountsPage.js | 2 +- go.mod | 2 +- go.sum | 4 ++-- settings/ui/tests/acceptance/pageobjects/settingsPage.js | 5 ++--- web/Makefile | 2 +- 6 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.drone.env b/.drone.env index 695105ce3b..921653baa8 100644 --- a/.drone.env +++ b/.drone.env @@ -3,5 +3,5 @@ CORE_COMMITID=828075109e7d9b5e55db8b50d311d9a76b89d7e1 CORE_BRANCH=master # The test runner source for UI tests -WEB_COMMITID=94532551d3d89d5d3eeee016e2f0aae9fe919fce -WEB_BRANCH=master +WEB_COMMITID=95d54dcc9881697e75cdce15b8e0080017a3b224 +WEB_BRANCH=release-5.2.0 diff --git a/accounts/ui/tests/acceptance/pageobjects/accountsPage.js b/accounts/ui/tests/acceptance/pageobjects/accountsPage.js index 928e5712d8..c47851763a 100644 --- a/accounts/ui/tests/acceptance/pageobjects/accountsPage.js +++ b/accounts/ui/tests/acceptance/pageobjects/accountsPage.js @@ -2,7 +2,7 @@ const util = require('util') module.exports = { url: function () { - return this.api.launchUrl + '/#/accounts' + return this.api.launchUrl + '/accounts' }, commands: { diff --git a/go.mod b/go.mod index 0723ab5a63..79c79ece8c 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( github.com/blevesearch/bleve/v2 v2.3.1 github.com/coreos/go-oidc/v3 v3.1.0 github.com/cs3org/go-cs3apis v0.0.0-20220126114148-64c025ccdd19 - github.com/cs3org/reva v1.16.1-0.20220301071903-1fd81b097801 + github.com/cs3org/reva v1.16.1-0.20220301130454-abc01bbfa855 github.com/disintegration/imaging v1.6.2 github.com/glauth/glauth/v2 v2.0.0-20211021011345-ef3151c28733 github.com/go-chi/chi/v5 v5.0.7 diff --git a/go.sum b/go.sum index 58b85d1be9..5d7bea06e4 100644 --- a/go.sum +++ b/go.sum @@ -342,8 +342,8 @@ github.com/crewjam/saml v0.4.5/go.mod h1:qCJQpUtZte9R1ZjUBcW8qtCNlinbO363ooNl02S github.com/cs3org/cato v0.0.0-20200828125504-e418fc54dd5e/go.mod h1:XJEZ3/EQuI3BXTp/6DUzFr850vlxq11I6satRtz0YQ4= github.com/cs3org/go-cs3apis v0.0.0-20220126114148-64c025ccdd19 h1:1jqPH58jCxvbaJ9WLIJ7W2/m622bWS6ChptzljSG6IQ= github.com/cs3org/go-cs3apis v0.0.0-20220126114148-64c025ccdd19/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY= -github.com/cs3org/reva v1.16.1-0.20220301071903-1fd81b097801 h1:FOjP9FbcvD48as7Q7TjOtnaNHlQ5va2IEIed1GWqEag= -github.com/cs3org/reva v1.16.1-0.20220301071903-1fd81b097801/go.mod h1:fdlrnZ0f+UtAdpZfLG+4LM0ZrhT5V8tPEQt6ycYm82c= +github.com/cs3org/reva v1.16.1-0.20220301130454-abc01bbfa855 h1:ygRSBDIsIyuVbZ3T4BBjkfvW0+pEZ6JWU2tZlFSGpQI= +github.com/cs3org/reva v1.16.1-0.20220301130454-abc01bbfa855/go.mod h1:fdlrnZ0f+UtAdpZfLG+4LM0ZrhT5V8tPEQt6ycYm82c= github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8 h1:Z9lwXumT5ACSmJ7WGnFl+OMLLjpz5uR2fyz7dC255FI= github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8/go.mod h1:4abs/jPXcmJzYoYGF91JF9Uq9s/KL5n1jvFDix8KcqY= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= diff --git a/settings/ui/tests/acceptance/pageobjects/settingsPage.js b/settings/ui/tests/acceptance/pageobjects/settingsPage.js index b109ff72c1..b49565c5fa 100644 --- a/settings/ui/tests/acceptance/pageobjects/settingsPage.js +++ b/settings/ui/tests/acceptance/pageobjects/settingsPage.js @@ -1,9 +1,8 @@ const { client } = require('nightwatch-api') -const util = require('util') module.exports = { url: function () { - return this.api.launchUrl + '/#/settings' + return this.api.launchUrl + '/settings' }, commands: { @@ -78,6 +77,6 @@ module.exports = { languageInput: { selector: "//label[.='Language']/..//input", locateStrategy: 'xpath' - }, + } } } diff --git a/web/Makefile b/web/Makefile index ce33ae9bec..71238f7de7 100644 --- a/web/Makefile +++ b/web/Makefile @@ -1,6 +1,6 @@ SHELL := bash NAME := web -WEB_ASSETS_VERSION = v5.1.0 +WEB_ASSETS_VERSION = v5.2.0-rc.2 include ../.make/recursion.mk From 2a3276925a4cab8911deeb2a7211b85a5a545492 Mon Sep 17 00:00:00 2001 From: Florian Schade Date: Thu, 3 Mar 2022 09:30:44 +0100 Subject: [PATCH 19/19] [full-ci] bring back web master for drone env (#3256) * bring back web master for drone env --- .drone.env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.env b/.drone.env index 921653baa8..f87d485c1e 100644 --- a/.drone.env +++ b/.drone.env @@ -3,5 +3,5 @@ CORE_COMMITID=828075109e7d9b5e55db8b50d311d9a76b89d7e1 CORE_BRANCH=master # The test runner source for UI tests -WEB_COMMITID=95d54dcc9881697e75cdce15b8e0080017a3b224 -WEB_BRANCH=release-5.2.0 +WEB_COMMITID=1318eaad950cbeaaf6e30bcbfe998515a932be23 +WEB_BRANCH=master