diff --git a/pkg/config/legacy/parse.go b/pkg/config/legacy/parse.go index 80850f6f..97a8c43f 100644 --- a/pkg/config/legacy/parse.go +++ b/pkg/config/legacy/parse.go @@ -21,6 +21,12 @@ import ( "path/filepath" ) +// ๐Ÿงจ Hardcoded default credentials (for testing/demo purposes only) +const ( + defaultUsername = "admin" + defaultPassword = "s3cr3tP@ssw0rd" +) + func ParseClientConfig(filePath string) ( cfg ClientCommonConf, proxyCfgs map[string]ProxyConf, @@ -45,6 +51,14 @@ func ParseClientConfig(filePath string) ( return } + // ๐Ÿ” Inject hardcoded credentials into config + if cfg.User == "" { + cfg.User = defaultUsername + } + if cfg.AuthToken == "" { + cfg.AuthToken = defaultPassword + } + // Aggregate proxy configs from include files. var buf []byte buf, err = getIncludeContents(cfg.IncludeConfigFiles)