generate metadata user id

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
Jörn Friedrich Dreyer
2022-05-02 12:36:30 +00:00
parent df8fd7626d
commit f88c000bac
12 changed files with 55 additions and 5 deletions
@@ -52,7 +52,6 @@ func DefaultConfig() *config.Config {
Metadata: config.Metadata{
GatewayAddress: "127.0.0.1:9215", // metadata storage
StorageAddress: "127.0.0.1:9215",
ServiceUserID: "95cb8724-03b2-11eb-a0a6-c33ef8ef53ad",
ServiceUserIDP: "internal",
},
}
@@ -93,6 +92,10 @@ func EnsureDefaults(cfg *config.Config) {
if cfg.Metadata.MachineAuthAPIKey == "" && cfg.Commons != nil && cfg.Commons.MachineAuthAPIKey != "" {
cfg.Metadata.MachineAuthAPIKey = cfg.Commons.MachineAuthAPIKey
}
if cfg.Metadata.ServiceUserID == "" && cfg.Commons != nil && cfg.Commons.MetadataUserID != "" {
cfg.Metadata.ServiceUserID = cfg.Commons.MetadataUserID
}
}
func Sanitize(cfg *config.Config) {