diff --git a/Dockerfile b/Dockerfile index ee016b3..39b8bab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,7 @@ ARG ARCH=armv7hf ARG REPO=axisecp ARG VERSION=1.14 ARG UBUNTU_VERSION=22.04 +ARG GRPC_VERSION=v1.65.5 FROM arm64v8/ubuntu:${UBUNTU_VERSION} AS containerized_aarch64 FROM arm32v7/ubuntu:${UBUNTU_VERSION} AS containerized_armv7hf @@ -46,6 +47,7 @@ FROM build_base AS testdata # Install Edge TPU compiler SHELL ["/bin/bash", "-o", "pipefail", "-c"] +# hadolint ignore=DL3009 RUN <& stub, const char* modelPat ASSERT_FALSE(status.ok()); } +// Disabled while updating grpc/openssl TEST(InferenceTest, ServerAuthentication) { shm_unlink(sharedFile); thread main(ServiceSecurity, 5, cpuChipId, serverCertificatePath, serverKeyPath); @@ -419,7 +420,12 @@ TEST(InferenceTest, ServerAuthentication) { string root_cert = read_text(serverCertificatePath); SslCredentialsOptions ssl_opts = {root_cert.c_str(), "", ""}; shared_ptr creds = grpc::SslCredentials(ssl_opts); - shared_ptr channel = CreateChannel(target, creds); + grpc::ChannelArguments args; + // gRPC/ssl doesn't support skipping server common-name verification so we force target name to + // localhost as used in the cert creation. + args.SetSslTargetNameOverride("localhost"); + shared_ptr channel = grpc::CreateCustomChannel(target, creds, args); + ASSERT_TRUE(channel->WaitForConnected( gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), gpr_time_from_seconds(5, GPR_TIMESPAN)))); unique_ptr stub = PredictionService::NewStub(channel); @@ -559,6 +565,7 @@ TEST(InferenceTest, PredictModel_Fail) { } #ifdef __arm64__ +// Disabled while updating grpc/openssl TEST(InferenceTest, ServerAuthenticationDlpu) { shm_unlink(sharedFile); thread main(ServiceSecurity, 5, dlpuChipId, serverCertificatePath, serverKeyPath); @@ -566,7 +573,11 @@ TEST(InferenceTest, ServerAuthenticationDlpu) { string root_cert = read_text(serverCertificatePath); SslCredentialsOptions ssl_opts = {root_cert.c_str(), "", ""}; shared_ptr creds = grpc::SslCredentials(ssl_opts); - shared_ptr channel = CreateChannel(target, creds); + grpc::ChannelArguments args; + // gRPC/ssl doesn't support skipping server common-name verification so we force target name to + // localhost as used in the cert creation. + args.SetSslTargetNameOverride("localhost"); + shared_ptr channel = grpc::CreateCustomChannel(target, creds, args); ASSERT_TRUE(channel->WaitForConnected( gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), gpr_time_from_seconds(5, GPR_TIMESPAN)))); unique_ptr stub = PredictionService::NewStub(channel); @@ -650,6 +661,7 @@ TEST(InferenceTest, DISABLED_PredictDlpuModel3) main.join(); } #elif __arm__ +// Disabled while updating grpc/openssl TEST(InferenceTest, ServerAuthenticationTpu) { shm_unlink(sharedFile); thread main(ServiceSecurity, 5, tpuChipId, serverCertificatePath, serverKeyPath); @@ -657,7 +669,11 @@ TEST(InferenceTest, ServerAuthenticationTpu) { string root_cert = read_text(serverCertificatePath); SslCredentialsOptions ssl_opts = {root_cert.c_str(), "", ""}; shared_ptr creds = grpc::SslCredentials(ssl_opts); - shared_ptr channel = CreateChannel(target, creds); + grpc::ChannelArguments args; + // gRPC/ssl doesn't support skipping server common-name verification so we force target name to + // localhost as used in the cert creation. + args.SetSslTargetNameOverride("localhost"); + shared_ptr channel = grpc::CreateCustomChannel(target, creds, args); ASSERT_TRUE(channel->WaitForConnected( gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), gpr_time_from_seconds(5, GPR_TIMESPAN)))); unique_ptr stub = PredictionService::NewStub(channel);