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/.bazelrc b/.bazelrc
index 61ac856..d4603f9 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -113,7 +113,15 @@
# Prevent cypress from using its own binary. We want to use the hermetic one.
build --action_env=CYPRESS_INSTALL_BINARY=0
+# From our one and only phil.schrader: https://groups.google.com/g/bazel-discuss/c/5cbRuLuTwNg :)
+# Enable -Werror and warnings for our code
+# TODO: It would be nice to enable Wcast-align and Wcast-qual.
+build --per_file_copt=-third_party/.*,-external/.*@-Werror,-Wextra,-Wpointer-arith,-Wstrict-aliasing,-Wwrite-strings,-Wtype-limits,-Wsign-compare,-Wformat=2
+# NOTE: Explicitly disable -Werror because the `-external/.*` filter does not work
+build --per_file_copt=third_party/.*,external/.*@-Wno-sign-compare,-Wno-cast-align,-Wno-error,-Wno-unused-parameter,-Wno-cast-qual,-Wno-format-nonliteral,-Wno-tautological-type-limit-compare,-Wno-missing-field-initializers,-Wno-unused-function,-Wno-cast-function-type,-Wno-comment,-Wno-typedef-redefinition,-Wno-tautological-unsigned-enum-zero-compare,-Wno-extra,-Wno-type-limits,-Wno-attributes,-Wno-deprecated
+
# Load a local file that users can use to customize bazel invocations. This
# should stay the last line in this file so users can override things when they
# want.
try-import %workspace%/.bazelrc.user
+