[alts] Remove CheckCallHost checks in ALTS security connector. (#33043)

This check compares the host portion of the target name to the authority
header, but in common use cases (e.g. GCS) they may not coincide.
Additionally, this check does not happen in the Go and Java ALTS stacks.
pull/32914/head
Matthew Stevenson 2 years ago committed by GitHub
parent 3d291cc463
commit 68b416d383
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      BUILD
  2. 9
      src/core/lib/security/security_connector/alts/alts_security_connector.cc

@ -3160,7 +3160,6 @@ grpc_cc_library(
external_deps = [
"absl/status",
"absl/strings",
"absl/strings:str_format",
"absl/types:optional",
],
language = "c++",

@ -23,11 +23,9 @@
#include <string.h>
#include <algorithm>
#include <initializer_list>
#include <utility>
#include "absl/status/status.h"
#include "absl/strings/str_format.h"
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
@ -132,12 +130,7 @@ class grpc_alts_channel_security_connector final
}
grpc_core::ArenaPromise<absl::Status> CheckCallHost(
absl::string_view host, grpc_auth_context*) override {
if (host.empty() || host != target_name_) {
return grpc_core::Immediate(absl::UnauthenticatedError(absl::StrFormat(
"ALTS call host [%s] does not match target name [%s].", host,
target_name_)));
}
absl::string_view, grpc_auth_context*) override {
return grpc_core::ImmediateOkStatus();
}

Loading…
Cancel
Save