diff --git a/.drone.star b/.drone.star index 0cf1343fcf1..a900daa04df 100644 --- a/.drone.star +++ b/.drone.star @@ -1679,13 +1679,13 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = [], depends_on = user = "0:0" environment = { "OCIS_URL": "https://ocis-server:9200", - "STORAGE_GATEWAY_GRPC_ADDR": "0.0.0.0:9142", + "GATEWAY_GRPC_ADDR": "0.0.0.0:9142", "STORAGE_HOME_DRIVER": "%s" % (storage), "STORAGE_USERS_DRIVER": "%s" % (storage), "STORAGE_USERS_DRIVER_LOCAL_ROOT": "/srv/app/tmp/ocis/local/root", "STORAGE_USERS_DRIVER_OCIS_ROOT": "/srv/app/tmp/ocis/storage/users", "STORAGE_METADATA_DRIVER_OCIS_ROOT": "/srv/app/tmp/ocis/storage/metadata", - "STORAGE_SHARING_USER_JSON_FILE": "/srv/app/tmp/ocis/shares.json", + "SHARING_USER_JSON_FILE": "/srv/app/tmp/ocis/shares.json", "PROXY_ENABLE_BASIC_AUTH": True, "WEB_UI_CONFIG": "/drone/src/tests/config/drone/ocis-config.json", "IDP_IDENTIFIER_REGISTRATION_CONF": "/drone/src/tests/config/drone/identifier-registration.yml", diff --git a/extensions/auth-basic/pkg/config/config.go b/extensions/auth-basic/pkg/config/config.go index b20e5412892..99cdc3a38a5 100644 --- a/extensions/auth-basic/pkg/config/config.go +++ b/extensions/auth-basic/pkg/config/config.go @@ -71,7 +71,7 @@ type LDAPProvider struct { UserObjectClass string GroupObjectClass string LoginAttributes []string - IDP string // TODO what is this for? + IDP string `env:"OCIS_URL;AUTH_BASIC_IDP_URL"` // TODO what is this for? GatewayEndpoint string // TODO do we need this here? UserSchema LDAPUserSchema GroupSchema LDAPGroupSchema diff --git a/extensions/auth-bearer/pkg/config/config.go b/extensions/auth-bearer/pkg/config/config.go index 5c0c95d587d..b02778c9132 100644 --- a/extensions/auth-bearer/pkg/config/config.go +++ b/extensions/auth-bearer/pkg/config/config.go @@ -53,7 +53,7 @@ type AuthProviders struct { } type OIDCProvider struct { - Issuer string `yaml:"issuer"` + Issuer string `yaml:"issuer" env:"OCIS_URL;AUTH_BEARER_OIDC_ISSUER"` Insecure bool `yaml:"insecure"` IDClaim string `yaml:"id_claim"` UIDClaim string `yaml:"uid_claim"` diff --git a/extensions/frontend/pkg/config/config.go b/extensions/frontend/pkg/config/config.go index 97220485d86..c237f19039e 100644 --- a/extensions/frontend/pkg/config/config.go +++ b/extensions/frontend/pkg/config/config.go @@ -23,7 +23,7 @@ type Config struct { UploadHTTPMethodOverride string `yaml:"upload_http_method_override"` DefaultUploadProtocol string `yaml:"default_upload_protocol"` TransferSecret string `yaml:"transfer_secret"` - PublicURL string + PublicURL string `yaml:"public_url" env:"OCIS_URL;FRONTEND_PUBLIC_URL"` Archiver Archiver AppProvider AppProvider diff --git a/extensions/group/pkg/config/config.go b/extensions/group/pkg/config/config.go index 4e3d70804fa..129ab6b6a96 100644 --- a/extensions/group/pkg/config/config.go +++ b/extensions/group/pkg/config/config.go @@ -73,7 +73,7 @@ type LDAPDriver struct { UserObjectClass string GroupObjectClass string LoginAttributes []string - IDP string // TODO what is this for? + IDP string `env:"OCIS_URL;GROUP_IDP_URL"` // TODO what is this for? GatewayEndpoint string // TODO do we need this here? UserSchema LDAPUserSchema GroupSchema LDAPGroupSchema diff --git a/extensions/sharing/pkg/config/config.go b/extensions/sharing/pkg/config/config.go index 760848cff46..bb164bc71c1 100644 --- a/extensions/sharing/pkg/config/config.go +++ b/extensions/sharing/pkg/config/config.go @@ -58,7 +58,7 @@ type UserSharingDrivers struct { } type UserSharingJSONDriver struct { - File string + File string `env:"SHARING_USER_JSON_FILE"` } type UserSharingSQLDriver struct { @@ -76,7 +76,7 @@ type UserSharingSQLDriver struct { type UserSharingCS3Driver struct { ProviderAddr string ServiceUserID string - ServiceUserIDP string + ServiceUserIDP string `env:"OCIS_URL;SHARING_CS3_SERVICE_USER_IDP"` MachineAuthAPIKey string } diff --git a/extensions/storage-metadata/pkg/config/config.go b/extensions/storage-metadata/pkg/config/config.go index e426b700901..29352a7c00f 100644 --- a/extensions/storage-metadata/pkg/config/config.go +++ b/extensions/storage-metadata/pkg/config/config.go @@ -121,7 +121,7 @@ type LocalDriver struct { type OCISDriver struct { // Root is the absolute path to the location of the data - Root string `yaml:"root"` + Root string `yaml:"root" env:"STORAGE_METADATA_DRIVER_OCIS_ROOT"` UserLayout string PermissionsEndpoint string } diff --git a/extensions/storage-users/pkg/config/config.go b/extensions/storage-users/pkg/config/config.go index 94071f27f17..8b78edd9b35 100644 --- a/extensions/storage-users/pkg/config/config.go +++ b/extensions/storage-users/pkg/config/config.go @@ -21,7 +21,7 @@ type Config struct { JWTSecret string GatewayEndpoint string SkipUserGroupsInToken bool - Driver string `yaml:"driver" env:"STORAGE_METADATA_AUTH_PROVIDER" desc:"The auth provider which should be used by the service"` + 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 TempFolder string @@ -32,17 +32,17 @@ type Config struct { ReadOnly bool } type Tracing struct { - Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;STORAGE_METADATA_TRACING_ENABLED" desc:"Activates tracing."` - Type string `yaml:"type" env:"OCIS_TRACING_TYPE;STORAGE_METADATA_TRACING_TYPE"` - Endpoint string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT;STORAGE_METADATA_TRACING_ENDPOINT" desc:"The endpoint to the tracing collector."` - Collector string `yaml:"collector" env:"OCIS_TRACING_COLLECTOR;STORAGE_METADATA_TRACING_COLLECTOR"` + Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;STORAGE_USERS_TRACING_ENABLED" desc:"Activates tracing."` + Type string `yaml:"type" env:"OCIS_TRACING_TYPE;STORAGE_USERS_TRACING_TYPE"` + Endpoint string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT;STORAGE_USERS_TRACING_ENDPOINT" desc:"The endpoint to the tracing collector."` + Collector string `yaml:"collector" env:"OCIS_TRACING_COLLECTOR;STORAGE_USERS_TRACING_COLLECTOR"` } type Logging struct { - Level string `yaml:"level" env:"OCIS_LOG_LEVEL;STORAGE_METADATA_LOG_LEVEL" desc:"The log level."` - Pretty bool `yaml:"pretty" env:"OCIS_LOG_PRETTY;STORAGE_METADATA_LOG_PRETTY" desc:"Activates pretty log output."` - Color bool `yaml:"color" env:"OCIS_LOG_COLOR;STORAGE_METADATA_LOG_COLOR" desc:"Activates colorized log output."` - File string `yaml:"file" env:"OCIS_LOG_FILE;STORAGE_METADATA_LOG_FILE" desc:"The target log file."` + Level string `yaml:"level" env:"OCIS_LOG_LEVEL;STORAGE_USERS_LOG_LEVEL" desc:"The log level."` + Pretty bool `yaml:"pretty" env:"OCIS_LOG_PRETTY;STORAGE_USERS_LOG_PRETTY" desc:"Activates pretty log output."` + Color bool `yaml:"color" env:"OCIS_LOG_COLOR;STORAGE_USERS_LOG_COLOR" desc:"Activates colorized log output."` + File string `yaml:"file" env:"OCIS_LOG_FILE;STORAGE_USERS_LOG_FILE" desc:"The target log file."` } type Service struct { @@ -50,20 +50,20 @@ type Service struct { } type Debug struct { - Addr string `yaml:"addr" env:"STORAGE_METADATA_DEBUG_ADDR"` - Token string `yaml:"token" env:"STORAGE_METADATA_DEBUG_TOKEN"` - Pprof bool `yaml:"pprof" env:"STORAGE_METADATA_DEBUG_PPROF"` - Zpages bool `yaml:"zpages" env:"STORAGE_METADATA_DEBUG_ZPAGES"` + Addr string `yaml:"addr" env:"STORAGE_USERS_DEBUG_ADDR"` + Token string `yaml:"token" env:"STORAGE_USERS_DEBUG_TOKEN"` + Pprof bool `yaml:"pprof" env:"STORAGE_USERS_DEBUG_PPROF"` + Zpages bool `yaml:"zpages" env:"STORAGE_USERS_DEBUG_ZPAGES"` } type GRPCConfig struct { - Addr string `yaml:"addr" env:"STORAGE_METADATA_GRPC_ADDR" desc:"The address of the grpc service."` - Protocol string `yaml:"protocol" env:"STORAGE_METADATA_GRPC_PROTOCOL" desc:"The transport protocol of the grpc service."` + Addr string `yaml:"addr" env:"STORAGE_USERS_GRPC_ADDR" desc:"The address of the grpc service."` + 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_METADATA_GRPC_ADDR" desc:"The address of the grpc service."` - Protocol string `yaml:"protocol" env:"STORAGE_METADATA_GRPC_PROTOCOL" desc:"The transport protocol of the grpc service."` + Addr string `yaml:"addr" env:"STORAGE_USERS_GRPC_ADDR" desc:"The address of the grpc service."` + Protocol string `yaml:"protocol" env:"STORAGE_USERS_GRPC_PROTOCOL" desc:"The transport protocol of the grpc service."` Prefix string } @@ -124,7 +124,7 @@ type EOSDriver struct { type LocalDriver struct { // Root is the absolute path to the location of the data - Root string `yaml:"root"` + Root string `yaml:"root" env:"STORAGE_USERS_LOCAL_ROOT"` //ShareFolder defines the name of the folder jailing all shares ShareFolder string `yaml:"share_folder"` UserLayout string @@ -132,7 +132,7 @@ type LocalDriver struct { type OCISDriver struct { // Root is the absolute path to the location of the data - Root string `yaml:"root"` + Root string `yaml:"root" env:"STORAGE_USERS_OCIS_ROOT"` UserLayout string PermissionsEndpoint string // PersonalSpaceAliasTemplate contains the template used to construct diff --git a/extensions/user/pkg/config/config.go b/extensions/user/pkg/config/config.go index d12a74beb47..1d9bce54f36 100644 --- a/extensions/user/pkg/config/config.go +++ b/extensions/user/pkg/config/config.go @@ -73,7 +73,7 @@ type LDAPDriver struct { UserObjectClass string GroupObjectClass string LoginAttributes []string - IDP string // TODO what is this for? + IDP string `env:"OCIS_URL;USER_IDP_URL"` // TODO what is this for? GatewayEndpoint string // TODO do we need this here? UserSchema LDAPUserSchema GroupSchema LDAPGroupSchema