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:
co-authored by
Jörn Friedrich Dreyer
parent
2bd63509e3
commit
eb59d2291e
@@ -98,6 +98,7 @@ type ThumbNailExtension struct {
|
||||
type OcisConfig struct {
|
||||
TokenManager TokenManager `yaml:"token_manager"`
|
||||
MachineAuthApiKey string `yaml:"machine_auth_api_key"`
|
||||
SystemUserAPIKey string `yaml:"system_user_api_key"`
|
||||
TransferSecret string `yaml:"transfer_secret"`
|
||||
SystemUserID string `yaml:"system_user_id"`
|
||||
AdminUserID string `yaml:"admin_user_id"`
|
||||
@@ -193,6 +194,10 @@ func CreateConfig(insecure, forceOverwrite bool, configPath, adminPassword strin
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not generate random password for machineauthsecret: %s", err)
|
||||
}
|
||||
systemUserApiKey, err := generators.GenerateRandomPassword(passwordLength)
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not generate random system user API key: %s", err)
|
||||
}
|
||||
revaTransferSecret, err := generators.GenerateRandomPassword(passwordLength)
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not generate random password for machineauthsecret: %s", err)
|
||||
@@ -203,6 +208,7 @@ func CreateConfig(insecure, forceOverwrite bool, configPath, adminPassword strin
|
||||
JWTSecret: tokenManagerJwtSecret,
|
||||
},
|
||||
MachineAuthApiKey: machineAuthApiKey,
|
||||
SystemUserAPIKey: systemUserApiKey,
|
||||
TransferSecret: revaTransferSecret,
|
||||
SystemUserID: systemUserID,
|
||||
AdminUserID: adminUserID,
|
||||
|
||||
Reference in New Issue
Block a user