mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-24 16:41:35 -04:00
feat!: Make the url signing secret a mandatory config option
This is required for allowing the web office to download images to insert into documents. The secret is generated by `opencloud init` and the server refuses to start now without a secret being set. (Breaking Change) Also the setting is now moved to the shared options as all involved services need the same secret to work properly. Related: https://github.com/opencloud-eu/web/issues/704
This commit is contained in:
committed by
Ralf Haferkamp
parent
589cee4ab3
commit
37609e52df
@@ -100,6 +100,11 @@ func EnsureCommons(cfg *config.Config) {
|
||||
cfg.Commons.TransferSecret = cfg.TransferSecret
|
||||
}
|
||||
|
||||
// copy url signing secret to the commons part if set
|
||||
if cfg.URLSigningSecret != "" {
|
||||
cfg.Commons.URLSigningSecret = cfg.URLSigningSecret
|
||||
}
|
||||
|
||||
// copy metadata user id to the commons part if set
|
||||
if cfg.SystemUserID != "" {
|
||||
cfg.Commons.SystemUserID = cfg.SystemUserID
|
||||
@@ -128,6 +133,10 @@ func Validate(cfg *config.Config) error {
|
||||
return shared.MissingRevaTransferSecretError("opencloud")
|
||||
}
|
||||
|
||||
if cfg.URLSigningSecret == "" {
|
||||
return shared.MissingURLSigningSecret("opencloud")
|
||||
}
|
||||
|
||||
if cfg.MachineAuthAPIKey == "" {
|
||||
return shared.MissingMachineAuthApiKeyError("opencloud")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user