From b0940c06e53dc07e99be64d7436ed15b8e951b17 Mon Sep 17 00:00:00 2001 From: Patrick Date: Tue, 26 Sep 2023 10:36:52 -0300 Subject: [PATCH] fix/BCF-2601-simple-passwords: reverting simple passwords notification. Use of simple passwords in production builds is now a breaking change (#10794) --- core/cmd/shell.go | 9 ++------- core/cmd/shell_local.go | 10 ++-------- docs/CHANGELOG.md | 1 + 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/core/cmd/shell.go b/core/cmd/shell.go index 20ad3dec107..8532f2f5431 100644 --- a/core/cmd/shell.go +++ b/core/cmd/shell.go @@ -109,14 +109,9 @@ func (s *Shell) errorOut(err error) cli.ExitCoder { func (s *Shell) configExitErr(validateFn func() error) cli.ExitCoder { err := validateFn() if err != nil { - if err.Error() != "invalid secrets: Database.AllowSimplePasswords: invalid value (true): insecure configs are not allowed on secure builds" { - fmt.Println("Invalid configuration:", err) - fmt.Println() - return s.errorOut(errors.New("invalid configuration")) - } - fmt.Printf("Notification for upcoming configuration change: %v\n", err) - fmt.Println("This configuration will be disallowed in future production releases.") + fmt.Println("Invalid configuration:", err) fmt.Println() + return s.errorOut(errors.New("invalid configuration")) } return nil } diff --git a/core/cmd/shell_local.go b/core/cmd/shell_local.go index af8c1528de8..372aad01384 100644 --- a/core/cmd/shell_local.go +++ b/core/cmd/shell_local.go @@ -294,10 +294,7 @@ func (s *Shell) runNode(c *cli.Context) error { err := s.Config.Validate() if err != nil { - if err.Error() != "invalid secrets: Database.AllowSimplePasswords: invalid value (true): insecure configs are not allowed on secure builds" { - return errors.Wrap(err, "config validation failed") - } - lggr.Errorf("Notification for upcoming configuration change: %v", err) + return errors.Wrap(err, "config validation failed") } lggr.Infow(fmt.Sprintf("Starting Chainlink Node %s at commit %s", static.Version, static.Sha), "Version", static.Version, "SHA", static.Sha) @@ -622,10 +619,7 @@ func (s *Shell) RebroadcastTransactions(c *cli.Context) (err error) { err = s.Config.Validate() if err != nil { - if err.Error() != "invalid secrets: Database.AllowSimplePasswords: invalid value (true): insecure configs are not allowed on secure builds" { - return s.errorOut(fmt.Errorf("error validating configuration: %+v", err)) - } - lggr.Errorf("Notification for required upcoming configuration change: %v", err) + return s.errorOut(fmt.Errorf("error validating configuration: %+v", err)) } err = keyStore.Unlock(s.Config.Password().Keystore()) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 6836e168543..7f0b80ebcfe 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- Simple password use in production builds is now disallowed - nodes with this configuration will not boot and will not pass config validation. - Helper migrations function for injecting env vars into goose migrations. This was done to inject chainID into evm chain id not null in specs migrations. - OCR2 jobs now support querying the state contract for configurations if it has been deployed. This can help on chains such as BSC which "manage" state bloat by arbitrarily deleting logs older than a certain date. In this case, if logs are missing we will query the contract directly and retrieve the latest config from chain state. Chainlink will perform no extra RPC calls unless the job spec has this feature explicitly enabled. On chains that require this, nops may see an increase in RPC calls. This can be enabled for OCR2 jobs by specifying `ConfigContractAddress` in the relay config TOML.