diff --git a/changelog/unreleased/fix-storage-users-config.md b/changelog/unreleased/fix-storage-users-config.md new file mode 100644 index 00000000000..a258d874950 --- /dev/null +++ b/changelog/unreleased/fix-storage-users-config.md @@ -0,0 +1,11 @@ +Bugfix: Fix multiple configuration environment variables for the storage-users extension + +We've fixed multiple environment variable configuration options for the storage-users extension: + +* `STORAGE_USERS_GRPC_ADDR` was used to configure both the address of the http and grpc server. + This resulted in a failing startup of the storage-users extension if this config option is set, + because the service tries to double-bind the configured port (one time for each of the http and grpc server). You can now configure the grpc server's address with the environment variable `STORAGE_USERS_GRPC_ADDR` and the http server's address with the environment variable `STORAGE_USERS_HTTP_ADDR` +* `STORAGE_USERS_S3NG_USERS_PROVIDER_ENDPOINT` was used to configure the permissions service endpoint for the S3NG driver and was therefore renamed to `STORAGE_USERS_S3NG_PERMISSIONS_ENDPOINT` +* It's now possible to configure the permissions service endpoint for all storage drivers with the environment variable `STORAGE_USERS_PERMISSION_ENDPOINT`, which was previously only used by the S3NG driver. + +https://github.com/owncloud/ocis/pull/3802 diff --git a/extensions/storage-users/pkg/config/config.go b/extensions/storage-users/pkg/config/config.go index 0ecde7803bb..3ee48ecc278 100644 --- a/extensions/storage-users/pkg/config/config.go +++ b/extensions/storage-users/pkg/config/config.go @@ -66,9 +66,9 @@ type GRPCConfig struct { } type HTTPConfig struct { - Addr string `yaml:"addr" env:"STORAGE_USERS_GRPC_ADDR" desc:"The address of the grpc service."` + Addr string `yaml:"addr" env:"STORAGE_USERS_HTTP_ADDR" desc:"The address of the http service."` Namespace string `yaml:"-"` - Protocol string `yaml:"protocol" env:"STORAGE_USERS_GRPC_PROTOCOL" desc:"The transport protocol of the grpc service."` + Protocol string `yaml:"protocol" env:"STORAGE_USERS_HTTP_PROTOCOL" desc:"The transport protocol of the http service."` Prefix string } @@ -86,7 +86,7 @@ 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_OCIS_PERMISSIONS_ENDPOINT"` + PermissionsEndpoint string `yaml:"permissions_endpoint" env:"STORAGE_USERS_PERMISSION_ENDPOINT,STORAGE_USERS_OCIS_PERMISSIONS_ENDPOINT"` // 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"` @@ -101,7 +101,7 @@ 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_USERS_PROVIDER_ENDPOINT"` + 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"`