From caca34b7b6bcb136b02e31f6602363711d433fdc Mon Sep 17 00:00:00 2001 From: Darren Bolduc Date: Tue, 15 Oct 2024 14:01:07 -0400 Subject: [PATCH] cleanup(storage): add comment on why no API key support (#14788) --- google/cloud/storage/internal/unified_rest_credentials.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/google/cloud/storage/internal/unified_rest_credentials.cc b/google/cloud/storage/internal/unified_rest_credentials.cc index 74233196bee6..a43dd71fbefa 100644 --- a/google/cloud/storage/internal/unified_rest_credentials.cc +++ b/google/cloud/storage/internal/unified_rest_credentials.cc @@ -136,7 +136,10 @@ std::shared_ptr MapCredentials( Decorate(std::move(impl), cfg.options())); } void visit(internal::ApiKeyConfig const&) override { - // TODO(#14759) - Support API key authentication over REST + // Circa 2024, GCS does not support API key authentication. Moreover, we + // would have to grow the deprecated `storage::oauth2::Credentials` class + // to support setting the `x-goog-api-key` header. For these reasons, we + // just return anonymous (no-op) credentials. result = google::cloud::storage::oauth2::CreateAnonymousCredentials(); }