Setup the message bridge key sharing services
This implements 2 new services that will be used to share the active
SCTP authentication key. For context, if SCTP authentication is wanted,
then we will need a way to securely distribute a shared key across every
node. We use gRPC to distribute the key.
* message_bridge_auth_server
This service should only run in one node. It generates a 128-bit
random-key during initialization. It sets up the gRPC service using
mutual-TLS authentication.
* message_bridge_auth_client
This service will run in every node. It listens for requests
in /aos aos.message_bridge.SctpConfigRequest and requests the
active key from the gRPC server which gets propagated into /aos
aos.message_bridge.SctpConfig. message_bridge reads this value and sets
the authentication key (previous change in relation).
These have some additional side-effects:
* This change also forces us to bring in an appropriate version of GRPC,
which itself forces updates to protobuf and other dependencies. We
take the opportunity to remove the protobuf subtree in favor of
a more sanitized import in the WORKSPACE.
* The various upgrades also upgraded our version of buildifier,
which now performs more aggressive linting.
* Our version of abseil was upgraded, which now forces you to only
have access to const references to things stored in absl::btree_set's
(see https://github.com/abseil/abseil-cpp/commit/a74b796ab3f114f6991479c9ad9e4c1a0dad3a4b).
Change-Id: I870b8f93451056e011cefa3cdf3c5dc01c19a6f9
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
Signed-off-by: Adam Snaider <adsnaider@gmail.com>
diff --git a/debian/grpc.patch b/debian/grpc.patch
new file mode 100644
index 0000000..b480d4a
--- /dev/null
+++ b/debian/grpc.patch
@@ -0,0 +1,28 @@
+diff --git a/bazel/copts.bzl b/bazel/copts.bzl
+index f63e39ee93..78fdb3ac61 100644
+--- a/bazel/copts.bzl
++++ b/bazel/copts.bzl
+@@ -58,5 +58,5 @@ GRPC_LLVM_WARNING_FLAGS = [
+
+ GRPC_DEFAULT_COPTS = select({
+ "//:use_strict_warning": GRPC_LLVM_WARNING_FLAGS + ["-DUSE_STRICT_WARNING=1"],
+- "//conditions:default": [],
++ "//conditions:default": ["-Wno-missing-constinit"],
+ })
+diff --git a/bazel/grpc_extra_deps.bzl b/bazel/grpc_extra_deps.bzl
+index 4d8afa3131..4241197815 100644
+--- a/bazel/grpc_extra_deps.bzl
++++ b/bazel/grpc_extra_deps.bzl
+@@ -52,9 +52,9 @@ def grpc_extra_deps(ignore_version_differences = False):
+
+ api_dependencies()
+
+- go_rules_dependencies()
+- go_register_toolchains(version = "1.18")
+- gazelle_dependencies()
++ #go_rules_dependencies()
++ #go_register_toolchains(version = "1.18")
++ #gazelle_dependencies()
+
+ # Pull-in the go 3rd party dependencies for protoc_gen_validate, which is
+ # needed for building C++ xDS protos