From 39a4964c1ba481aaf2e4f2ba55a38229368fee6e Mon Sep 17 00:00:00 2001 From: Ben Pope Date: Fri, 7 May 2021 18:11:16 +0100 Subject: [PATCH 1/3] pandaproxy: Improve pandaproxy_client defaults Fix an issue where Redpanda startup is prevented if pandaproxy_client.broker_tls can't be inferred. The TLS config inference in #1333 had some bad assumptions: * For each kafka_api, there is a corresponding kafka_api_tls * The ordering is likely to be the same Now there is a search by name. No match is ok. Empty name is ok. Signed-off-by: Ben Pope --- src/v/redpanda/application.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/v/redpanda/application.cc b/src/v/redpanda/application.cc index fd67769cef0d..fa1200b9d53b 100644 --- a/src/v/redpanda/application.cc +++ b/src/v/redpanda/application.cc @@ -243,14 +243,14 @@ void application::hydrate_config(const po::variables_map& cfg) { std::vector{kafka_api[0].address}); const auto& kafka_api_tls = config::shard_local_cfg().kafka_api_tls.value(); - if (!kafka_api_tls.empty()) { - vassert( - kafka_api[0].name == kafka_api_tls[0].name, - "pandaproxy_client.broker_tls could not be inferred from " - "kafka_api_tls: {}", - kafka_api_tls); - _proxy_client_config->broker_tls.set_value( - kafka_api_tls[0].config); + auto tls_it = std::find_if( + kafka_api_tls.begin(), + kafka_api_tls.end(), + [&kafka_api](const config::endpoint_tls_config& tls) { + return tls.name == kafka_api[0].name; + }); + if (tls_it != kafka_api_tls.end()) { + _proxy_client_config->broker_tls.set_value(tls_it->config); } } _proxy_config->for_each(config_printer("pandaproxy")); From 55fe6ece01fcd46461fce1eee2075646da83417e Mon Sep 17 00:00:00 2001 From: Ben Pope Date: Fri, 7 May 2021 18:16:04 +0100 Subject: [PATCH 2/3] config: Improve tls_config logging Signed-off-by: Ben Pope --- src/v/config/tls_config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/v/config/tls_config.h b/src/v/config/tls_config.h index ead7eafb213e..dbcfb90afa7e 100644 --- a/src/v/config/tls_config.h +++ b/src/v/config/tls_config.h @@ -124,7 +124,7 @@ static inline ostream& operator<<(ostream& o, const config::key_cert& c) { } static inline ostream& operator<<(ostream& o, const config::tls_config& c) { o << "{ " - << "enabled: " << c.is_enabled() + << "enabled: " << c.is_enabled() << " " << "key/cert files: " << c.get_key_cert_files() << " " << "ca file: " << c.get_truststore_file() << " " << "client_auth_required: " << c.get_require_client_auth() << " }"; From 846329bbfb548123e9663ac7d42371fe0c66545f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 7 May 2021 17:50:38 +0000 Subject: [PATCH 3/3] build(deps): bump lodash from 4.17.20 to 4.17.21 in /tools/ts-generator Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.17.20...4.17.21) Signed-off-by: dependabot[bot] --- tools/ts-generator/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/ts-generator/package-lock.json b/tools/ts-generator/package-lock.json index a5adf62fbf8b..2b4abfdfd7e4 100644 --- a/tools/ts-generator/package-lock.json +++ b/tools/ts-generator/package-lock.json @@ -651,9 +651,9 @@ } }, "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, "lodash.get": {