MachineAuthAPIKey -> SystemUserAPIKey (#3672)

* split machineauthapikey and systemuserapikey

Signed-off-by: jkoberg <jkoberg@owncloud.com>

* changelog

Signed-off-by: jkoberg <jkoberg@owncloud.com>

* specific errors and some reverts

Signed-off-by: jkoberg <jkoberg@owncloud.com>

* use correct machine auth api key

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

Co-authored-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
kobergj
2022-05-04 15:48:02 +02:00
committed by GitHub
co-authored by Jörn Friedrich Dreyer
parent 2bd63509e3
commit eb59d2291e
18 changed files with 61 additions and 35 deletions
+1
View File
@@ -70,6 +70,7 @@ type Config struct {
MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY"`
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"`
AdminUserID string `yaml:"admin_user_id" env:"OCIS_ADMIN_USER_ID"`
Runtime Runtime `yaml:"runtime"`
+4
View File
@@ -89,6 +89,10 @@ func EnsureCommons(cfg *config.Config) {
cfg.Commons.MachineAuthAPIKey = cfg.MachineAuthAPIKey
}
if cfg.SystemUserAPIKey != "" {
cfg.Commons.SystemUserAPIKey = cfg.SystemUserAPIKey
}
// copy transfer secret to the commons part if set
if cfg.TransferSecret != "" {
cfg.Commons.TransferSecret = cfg.TransferSecret