From 9bf2661395bab608a82afa48fd3a3f4a9ba0fb54 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Wed, 15 Jun 2022 14:49:43 +0200 Subject: [PATCH 01/12] add more config doc descriptions --- .../fix-remove-unused-config-options.md | 12 +++ docs/extensions/graph-explorer/_index.md | 7 ++ docs/extensions/graph/_index.md | 4 + docs/extensions/idp/_index.md | 6 ++ docs/extensions/ocs/_index.md | 6 ++ docs/extensions/proxy/_index.md | 6 ++ docs/extensions/search/_index.md | 6 ++ docs/extensions/settings/_index.md | 4 + docs/extensions/sharing/_index.md | 6 ++ docs/extensions/store/_index.md | 7 ++ docs/extensions/thumbnails/_index.md | 7 ++ docs/extensions/web/_index.md | 7 ++ docs/extensions/webdav/_index.md | 9 ++- extensions/app-provider/pkg/config/config.go | 2 +- extensions/app-registry/pkg/config/config.go | 2 +- extensions/auth-basic/pkg/config/config.go | 4 +- extensions/auth-bearer/pkg/config/config.go | 4 +- extensions/auth-machine/pkg/config/config.go | 4 +- extensions/frontend/pkg/config/config.go | 10 +-- extensions/gateway/pkg/config/config.go | 8 +- extensions/graph-explorer/pkg/config/http.go | 4 +- extensions/graph/pkg/config/config.go | 2 +- extensions/graph/pkg/config/http.go | 4 +- extensions/groups/pkg/config/config.go | 4 +- extensions/idp/pkg/config/config.go | 2 +- extensions/idp/pkg/config/http.go | 4 +- extensions/ocdav/pkg/config/config.go | 8 +- extensions/ocs/pkg/config/http.go | 4 +- extensions/proxy/pkg/config/http.go | 4 +- extensions/search/pkg/config/grpc.go | 2 +- extensions/search/pkg/config/http.go | 4 +- extensions/settings/pkg/config/config.go | 16 ++-- extensions/settings/pkg/config/grpc.go | 2 +- extensions/settings/pkg/config/http.go | 6 +- extensions/sharing/pkg/config/config.go | 40 +++++----- .../storage-publiclink/pkg/config/config.go | 6 +- .../storage-shares/pkg/config/config.go | 10 +-- .../storage-system/pkg/config/config.go | 20 +++-- .../pkg/config/defaults/defaultconfig.go | 1 - .../storage-system/pkg/revaconfig/config.go | 11 +-- extensions/storage-users/pkg/config/config.go | 76 +++++++++---------- .../pkg/config/defaults/defaultconfig.go | 1 - .../storage-users/pkg/revaconfig/config.go | 3 - extensions/store/pkg/config/config.go | 2 +- extensions/store/pkg/config/grpc.go | 2 +- extensions/thumbnails/pkg/config/http.go | 2 +- extensions/users/pkg/config/config.go | 4 +- extensions/web/pkg/config/config.go | 25 +++--- .../web/pkg/config/defaults/defaultconfig.go | 5 +- extensions/web/pkg/config/http.go | 6 +- extensions/webdav/pkg/config/config.go | 2 +- extensions/webdav/pkg/config/http.go | 4 +- ocis-pkg/config/config.go | 6 +- ocis-pkg/shared/shared_types.go | 4 +- ocis/pkg/init/init.go | 12 --- 55 files changed, 244 insertions(+), 185 deletions(-) create mode 100644 changelog/unreleased/fix-remove-unused-config-options.md diff --git a/changelog/unreleased/fix-remove-unused-config-options.md b/changelog/unreleased/fix-remove-unused-config-options.md new file mode 100644 index 00000000000..722b47aee06 --- /dev/null +++ b/changelog/unreleased/fix-remove-unused-config-options.md @@ -0,0 +1,12 @@ +Bugfix: Remove unused configuration options + +We've removed multiple unused configuration options: + +- `STORAGE_SYSTEM_DATAPROVIDER_INSECURE`, see also cs3org/reva#2993 +- `STORAGE_USERS_DATAPROVIDER_INSECURE`, see also cs3org/reva#2993 +- `STORAGE_SYSTEM_TEMP_FOLDER`, see also cs3org/reva#2993 +- `STORAGE_USERS_TEMP_FOLDER`, see also cs3org/reva#2993 +- `WEB_UI_CONFIG_VERSION`, see also owncloud/web#7130 + +https://github.com/owncloud/ocis/pull/3973 + diff --git a/docs/extensions/graph-explorer/_index.md b/docs/extensions/graph-explorer/_index.md index 6e97f68a3ec..a10159400f1 100644 --- a/docs/extensions/graph-explorer/_index.md +++ b/docs/extensions/graph-explorer/_index.md @@ -8,4 +8,11 @@ geekdocFilePath: _index.md geekdocCollapseSection: true --- +## Abstract + + This service embeds [Graph-Explorer](https://github.com/owncloud/ocis/tree/master/graph-explorer) to provide a UI for ownCloud Infinite Scale. + +## Table of Contents + +{{< toc-tree >}} diff --git a/docs/extensions/graph/_index.md b/docs/extensions/graph/_index.md index 7ff7bc687c4..fb754d6a86a 100644 --- a/docs/extensions/graph/_index.md +++ b/docs/extensions/graph/_index.md @@ -8,6 +8,10 @@ geekdocFilePath: _index.md geekdocCollapseSection: true --- +## Abstract + This service provides a simple graph world API which can be used by clients or other extensions. +## Table of Contents + {{< toc-tree >}} diff --git a/docs/extensions/idp/_index.md b/docs/extensions/idp/_index.md index e4ab82677c4..d87996e53f8 100644 --- a/docs/extensions/idp/_index.md +++ b/docs/extensions/idp/_index.md @@ -7,4 +7,10 @@ geekdocFilePath: _index.md geekdocCollapseSection: true --- +## Abstract + This service provides an OpenID Connect provider which is the default way to authenticate in oCIS. + +## Table of Contents + +{{< toc-tree >}} diff --git a/docs/extensions/ocs/_index.md b/docs/extensions/ocs/_index.md index 70796fe3c4b..3f74f782c84 100644 --- a/docs/extensions/ocs/_index.md +++ b/docs/extensions/ocs/_index.md @@ -8,4 +8,10 @@ geekdocFilePath: _index.md geekdocCollapseSection: true --- +## Abstract + This service provides the OCS API which is required by some ownCloud clients. + +## Table of Contents + +{{< toc-tree >}} diff --git a/docs/extensions/proxy/_index.md b/docs/extensions/proxy/_index.md index b7aaaef7144..f406b83ec19 100644 --- a/docs/extensions/proxy/_index.md +++ b/docs/extensions/proxy/_index.md @@ -7,4 +7,10 @@ geekdocFilePath: _index.md geekdocCollapseSection: true --- +## Abstract + This service provides a proxy service that routes requests to the correct extensions. + +## Table of Contents + +{{< toc-tree >}} diff --git a/docs/extensions/search/_index.md b/docs/extensions/search/_index.md index b00af59fc7c..fc245f06b9a 100644 --- a/docs/extensions/search/_index.md +++ b/docs/extensions/search/_index.md @@ -7,4 +7,10 @@ geekdocFilePath: _index.md geekdocCollapseSection: true --- +## Abstract + This service provides search functionality. + +## Table of Contents + +{{< toc-tree >}} diff --git a/docs/extensions/settings/_index.md b/docs/extensions/settings/_index.md index fabaf141d0e..4a61c4d8840 100644 --- a/docs/extensions/settings/_index.md +++ b/docs/extensions/settings/_index.md @@ -45,3 +45,7 @@ The forms are generated from the registered *settings bundles*. if it's available. The SDK uses sensible defaults when ocis-settings is not part of the setup. For compatibility with ownCloud 10, a migration of ownCloud 10 settings into the storage of ocis-settings will be available. + +## Table of Contents + +{{< toc-tree >}} diff --git a/docs/extensions/sharing/_index.md b/docs/extensions/sharing/_index.md index e96801c9e44..171541e2f19 100644 --- a/docs/extensions/sharing/_index.md +++ b/docs/extensions/sharing/_index.md @@ -7,4 +7,10 @@ geekdocFilePath: _index.md geekdocCollapseSection: true --- +## Abstract + This service provides sharing functionality. + +## Table of Contents + +{{< toc-tree >}} diff --git a/docs/extensions/store/_index.md b/docs/extensions/store/_index.md index 3638f96524b..ddc5be10a8c 100644 --- a/docs/extensions/store/_index.md +++ b/docs/extensions/store/_index.md @@ -8,4 +8,11 @@ geekdocFilePath: _index.md geekdocCollapseSection: true --- +## Abstract + This service provides ... + + +## Table of Contents + +{{< toc-tree >}} diff --git a/docs/extensions/thumbnails/_index.md b/docs/extensions/thumbnails/_index.md index 30c3f3fa939..84c57b0a00a 100644 --- a/docs/extensions/thumbnails/_index.md +++ b/docs/extensions/thumbnails/_index.md @@ -8,4 +8,11 @@ geekdocFilePath: _index.md geekdocCollapseSection: true --- +## Abstract + This service provides an ocis extensions which generates thumbnails for image files. + + +## Table of Contents + +{{< toc-tree >}} diff --git a/docs/extensions/web/_index.md b/docs/extensions/web/_index.md index cb8c7900b30..a37a35a2e14 100644 --- a/docs/extensions/web/_index.md +++ b/docs/extensions/web/_index.md @@ -8,4 +8,11 @@ geekdocFilePath: _index.md geekdocCollapseSection: true --- +## Abstract + This service embeds [ownCloud Web](https://github.com/owncloud/web) to provide a UI for ownCloud Infinite Scale. + + +## Table of Contents + +{{< toc-tree >}} diff --git a/docs/extensions/webdav/_index.md b/docs/extensions/webdav/_index.md index dbf0f98b6c8..fff42eb9b47 100644 --- a/docs/extensions/webdav/_index.md +++ b/docs/extensions/webdav/_index.md @@ -1,5 +1,5 @@ --- -title: WebDaV +title: WebDAV date: 2018-05-02T00:00:00+00:00 weight: 20 geekdocRepo: https://github.com/owncloud/ocis @@ -8,4 +8,11 @@ geekdocFilePath: _index.md geekdocCollapseSection: true --- +## Abstract + This service provides the WebDAV API which is required by some ownCloud clients. + + +## Table of Contents + +{{< toc-tree >}} diff --git a/extensions/app-provider/pkg/config/config.go b/extensions/app-provider/pkg/config/config.go index 6536748ee90..454bffb4371 100644 --- a/extensions/app-provider/pkg/config/config.go +++ b/extensions/app-provider/pkg/config/config.go @@ -52,7 +52,7 @@ type Debug struct { } type GRPCConfig struct { - Addr string `yaml:"addr" env:"APP_PROVIDER_GRPC_ADDR" desc:"The address of the grpc service."` + Addr string `yaml:"addr" env:"APP_PROVIDER_GRPC_ADDR" desc:"The bind address of the GRPC service."` Namespace string `yaml:"-"` Protocol string `yaml:"protocol" env:"APP_PROVIDER_GRPC_PROTOCOL" desc:"The transport protocol of the grpc service."` } diff --git a/extensions/app-registry/pkg/config/config.go b/extensions/app-registry/pkg/config/config.go index 83cc74883e4..3c13b65ea38 100644 --- a/extensions/app-registry/pkg/config/config.go +++ b/extensions/app-registry/pkg/config/config.go @@ -50,7 +50,7 @@ type Debug struct { } type GRPCConfig struct { - Addr string `yaml:"addr" env:"APP_REGISTRY_GRPC_ADDR" desc:"The address of the grpc service."` + Addr string `yaml:"addr" env:"APP_REGISTRY_GRPC_ADDR" desc:"The bind address of the GRPC service."` Namespace string `yaml:"-"` Protocol string `yaml:"protocol" env:"APP_REGISTRY_GRPC_PROTOCOL" desc:"The transport protocol of the grpc service."` } diff --git a/extensions/auth-basic/pkg/config/config.go b/extensions/auth-basic/pkg/config/config.go index 7660223e9fa..c168c61bd78 100644 --- a/extensions/auth-basic/pkg/config/config.go +++ b/extensions/auth-basic/pkg/config/config.go @@ -18,7 +18,7 @@ type Config struct { TokenManager *TokenManager `yaml:"token_manager"` Reva *Reva `yaml:"reva"` - SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"AUTH_BASIC_SKIP_USER_GROUPS_IN_TOKEN" desc:"Disables the encoding of the user's groupmember ships in the reva access token. To reduces token size, especially when users are members of a large number of groups."` + SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"AUTH_BASIC_SKIP_USER_GROUPS_IN_TOKEN" desc:"Disables the encoding of the user's group memberships in the reva access token. This reduces the token size, especially when users are members of a large number of groups."` AuthProvider string `yaml:"auth_provider" env:"AUTH_BASIC_AUTH_PROVIDER" desc:"The auth provider which should be used by the service (e.g. 'ldap')."` AuthProviders AuthProviders `yaml:"auth_providers"` @@ -51,7 +51,7 @@ type Debug struct { } type GRPCConfig struct { - Addr string `yaml:"addr" env:"AUTH_BASIC_GRPC_ADDR" desc:"The address of the grpc service."` + Addr string `yaml:"addr" env:"AUTH_BASIC_GRPC_ADDR" desc:"The bind address of the GRPC service."` Namespace string `yaml:"-"` Protocol string `yaml:"protocol" env:"AUTH_BASIC_GRPC_PROTOCOL" desc:"The transport protocol of the grpc service."` } diff --git a/extensions/auth-bearer/pkg/config/config.go b/extensions/auth-bearer/pkg/config/config.go index 63ac65d9288..3e583696989 100644 --- a/extensions/auth-bearer/pkg/config/config.go +++ b/extensions/auth-bearer/pkg/config/config.go @@ -18,7 +18,7 @@ type Config struct { TokenManager *TokenManager `yaml:"token_manager"` Reva *Reva `yaml:"reva"` - SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"AUTH_BEARER_SKIP_USER_GROUPS_IN_TOKEN" desc:"Skip storing all groups of a user in the jwt token."` + SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"AUTH_BEARER_SKIP_USER_GROUPS_IN_TOKEN" desc:"Disables the encoding of the user's group memberships in the reva access token. This reduces the token size, especially when users are members of a large number of groups."` OIDC OIDC `yaml:"oidc"` @@ -51,7 +51,7 @@ type Debug struct { } type GRPCConfig struct { - Addr string `yaml:"addr" env:"AUTH_BEARER_GRPC_ADDR" desc:"The address of the grpc service."` + Addr string `yaml:"addr" env:"AUTH_BEARER_GRPC_ADDR" desc:"The bind address of the GRPC service."` Namespace string `yaml:"-"` Protocol string `yaml:"protocol" env:"AUTH_BEARER_GRPC_PROTOCOL" desc:"The transport protocol of the grpc service."` } diff --git a/extensions/auth-machine/pkg/config/config.go b/extensions/auth-machine/pkg/config/config.go index e2a363c3e15..4c4ade07a45 100644 --- a/extensions/auth-machine/pkg/config/config.go +++ b/extensions/auth-machine/pkg/config/config.go @@ -18,7 +18,7 @@ type Config struct { TokenManager *TokenManager `yaml:"token_manager"` Reva *Reva `yaml:"reva"` - SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"AUTH_MACHINE_SKIP_USER_GROUPS_IN_TOKEN" desc:"Skip storing all groups of a user in the jwt token."` + SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"AUTH_MACHINE_SKIP_USER_GROUPS_IN_TOKEN" desc:"Disables the encoding of the user's group memberships in the reva access token. This reduces the token size, especially when users are members of a large number of groups."` MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY;AUTH_MACHINE_API_KEY" desc:"Machine auth API key used for validating requests from other services when impersonating users."` @@ -51,7 +51,7 @@ type Debug struct { } type GRPCConfig struct { - Addr string `yaml:"addr" env:"AUTH_MACHINE_GRPC_ADDR" desc:"The address of the grpc service."` + Addr string `yaml:"addr" env:"AUTH_MACHINE_GRPC_ADDR" desc:"The bind address of the GRPC service."` Namespace string `yaml:"-"` Protocol string `yaml:"protocol" env:"AUTH_MACHINE_GRPC_PROTOCOL" desc:"The transport protocol of the grpc service."` } diff --git a/extensions/frontend/pkg/config/config.go b/extensions/frontend/pkg/config/config.go index 4f2d6acfe14..8c607df0d81 100644 --- a/extensions/frontend/pkg/config/config.go +++ b/extensions/frontend/pkg/config/config.go @@ -17,13 +17,13 @@ type Config struct { // JWTSecret used to verify reva access token - TransferSecret string `yaml:"transfer_secret" env:"STORAGE_TRANSFER_SECRET"` + TransferSecret string `yaml:"transfer_secret" env:"STORAGE_TRANSFER_SECRET" desc:"Transfer secret for signing file up- and download requests."` TokenManager *TokenManager `yaml:"token_manager"` Reva *Reva `yaml:"reva"` - MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY;FRONTEND_MACHINE_AUTH_API_KEY" desc:"Machine auth API key used for accessing the 'auth-machine' service."` + MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY;FRONTEND_MACHINE_AUTH_API_KEY" desc:"Machine auth API key used for accessing the 'auth-machine' service to impersonate users."` - SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"FRONTEND_SKIP_USER_GROUPS_IN_TOKEN" desc:"Disables the encoding of the user's group memberships in the reva access token. This reduces token size, especially when users are members of a large number of groups."` + SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"FRONTEND_SKIP_USER_GROUPS_IN_TOKEN" desc:"Disables the loading of user's group memberships from the reva access token."` EnableFavorites bool `yaml:"enable_favorites" env:"FRONTEND_ENABLE_FAVORITES" desc:"Disables the support for favorites in the frontend."` EnableProjectSpaces bool `yaml:"enable_project_spaces" env:"FRONTEND_ENABLE_PROJECT_SPACES" desc:"Indicates to clients that project spaces are supposed to be made available."` @@ -32,7 +32,7 @@ type Config struct { UploadHTTPMethodOverride string `yaml:"upload_http_method_override" env:"FRONTEND_UPLOAD_HTTP_METHOD_OVERRIDE" desc:"Advise TUS to replace PATCH requests by POST requests."` DefaultUploadProtocol string `yaml:"default_upload_protocol" env:"FRONTEND_DEFAULT_UPLOAD_PROTOCOL" desc:"The default upload protocol to use in the frontend (e.g. tus)."` - PublicURL string `yaml:"public_url" env:"OCIS_URL;FRONTEND_PUBLIC_URL" desc:"The public facing url of the ocis frontend."` + PublicURL string `yaml:"public_url" env:"OCIS_URL;FRONTEND_PUBLIC_URL" desc:"URL, where oCIS is reachable for users."` AppHandler AppHandler `yaml:"app_handler"` Archiver Archiver `yaml:"archiver"` @@ -71,7 +71,7 @@ type Debug struct { } type HTTPConfig struct { - Addr string `yaml:"addr" env:"FRONTEND_HTTP_ADDR" desc:"The address of the http service."` + Addr string `yaml:"addr" env:"FRONTEND_HTTP_ADDR" desc:"The bind address of the HTTP service."` Namespace string `yaml:"-"` Protocol string `yaml:"protocol" env:"FRONTEND_HTTP_PROTOCOL" desc:"The transport protocol of the http service."` Prefix string `yaml:"prefix" env:"FRONTEND_HTTP_PREFIX" desc:"The Path prefix where the frontend can be accessed (defaults to /)."` diff --git a/extensions/gateway/pkg/config/config.go b/extensions/gateway/pkg/config/config.go index f53ad75f9eb..1f6951728b5 100644 --- a/extensions/gateway/pkg/config/config.go +++ b/extensions/gateway/pkg/config/config.go @@ -19,18 +19,18 @@ type Config struct { TokenManager *TokenManager `yaml:"token_manager"` Reva *Reva `yaml:"reva"` - SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"GATEWAY_SKIP_USER_GROUPS_IN_TOKEN"` + SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"GATEWAY_SKIP_USER_GROUPS_IN_TOKEN" desc:"Disables the loading of user's group memberships from the reva access token."` CommitShareToStorageGrant bool `yaml:"commit_share_to_storage_grant" env:"GATEWAY_COMMIT_SHARE_TO_STORAGE_GRANT"` CommitShareToStorageRef bool `yaml:"commit_share_to_storage_ref" env:"GATEWAY_COMMIT_SHARE_TO_STORAGE_REF"` ShareFolder string `yaml:"share_folder_name" env:"GATEWAY_SHARE_FOLDER_NAME"` DisableHomeCreationOnLogin bool `yaml:"disable_home_creation_on_login" env:"GATEWAY_DISABLE_HOME_CREATION_ON_LOGIN"` - TransferSecret string `yaml:"transfer_secret" env:"STORAGE_TRANSFER_SECRET"` // TODO: how to name the env + TransferSecret string `yaml:"transfer_secret" env:"STORAGE_TRANSFER_SECRET" desc:"Transfer secret for signing file up- and download requests."` TransferExpires int `yaml:"transfer_expires" env:"GATEWAY_TRANSFER_EXPIRES"` HomeMapping string `yaml:"home_mapping" env:"GATEWAY_HOME_MAPPING"` EtagCacheTTL int `yaml:"etag_cache_ttl" env:"GATEWAY_ETAG_CACHE_TTL"` - FrontendPublicURL string `yaml:"frontend_public_url" env:"OCIS_URL;GATEWAY_FRONTEND_PUBLIC_URL"` + FrontendPublicURL string `yaml:"frontend_public_url" env:"OCIS_URL;GATEWAY_FRONTEND_PUBLIC_URL" desc:"URL, where oCIS is reachable for users."` UsersEndpoint string `yaml:"users_endpoint" env:"GATEWAY_USERS_ENDPOINT"` GroupsEndpoint string `yaml:"groups_endpoint" env:"GATEWAY_GROUPS_ENDPOINT"` @@ -75,7 +75,7 @@ type Debug struct { } type GRPCConfig struct { - Addr string `yaml:"addr" env:"GATEWAY_GRPC_ADDR" desc:"The address of the grpc service."` + Addr string `yaml:"addr" env:"GATEWAY_GRPC_ADDR" desc:"The bind address of the GRPC service."` Namespace string `yaml:"-"` Protocol string `yaml:"protocol" env:"GATEWAY_GRPC_PROTOCOL" desc:"The transport protocol of the grpc service."` } diff --git a/extensions/graph-explorer/pkg/config/http.go b/extensions/graph-explorer/pkg/config/http.go index 54f9c6bc636..a13c41c3de7 100644 --- a/extensions/graph-explorer/pkg/config/http.go +++ b/extensions/graph-explorer/pkg/config/http.go @@ -2,8 +2,8 @@ package config // HTTP defines the available http configuration. type HTTP struct { - Addr string `yaml:"addr" env:"GRAPH_EXPLORER_HTTP_ADDR" desc:"The HTTP service address."` - Root string `yaml:"root" env:"GRAPH_EXPLORER_HTTP_ROOT" desc:"The HTTP service root path."` + Addr string `yaml:"addr" env:"GRAPH_EXPLORER_HTTP_ADDR" desc:"The bind address of the HTTP service."` + Root string `yaml:"root" env:"GRAPH_EXPLORER_HTTP_ROOT" desc:"The root path of the HTTP service."` Namespace string `yaml:"-"` } diff --git a/extensions/graph/pkg/config/config.go b/extensions/graph/pkg/config/config.go index 5704aee04ef..8d7bc469421 100644 --- a/extensions/graph/pkg/config/config.go +++ b/extensions/graph/pkg/config/config.go @@ -29,7 +29,7 @@ type Config struct { } type Spaces struct { - WebDavBase string `yaml:"webdav_base" env:"OCIS_URL;GRAPH_SPACES_WEBDAV_BASE"` + WebDavBase string `yaml:"webdav_base" env:"OCIS_URL;GRAPH_SPACES_WEBDAV_BASE" desc:"URL, where oCIS is reachable for users."` WebDavPath string `yaml:"webdav_path" env:"GRAPH_SPACES_WEBDAV_PATH"` DefaultQuota string `yaml:"default_quota" env:"GRAPH_SPACES_DEFAULT_QUOTA"` Insecure bool `yaml:"insecure" env:"OCIS_INSECURE;GRAPH_SPACES_INSECURE"` diff --git a/extensions/graph/pkg/config/http.go b/extensions/graph/pkg/config/http.go index e8da11aa270..7116a2c143b 100644 --- a/extensions/graph/pkg/config/http.go +++ b/extensions/graph/pkg/config/http.go @@ -2,7 +2,7 @@ package config // HTTP defines the available http configuration. type HTTP struct { - Addr string `yaml:"addr" env:"GRAPH_HTTP_ADDR"` + Addr string `yaml:"addr" env:"GRAPH_HTTP_ADDR" desc:"The bind address of the HTTP service."` Namespace string `yaml:"-"` - Root string `yaml:"root" env:"GRAPH_HTTP_ROOT"` + Root string `yaml:"root" env:"GRAPH_HTTP_ROOT" desc:"The root path of the HTTP service."` } diff --git a/extensions/groups/pkg/config/config.go b/extensions/groups/pkg/config/config.go index 55d6dcf9ca0..569aa46406d 100644 --- a/extensions/groups/pkg/config/config.go +++ b/extensions/groups/pkg/config/config.go @@ -18,7 +18,7 @@ type Config struct { TokenManager *TokenManager `yaml:"token_manager"` Reva *Reva `yaml:"reva"` - SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"GROUPS_SKIP_USER_GROUPS_IN_TOKEN" desc:"Disables the encoding of the user's groupmember ships in the reva access token. To reduces token size, especially when users are members of a large number of groups."` + SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"GROUPS_SKIP_USER_GROUPS_IN_TOKEN" desc:"Disables the loading of user's group memberships from the reva access token."` Driver string `yaml:"driver" desc:"The driver which should be used by the groups service (e.g. ldap)."` Drivers Drivers `yaml:"drivers"` @@ -52,7 +52,7 @@ type Debug struct { } type GRPCConfig struct { - Addr string `yaml:"addr" env:"GROUPS_GRPC_ADDR" desc:"The address of the grpc service."` + Addr string `yaml:"addr" env:"GROUPS_GRPC_ADDR" desc:"The bind address of the GRPC service."` Namespace string `yaml:"-"` Protocol string `yaml:"protocol" env:"GROUPS_GRPC_PROTOCOL" desc:"The transport protocol of the grpc service."` } diff --git a/extensions/idp/pkg/config/config.go b/extensions/idp/pkg/config/config.go index df25ff68bd0..80415bfb61b 100644 --- a/extensions/idp/pkg/config/config.go +++ b/extensions/idp/pkg/config/config.go @@ -53,7 +53,7 @@ type Ldap struct { // Asset defines the available asset configuration. type Asset struct { - Path string `yaml:"asset" env:"IDP_ASSET_PATH" desc:"Defines the path for the IDP assets."` + Path string `yaml:"asset" env:"IDP_ASSET_PATH" desc:"Serve IDP assets from a path on the filesystem instead of the builtin assets."` } type Client struct { diff --git a/extensions/idp/pkg/config/http.go b/extensions/idp/pkg/config/http.go index 616449c0e70..8a8138336ca 100644 --- a/extensions/idp/pkg/config/http.go +++ b/extensions/idp/pkg/config/http.go @@ -2,8 +2,8 @@ package config // HTTP defines the available http configuration. type HTTP struct { - Addr string `yaml:"addr" env:"IDP_HTTP_ADDR"` - Root string `yaml:"root" env:"IDP_HTTP_ROOT"` + Addr string `yaml:"addr" env:"IDP_HTTP_ADDR" desc:"The bind address of the HTTP service."` + Root string `yaml:"root" env:"IDP_HTTP_ROOT" desc:"The root path of the HTTP service."` Namespace string `yaml:"-"` TLSCert string `yaml:"tls_cert" env:"IDP_TRANSPORT_TLS_CERT"` TLSKey string `yaml:"tls_key" env:"IDP_TRANSPORT_TLS_KEY"` diff --git a/extensions/ocdav/pkg/config/config.go b/extensions/ocdav/pkg/config/config.go index 4bf2d769951..04fb48ebe43 100644 --- a/extensions/ocdav/pkg/config/config.go +++ b/extensions/ocdav/pkg/config/config.go @@ -18,18 +18,18 @@ type Config struct { TokenManager *TokenManager `yaml:"token_manager"` Reva *Reva `yaml:"reva"` - SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"OCDAV_SKIP_USER_GROUPS_IN_TOKEN" desc:"Disables the encoding of the user's group memberships in the reva access token. This reduces token size, especially when users are members of a large number of groups."` + SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"OCDAV_SKIP_USER_GROUPS_IN_TOKEN" desc:"Disables the loading of user's group memberships from the reva access token."` WebdavNamespace string `yaml:"webdav_namespace" env:"OCDAV_WEBDAV_NAMESPACE" desc:"Jail requests to /dav/webdav into this CS3 namespace. Supports template layouting with CS3 User properties."` FilesNamespace string `yaml:"files_namespace" env:"OCDAV_FILES_NAMESPACE" desc:"Jail requests to /dav/files/{username} into this CS3 namespace. Supports template layouting with CS3 User properties."` SharesNamespace string `yaml:"shares_namespace" env:"OCDAV_SHARES_NAMESPACE" desc:"The human readable path for the share jail. Relative to a users personal space root. Upcased intentionally."` // PublicURL used to redirect /s/{token} URLs to - PublicURL string `yaml:"public_url" env:"OCIS_URL;OCDAV_PUBLIC_URL"` + PublicURL string `yaml:"public_url" env:"OCIS_URL;OCDAV_PUBLIC_URL" desc:"URL, where oCIS is reachable for users."` // Insecure certificates allowed when making requests to the gateway Insecure bool `yaml:"insecure" env:"OCIS_INSECURE;OCDAV_INSECURE"` // Timeout in seconds when making requests to the gateway - Timeout int64 `yaml:"gateway_request_timeout" env:"OCDAV_GATEWAY_REQUEST_TIMEOUT" desc:"Request timeout for ocdav gateway.` + Timeout int64 `yaml:"gateway_request_timeout" env:"OCDAV_GATEWAY_REQUEST_TIMEOUT" desc:"Request timeout for requests from the oCDAV service to the gateway service."` Middleware Middleware `yaml:"middleware"` Context context.Context `yaml:"-"` @@ -61,7 +61,7 @@ type Debug struct { } type HTTPConfig struct { - Addr string `yaml:"addr" env:"OCDAV_HTTP_ADDR" desc:"The address of the http service."` + Addr string `yaml:"addr" env:"OCDAV_HTTP_ADDR" desc:"The bind address of the HTTP service."` Namespace string `yaml:"-"` Protocol string `yaml:"protocol" env:"OCDAV_HTTP_PROTOCOL" desc:"The transport protocol of the http service."` Prefix string `yaml:"prefix" env:"OCDAV_HTTP_PREFIX" desc:"A URL path prefix for the handler."` diff --git a/extensions/ocs/pkg/config/http.go b/extensions/ocs/pkg/config/http.go index 115bc4b7a8d..4b091779518 100644 --- a/extensions/ocs/pkg/config/http.go +++ b/extensions/ocs/pkg/config/http.go @@ -2,8 +2,8 @@ package config // HTTP defines the available http configuration. type HTTP struct { - Addr string `yaml:"addr" env:"OCS_HTTP_ADDR"` - Root string `yaml:"root" env:"OCS_HTTP_ROOT"` + Addr string `yaml:"addr" env:"OCS_HTTP_ADDR" desc:"The bind address of the HTTP service."` + Root string `yaml:"root" env:"OCS_HTTP_ROOT" desc:"The root path of the HTTP service."` Namespace string `yaml:"-"` CORS CORS `yaml:"cors"` } diff --git a/extensions/proxy/pkg/config/http.go b/extensions/proxy/pkg/config/http.go index e57452948dc..89aa735c116 100644 --- a/extensions/proxy/pkg/config/http.go +++ b/extensions/proxy/pkg/config/http.go @@ -2,8 +2,8 @@ package config // HTTP defines the available http configuration. type HTTP struct { - Addr string `yaml:"addr" env:"PROXY_HTTP_ADDR"` - Root string `yaml:"root" env:"PROXY_HTTP_ROOT"` + Addr string `yaml:"addr" env:"PROXY_HTTP_ADDR" desc:"The bind address of the HTTP service."` + Root string `yaml:"root" env:"PROXY_HTTP_ROOT" desc:"The root path of the HTTP service."` Namespace string `yaml:"-"` TLSCert string `yaml:"tls_cert" env:"PROXY_TRANSPORT_TLS_CERT"` TLSKey string `yaml:"tls_key" env:"PROXY_TRANSPORT_TLS_KEY"` diff --git a/extensions/search/pkg/config/grpc.go b/extensions/search/pkg/config/grpc.go index 89593b52933..51fd97212f3 100644 --- a/extensions/search/pkg/config/grpc.go +++ b/extensions/search/pkg/config/grpc.go @@ -2,6 +2,6 @@ package config // GRPC defines the available grpc configuration. type GRPC struct { - Addr string `ocisConfig:"addr" env:"SEARCH_GRPC_ADDR" desc:"The address of the grpc service."` + Addr string `ocisConfig:"addr" env:"SEARCH_GRPC_ADDR" desc:"The bind address of the GRPC service."` Namespace string `ocisConfig:"-" yaml:"-"` } diff --git a/extensions/search/pkg/config/http.go b/extensions/search/pkg/config/http.go index 018f8c551f1..7d1fbc2c571 100644 --- a/extensions/search/pkg/config/http.go +++ b/extensions/search/pkg/config/http.go @@ -2,7 +2,7 @@ package config // HTTP defines the available http configuration. type HTTP struct { - Addr string `ocisConfig:"addr" env:"SEARCH_HTTP_ADDR"` + Addr string `ocisConfig:"addr" env:"SEARCH_HTTP_ADDR" desc:"The bind address of the HTTP service."` Namespace string `ocisConfig:"-" yaml:"-"` - Root string `ocisConfig:"root" env:"SEARCH_HTTP_ROOT"` + Root string `ocisConfig:"root" env:"SEARCH_HTTP_ROOT" desc:"The root path of the HTTP service."` } diff --git a/extensions/settings/pkg/config/config.go b/extensions/settings/pkg/config/config.go index 87fbaa7ebfb..de7570cb166 100644 --- a/extensions/settings/pkg/config/config.go +++ b/extensions/settings/pkg/config/config.go @@ -19,8 +19,8 @@ type Config struct { HTTP HTTP `yaml:"http"` GRPC GRPC `yaml:"grpc"` - StoreType string `yaml:"store_type" env:"SETTINGS_STORE_TYPE"` - DataPath string `yaml:"data_path" env:"SETTINGS_DATA_PATH"` + StoreType string `yaml:"store_type" env:"SETTINGS_STORE_TYPE" desc:"Store type configures the persistency driver. Possible values are \"metadata\" and \"filesystem\"."` + DataPath string `yaml:"data_path" env:"SETTINGS_DATA_PATH" desc:"Path for the persistence directory."` Metadata Metadata `yaml:"metadata_config"` AdminUserID string `yaml:"admin_user_id" env:"OCIS_ADMIN_USER_ID;SETTINGS_ADMIN_USER_ID" desc:"ID of a user, that should receive admin privileges."` @@ -35,15 +35,15 @@ type Config struct { // Asset defines the available asset configuration. type Asset struct { - Path string `yaml:"path" env:"SETTINGS_ASSET_PATH"` + Path string `yaml:"path" env:"SETTINGS_ASSET_PATH" desc:"Serve settings assets from a path on the filesystem instead of the builtin assets."` } // Metadata configures the metadata store to use type Metadata struct { - GatewayAddress string `yaml:"gateway_addr" env:"STORAGE_GATEWAY_GRPC_ADDR"` - StorageAddress string `yaml:"storage_addr" env:"STORAGE_GRPC_ADDR"` + GatewayAddress string `yaml:"gateway_addr" env:"STORAGE_GATEWAY_GRPC_ADDR" desc:"GRPC address of the storage-system extension."` + StorageAddress string `yaml:"storage_addr" env:"STORAGE_GRPC_ADDR" desc:"GRPC address of the storage-system extension."` - SystemUserID string `yaml:"system_user_id" env:"OCIS_SYSTEM_USER_ID;SETTINGS_SYSTEM_USER_ID"` - SystemUserIDP string `yaml:"system_user_idp" env:"OCIS_SYSTEM_USER_IDP;SETTINGS_SYSTEM_USER_IDP"` - SystemUserAPIKey string `yaml:"system_user_api_key" env:"OCIS_SYSTEM_USER_API_KEY"` + SystemUserID string `yaml:"system_user_id" env:"OCIS_SYSTEM_USER_ID;SETTINGS_SYSTEM_USER_ID" desc:"ID of the oCIS storage-system system user."` + SystemUserIDP string `yaml:"system_user_idp" env:"OCIS_SYSTEM_USER_IDP;SETTINGS_SYSTEM_USER_IDP" desc:"IDP of the oCIS storage-system system user."` + SystemUserAPIKey string `yaml:"system_user_api_key" env:"OCIS_SYSTEM_USER_API_KEY" desc:"API key for the storage-system system user."` } diff --git a/extensions/settings/pkg/config/grpc.go b/extensions/settings/pkg/config/grpc.go index f6f8a0f0d37..1acae9e3004 100644 --- a/extensions/settings/pkg/config/grpc.go +++ b/extensions/settings/pkg/config/grpc.go @@ -2,6 +2,6 @@ package config // GRPC defines the available grpc configuration. type GRPC struct { - Addr string `yaml:"addr" env:"SETTINGS_GRPC_ADDR"` + Addr string `yaml:"addr" env:"SETTINGS_GRPC_ADDR" desc:"The bind address of the GRPC service."` Namespace string `yaml:"-"` } diff --git a/extensions/settings/pkg/config/http.go b/extensions/settings/pkg/config/http.go index 5b212af05c3..5c61c906831 100644 --- a/extensions/settings/pkg/config/http.go +++ b/extensions/settings/pkg/config/http.go @@ -2,10 +2,10 @@ package config // HTTP defines the available http configuration. type HTTP struct { - Addr string `yaml:"addr" env:"SETTINGS_HTTP_ADDR"` + Addr string `yaml:"addr" env:"SETTINGS_HTTP_ADDR" desc:"The bind address of the HTTP service."` Namespace string `yaml:"-"` - Root string `yaml:"root" env:"SETTINGS_HTTP_ROOT"` - CacheTTL int `yaml:"cache_ttl" env:"SETTINGS_CACHE_TTL"` + Root string `yaml:"root" env:"SETTINGS_HTTP_ROOT" desc:"The root path of the HTTP service."` + CacheTTL int `yaml:"cache_ttl" env:"SETTINGS_CACHE_TTL" desc:"Cache TTL policy."` CORS CORS `yaml:"cors"` } diff --git a/extensions/sharing/pkg/config/config.go b/extensions/sharing/pkg/config/config.go index 12753527583..6e9e3cd7a8c 100644 --- a/extensions/sharing/pkg/config/config.go +++ b/extensions/sharing/pkg/config/config.go @@ -19,11 +19,11 @@ type Config struct { Reva *Reva `yaml:"reva"` Events Events `yaml:"events"` - SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"SHARING_SKIP_USER_GROUPS_IN_TOKEN"` + SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"SHARING_SKIP_USER_GROUPS_IN_TOKEN" desc:"Disables the loading of user's group memberships from the reva access token."` - UserSharingDriver string `yaml:"user_sharing_driver" env:"SHARING_USER_DRIVER"` + UserSharingDriver string `yaml:"user_sharing_driver" env:"SHARING_USER_DRIVER" desc:"Driver to be used to persist shares. Possible values: \"json\", \"cs3\", \"owncloudsql\""` UserSharingDrivers UserSharingDrivers `yaml:"user_sharing_drivers"` - PublicSharingDriver string `yaml:"public_sharing_driver" env:"SHARING_PUBLIC_DRIVER"` + PublicSharingDriver string `yaml:"public_sharing_driver" env:"SHARING_PUBLIC_DRIVER" desc:"Driver to be used to persist public shares. Possible values: \"json\", \"cs3\""` PublicSharingDrivers PublicSharingDrivers `yaml:"public_sharing_drivers"` Supervised bool `yaml:"-"` @@ -55,7 +55,7 @@ type Debug struct { } type GRPCConfig struct { - Addr string `yaml:"addr" env:"SHARING_GRPC_ADDR" desc:"The address of the grpc service."` + Addr string `yaml:"addr" env:"SHARING_GRPC_ADDR" desc:"The bind address of the GRPC service."` Namespace string `yaml:"-"` Protocol string `yaml:"protocol" env:"SHARING_GRPC_PROTOCOL" desc:"The transport protocol of the grpc service."` } @@ -69,7 +69,7 @@ type UserSharingDrivers struct { } type UserSharingJSONDriver struct { - File string `yaml:"file" env:"SHARING_USER_JSON_FILE"` + File string `yaml:"file" env:"SHARING_USER_JSON_FILE" desc:"Path to the json file where shares will be persisted."` } type UserSharingSQLDriver struct { @@ -85,19 +85,19 @@ type UserSharingSQLDriver struct { } type UserSharingOwnCloudSQLDriver struct { - DBUsername string `yaml:"db_username" env:"SHARING_USER_OWNCLOUDSQL_DB_USERNAME"` - DBPassword string `yaml:"db_password" env:"SHARING_USER_OWNCLOUDSQL_DB_PASSWORD"` - DBHost string `yaml:"db_host" env:"SHARING_USER_OWNCLOUDSQL_DB_HOST"` - DBPort int `yaml:"db_port" env:"SHARING_USER_OWNCLOUDSQL_DB_PORT"` - DBName string `yaml:"db_name" env:"SHARING_USER_OWNCLOUDSQL_DB_NAME"` - UserStorageMountID string `yaml:"user_storage_mount_id" env:"SHARING_USER_OWNCLOUDSQL_USER_STORAGE_MOUNT_ID"` + DBUsername string `yaml:"db_username" env:"SHARING_USER_OWNCLOUDSQL_DB_USERNAME" desc:"Username for the database."` + DBPassword string `yaml:"db_password" env:"SHARING_USER_OWNCLOUDSQL_DB_PASSWORD" desc:"Password for the database."` + DBHost string `yaml:"db_host" env:"SHARING_USER_OWNCLOUDSQL_DB_HOST" desc:"Hostname or IP of the database server."` + DBPort int `yaml:"db_port" env:"SHARING_USER_OWNCLOUDSQL_DB_PORT" desc:"Port, the database server is listening on."` + DBName string `yaml:"db_name" env:"SHARING_USER_OWNCLOUDSQL_DB_NAME" desc:"Name of the database to be used."` + UserStorageMountID string `yaml:"user_storage_mount_id" env:"SHARING_USER_OWNCLOUDSQL_USER_STORAGE_MOUNT_ID" desc:"Mount ID of this storage."` } type UserSharingCS3Driver struct { - ProviderAddr string `yaml:"provider_addr" env:"SHARING_USER_CS3_PROVIDER_ADDR"` - SystemUserID string `yaml:"system_user_id" env:"OCIS_SYSTEM_USER_ID;SHARING_USER_CS3_SYSTEM_USER_ID"` - SystemUserIDP string `yaml:"system_user_idp" env:"OCIS_SYSTEM_USER_IDP;SHARING_USER_CS3_SYSTEM_USER_IDP"` - SystemUserAPIKey string `yaml:"system_user_api_key" env:"OCIS_SYSTEM_USER_API_KEY;SHARING_USER_CS3_SYSTEM_USER_API_KEY"` + ProviderAddr string `yaml:"provider_addr" env:"SHARING_USER_CS3_PROVIDER_ADDR" desc:"GRPC address of the storage-system extension."` + SystemUserID string `yaml:"system_user_id" env:"OCIS_SYSTEM_USER_ID;SHARING_USER_CS3_SYSTEM_USER_ID" desc:"ID of the oCIS storage-system system user."` + SystemUserIDP string `yaml:"system_user_idp" env:"OCIS_SYSTEM_USER_IDP;SHARING_USER_CS3_SYSTEM_USER_IDP" desc:"IDP of the oCIS storage-system system user."` + SystemUserAPIKey string `yaml:"system_user_api_key" env:"OCIS_SYSTEM_USER_API_KEY;SHARING_USER_CS3_SYSTEM_USER_API_KEY" desc:"API key for the storage-system system user."` } type PublicSharingDrivers struct { @@ -108,7 +108,7 @@ type PublicSharingDrivers struct { } type PublicSharingJSONDriver struct { - File string `yaml:"file" env:"SHARING_PUBLIC_JSON_FILE"` + File string `yaml:"file" env:"SHARING_PUBLIC_JSON_FILE" desc:"Path to the json file where public shares will be persisted."` } type PublicSharingSQLDriver struct { @@ -124,10 +124,10 @@ type PublicSharingSQLDriver struct { } type PublicSharingCS3Driver struct { - ProviderAddr string `yaml:"provider_addr" env:"SHARING_PUBLIC_CS3_PROVIDER_ADDR"` - SystemUserID string `yaml:"system_user_id" env:"OCIS_SYSTEM_USER_ID;SHARING_PUBLIC_CS3_SYSTEM_USER_ID"` - SystemUserIDP string `yaml:"system_user_idp" env:"OCIS_SYSTEM_USER_IDP;SHARING_PUBLIC_CS3_SYSTEM_USER_IDP"` - SystemUserAPIKey string `yaml:"system_user_api_key" env:"OCIS_SYSTEM_USER_API_KEY;SHARING_USER_CS3_SYSTEM_USER_API_KEY"` + ProviderAddr string `yaml:"provider_addr" env:"SHARING_PUBLIC_CS3_PROVIDER_ADDR" desc:"GRPC address of the storage-system extension."` + SystemUserID string `yaml:"system_user_id" env:"OCIS_SYSTEM_USER_ID;SHARING_PUBLIC_CS3_SYSTEM_USER_ID" desc:"ID of the oCIS storage-system system user."` + SystemUserIDP string `yaml:"system_user_idp" env:"OCIS_SYSTEM_USER_IDP;SHARING_PUBLIC_CS3_SYSTEM_USER_IDP" desc:"IDP of the oCIS storage-system system user."` + SystemUserAPIKey string `yaml:"system_user_api_key" env:"OCIS_SYSTEM_USER_API_KEY;SHARING_USER_CS3_SYSTEM_USER_API_KEY" desc:"API key for the storage-system system user."` } type Events struct { diff --git a/extensions/storage-publiclink/pkg/config/config.go b/extensions/storage-publiclink/pkg/config/config.go index 159f4c8de19..9faf48a934d 100644 --- a/extensions/storage-publiclink/pkg/config/config.go +++ b/extensions/storage-publiclink/pkg/config/config.go @@ -18,7 +18,7 @@ type Config struct { TokenManager *TokenManager `yaml:"token_manager"` Reva *Reva `yaml:"reva"` - SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"STORAGE_PUBLICLINK_SKIP_USER_GROUPS_IN_TOKEN"` + SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"STORAGE_PUBLICLINK_SKIP_USER_GROUPS_IN_TOKEN" desc:"Disables the loading of user's group memberships from the reva access token."` StorageProvider StorageProvider `yaml:"storage_provider"` @@ -51,11 +51,11 @@ type Debug struct { } type GRPCConfig struct { - Addr string `yaml:"addr" env:"STORAGE_PUBLICLINK_GRPC_ADDR" desc:"The address of the grpc service."` + Addr string `yaml:"addr" env:"STORAGE_PUBLICLINK_GRPC_ADDR" desc:"The bind address of the GRPC service."` Namespace string `yaml:"-"` Protocol string `yaml:"protocol" env:"STORAGE_PUBLICLINK_GRPC_PROTOCOL" desc:"The transport protocol of the grpc service."` } type StorageProvider struct { - MountID string `yaml:"mount_id" env:"STORAGE_PUBLICLINK_STORAGE_PROVIDER_MOUNT_ID"` + MountID string `yaml:"mount_id" env:"STORAGE_PUBLICLINK_STORAGE_PROVIDER_MOUNT_ID" desc:"Mount ID of this storage."` } diff --git a/extensions/storage-shares/pkg/config/config.go b/extensions/storage-shares/pkg/config/config.go index 6ee4621e429..b7bfd97920d 100644 --- a/extensions/storage-shares/pkg/config/config.go +++ b/extensions/storage-shares/pkg/config/config.go @@ -18,11 +18,11 @@ type Config struct { TokenManager *TokenManager `yaml:"token_manager"` Reva *Reva `yaml:"reva"` - SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"STORAGE_SHARES_SKIP_USER_GROUPS_IN_TOKEN"` + SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"STORAGE_SHARES_SKIP_USER_GROUPS_IN_TOKEN" desc:"Disables the loading of user's group memberships from the reva access token."` - MountID string `yaml:"mount_id" env:"STORAGE_SHARES_MOUNT_ID"` - ReadOnly bool `yaml:"readonly" env:"STORAGE_SHARES_READ_ONLY"` - SharesProviderEndpoint string `yaml:"user_share_provider_endpoint" env:"STORAGE_SHARES_USER_SHARE_PROVIDER_ENDPOINT"` + MountID string `yaml:"mount_id" env:"STORAGE_SHARES_MOUNT_ID" desc:"Mount ID of this storage."` + ReadOnly bool `yaml:"readonly" env:"STORAGE_SHARES_READ_ONLY" desc:"Set this storage to be read-only."` + SharesProviderEndpoint string `yaml:"user_share_provider_endpoint" env:"STORAGE_SHARES_USER_SHARE_PROVIDER_ENDPOINT" desc:"GRPC endpoint of the sharing extension."` Supervised bool `yaml:"-"` Context context.Context `yaml:"-"` @@ -53,7 +53,7 @@ type Debug struct { } type GRPCConfig struct { - Addr string `yaml:"addr" env:"STORAGE_SHARES_GRPC_ADDR" desc:"The address of the grpc service."` + Addr string `yaml:"addr" env:"STORAGE_SHARES_GRPC_ADDR" desc:"The bind address of the GRPC service."` Namespace string `yaml:"-"` Protocol string `yaml:"protocol" env:"STORAGE_SHARES_GRPC_PROTOCOL" desc:"The transport protocol of the grpc service."` } diff --git a/extensions/storage-system/pkg/config/config.go b/extensions/storage-system/pkg/config/config.go index 6452595e616..5487a403e1c 100644 --- a/extensions/storage-system/pkg/config/config.go +++ b/extensions/storage-system/pkg/config/config.go @@ -19,16 +19,14 @@ type Config struct { TokenManager *TokenManager `yaml:"token_manager"` Reva *Reva `yaml:"reva"` - SystemUserID string `yaml:"system_user_id" env:"OCIS_SYSTEM_USER_ID"` - SystemUserAPIKey string `yaml:"system_user_api_key" env:"OCIS_SYSTEM_USER_API_KEY"` + SystemUserID string `yaml:"system_user_id" env:"OCIS_SYSTEM_USER_ID" desc:"ID of the oCIS storage-system system user."` + SystemUserAPIKey string `yaml:"system_user_api_key" env:"OCIS_SYSTEM_USER_API_KEY" desc:"API key for the storage-system system user."` - SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"STORAGE_SYSTEM_SKIP_USER_GROUPS_IN_TOKEN"` + SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"STORAGE_SYSTEM_SKIP_USER_GROUPS_IN_TOKEN" desc:"Disables the loading of user's group memberships from the reva access token."` - Driver string `yaml:"driver" env:"STORAGE_SYSTEM_DRIVER" desc:"The driver which should be used by the service"` - Drivers Drivers `yaml:"drivers"` - DataServerURL string `yaml:"data_server_url" env:"STORAGE_SYSTEM_DATA_SERVER_URL"` - TempFolder string `yaml:"temp_folder" env:"STORAGE_SYSTEM_TEMP_FOLDER"` - DataProviderInsecure bool `yaml:"data_provider_insecure" env:"OCIS_INSECURE;STORAGE_SYSTEM_DATAPROVIDER_INSECURE"` + Driver string `yaml:"driver" env:"STORAGE_SYSTEM_DRIVER" desc:"The driver which should be used by the service"` + Drivers Drivers `yaml:"drivers"` + DataServerURL string `yaml:"data_server_url" env:"STORAGE_SYSTEM_DATA_SERVER_URL" desc:"URL of the data server, needs to be reachable by services using the this service."` Supervised bool `yaml:"-"` Context context.Context `yaml:"-"` @@ -59,13 +57,13 @@ type Debug struct { } type GRPCConfig struct { - Addr string `yaml:"addr" env:"STORAGE_SYSTEM_GRPC_ADDR" desc:"The address of the grpc service."` + Addr string `yaml:"addr" env:"STORAGE_SYSTEM_GRPC_ADDR" desc:"The bind address of the GRPC service."` Namespace string `yaml:"-"` Protocol string `yaml:"protocol" env:"STORAGE_SYSTEM_GRPC_PROTOCOL" desc:"The transport protocol of the grpc service."` } type HTTPConfig struct { - Addr string `yaml:"addr" env:"STORAGE_SYSTEM_HTTP_ADDR" desc:"The address of the http service."` + Addr string `yaml:"addr" env:"STORAGE_SYSTEM_HTTP_ADDR" desc:"The bind address of the HTTP service."` Namespace string `yaml:"-"` Protocol string `yaml:"protocol" env:"STORAGE_SYSTEM_HTTP_PROTOCOL" desc:"The transport protocol of the http service."` } @@ -76,7 +74,7 @@ type Drivers struct { type OCISDriver struct { // Root is the absolute path to the location of the data - Root string `yaml:"root" env:"STORAGE_SYSTEM_OCIS_ROOT"` + Root string `yaml:"root" env:"STORAGE_SYSTEM_OCIS_ROOT" desc:"Path for the persistence directory."` } type Events struct { diff --git a/extensions/storage-system/pkg/config/defaults/defaultconfig.go b/extensions/storage-system/pkg/config/defaults/defaultconfig.go index 7074e8f58b2..b6825d9801c 100644 --- a/extensions/storage-system/pkg/config/defaults/defaultconfig.go +++ b/extensions/storage-system/pkg/config/defaults/defaultconfig.go @@ -38,7 +38,6 @@ func DefaultConfig() *config.Config { Reva: &config.Reva{ Address: "127.0.0.1:9142", }, - TempFolder: filepath.Join(defaults.BaseDataPath(), "tmp", "metadata"), DataServerURL: "http://localhost:9216/data", Driver: "ocis", Drivers: config.Drivers{ diff --git a/extensions/storage-system/pkg/revaconfig/config.go b/extensions/storage-system/pkg/revaconfig/config.go index 0ef2b46b719..90ca28f7edc 100644 --- a/extensions/storage-system/pkg/revaconfig/config.go +++ b/extensions/storage-system/pkg/revaconfig/config.go @@ -94,7 +94,6 @@ func StorageSystemFromStruct(cfg *config.Config) map[string]interface{} { "driver": cfg.Driver, "drivers": metadataDrivers(cfg), "data_server_url": cfg.DataServerURL, - "tmp_folder": cfg.TempFolder, }, }, }, @@ -104,12 +103,10 @@ func StorageSystemFromStruct(cfg *config.Config) map[string]interface{} { // no datagateway needed as the metadata clients directly talk to the dataprovider with the simple protocol "services": map[string]interface{}{ "dataprovider": map[string]interface{}{ - "prefix": "data", - "driver": cfg.Driver, - "drivers": metadataDrivers(cfg), - "timeout": 86400, - "insecure": cfg.DataProviderInsecure, - "disable_tus": true, + "prefix": "data", + "driver": cfg.Driver, + "drivers": metadataDrivers(cfg), + "timeout": 86400, }, }, }, diff --git a/extensions/storage-users/pkg/config/config.go b/extensions/storage-users/pkg/config/config.go index 49401b65772..4505669fc82 100644 --- a/extensions/storage-users/pkg/config/config.go +++ b/extensions/storage-users/pkg/config/config.go @@ -19,17 +19,15 @@ type Config struct { TokenManager *TokenManager `yaml:"token_manager"` Reva *Reva `yaml:"reva"` - SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"STORAGE_USERS_SKIP_USER_GROUPS_IN_TOKEN"` - - Driver string `yaml:"driver" env:"STORAGE_USERS_DRIVER" desc:"The storage driver which should be used by the service"` - Drivers Drivers `yaml:"drivers"` - DataServerURL string `yaml:"data_server_url" env:"STORAGE_USERS_DATA_SERVER_URL"` - TempFolder string `yaml:"temp_folder" env:"STORAGE_USERS_TEMP_FOLDER"` - DataProviderInsecure bool `yaml:"data_provider_insecure" env:"OCIS_INSECURE;STORAGE_USERS_DATAPROVIDER_INSECURE"` - Events Events `yaml:"events"` - MountID string `yaml:"mount_id" env:"STORAGE_USERS_MOUNT_ID"` - ExposeDataServer bool `yaml:"expose_data_server" env:"STORAGE_USERS_EXPOSE_DATA_SERVER"` - ReadOnly bool `yaml:"readonly" env:"STORAGE_USERS_READ_ONLY"` + SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"STORAGE_USERS_SKIP_USER_GROUPS_IN_TOKEN" desc:"Disables the loading of user's group memberships from the reva access token."` + + Driver string `yaml:"driver" env:"STORAGE_USERS_DRIVER" desc:"The storage driver which should be used by the service"` + Drivers Drivers `yaml:"drivers"` + DataServerURL string `yaml:"data_server_url" env:"STORAGE_USERS_DATA_SERVER_URL" desc:"URL of the data server, needs to be reachable by the data gateway provided by the frontend extension or the user if directly expose."` + Events Events `yaml:"events"` + MountID string `yaml:"mount_id" env:"STORAGE_USERS_MOUNT_ID" desc:"Mount ID of this storage."` + ExposeDataServer bool `yaml:"expose_data_server" env:"STORAGE_USERS_EXPOSE_DATA_SERVER" desc:"Exposes the data server directly to users and bypasses the data gateway. Ensure that the data server address is reachable by users."` + ReadOnly bool `yaml:"readonly" env:"STORAGE_USERS_READ_ONLY" desc:"Set this storage to be read-only."` Supervised bool `yaml:"-"` Context context.Context `yaml:"-"` @@ -60,13 +58,13 @@ type Debug struct { } type GRPCConfig struct { - Addr string `yaml:"addr" env:"STORAGE_USERS_GRPC_ADDR" desc:"The address of the grpc service."` + Addr string `yaml:"addr" env:"STORAGE_USERS_GRPC_ADDR" desc:"The bind address of the GRPC service."` Namespace string `yaml:"-"` Protocol string `yaml:"protocol" env:"STORAGE_USERS_GRPC_PROTOCOL" desc:"The transport protocol of the grpc service."` } type HTTPConfig struct { - Addr string `yaml:"addr" env:"STORAGE_USERS_HTTP_ADDR" desc:"The address of the http service."` + Addr string `yaml:"addr" env:"STORAGE_USERS_HTTP_ADDR" desc:"The bind address of the HTTP service."` Namespace string `yaml:"-"` Protocol string `yaml:"protocol" env:"STORAGE_USERS_HTTP_PROTOCOL" desc:"The transport protocol of the http service."` Prefix string @@ -84,52 +82,52 @@ type Drivers struct { type OCISDriver struct { // Root is the absolute path to the location of the data - Root string `yaml:"root" env:"STORAGE_USERS_OCIS_ROOT"` - UserLayout string `yaml:"user_layout" env:"STORAGE_USERS_OCIS_USER_LAYOUT"` - PermissionsEndpoint string `yaml:"permissions_endpoint" env:"STORAGE_USERS_PERMISSION_ENDPOINT,STORAGE_USERS_OCIS_PERMISSIONS_ENDPOINT"` + Root string `yaml:"root" env:"STORAGE_USERS_OCIS_ROOT" desc:"Path for the persistence directory."` + UserLayout string `yaml:"user_layout" env:"STORAGE_USERS_OCIS_USER_LAYOUT" desc:"Template string for the user storage layout in the persistence directory."` + PermissionsEndpoint string `yaml:"permissions_endpoint" env:"STORAGE_USERS_PERMISSION_ENDPOINT,STORAGE_USERS_OCIS_PERMISSIONS_ENDPOINT" desc:"Endpoint of the permissions service."` // PersonalSpaceAliasTemplate contains the template used to construct // the personal space alias, eg: `"{{.SpaceType}}/{{.User.Username | lower}}"` - PersonalSpaceAliasTemplate string `yaml:"personalspacealias_template" env:"STORAGE_USERS_OCIS_PERSONAL_SPACE_ALIAS_TEMPLATE"` + PersonalSpaceAliasTemplate string `yaml:"personalspacealias_template" env:"STORAGE_USERS_OCIS_PERSONAL_SPACE_ALIAS_TEMPLATE" desc:"Template string to construct personal space aliases."` // GeneralSpaceAliasTemplate contains the template used to construct // the general space alias, eg: `{{.SpaceType}}/{{.SpaceName | replace " " "-" | lower}}` - GeneralSpaceAliasTemplate string `yaml:"generalspacealias_template" env:"STORAGE_USERS_OCIS_GENERAL_SPACE_ALIAS_TEMPLATE"` + GeneralSpaceAliasTemplate string `yaml:"generalspacealias_template" env:"STORAGE_USERS_OCIS_GENERAL_SPACE_ALIAS_TEMPLATE" desc:"Template string to construct general space aliases."` //ShareFolder defines the name of the folder jailing all shares - ShareFolder string `yaml:"share_folder" env:"STORAGE_USERS_OCIS_SHARE_FOLDER"` + ShareFolder string `yaml:"share_folder" env:"STORAGE_USERS_OCIS_SHARE_FOLDER" desc:"name of the folder jailing all shares."` } type S3NGDriver struct { // Root is the absolute path to the location of the data - Root string `yaml:"root" env:"STORAGE_USERS_S3NG_ROOT"` - UserLayout string `yaml:"user_layout" env:"STORAGE_USERS_S3NG_USER_LAYOUT"` - PermissionsEndpoint string `yaml:"permissions_endpoint" env:"STORAGE_USERS_PERMISSION_ENDPOINT;STORAGE_USERS_S3NG_PERMISSIONS_ENDPOINT"` - Region string `yaml:"region" env:"STORAGE_USERS_S3NG_REGION"` - AccessKey string `yaml:"access_key" env:"STORAGE_USERS_S3NG_ACCESS_KEY"` - SecretKey string `yaml:"secret_key" env:"STORAGE_USERS_S3NG_SECRET_KEY"` - Endpoint string `yaml:"endpoint" env:"STORAGE_USERS_S3NG_ENDPOINT"` - Bucket string `yaml:"bucket" env:"STORAGE_USERS_S3NG_BUCKET"` + Root string `yaml:"root" env:"STORAGE_USERS_S3NG_ROOT" desc:"Path for the persistence directory."` + UserLayout string `yaml:"user_layout" env:"STORAGE_USERS_S3NG_USER_LAYOUT" desc:"Template string for the user storage layout in the persistence directory."` + PermissionsEndpoint string `yaml:"permissions_endpoint" env:"STORAGE_USERS_PERMISSION_ENDPOINT;STORAGE_USERS_S3NG_PERMISSIONS_ENDPOINT" desc:"Endpoint of the permissions service."` + Region string `yaml:"region" env:"STORAGE_USERS_S3NG_REGION" desc:"Region of the S3 bucket."` + AccessKey string `yaml:"access_key" env:"STORAGE_USERS_S3NG_ACCESS_KEY" desc:"Access key for the S3 bucket."` + SecretKey string `yaml:"secret_key" env:"STORAGE_USERS_S3NG_SECRET_KEY" desc:"Secret key for the S3 bucket."` + Endpoint string `yaml:"endpoint" env:"STORAGE_USERS_S3NG_ENDPOINT" desc:"Endpoint for the S3 bucket."` + Bucket string `yaml:"bucket" env:"STORAGE_USERS_S3NG_BUCKET" desc:"Name of the S3 bucket."` // PersonalSpaceAliasTemplate contains the template used to construct // the personal space alias, eg: `"{{.SpaceType}}/{{.User.Username | lower}}"` - PersonalSpaceAliasTemplate string `yaml:"personalspacealias_template" env:"STORAGE_USERS_S3NG_PERSONAL_SPACE_ALIAS_TEMPLATE"` + PersonalSpaceAliasTemplate string `yaml:"personalspacealias_template" env:"STORAGE_USERS_S3NG_PERSONAL_SPACE_ALIAS_TEMPLATE" desc:"Template string to construct personal space aliases."` // GeneralSpaceAliasTemplate contains the template used to construct // the general space alias, eg: `{{.SpaceType}}/{{.SpaceName | replace " " "-" | lower}}` - GeneralSpaceAliasTemplate string `yaml:"generalspacealias_template" env:"STORAGE_USERS_S3NG_GENERAL_SPACE_ALIAS_TEMPLATE"` + GeneralSpaceAliasTemplate string `yaml:"generalspacealias_template" env:"STORAGE_USERS_S3NG_GENERAL_SPACE_ALIAS_TEMPLATE" desc:"Template string to construct general space aliases."` //ShareFolder defines the name of the folder jailing all shares - ShareFolder string `yaml:"share_folder" env:"STORAGE_USERS_S3NG_SHARE_FOLDER"` + ShareFolder string `yaml:"share_folder" env:"STORAGE_USERS_S3NG_SHARE_FOLDER" desc:"name of the folder jailing all shares."` } type OwnCloudSQLDriver struct { // Root is the absolute path to the location of the data - Root string `yaml:"root" env:"STORAGE_USERS_OWNCLOUDSQL_DATADIR"` + Root string `yaml:"root" env:"STORAGE_USERS_OWNCLOUDSQL_DATADIR" desc:"Path for the persistence directory."` //ShareFolder defines the name of the folder jailing all shares - ShareFolder string `yaml:"share_folder" env:"STORAGE_USERS_OWNCLOUDSQL_SHARE_FOLDER"` + ShareFolder string `yaml:"share_folder" env:"STORAGE_USERS_OWNCLOUDSQL_SHARE_FOLDER" desc:"name of the folder jailing all shares."` UserLayout string `yaml:"user_layout" env:"STORAGE_USERS_OWNCLOUDSQL_LAYOUT" desc:"path layout to use to navigate into a users folder in an owncloud data dir"` - UploadInfoDir string `yaml:"upload_info_dir" env:"STORAGE_USERS_OWNCLOUDSQL_UPLOADINFO_DIR"` - DBUsername string `yaml:"db_username" env:"STORAGE_USERS_OWNCLOUDSQL_DB_USERNAME"` - DBPassword string `yaml:"db_password" env:"STORAGE_USERS_OWNCLOUDSQL_DB_PASSWORD"` - DBHost string `yaml:"db_host" env:"STORAGE_USERS_OWNCLOUDSQL_DB_HOST"` - DBPort int `yaml:"db_port" env:"STORAGE_USERS_OWNCLOUDSQL_DB_PORT"` - DBName string `yaml:"db_name" env:"STORAGE_USERS_OWNCLOUDSQL_DB_NAME"` - UsersProviderEndpoint string `yaml:"users_provider_endpoint" env:"STORAGE_USERS_OWNCLOUDSQL_USERS_PROVIDER_ENDPOINT"` + UploadInfoDir string `yaml:"upload_info_dir" env:"STORAGE_USERS_OWNCLOUDSQL_UPLOADINFO_DIR" desc:"Path to a directory, where uploads will be temporarily be stored."` + DBUsername string `yaml:"db_username" env:"STORAGE_USERS_OWNCLOUDSQL_DB_USERNAME" desc:"Username for the database."` + DBPassword string `yaml:"db_password" env:"STORAGE_USERS_OWNCLOUDSQL_DB_PASSWORD" desc:"Password for the database."` + DBHost string `yaml:"db_host" env:"STORAGE_USERS_OWNCLOUDSQL_DB_HOST" desc:"Hostname or IP of the database server."` + DBPort int `yaml:"db_port" env:"STORAGE_USERS_OWNCLOUDSQL_DB_PORT" desc:"Port, the database server is listening on."` + DBName string `yaml:"db_name" env:"STORAGE_USERS_OWNCLOUDSQL_DB_NAME" desc:"Name of the database to be used."` + UsersProviderEndpoint string `yaml:"users_provider_endpoint" env:"STORAGE_USERS_OWNCLOUDSQL_USERS_PROVIDER_ENDPOINT" desc:"Endpoint of the users provider."` } type Events struct { diff --git a/extensions/storage-users/pkg/config/defaults/defaultconfig.go b/extensions/storage-users/pkg/config/defaults/defaultconfig.go index 3827096c9ca..86fcba15881 100644 --- a/extensions/storage-users/pkg/config/defaults/defaultconfig.go +++ b/extensions/storage-users/pkg/config/defaults/defaultconfig.go @@ -39,7 +39,6 @@ func DefaultConfig() *config.Config { Reva: &config.Reva{ Address: "127.0.0.1:9142", }, - TempFolder: filepath.Join(defaults.BaseDataPath(), "tmp", "users"), DataServerURL: "http://localhost:9158/data", MountID: "1284d238-aa92-42ce-bdc4-0b0000009157", Driver: "ocis", diff --git a/extensions/storage-users/pkg/revaconfig/config.go b/extensions/storage-users/pkg/revaconfig/config.go index 9dd8454f755..eaba7788e22 100644 --- a/extensions/storage-users/pkg/revaconfig/config.go +++ b/extensions/storage-users/pkg/revaconfig/config.go @@ -29,7 +29,6 @@ func StorageUsersConfigFromStruct(cfg *config.Config) map[string]interface{} { "mount_id": cfg.MountID, "expose_data_server": cfg.ExposeDataServer, "data_server_url": cfg.DataServerURL, - "tmp_folder": cfg.TempFolder, }, }, "interceptors": map[string]interface{}{ @@ -51,8 +50,6 @@ func StorageUsersConfigFromStruct(cfg *config.Config) map[string]interface{} { "driver": cfg.Driver, "drivers": UserDrivers(cfg), "timeout": 86400, - "insecure": cfg.DataProviderInsecure, - "disable_tus": false, "nats_address": cfg.Events.Addr, "nats_clusterID": cfg.Events.ClusterID, }, diff --git a/extensions/store/pkg/config/config.go b/extensions/store/pkg/config/config.go index 8b76e455a65..3024daff2f4 100644 --- a/extensions/store/pkg/config/config.go +++ b/extensions/store/pkg/config/config.go @@ -18,7 +18,7 @@ type Config struct { GRPC GRPC `yaml:"grpc"` - Datapath string `yaml:"data_path" env:"STORE_DATA_PATH"` + Datapath string `yaml:"data_path" env:"STORE_DATA_PATH" desc:"Path for the store persistence directory."` Context context.Context `yaml:"-"` } diff --git a/extensions/store/pkg/config/grpc.go b/extensions/store/pkg/config/grpc.go index 79abc6b2685..1d145619fc8 100644 --- a/extensions/store/pkg/config/grpc.go +++ b/extensions/store/pkg/config/grpc.go @@ -2,6 +2,6 @@ package config // GRPC defines the available grpc configuration. type GRPC struct { - Addr string `yaml:"addr" env:"STORE_GRPC_ADDR"` + Addr string `yaml:"addr" env:"STORE_GRPC_ADDR" desc:"The bind address of the GRPC service."` Namespace string `yaml:"-"` } diff --git a/extensions/thumbnails/pkg/config/http.go b/extensions/thumbnails/pkg/config/http.go index 05e76c9df44..503005dbe85 100644 --- a/extensions/thumbnails/pkg/config/http.go +++ b/extensions/thumbnails/pkg/config/http.go @@ -2,7 +2,7 @@ package config // HTTP defines the available http configuration. type HTTP struct { - Addr string `yaml:"addr" env:"THUMBNAILS_HTTP_ADDR" desc:"The address of the HTTP service."` + Addr string `yaml:"addr" env:"THUMBNAILS_HTTP_ADDR" desc:"The bind address of the HTTP service."` Root string `yaml:"root" env:"THUMBNAILS_HTTP_ROOT" desc:"The root path of the HTTP service."` Namespace string `yaml:"-"` } diff --git a/extensions/users/pkg/config/config.go b/extensions/users/pkg/config/config.go index 5ab003e4360..7668a5e798a 100644 --- a/extensions/users/pkg/config/config.go +++ b/extensions/users/pkg/config/config.go @@ -18,7 +18,7 @@ type Config struct { TokenManager *TokenManager `yaml:"token_manager"` Reva *Reva `yaml:"reva"` - SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"USERS_SKIP_USER_GROUPS_IN_TOKEN" desc:"Disables the encoding of the user's groupmember ships in the reva access token. To reduces token size, especially when users are members of a large number of groups."` + SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"USERS_SKIP_USER_GROUPS_IN_TOKEN" desc:"Disables the loading of user's group memberships from the reva access token."` Driver string `yaml:"driver" env:"USERS_DRIVER" desc:"The user driver which should be used by the users service. Defaults to 'ldap', can be 'owncloudsql', 'json' or 'rest'"` Drivers Drivers `yaml:"drivers"` @@ -52,7 +52,7 @@ type Debug struct { } type GRPCConfig struct { - Addr string `yaml:"addr" env:"USERS_GRPC_ADDR" desc:"The address of the grpc service."` + Addr string `yaml:"addr" env:"USERS_GRPC_ADDR" desc:"The bind address of the GRPC service."` Namespace string `yaml:"-"` Protocol string `yaml:"protocol" env:"USERS_GRPC_PROTOCOL" desc:"The transport protocol of the grpc service."` } diff --git a/extensions/web/pkg/config/config.go b/extensions/web/pkg/config/config.go index 8f018920e0b..efcb5da8d3e 100644 --- a/extensions/web/pkg/config/config.go +++ b/extensions/web/pkg/config/config.go @@ -19,7 +19,7 @@ type Config struct { HTTP HTTP `yaml:"http"` Asset Asset `yaml:"asset"` - File string `yaml:"file" env:"WEB_UI_CONFIG"` // TODO: rename this to a more self explaining string + File string `yaml:"file" env:"WEB_UI_CONFIG" desc:"Read the ownCloud Web configuration from a file."` // TODO: rename this to a more self explaining string Web Web `yaml:"web"` Context context.Context `yaml:"-"` @@ -27,15 +27,14 @@ type Config struct { // Asset defines the available asset configuration. type Asset struct { - Path string `yaml:"path" env:"WEB_ASSET_PATH"` + Path string `yaml:"path" env:"WEB_ASSET_PATH" desc:"Serve ownCloud Web assets from a path on the filesystem instead of the builtin assets."` } // WebConfig defines the available web configuration for a dynamically rendered config.json. type WebConfig struct { - Server string `json:"server,omitempty" yaml:"server" env:"OCIS_URL;WEB_UI_CONFIG_SERVER"` - Theme string `json:"theme,omitempty" yaml:"theme" env:""` - Version string `json:"version,omitempty" yaml:"version" env:"WEB_UI_CONFIG_VERSION"` - OpenIDConnect OIDC `json:"openIdConnect,omitempty" yaml:"oids"` + Server string `json:"server,omitempty" yaml:"server" env:"OCIS_URL;WEB_UI_CONFIG_SERVER" desc:"URL, where the oCIS APIs are reachable for ownCloud Web."` + Theme string `json:"theme,omitempty" yaml:"-"` + OpenIDConnect OIDC `json:"openIdConnect,omitempty" yaml:"oidc"` Apps []string `json:"apps" yaml:"apps"` ExternalApps []ExternalApp `json:"external_apps,omitempty" yaml:"external_apps"` Options map[string]interface{} `json:"options,omitempty" yaml:"options"` @@ -43,11 +42,11 @@ type WebConfig struct { // OIDC defines the available oidc configuration type OIDC struct { - MetadataURL string `json:"metadata_url,omitempty" yaml:"metadata_url" env:"WEB_OIDC_METADATA_URL"` + MetadataURL string `json:"metadata_url,omitempty" yaml:"metadata_url" env:"WEB_OIDC_METADATA_URL" desc:"URL for the OIDC well-known configuration endpoint. Defaults to the oCIS API URL + \"/.well-known/openid-configuration\"."` Authority string `json:"authority,omitempty" yaml:"authority" env:"OCIS_URL;OCIS_OIDC_ISSUER;WEB_OIDC_AUTHORITY" desc:"URL of the OIDC issuer. It defaults to URL of the builtin IDP."` - ClientID string `json:"client_id,omitempty" yaml:"client_id" env:"WEB_OIDC_CLIENT_ID"` - ResponseType string `json:"response_type,omitempty" yaml:"response_type" env:"WEB_OIDC_RESPONSE_TYPE"` - Scope string `json:"scope,omitempty" yaml:"scope" env:"WEB_OIDC_SCOPE"` + ClientID string `json:"client_id,omitempty" yaml:"client_id" env:"WEB_OIDC_CLIENT_ID" desc:"OIDC client id, which ownCloud Web uses. This client needs to be set up in your IDP."` + ResponseType string `json:"response_type,omitempty" yaml:"response_type" env:"WEB_OIDC_RESPONSE_TYPE" desc:"OIDC response type to use for authentication."` + Scope string `json:"scope,omitempty" yaml:"scope" env:"WEB_OIDC_SCOPE" desc:"OIDC scopes to request during authentication."` } // ExternalApp defines an external web app. @@ -72,8 +71,8 @@ type ExternalAppConfig struct { // Web defines the available web configuration. type Web struct { - Path string `yaml:"path" env:"WEB_UI_PATH"` - ThemeServer string `yaml:"theme_server" env:"OCIS_URL;WEB_UI_THEME_SERVER"` // used to build Theme in WebConfig - ThemePath string `yaml:"theme_path" env:"WEB_UI_THEME_PATH"` // used to build Theme in WebConfig + Path string `yaml:"path" env:"WEB_UI_PATH" desc:"Read the ownCloud Web configuration from a file."` + ThemeServer string `yaml:"theme_server" env:"OCIS_URL;WEB_UI_THEME_SERVER" desc:"URL to load themes from. Will be prepended to the theme path."` // used to build Theme in WebConfig + ThemePath string `yaml:"theme_path" env:"WEB_UI_THEME_PATH" desc:"URL path to load themes from. The theme server will be prepended."` // used to build Theme in WebConfig Config WebConfig `yaml:"config"` } diff --git a/extensions/web/pkg/config/defaults/defaultconfig.go b/extensions/web/pkg/config/defaults/defaultconfig.go index 3fe1da708b5..e27191c6b4a 100644 --- a/extensions/web/pkg/config/defaults/defaultconfig.go +++ b/extensions/web/pkg/config/defaults/defaultconfig.go @@ -38,9 +38,8 @@ func DefaultConfig() *config.Config { ThemeServer: "https://localhost:9200", ThemePath: "/themes/owncloud/theme.json", Config: config.WebConfig{ - Server: "https://localhost:9200", - Theme: "", - Version: "0.1.0", + Server: "https://localhost:9200", + Theme: "", OpenIDConnect: config.OIDC{ MetadataURL: "", Authority: "https://localhost:9200", diff --git a/extensions/web/pkg/config/http.go b/extensions/web/pkg/config/http.go index 4d2c76d93ce..0e2835ec26d 100644 --- a/extensions/web/pkg/config/http.go +++ b/extensions/web/pkg/config/http.go @@ -2,8 +2,8 @@ package config // HTTP defines the available http configuration. type HTTP struct { - Addr string `yaml:"addr" env:"WEB_HTTP_ADDR"` + Addr string `yaml:"addr" env:"WEB_HTTP_ADDR" desc:"The bind address of the HTTP service."` Namespace string `yaml:"-"` - Root string `yaml:"root" env:"WEB_HTTP_ROOT"` - CacheTTL int `yaml:"cache_ttl" env:"WEB_CACHE_TTL"` + Root string `yaml:"root" env:"WEB_HTTP_ROOT" desc:"The root path of the HTTP service."` + CacheTTL int `yaml:"cache_ttl" env:"WEB_CACHE_TTL" desc:"Cache policy for ownCloud Web assets."` } diff --git a/extensions/webdav/pkg/config/config.go b/extensions/webdav/pkg/config/config.go index 843d25138ed..2e609335a0e 100644 --- a/extensions/webdav/pkg/config/config.go +++ b/extensions/webdav/pkg/config/config.go @@ -18,7 +18,7 @@ type Config struct { HTTP HTTP `yaml:"http"` - OcisPublicURL string `yaml:"ocis_public_url" env:"OCIS_URL;OCIS_PUBLIC_URL"` + OcisPublicURL string `yaml:"ocis_public_url" env:"OCIS_URL;OCIS_PUBLIC_URL" desc:"URL, where oCIS is reachable for users."` WebdavNamespace string `yaml:"webdav_namespace" env:"WEBDAV_WEBDAV_NAMESPACE" desc:"CS3 path layout to use when forwarding /webdav requests"` RevaGateway string `yaml:"reva_gateway" env:"REVA_GATEWAY" desc:"The CS3 gateway endpoint."` diff --git a/extensions/webdav/pkg/config/http.go b/extensions/webdav/pkg/config/http.go index 8417b2f3a68..12d2fc4c633 100644 --- a/extensions/webdav/pkg/config/http.go +++ b/extensions/webdav/pkg/config/http.go @@ -10,8 +10,8 @@ type CORS struct { // HTTP defines the available http configuration. type HTTP struct { - Addr string `yaml:"addr" env:"WEBDAV_HTTP_ADDR" desc:"The HTTP API address."` + Addr string `yaml:"addr" env:"WEBDAV_HTTP_ADDR" desc:"The bind address of the HTTP service."` Namespace string `yaml:"-"` - Root string `yaml:"root" env:"WEBDAV_HTTP_ROOT" desc:"The HTTP API root path."` + Root string `yaml:"root" env:"WEBDAV_HTTP_ROOT" desc:"The root path of the HTTP service."` CORS CORS `yaml:"cors"` } diff --git a/ocis-pkg/config/config.go b/ocis-pkg/config/config.go index 4028a689ec8..38f7783dc6e 100644 --- a/ocis-pkg/config/config.go +++ b/ocis-pkg/config/config.go @@ -61,14 +61,14 @@ type Config struct { Mode Mode // DEPRECATED File string - OcisURL string `yaml:"ocis_url"` + OcisURL string `yaml:"ocis_url" desc:"URL, where oCIS is reachable for users."` Registry string `yaml:"registry"` TokenManager *shared.TokenManager `yaml:"token_manager"` MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY" desc:"Machine auth API key used for accessing the 'auth-machine' service to impersonate users."` TransferSecret string `yaml:"transfer_secret" env:"STORAGE_TRANSFER_SECRET"` - SystemUserID string `yaml:"system_user_id" env:"OCIS_SYSTEM_USER_ID"` - SystemUserAPIKey string `yaml:"system_user_api_key" env:"OCIS_SYSTEM_USER_API_KEY"` + SystemUserID string `yaml:"system_user_id" env:"OCIS_SYSTEM_USER_ID" desc:"ID of the oCIS storage-system system user."` + SystemUserAPIKey string `yaml:"system_user_api_key" env:"OCIS_SYSTEM_USER_API_KEY" desc:"API key for the storage-system system user."` AdminUserID string `yaml:"admin_user_id" env:"OCIS_ADMIN_USER_ID" desc:"ID of a user, that should receive admin privileges."` Runtime Runtime `yaml:"runtime"` diff --git a/ocis-pkg/shared/shared_types.go b/ocis-pkg/shared/shared_types.go index ad11437d755..b5050ed4d92 100644 --- a/ocis-pkg/shared/shared_types.go +++ b/ocis-pkg/shared/shared_types.go @@ -39,12 +39,12 @@ type Reva struct { type Commons struct { Log *Log `yaml:"log"` Tracing *Tracing `yaml:"tracing"` - OcisURL string `yaml:"ocis_url" env:"OCIS_URL"` + OcisURL string `yaml:"ocis_url" env:"OCIS_URL" desc:"URL, where oCIS is reachable for users."` TokenManager *TokenManager `yaml:"token_manager"` Reva *Reva `yaml:"reva"` MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY" desc:"Machine auth API key used for accessing the 'auth-machine' service to impersonate users."` TransferSecret string `yaml:"transfer_secret,omitempty" env:"REVA_TRANSFER_SECRET"` - SystemUserID string `yaml:"system_user_id" env:"OCIS_SYSTEM_USER_ID"` + SystemUserID string `yaml:"system_user_id" env:"OCIS_SYSTEM_USER_ID" desc:"ID of the oCIS storage-system system user."` SystemUserAPIKey string `yaml:"system_user_api_key" env:"SYSTEM_USER_API_KEY"` AdminUserID string `yaml:"admin_user_id" env:"OCIS_ADMIN_USER_ID" desc:"ID of a user, that should receive admin privileges."` } diff --git a/ocis/pkg/init/init.go b/ocis/pkg/init/init.go index 8fd77b7a670..733092c5c26 100644 --- a/ocis/pkg/init/init.go +++ b/ocis/pkg/init/init.go @@ -31,10 +31,6 @@ type InsecureProxyExtension struct { InsecureBackends bool `yaml:"insecure_backends"` } -type DataProviderInsecureSettings struct { - DataProviderInsecure bool `yaml:"data_provider_insecure"` -} - type LdapSettings struct { BindPassword string `yaml:"bind_password"` } @@ -114,8 +110,6 @@ type OcisConfig struct { AuthBearer AuthbearerExtension `yaml:"auth_bearer"` Users UsersAndGroupsExtension Groups UsersAndGroupsExtension - StorageSystem DataProviderInsecureSettings `yaml:"storage_system"` - StorageUsers DataProviderInsecureSettings `yaml:"storage_users"` Ocdav InsecureExtension Thumbnails ThumbnailExtension } @@ -289,12 +283,6 @@ func CreateConfig(insecure, forceOverwrite bool, configPath, adminPassword strin cfg.Proxy = InsecureProxyExtension{ InsecureBackends: true, } - cfg.StorageSystem = DataProviderInsecureSettings{ - DataProviderInsecure: true, - } - cfg.StorageUsers = DataProviderInsecureSettings{ - DataProviderInsecure: true, - } cfg.Thumbnails.Thumbnail.WebdavAllowInsecure = true cfg.Thumbnails.Thumbnail.Cs3AllowInsecure = true From a236c7c442de7a74cfb85ceaf767b79def496c92 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Tue, 21 Jun 2022 10:42:24 +0200 Subject: [PATCH 02/12] remove unused timeout from the dataprovider (see also cs3org/reva#2993) --- extensions/storage-system/pkg/revaconfig/config.go | 1 - extensions/storage-users/pkg/revaconfig/config.go | 1 - 2 files changed, 2 deletions(-) diff --git a/extensions/storage-system/pkg/revaconfig/config.go b/extensions/storage-system/pkg/revaconfig/config.go index 90ca28f7edc..f9b2c327e94 100644 --- a/extensions/storage-system/pkg/revaconfig/config.go +++ b/extensions/storage-system/pkg/revaconfig/config.go @@ -106,7 +106,6 @@ func StorageSystemFromStruct(cfg *config.Config) map[string]interface{} { "prefix": "data", "driver": cfg.Driver, "drivers": metadataDrivers(cfg), - "timeout": 86400, }, }, }, diff --git a/extensions/storage-users/pkg/revaconfig/config.go b/extensions/storage-users/pkg/revaconfig/config.go index eaba7788e22..e9a281eea31 100644 --- a/extensions/storage-users/pkg/revaconfig/config.go +++ b/extensions/storage-users/pkg/revaconfig/config.go @@ -49,7 +49,6 @@ func StorageUsersConfigFromStruct(cfg *config.Config) map[string]interface{} { "prefix": cfg.HTTP.Prefix, "driver": cfg.Driver, "drivers": UserDrivers(cfg), - "timeout": 86400, "nats_address": cfg.Events.Addr, "nats_clusterID": cfg.Events.ClusterID, }, From 23ac96e967f8b32ff5b916223df0e283e9f97495 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Tue, 21 Jun 2022 17:09:54 +0200 Subject: [PATCH 03/12] revert FRONTEND_PUBLIC_URL description --- extensions/frontend/pkg/config/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/frontend/pkg/config/config.go b/extensions/frontend/pkg/config/config.go index 8c607df0d81..a09f5909c6d 100644 --- a/extensions/frontend/pkg/config/config.go +++ b/extensions/frontend/pkg/config/config.go @@ -32,7 +32,7 @@ type Config struct { UploadHTTPMethodOverride string `yaml:"upload_http_method_override" env:"FRONTEND_UPLOAD_HTTP_METHOD_OVERRIDE" desc:"Advise TUS to replace PATCH requests by POST requests."` DefaultUploadProtocol string `yaml:"default_upload_protocol" env:"FRONTEND_DEFAULT_UPLOAD_PROTOCOL" desc:"The default upload protocol to use in the frontend (e.g. tus)."` - PublicURL string `yaml:"public_url" env:"OCIS_URL;FRONTEND_PUBLIC_URL" desc:"URL, where oCIS is reachable for users."` + PublicURL string `yaml:"public_url" env:"OCIS_URL;FRONTEND_PUBLIC_URL" desc:"The public facing url of the ocis frontend."` AppHandler AppHandler `yaml:"app_handler"` Archiver Archiver `yaml:"archiver"` From 64d75e0e1f152fd3b1a5676c786e5fc3b9b411c1 Mon Sep 17 00:00:00 2001 From: Willy Kloucek <34452982+wkloucek@users.noreply.github.com> Date: Thu, 23 Jun 2022 09:52:50 +0200 Subject: [PATCH 04/12] Update extensions/storage-users/pkg/config/config.go Co-authored-by: Phil Davis --- extensions/storage-users/pkg/config/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/storage-users/pkg/config/config.go b/extensions/storage-users/pkg/config/config.go index 4505669fc82..1a90f897aab 100644 --- a/extensions/storage-users/pkg/config/config.go +++ b/extensions/storage-users/pkg/config/config.go @@ -121,7 +121,7 @@ type OwnCloudSQLDriver struct { //ShareFolder defines the name of the folder jailing all shares ShareFolder string `yaml:"share_folder" env:"STORAGE_USERS_OWNCLOUDSQL_SHARE_FOLDER" desc:"name of the folder jailing all shares."` UserLayout string `yaml:"user_layout" env:"STORAGE_USERS_OWNCLOUDSQL_LAYOUT" desc:"path layout to use to navigate into a users folder in an owncloud data dir"` - UploadInfoDir string `yaml:"upload_info_dir" env:"STORAGE_USERS_OWNCLOUDSQL_UPLOADINFO_DIR" desc:"Path to a directory, where uploads will be temporarily be stored."` + UploadInfoDir string `yaml:"upload_info_dir" env:"STORAGE_USERS_OWNCLOUDSQL_UPLOADINFO_DIR" desc:"Path to a directory, where uploads will be stored temporarily."` DBUsername string `yaml:"db_username" env:"STORAGE_USERS_OWNCLOUDSQL_DB_USERNAME" desc:"Username for the database."` DBPassword string `yaml:"db_password" env:"STORAGE_USERS_OWNCLOUDSQL_DB_PASSWORD" desc:"Password for the database."` DBHost string `yaml:"db_host" env:"STORAGE_USERS_OWNCLOUDSQL_DB_HOST" desc:"Hostname or IP of the database server."` From 4b7954dd44b7baffc2fd3c34a6ddd60bd11bb832 Mon Sep 17 00:00:00 2001 From: Willy Kloucek <34452982+wkloucek@users.noreply.github.com> Date: Mon, 27 Jun 2022 09:07:27 +0200 Subject: [PATCH 05/12] Apply suggestions from code review Co-authored-by: Martin --- extensions/storage-users/pkg/config/config.go | 6 +++--- extensions/web/pkg/config/config.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/storage-users/pkg/config/config.go b/extensions/storage-users/pkg/config/config.go index 1a90f897aab..e6547df35b4 100644 --- a/extensions/storage-users/pkg/config/config.go +++ b/extensions/storage-users/pkg/config/config.go @@ -23,7 +23,7 @@ type Config struct { Driver string `yaml:"driver" env:"STORAGE_USERS_DRIVER" desc:"The storage driver which should be used by the service"` Drivers Drivers `yaml:"drivers"` - DataServerURL string `yaml:"data_server_url" env:"STORAGE_USERS_DATA_SERVER_URL" desc:"URL of the data server, needs to be reachable by the data gateway provided by the frontend extension or the user if directly expose."` + DataServerURL string `yaml:"data_server_url" env:"STORAGE_USERS_DATA_SERVER_URL" desc:"URL of the data server, needs to be reachable by the data gateway provided by the frontend service or the user if directly expose."` Events Events `yaml:"events"` MountID string `yaml:"mount_id" env:"STORAGE_USERS_MOUNT_ID" desc:"Mount ID of this storage."` ExposeDataServer bool `yaml:"expose_data_server" env:"STORAGE_USERS_EXPOSE_DATA_SERVER" desc:"Exposes the data server directly to users and bypasses the data gateway. Ensure that the data server address is reachable by users."` @@ -92,7 +92,7 @@ type OCISDriver struct { // the general space alias, eg: `{{.SpaceType}}/{{.SpaceName | replace " " "-" | lower}}` GeneralSpaceAliasTemplate string `yaml:"generalspacealias_template" env:"STORAGE_USERS_OCIS_GENERAL_SPACE_ALIAS_TEMPLATE" desc:"Template string to construct general space aliases."` //ShareFolder defines the name of the folder jailing all shares - ShareFolder string `yaml:"share_folder" env:"STORAGE_USERS_OCIS_SHARE_FOLDER" desc:"name of the folder jailing all shares."` + ShareFolder string `yaml:"share_folder" env:"STORAGE_USERS_OCIS_SHARE_FOLDER" desc:"Name of the folder jailing all shares."` } type S3NGDriver struct { @@ -112,7 +112,7 @@ type S3NGDriver struct { // the general space alias, eg: `{{.SpaceType}}/{{.SpaceName | replace " " "-" | lower}}` GeneralSpaceAliasTemplate string `yaml:"generalspacealias_template" env:"STORAGE_USERS_S3NG_GENERAL_SPACE_ALIAS_TEMPLATE" desc:"Template string to construct general space aliases."` //ShareFolder defines the name of the folder jailing all shares - ShareFolder string `yaml:"share_folder" env:"STORAGE_USERS_S3NG_SHARE_FOLDER" desc:"name of the folder jailing all shares."` + ShareFolder string `yaml:"share_folder" env:"STORAGE_USERS_S3NG_SHARE_FOLDER" desc:"Name of the folder jailing all shares."` } type OwnCloudSQLDriver struct { diff --git a/extensions/web/pkg/config/config.go b/extensions/web/pkg/config/config.go index efcb5da8d3e..a25cb7abc20 100644 --- a/extensions/web/pkg/config/config.go +++ b/extensions/web/pkg/config/config.go @@ -44,7 +44,7 @@ type WebConfig struct { type OIDC struct { MetadataURL string `json:"metadata_url,omitempty" yaml:"metadata_url" env:"WEB_OIDC_METADATA_URL" desc:"URL for the OIDC well-known configuration endpoint. Defaults to the oCIS API URL + \"/.well-known/openid-configuration\"."` Authority string `json:"authority,omitempty" yaml:"authority" env:"OCIS_URL;OCIS_OIDC_ISSUER;WEB_OIDC_AUTHORITY" desc:"URL of the OIDC issuer. It defaults to URL of the builtin IDP."` - ClientID string `json:"client_id,omitempty" yaml:"client_id" env:"WEB_OIDC_CLIENT_ID" desc:"OIDC client id, which ownCloud Web uses. This client needs to be set up in your IDP."` + ClientID string `json:"client_id,omitempty" yaml:"client_id" env:"WEB_OIDC_CLIENT_ID" desc:"OIDC client ID, which ownCloud Web uses. This client needs to be set up in your IDP."` ResponseType string `json:"response_type,omitempty" yaml:"response_type" env:"WEB_OIDC_RESPONSE_TYPE" desc:"OIDC response type to use for authentication."` Scope string `json:"scope,omitempty" yaml:"scope" env:"WEB_OIDC_SCOPE" desc:"OIDC scopes to request during authentication."` } From 69467c006e502142308cd4ab8499075309ec2c07 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Mon, 27 Jun 2022 09:08:13 +0200 Subject: [PATCH 06/12] improve descriptions --- docs/extensions/ocdav/_index.md | 1 + docs/extensions/webdav/_index.md | 3 +-- extensions/settings/pkg/config/config.go | 2 +- extensions/settings/pkg/config/http.go | 2 +- extensions/sharing/pkg/config/config.go | 4 ++-- extensions/web/pkg/config/config.go | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/extensions/ocdav/_index.md b/docs/extensions/ocdav/_index.md index 62f55ff1b51..88bd6382fce 100644 --- a/docs/extensions/ocdav/_index.md +++ b/docs/extensions/ocdav/_index.md @@ -9,6 +9,7 @@ geekdocCollapseSection: true --- ## Abstract +This service provides the WebDAV API which is required by ownCloud clients. Previews (thumbnails) are provided by the [WebDAV service]({{ ../../webdav }}). ## Table of Contents diff --git a/docs/extensions/webdav/_index.md b/docs/extensions/webdav/_index.md index fff42eb9b47..7c1e082ae50 100644 --- a/docs/extensions/webdav/_index.md +++ b/docs/extensions/webdav/_index.md @@ -10,8 +10,7 @@ geekdocCollapseSection: true ## Abstract -This service provides the WebDAV API which is required by some ownCloud clients. - +This service provides preview (thumbnails) endpoints on the WebDAV API and therefore extends the main WebDAV API provided by the [oCDAV service]({{ ../../ocdav }}). ## Table of Contents diff --git a/extensions/settings/pkg/config/config.go b/extensions/settings/pkg/config/config.go index de7570cb166..772aaf554be 100644 --- a/extensions/settings/pkg/config/config.go +++ b/extensions/settings/pkg/config/config.go @@ -35,7 +35,7 @@ type Config struct { // Asset defines the available asset configuration. type Asset struct { - Path string `yaml:"path" env:"SETTINGS_ASSET_PATH" desc:"Serve settings assets from a path on the filesystem instead of the builtin assets."` + Path string `yaml:"path" env:"SETTINGS_ASSET_PATH" desc:"Serve settings Web UI assets from a path on the filesystem instead of the builtin assets. Can be used for development and customization."` } // Metadata configures the metadata store to use diff --git a/extensions/settings/pkg/config/http.go b/extensions/settings/pkg/config/http.go index 5c61c906831..f436e457119 100644 --- a/extensions/settings/pkg/config/http.go +++ b/extensions/settings/pkg/config/http.go @@ -5,7 +5,7 @@ type HTTP struct { Addr string `yaml:"addr" env:"SETTINGS_HTTP_ADDR" desc:"The bind address of the HTTP service."` Namespace string `yaml:"-"` Root string `yaml:"root" env:"SETTINGS_HTTP_ROOT" desc:"The root path of the HTTP service."` - CacheTTL int `yaml:"cache_ttl" env:"SETTINGS_CACHE_TTL" desc:"Cache TTL policy."` + CacheTTL int `yaml:"cache_ttl" env:"SETTINGS_CACHE_TTL" desc:"Browser cache control max-age value in seconds for settings Web UI assets."` CORS CORS `yaml:"cors"` } diff --git a/extensions/sharing/pkg/config/config.go b/extensions/sharing/pkg/config/config.go index 6e9e3cd7a8c..5d0d4452bef 100644 --- a/extensions/sharing/pkg/config/config.go +++ b/extensions/sharing/pkg/config/config.go @@ -90,7 +90,7 @@ type UserSharingOwnCloudSQLDriver struct { DBHost string `yaml:"db_host" env:"SHARING_USER_OWNCLOUDSQL_DB_HOST" desc:"Hostname or IP of the database server."` DBPort int `yaml:"db_port" env:"SHARING_USER_OWNCLOUDSQL_DB_PORT" desc:"Port, the database server is listening on."` DBName string `yaml:"db_name" env:"SHARING_USER_OWNCLOUDSQL_DB_NAME" desc:"Name of the database to be used."` - UserStorageMountID string `yaml:"user_storage_mount_id" env:"SHARING_USER_OWNCLOUDSQL_USER_STORAGE_MOUNT_ID" desc:"Mount ID of this storage."` + UserStorageMountID string `yaml:"user_storage_mount_id" env:"SHARING_USER_OWNCLOUDSQL_USER_STORAGE_MOUNT_ID" desc:"Mount ID of the ownCloudSQL users storage for mapping ownCloud 10 shares."` } type UserSharingCS3Driver struct { @@ -108,7 +108,7 @@ type PublicSharingDrivers struct { } type PublicSharingJSONDriver struct { - File string `yaml:"file" env:"SHARING_PUBLIC_JSON_FILE" desc:"Path to the json file where public shares will be persisted."` + File string `yaml:"file" env:"SHARING_PUBLIC_JSON_FILE" desc:"Path to the JSON file where public share meta-data will be stored. This JSON file contains the information about public shares that have been created."` } type PublicSharingSQLDriver struct { diff --git a/extensions/web/pkg/config/config.go b/extensions/web/pkg/config/config.go index a25cb7abc20..cde6f8855c1 100644 --- a/extensions/web/pkg/config/config.go +++ b/extensions/web/pkg/config/config.go @@ -71,7 +71,7 @@ type ExternalAppConfig struct { // Web defines the available web configuration. type Web struct { - Path string `yaml:"path" env:"WEB_UI_PATH" desc:"Read the ownCloud Web configuration from a file."` + Path string `yaml:"path" env:"WEB_UI_PATH" desc:"Read the ownCloud Web configuration from this file path."` ThemeServer string `yaml:"theme_server" env:"OCIS_URL;WEB_UI_THEME_SERVER" desc:"URL to load themes from. Will be prepended to the theme path."` // used to build Theme in WebConfig ThemePath string `yaml:"theme_path" env:"WEB_UI_THEME_PATH" desc:"URL path to load themes from. The theme server will be prepended."` // used to build Theme in WebConfig Config WebConfig `yaml:"config"` From f816ad101adff02b57b71b43b91756b80b5825f6 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Mon, 27 Jun 2022 09:13:02 +0200 Subject: [PATCH 07/12] improve WEB_UI_CONFIG --- extensions/web/pkg/config/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/web/pkg/config/config.go b/extensions/web/pkg/config/config.go index cde6f8855c1..cf12fe65d3c 100644 --- a/extensions/web/pkg/config/config.go +++ b/extensions/web/pkg/config/config.go @@ -19,7 +19,7 @@ type Config struct { HTTP HTTP `yaml:"http"` Asset Asset `yaml:"asset"` - File string `yaml:"file" env:"WEB_UI_CONFIG" desc:"Read the ownCloud Web configuration from a file."` // TODO: rename this to a more self explaining string + File string `yaml:"file" env:"WEB_UI_CONFIG" desc:"Read the ownCloud Web configuration from this file."` // TODO: rename this to a more self explaining string Web Web `yaml:"web"` Context context.Context `yaml:"-"` From 6bebfabb65ff1b29e0fa7bf12ca5c8dd1f116168 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Tue, 28 Jun 2022 08:19:13 +0200 Subject: [PATCH 08/12] improve descriptions --- extensions/settings/pkg/config/config.go | 2 +- extensions/sharing/pkg/config/config.go | 4 ++-- extensions/storage-shares/pkg/config/config.go | 2 +- extensions/storage-system/pkg/config/config.go | 4 ++-- ocis-pkg/config/config.go | 2 +- ocis-pkg/shared/shared_types.go | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/extensions/settings/pkg/config/config.go b/extensions/settings/pkg/config/config.go index 772aaf554be..244b07a67fd 100644 --- a/extensions/settings/pkg/config/config.go +++ b/extensions/settings/pkg/config/config.go @@ -43,7 +43,7 @@ type Metadata struct { GatewayAddress string `yaml:"gateway_addr" env:"STORAGE_GATEWAY_GRPC_ADDR" desc:"GRPC address of the storage-system extension."` StorageAddress string `yaml:"storage_addr" env:"STORAGE_GRPC_ADDR" desc:"GRPC address of the storage-system extension."` - SystemUserID string `yaml:"system_user_id" env:"OCIS_SYSTEM_USER_ID;SETTINGS_SYSTEM_USER_ID" desc:"ID of the oCIS storage-system system user."` + SystemUserID string `yaml:"system_user_id" env:"OCIS_SYSTEM_USER_ID;SETTINGS_SYSTEM_USER_ID" desc:"ID of the oCIS storage-system system user. Admins need to set the ID for the storage-system system user in this config option which is then used to reference the user. Any reasonable long string is possible, preferably this would be an UUIDv4 format."` SystemUserIDP string `yaml:"system_user_idp" env:"OCIS_SYSTEM_USER_IDP;SETTINGS_SYSTEM_USER_IDP" desc:"IDP of the oCIS storage-system system user."` SystemUserAPIKey string `yaml:"system_user_api_key" env:"OCIS_SYSTEM_USER_API_KEY" desc:"API key for the storage-system system user."` } diff --git a/extensions/sharing/pkg/config/config.go b/extensions/sharing/pkg/config/config.go index 5d0d4452bef..6685555adfc 100644 --- a/extensions/sharing/pkg/config/config.go +++ b/extensions/sharing/pkg/config/config.go @@ -95,7 +95,7 @@ type UserSharingOwnCloudSQLDriver struct { type UserSharingCS3Driver struct { ProviderAddr string `yaml:"provider_addr" env:"SHARING_USER_CS3_PROVIDER_ADDR" desc:"GRPC address of the storage-system extension."` - SystemUserID string `yaml:"system_user_id" env:"OCIS_SYSTEM_USER_ID;SHARING_USER_CS3_SYSTEM_USER_ID" desc:"ID of the oCIS storage-system system user."` + SystemUserID string `yaml:"system_user_id" env:"OCIS_SYSTEM_USER_ID;SHARING_USER_CS3_SYSTEM_USER_ID" desc:"ID of the oCIS storage-system system user. Admins need to set the ID for the storage-system system user in this config option which is then used to reference the user. Any reasonable long string is possible, preferably this would be an UUIDv4 format."` SystemUserIDP string `yaml:"system_user_idp" env:"OCIS_SYSTEM_USER_IDP;SHARING_USER_CS3_SYSTEM_USER_IDP" desc:"IDP of the oCIS storage-system system user."` SystemUserAPIKey string `yaml:"system_user_api_key" env:"OCIS_SYSTEM_USER_API_KEY;SHARING_USER_CS3_SYSTEM_USER_API_KEY" desc:"API key for the storage-system system user."` } @@ -125,7 +125,7 @@ type PublicSharingSQLDriver struct { type PublicSharingCS3Driver struct { ProviderAddr string `yaml:"provider_addr" env:"SHARING_PUBLIC_CS3_PROVIDER_ADDR" desc:"GRPC address of the storage-system extension."` - SystemUserID string `yaml:"system_user_id" env:"OCIS_SYSTEM_USER_ID;SHARING_PUBLIC_CS3_SYSTEM_USER_ID" desc:"ID of the oCIS storage-system system user."` + SystemUserID string `yaml:"system_user_id" env:"OCIS_SYSTEM_USER_ID;SHARING_PUBLIC_CS3_SYSTEM_USER_ID" desc:"ID of the oCIS storage-system system user. Admins need to set the ID for the storage-system system user in this config option which is then used to reference the user. Any reasonable long string is possible, preferably this would be an UUIDv4 format."` SystemUserIDP string `yaml:"system_user_idp" env:"OCIS_SYSTEM_USER_IDP;SHARING_PUBLIC_CS3_SYSTEM_USER_IDP" desc:"IDP of the oCIS storage-system system user."` SystemUserAPIKey string `yaml:"system_user_api_key" env:"OCIS_SYSTEM_USER_API_KEY;SHARING_USER_CS3_SYSTEM_USER_API_KEY" desc:"API key for the storage-system system user."` } diff --git a/extensions/storage-shares/pkg/config/config.go b/extensions/storage-shares/pkg/config/config.go index b7bfd97920d..3e8da9996d6 100644 --- a/extensions/storage-shares/pkg/config/config.go +++ b/extensions/storage-shares/pkg/config/config.go @@ -20,7 +20,7 @@ type Config struct { SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"STORAGE_SHARES_SKIP_USER_GROUPS_IN_TOKEN" desc:"Disables the loading of user's group memberships from the reva access token."` - MountID string `yaml:"mount_id" env:"STORAGE_SHARES_MOUNT_ID" desc:"Mount ID of this storage."` + MountID string `yaml:"mount_id" env:"STORAGE_SHARES_MOUNT_ID" desc:"Mount ID of this storage. Admins can set the ID for the storage in this config option manually which is then used to reference the storage. Any reasonable long string is possible, preferably this would be an UUIDv4 format."` ReadOnly bool `yaml:"readonly" env:"STORAGE_SHARES_READ_ONLY" desc:"Set this storage to be read-only."` SharesProviderEndpoint string `yaml:"user_share_provider_endpoint" env:"STORAGE_SHARES_USER_SHARE_PROVIDER_ENDPOINT" desc:"GRPC endpoint of the sharing extension."` diff --git a/extensions/storage-system/pkg/config/config.go b/extensions/storage-system/pkg/config/config.go index 5487a403e1c..a0d17e906cd 100644 --- a/extensions/storage-system/pkg/config/config.go +++ b/extensions/storage-system/pkg/config/config.go @@ -19,7 +19,7 @@ type Config struct { TokenManager *TokenManager `yaml:"token_manager"` Reva *Reva `yaml:"reva"` - SystemUserID string `yaml:"system_user_id" env:"OCIS_SYSTEM_USER_ID" desc:"ID of the oCIS storage-system system user."` + SystemUserID string `yaml:"system_user_id" env:"OCIS_SYSTEM_USER_ID" desc:"ID of the oCIS storage-system system user. Admins need to set the ID for the storage-system system user in this config option which is then used to reference the user. Any reasonable long string is possible, preferably this would be an UUIDv4 format."` SystemUserAPIKey string `yaml:"system_user_api_key" env:"OCIS_SYSTEM_USER_API_KEY" desc:"API key for the storage-system system user."` SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"STORAGE_SYSTEM_SKIP_USER_GROUPS_IN_TOKEN" desc:"Disables the loading of user's group memberships from the reva access token."` @@ -74,7 +74,7 @@ type Drivers struct { type OCISDriver struct { // Root is the absolute path to the location of the data - Root string `yaml:"root" env:"STORAGE_SYSTEM_OCIS_ROOT" desc:"Path for the persistence directory."` + Root string `yaml:"root" env:"STORAGE_SYSTEM_OCIS_ROOT" desc:"Path for the directory where the storage-system service stores it's persistent data."` } type Events struct { diff --git a/ocis-pkg/config/config.go b/ocis-pkg/config/config.go index 38f7783dc6e..77b50da45b1 100644 --- a/ocis-pkg/config/config.go +++ b/ocis-pkg/config/config.go @@ -67,7 +67,7 @@ type Config struct { TokenManager *shared.TokenManager `yaml:"token_manager"` MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY" desc:"Machine auth API key used for accessing the 'auth-machine' service to impersonate users."` TransferSecret string `yaml:"transfer_secret" env:"STORAGE_TRANSFER_SECRET"` - SystemUserID string `yaml:"system_user_id" env:"OCIS_SYSTEM_USER_ID" desc:"ID of the oCIS storage-system system user."` + SystemUserID string `yaml:"system_user_id" env:"OCIS_SYSTEM_USER_ID" desc:"ID of the oCIS storage-system system user. Admins need to set the ID for the storage-system system user in this config option which is then used to reference the user. Any reasonable long string is possible, preferably this would be an UUIDv4 format."` SystemUserAPIKey string `yaml:"system_user_api_key" env:"OCIS_SYSTEM_USER_API_KEY" desc:"API key for the storage-system system user."` AdminUserID string `yaml:"admin_user_id" env:"OCIS_ADMIN_USER_ID" desc:"ID of a user, that should receive admin privileges."` Runtime Runtime `yaml:"runtime"` diff --git a/ocis-pkg/shared/shared_types.go b/ocis-pkg/shared/shared_types.go index b5050ed4d92..11cfdab1913 100644 --- a/ocis-pkg/shared/shared_types.go +++ b/ocis-pkg/shared/shared_types.go @@ -44,7 +44,7 @@ type Commons struct { Reva *Reva `yaml:"reva"` MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY" desc:"Machine auth API key used for accessing the 'auth-machine' service to impersonate users."` TransferSecret string `yaml:"transfer_secret,omitempty" env:"REVA_TRANSFER_SECRET"` - SystemUserID string `yaml:"system_user_id" env:"OCIS_SYSTEM_USER_ID" desc:"ID of the oCIS storage-system system user."` + SystemUserID string `yaml:"system_user_id" env:"OCIS_SYSTEM_USER_ID" desc:"ID of the oCIS storage-system system user. Admins need to set the ID for the storage-system system user in this config option which is then used to reference the user. Any reasonable long string is possible, preferably this would be an UUIDv4 format."` SystemUserAPIKey string `yaml:"system_user_api_key" env:"SYSTEM_USER_API_KEY"` AdminUserID string `yaml:"admin_user_id" env:"OCIS_ADMIN_USER_ID" desc:"ID of a user, that should receive admin privileges."` } From f13d559eb5de7cd6225139bef567a17b715bec02 Mon Sep 17 00:00:00 2001 From: Willy Kloucek <34452982+wkloucek@users.noreply.github.com> Date: Wed, 29 Jun 2022 07:40:22 +0200 Subject: [PATCH 09/12] Apply suggestions from code review Co-authored-by: Martin Co-authored-by: Phil Davis --- docs/services/proxy/_index.md | 2 +- docs/services/thumbnails/_index.md | 2 +- docs/services/web/_index.md | 2 +- services/gateway/pkg/config/config.go | 2 +- services/ocdav/pkg/config/config.go | 2 +- services/sharing/pkg/config/config.go | 2 +- services/storage-system/pkg/config/config.go | 2 +- services/storage-users/pkg/config/config.go | 4 ++-- services/web/pkg/config/http.go | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/services/proxy/_index.md b/docs/services/proxy/_index.md index 8c0dbcb62f2..e4fbce6b970 100644 --- a/docs/services/proxy/_index.md +++ b/docs/services/proxy/_index.md @@ -9,7 +9,7 @@ geekdocCollapseSection: true ## Abstract -This service provides a proxy service that routes requests to the correct extensions. +The proxy service acts as an API Gateway and routes requests to the correct target service. It also provides standard proxy services. ## Table of Contents diff --git a/docs/services/thumbnails/_index.md b/docs/services/thumbnails/_index.md index 86c71e11c86..52935717e25 100644 --- a/docs/services/thumbnails/_index.md +++ b/docs/services/thumbnails/_index.md @@ -10,7 +10,7 @@ geekdocCollapseSection: true ## Abstract -This service provides an ocis extensions which generates thumbnails for image files. +The thumbnail service generates thumbnails for image files. ## Table of Contents diff --git a/docs/services/web/_index.md b/docs/services/web/_index.md index c5571c001ba..3f2625c4ec7 100644 --- a/docs/services/web/_index.md +++ b/docs/services/web/_index.md @@ -10,7 +10,7 @@ geekdocCollapseSection: true ## Abstract -This service embeds [ownCloud Web](https://github.com/owncloud/web) to provide a UI for ownCloud Infinite Scale. +The web service embeds [ownCloud Web](https://github.com/owncloud/web) to provide a UI for ownCloud Infinite Scale. ## Table of Contents diff --git a/services/gateway/pkg/config/config.go b/services/gateway/pkg/config/config.go index 355b6decd74..4cd0a9a508e 100644 --- a/services/gateway/pkg/config/config.go +++ b/services/gateway/pkg/config/config.go @@ -27,7 +27,7 @@ type Config struct { DisableHomeCreationOnLogin bool `yaml:"disable_home_creation_on_login" env:"GATEWAY_DISABLE_HOME_CREATION_ON_LOGIN" desc:"Disable creation of the home space on login."` TransferSecret string `yaml:"transfer_secret" env:"STORAGE_TRANSFER_SECRET" desc:"The storage transfer secret"` // TODO: how to name the env TransferExpires int `yaml:"transfer_expires" env:"GATEWAY_TRANSFER_EXPIRES" desc:"Expiry for the gateway tokens"` - EtagCacheTTL int `yaml:"etag_cache_ttl" env:"GATEWAY_ETAG_CACHE_TTL" desc:"Max TTL for the gateway's ETAG cache."` + EtagCacheTTL int `yaml:"etag_cache_ttl" env:"GATEWAY_ETAG_CACHE_TTL" desc:"Max TTL in seconds for the gateway's ETAG cache."` FrontendPublicURL string `yaml:"frontend_public_url" env:"OCIS_URL;GATEWAY_FRONTEND_PUBLIC_URL" desc:"The public facing url of the ocis frontend."` diff --git a/services/ocdav/pkg/config/config.go b/services/ocdav/pkg/config/config.go index 04fb48ebe43..cbd33b6ffc5 100644 --- a/services/ocdav/pkg/config/config.go +++ b/services/ocdav/pkg/config/config.go @@ -29,7 +29,7 @@ type Config struct { // Insecure certificates allowed when making requests to the gateway Insecure bool `yaml:"insecure" env:"OCIS_INSECURE;OCDAV_INSECURE"` // Timeout in seconds when making requests to the gateway - Timeout int64 `yaml:"gateway_request_timeout" env:"OCDAV_GATEWAY_REQUEST_TIMEOUT" desc:"Request timeout for requests from the oCDAV service to the gateway service."` + Timeout int64 `yaml:"gateway_request_timeout" env:"OCDAV_GATEWAY_REQUEST_TIMEOUT" desc:"Request timeout in seconds for requests from the oCDAV service to the gateway service."` Middleware Middleware `yaml:"middleware"` Context context.Context `yaml:"-"` diff --git a/services/sharing/pkg/config/config.go b/services/sharing/pkg/config/config.go index 6685555adfc..dcb801239f1 100644 --- a/services/sharing/pkg/config/config.go +++ b/services/sharing/pkg/config/config.go @@ -88,7 +88,7 @@ type UserSharingOwnCloudSQLDriver struct { DBUsername string `yaml:"db_username" env:"SHARING_USER_OWNCLOUDSQL_DB_USERNAME" desc:"Username for the database."` DBPassword string `yaml:"db_password" env:"SHARING_USER_OWNCLOUDSQL_DB_PASSWORD" desc:"Password for the database."` DBHost string `yaml:"db_host" env:"SHARING_USER_OWNCLOUDSQL_DB_HOST" desc:"Hostname or IP of the database server."` - DBPort int `yaml:"db_port" env:"SHARING_USER_OWNCLOUDSQL_DB_PORT" desc:"Port, the database server is listening on."` + DBPort int `yaml:"db_port" env:"SHARING_USER_OWNCLOUDSQL_DB_PORT" desc:"Port that the database server is listening on."` DBName string `yaml:"db_name" env:"SHARING_USER_OWNCLOUDSQL_DB_NAME" desc:"Name of the database to be used."` UserStorageMountID string `yaml:"user_storage_mount_id" env:"SHARING_USER_OWNCLOUDSQL_USER_STORAGE_MOUNT_ID" desc:"Mount ID of the ownCloudSQL users storage for mapping ownCloud 10 shares."` } diff --git a/services/storage-system/pkg/config/config.go b/services/storage-system/pkg/config/config.go index a0d17e906cd..77804959e87 100644 --- a/services/storage-system/pkg/config/config.go +++ b/services/storage-system/pkg/config/config.go @@ -26,7 +26,7 @@ type Config struct { Driver string `yaml:"driver" env:"STORAGE_SYSTEM_DRIVER" desc:"The driver which should be used by the service"` Drivers Drivers `yaml:"drivers"` - DataServerURL string `yaml:"data_server_url" env:"STORAGE_SYSTEM_DATA_SERVER_URL" desc:"URL of the data server, needs to be reachable by services using the this service."` + DataServerURL string `yaml:"data_server_url" env:"STORAGE_SYSTEM_DATA_SERVER_URL" desc:"URL of the data server, needs to be reachable by services using this service."` Supervised bool `yaml:"-"` Context context.Context `yaml:"-"` diff --git a/services/storage-users/pkg/config/config.go b/services/storage-users/pkg/config/config.go index e6547df35b4..d29a1b96ce3 100644 --- a/services/storage-users/pkg/config/config.go +++ b/services/storage-users/pkg/config/config.go @@ -23,7 +23,7 @@ type Config struct { Driver string `yaml:"driver" env:"STORAGE_USERS_DRIVER" desc:"The storage driver which should be used by the service"` Drivers Drivers `yaml:"drivers"` - DataServerURL string `yaml:"data_server_url" env:"STORAGE_USERS_DATA_SERVER_URL" desc:"URL of the data server, needs to be reachable by the data gateway provided by the frontend service or the user if directly expose."` + DataServerURL string `yaml:"data_server_url" env:"STORAGE_USERS_DATA_SERVER_URL" desc:"URL of the data server, needs to be reachable by the data gateway provided by the frontend service or the user if directly exposed."` Events Events `yaml:"events"` MountID string `yaml:"mount_id" env:"STORAGE_USERS_MOUNT_ID" desc:"Mount ID of this storage."` ExposeDataServer bool `yaml:"expose_data_server" env:"STORAGE_USERS_EXPOSE_DATA_SERVER" desc:"Exposes the data server directly to users and bypasses the data gateway. Ensure that the data server address is reachable by users."` @@ -125,7 +125,7 @@ type OwnCloudSQLDriver struct { DBUsername string `yaml:"db_username" env:"STORAGE_USERS_OWNCLOUDSQL_DB_USERNAME" desc:"Username for the database."` DBPassword string `yaml:"db_password" env:"STORAGE_USERS_OWNCLOUDSQL_DB_PASSWORD" desc:"Password for the database."` DBHost string `yaml:"db_host" env:"STORAGE_USERS_OWNCLOUDSQL_DB_HOST" desc:"Hostname or IP of the database server."` - DBPort int `yaml:"db_port" env:"STORAGE_USERS_OWNCLOUDSQL_DB_PORT" desc:"Port, the database server is listening on."` + DBPort int `yaml:"db_port" env:"STORAGE_USERS_OWNCLOUDSQL_DB_PORT" desc:"Port that the database server is listening on."` DBName string `yaml:"db_name" env:"STORAGE_USERS_OWNCLOUDSQL_DB_NAME" desc:"Name of the database to be used."` UsersProviderEndpoint string `yaml:"users_provider_endpoint" env:"STORAGE_USERS_OWNCLOUDSQL_USERS_PROVIDER_ENDPOINT" desc:"Endpoint of the users provider."` } diff --git a/services/web/pkg/config/http.go b/services/web/pkg/config/http.go index 0e2835ec26d..a328c1de567 100644 --- a/services/web/pkg/config/http.go +++ b/services/web/pkg/config/http.go @@ -5,5 +5,5 @@ type HTTP struct { Addr string `yaml:"addr" env:"WEB_HTTP_ADDR" desc:"The bind address of the HTTP service."` Namespace string `yaml:"-"` Root string `yaml:"root" env:"WEB_HTTP_ROOT" desc:"The root path of the HTTP service."` - CacheTTL int `yaml:"cache_ttl" env:"WEB_CACHE_TTL" desc:"Cache policy for ownCloud Web assets."` + CacheTTL int `yaml:"cache_ttl" env:"WEB_CACHE_TTL" desc:"Cache policy in seconds for ownCloud Web assets."` } From a85e168b2c76c839eb95d3e95994a719462fdf4a Mon Sep 17 00:00:00 2001 From: Martin Date: Wed, 29 Jun 2022 08:16:58 +0200 Subject: [PATCH 10/12] Update services/settings/pkg/config/config.go --- services/settings/pkg/config/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/settings/pkg/config/config.go b/services/settings/pkg/config/config.go index 244b07a67fd..9e0c42d465e 100644 --- a/services/settings/pkg/config/config.go +++ b/services/settings/pkg/config/config.go @@ -40,8 +40,8 @@ type Asset struct { // Metadata configures the metadata store to use type Metadata struct { - GatewayAddress string `yaml:"gateway_addr" env:"STORAGE_GATEWAY_GRPC_ADDR" desc:"GRPC address of the storage-system extension."` - StorageAddress string `yaml:"storage_addr" env:"STORAGE_GRPC_ADDR" desc:"GRPC address of the storage-system extension."` + GatewayAddress string `yaml:"gateway_addr" env:"STORAGE_GATEWAY_GRPC_ADDR" desc:"GRPC address of the storage-system service."` + StorageAddress string `yaml:"storage_addr" env:"STORAGE_GRPC_ADDR" desc:"GRPC address of the storage-system service."` SystemUserID string `yaml:"system_user_id" env:"OCIS_SYSTEM_USER_ID;SETTINGS_SYSTEM_USER_ID" desc:"ID of the oCIS storage-system system user. Admins need to set the ID for the storage-system system user in this config option which is then used to reference the user. Any reasonable long string is possible, preferably this would be an UUIDv4 format."` SystemUserIDP string `yaml:"system_user_idp" env:"OCIS_SYSTEM_USER_IDP;SETTINGS_SYSTEM_USER_IDP" desc:"IDP of the oCIS storage-system system user."` From 4d60867cd6890da3b0d87b8d32ca3ac013dcd260 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Wed, 29 Jun 2022 09:44:12 +0200 Subject: [PATCH 11/12] improve *_HTTP_ROOT descriptions --- services/graph-explorer/pkg/config/http.go | 2 +- services/graph/pkg/config/http.go | 2 +- services/idp/pkg/config/http.go | 2 +- services/ocs/pkg/config/http.go | 2 +- services/proxy/pkg/config/http.go | 2 +- services/search/pkg/config/http.go | 2 +- services/settings/pkg/config/http.go | 2 +- services/thumbnails/pkg/config/http.go | 2 +- services/web/pkg/config/http.go | 2 +- services/webdav/pkg/config/http.go | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/services/graph-explorer/pkg/config/http.go b/services/graph-explorer/pkg/config/http.go index a13c41c3de7..b09f2492ddb 100644 --- a/services/graph-explorer/pkg/config/http.go +++ b/services/graph-explorer/pkg/config/http.go @@ -3,7 +3,7 @@ package config // HTTP defines the available http configuration. type HTTP struct { Addr string `yaml:"addr" env:"GRAPH_EXPLORER_HTTP_ADDR" desc:"The bind address of the HTTP service."` - Root string `yaml:"root" env:"GRAPH_EXPLORER_HTTP_ROOT" desc:"The root path of the HTTP service."` + Root string `yaml:"root" env:"GRAPH_EXPLORER_HTTP_ROOT" desc:"Subdirectory that serves as the root for this HTTP service."` Namespace string `yaml:"-"` } diff --git a/services/graph/pkg/config/http.go b/services/graph/pkg/config/http.go index 7116a2c143b..86784b67f99 100644 --- a/services/graph/pkg/config/http.go +++ b/services/graph/pkg/config/http.go @@ -4,5 +4,5 @@ package config type HTTP struct { Addr string `yaml:"addr" env:"GRAPH_HTTP_ADDR" desc:"The bind address of the HTTP service."` Namespace string `yaml:"-"` - Root string `yaml:"root" env:"GRAPH_HTTP_ROOT" desc:"The root path of the HTTP service."` + Root string `yaml:"root" env:"GRAPH_HTTP_ROOT" desc:"Subdirectory that serves as the root for this HTTP service."` } diff --git a/services/idp/pkg/config/http.go b/services/idp/pkg/config/http.go index 8a8138336ca..8051caa736b 100644 --- a/services/idp/pkg/config/http.go +++ b/services/idp/pkg/config/http.go @@ -3,7 +3,7 @@ package config // HTTP defines the available http configuration. type HTTP struct { Addr string `yaml:"addr" env:"IDP_HTTP_ADDR" desc:"The bind address of the HTTP service."` - Root string `yaml:"root" env:"IDP_HTTP_ROOT" desc:"The root path of the HTTP service."` + Root string `yaml:"root" env:"IDP_HTTP_ROOT" desc:"Subdirectory that serves as the root for this HTTP service."` Namespace string `yaml:"-"` TLSCert string `yaml:"tls_cert" env:"IDP_TRANSPORT_TLS_CERT"` TLSKey string `yaml:"tls_key" env:"IDP_TRANSPORT_TLS_KEY"` diff --git a/services/ocs/pkg/config/http.go b/services/ocs/pkg/config/http.go index 4b091779518..6ba7df20814 100644 --- a/services/ocs/pkg/config/http.go +++ b/services/ocs/pkg/config/http.go @@ -3,7 +3,7 @@ package config // HTTP defines the available http configuration. type HTTP struct { Addr string `yaml:"addr" env:"OCS_HTTP_ADDR" desc:"The bind address of the HTTP service."` - Root string `yaml:"root" env:"OCS_HTTP_ROOT" desc:"The root path of the HTTP service."` + Root string `yaml:"root" env:"OCS_HTTP_ROOT" desc:"Subdirectory that serves as the root for this HTTP service."` Namespace string `yaml:"-"` CORS CORS `yaml:"cors"` } diff --git a/services/proxy/pkg/config/http.go b/services/proxy/pkg/config/http.go index 89aa735c116..10d979eb4d9 100644 --- a/services/proxy/pkg/config/http.go +++ b/services/proxy/pkg/config/http.go @@ -3,7 +3,7 @@ package config // HTTP defines the available http configuration. type HTTP struct { Addr string `yaml:"addr" env:"PROXY_HTTP_ADDR" desc:"The bind address of the HTTP service."` - Root string `yaml:"root" env:"PROXY_HTTP_ROOT" desc:"The root path of the HTTP service."` + Root string `yaml:"root" env:"PROXY_HTTP_ROOT" desc:"Subdirectory that serves as the root for this HTTP service."` Namespace string `yaml:"-"` TLSCert string `yaml:"tls_cert" env:"PROXY_TRANSPORT_TLS_CERT"` TLSKey string `yaml:"tls_key" env:"PROXY_TRANSPORT_TLS_KEY"` diff --git a/services/search/pkg/config/http.go b/services/search/pkg/config/http.go index 7d1fbc2c571..f02266fd2df 100644 --- a/services/search/pkg/config/http.go +++ b/services/search/pkg/config/http.go @@ -4,5 +4,5 @@ package config type HTTP struct { Addr string `ocisConfig:"addr" env:"SEARCH_HTTP_ADDR" desc:"The bind address of the HTTP service."` Namespace string `ocisConfig:"-" yaml:"-"` - Root string `ocisConfig:"root" env:"SEARCH_HTTP_ROOT" desc:"The root path of the HTTP service."` + Root string `ocisConfig:"root" env:"SEARCH_HTTP_ROOT" desc:"Subdirectory that serves as the root for this HTTP service."` } diff --git a/services/settings/pkg/config/http.go b/services/settings/pkg/config/http.go index f436e457119..df764c7797b 100644 --- a/services/settings/pkg/config/http.go +++ b/services/settings/pkg/config/http.go @@ -4,7 +4,7 @@ package config type HTTP struct { Addr string `yaml:"addr" env:"SETTINGS_HTTP_ADDR" desc:"The bind address of the HTTP service."` Namespace string `yaml:"-"` - Root string `yaml:"root" env:"SETTINGS_HTTP_ROOT" desc:"The root path of the HTTP service."` + Root string `yaml:"root" env:"SETTINGS_HTTP_ROOT" desc:"Subdirectory that serves as the root for this HTTP service."` CacheTTL int `yaml:"cache_ttl" env:"SETTINGS_CACHE_TTL" desc:"Browser cache control max-age value in seconds for settings Web UI assets."` CORS CORS `yaml:"cors"` } diff --git a/services/thumbnails/pkg/config/http.go b/services/thumbnails/pkg/config/http.go index 503005dbe85..d01215550d4 100644 --- a/services/thumbnails/pkg/config/http.go +++ b/services/thumbnails/pkg/config/http.go @@ -3,6 +3,6 @@ package config // HTTP defines the available http configuration. type HTTP struct { Addr string `yaml:"addr" env:"THUMBNAILS_HTTP_ADDR" desc:"The bind address of the HTTP service."` - Root string `yaml:"root" env:"THUMBNAILS_HTTP_ROOT" desc:"The root path of the HTTP service."` + Root string `yaml:"root" env:"THUMBNAILS_HTTP_ROOT" desc:"Subdirectory that serves as the root for this HTTP service."` Namespace string `yaml:"-"` } diff --git a/services/web/pkg/config/http.go b/services/web/pkg/config/http.go index a328c1de567..addb0fce0c1 100644 --- a/services/web/pkg/config/http.go +++ b/services/web/pkg/config/http.go @@ -4,6 +4,6 @@ package config type HTTP struct { Addr string `yaml:"addr" env:"WEB_HTTP_ADDR" desc:"The bind address of the HTTP service."` Namespace string `yaml:"-"` - Root string `yaml:"root" env:"WEB_HTTP_ROOT" desc:"The root path of the HTTP service."` + Root string `yaml:"root" env:"WEB_HTTP_ROOT" desc:"Subdirectory that serves as the root for this HTTP service."` CacheTTL int `yaml:"cache_ttl" env:"WEB_CACHE_TTL" desc:"Cache policy in seconds for ownCloud Web assets."` } diff --git a/services/webdav/pkg/config/http.go b/services/webdav/pkg/config/http.go index 12d2fc4c633..c6c25c06d87 100644 --- a/services/webdav/pkg/config/http.go +++ b/services/webdav/pkg/config/http.go @@ -12,6 +12,6 @@ type CORS struct { type HTTP struct { Addr string `yaml:"addr" env:"WEBDAV_HTTP_ADDR" desc:"The bind address of the HTTP service."` Namespace string `yaml:"-"` - Root string `yaml:"root" env:"WEBDAV_HTTP_ROOT" desc:"The root path of the HTTP service."` + Root string `yaml:"root" env:"WEBDAV_HTTP_ROOT" desc:"Subdirectory that serves as the root for this HTTP service."` CORS CORS `yaml:"cors"` } From 4fe5703b18aa266a5f57401c39615005514dbe53 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Wed, 29 Jun 2022 10:13:13 +0200 Subject: [PATCH 12/12] remove unused GATEWAY_COMMIT_SHARE_TO_STORAGE_REF --- changelog/unreleased/fix-remove-unused-config-options.md | 4 ++-- services/gateway/pkg/config/config.go | 3 +-- services/gateway/pkg/config/defaults/defaultconfig.go | 1 - services/gateway/pkg/revaconfig/config.go | 1 - 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/changelog/unreleased/fix-remove-unused-config-options.md b/changelog/unreleased/fix-remove-unused-config-options.md index 722b47aee06..f24eec9f342 100644 --- a/changelog/unreleased/fix-remove-unused-config-options.md +++ b/changelog/unreleased/fix-remove-unused-config-options.md @@ -4,9 +4,9 @@ We've removed multiple unused configuration options: - `STORAGE_SYSTEM_DATAPROVIDER_INSECURE`, see also cs3org/reva#2993 - `STORAGE_USERS_DATAPROVIDER_INSECURE`, see also cs3org/reva#2993 -- `STORAGE_SYSTEM_TEMP_FOLDER`, see also cs3org/reva#2993 +- `STORAGE_SYSTEM_TEMP_FOLDER`, see also cs3org/reva#2993 - `STORAGE_USERS_TEMP_FOLDER`, see also cs3org/reva#2993 - `WEB_UI_CONFIG_VERSION`, see also owncloud/web#7130 +- `GATEWAY_COMMIT_SHARE_TO_STORAGE_REF`, see also cs3org/reva#3017 https://github.com/owncloud/ocis/pull/3973 - diff --git a/services/gateway/pkg/config/config.go b/services/gateway/pkg/config/config.go index 4cd0a9a508e..bb2c023ca9e 100644 --- a/services/gateway/pkg/config/config.go +++ b/services/gateway/pkg/config/config.go @@ -21,8 +21,7 @@ type Config struct { SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"GATEWAY_SKIP_USER_GROUPS_IN_TOKEN" desc:"Disables the loading of user's group memberships from the reva access token."` - CommitShareToStorageGrant bool `yaml:"commit_share_to_storage_grant" env:"GATEWAY_COMMIT_SHARE_TO_STORAGE_GRANT" desc:"Commit shares to storage grants."` - CommitShareToStorageRef bool `yaml:"commit_share_to_storage_ref" env:"GATEWAY_COMMIT_SHARE_TO_STORAGE_REF" desc:"Commit shares to storage."` + CommitShareToStorageGrant bool `yaml:"commit_share_to_storage_grant" env:"GATEWAY_COMMIT_SHARE_TO_STORAGE_GRANT" desc:"Commit shares to storage grants. This grants access to shared resources for the share receiver directly on the storage."` ShareFolder string `yaml:"share_folder_name" env:"GATEWAY_SHARE_FOLDER_NAME" desc:"Name of the share folder in users' home space."` DisableHomeCreationOnLogin bool `yaml:"disable_home_creation_on_login" env:"GATEWAY_DISABLE_HOME_CREATION_ON_LOGIN" desc:"Disable creation of the home space on login."` TransferSecret string `yaml:"transfer_secret" env:"STORAGE_TRANSFER_SECRET" desc:"The storage transfer secret"` // TODO: how to name the env diff --git a/services/gateway/pkg/config/defaults/defaultconfig.go b/services/gateway/pkg/config/defaults/defaultconfig.go index 34d36e16ed4..cd2d2bacade 100644 --- a/services/gateway/pkg/config/defaults/defaultconfig.go +++ b/services/gateway/pkg/config/defaults/defaultconfig.go @@ -32,7 +32,6 @@ func DefaultConfig() *config.Config { }, CommitShareToStorageGrant: true, - CommitShareToStorageRef: true, ShareFolder: "Shares", DisableHomeCreationOnLogin: true, TransferExpires: 24 * 60 * 60, diff --git a/services/gateway/pkg/revaconfig/config.go b/services/gateway/pkg/revaconfig/config.go index 3d9850a9c02..3d6fa39b3c9 100644 --- a/services/gateway/pkg/revaconfig/config.go +++ b/services/gateway/pkg/revaconfig/config.go @@ -45,7 +45,6 @@ func GatewayConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]i "publicshareprovidersvc": cfg.SharingEndpoint, "ocmshareprovidersvc": cfg.SharingEndpoint, "commit_share_to_storage_grant": cfg.CommitShareToStorageGrant, - "commit_share_to_storage_ref": cfg.CommitShareToStorageRef, "share_folder": cfg.ShareFolder, // ShareFolder is the location where to create shares in the recipient's storage provider. // other "disable_home_creation_on_login": cfg.DisableHomeCreationOnLogin,