Automated rollback of commit 2eaaa9cbf7.

PiperOrigin-RevId: 694190066
pull/38079/head
Vignesh Babu 3 weeks ago committed by Copybara-Service
parent 7b6a5beed4
commit 0148b49aea
  1. 1
      BUILD
  2. 4
      CMakeLists.txt
  3. 1
      Makefile
  4. 2
      Package.swift
  5. 8
      build_autogenerated.yaml
  6. 1
      config.m4
  7. 1
      config.w32
  8. 2
      gRPC-C++.podspec
  9. 3
      gRPC-Core.podspec
  10. 2
      grpc.gemspec
  11. 2
      package.xml
  12. 1
      src/core/BUILD
  13. 8
      src/core/lib/security/context/security_context.h
  14. 5
      src/core/lib/surface/connection_context.h
  15. 1
      src/python/grpcio/grpc_core_dependencies.py
  16. 2
      tools/doxygen/Doxyfile.c++.internal
  17. 2
      tools/doxygen/Doxyfile.core.internal

@ -2179,6 +2179,7 @@ grpc_cc_library(
"//src/core:channel_args",
"//src/core:channel_fwd",
"//src/core:closure",
"//src/core:connection_context",
"//src/core:context",
"//src/core:error",
"//src/core:event_engine_memory_allocator",

4
CMakeLists.txt generated

@ -2830,6 +2830,7 @@ add_library(grpc
src/core/lib/surface/client_call.cc
src/core/lib/surface/completion_queue.cc
src/core/lib/surface/completion_queue_factory.cc
src/core/lib/surface/connection_context.cc
src/core/lib/surface/event_string.cc
src/core/lib/surface/filter_stack_call.cc
src/core/lib/surface/init.cc
@ -3603,6 +3604,7 @@ add_library(grpc_unsecure
src/core/lib/surface/client_call.cc
src/core/lib/surface/completion_queue.cc
src/core/lib/surface/completion_queue_factory.cc
src/core/lib/surface/connection_context.cc
src/core/lib/surface/event_string.cc
src/core/lib/surface/filter_stack_call.cc
src/core/lib/surface/init.cc
@ -5823,6 +5825,7 @@ add_library(grpc_authorization_provider
src/core/lib/surface/client_call.cc
src/core/lib/surface/completion_queue.cc
src/core/lib/surface/completion_queue_factory.cc
src/core/lib/surface/connection_context.cc
src/core/lib/surface/event_string.cc
src/core/lib/surface/filter_stack_call.cc
src/core/lib/surface/init_internally.cc
@ -12955,7 +12958,6 @@ endif()
if(gRPC_BUILD_TESTS)
add_executable(connection_context_test
src/core/lib/surface/connection_context.cc
test/core/surface/connection_context_test.cc
test/core/test_util/cmdline.cc
test/core/test_util/fuzzer_util.cc

1
Makefile generated

@ -1302,6 +1302,7 @@ LIBGRPC_SRC = \
src/core/lib/surface/client_call.cc \
src/core/lib/surface/completion_queue.cc \
src/core/lib/surface/completion_queue_factory.cc \
src/core/lib/surface/connection_context.cc \
src/core/lib/surface/event_string.cc \
src/core/lib/surface/filter_stack_call.cc \
src/core/lib/surface/init.cc \

2
Package.swift generated

@ -1596,6 +1596,8 @@ let package = Package(
"src/core/lib/surface/completion_queue.h",
"src/core/lib/surface/completion_queue_factory.cc",
"src/core/lib/surface/completion_queue_factory.h",
"src/core/lib/surface/connection_context.cc",
"src/core/lib/surface/connection_context.h",
"src/core/lib/surface/event_string.cc",
"src/core/lib/surface/event_string.h",
"src/core/lib/surface/filter_stack_call.cc",

@ -1055,6 +1055,7 @@ libs:
- src/core/lib/surface/client_call.h
- src/core/lib/surface/completion_queue.h
- src/core/lib/surface/completion_queue_factory.h
- src/core/lib/surface/connection_context.h
- src/core/lib/surface/event_string.h
- src/core/lib/surface/filter_stack_call.h
- src/core/lib/surface/init.h
@ -1911,6 +1912,7 @@ libs:
- src/core/lib/surface/client_call.cc
- src/core/lib/surface/completion_queue.cc
- src/core/lib/surface/completion_queue_factory.cc
- src/core/lib/surface/connection_context.cc
- src/core/lib/surface/event_string.cc
- src/core/lib/surface/filter_stack_call.cc
- src/core/lib/surface/init.cc
@ -2609,6 +2611,7 @@ libs:
- src/core/lib/surface/client_call.h
- src/core/lib/surface/completion_queue.h
- src/core/lib/surface/completion_queue_factory.h
- src/core/lib/surface/connection_context.h
- src/core/lib/surface/event_string.h
- src/core/lib/surface/filter_stack_call.h
- src/core/lib/surface/init.h
@ -3038,6 +3041,7 @@ libs:
- src/core/lib/surface/client_call.cc
- src/core/lib/surface/completion_queue.cc
- src/core/lib/surface/completion_queue_factory.cc
- src/core/lib/surface/connection_context.cc
- src/core/lib/surface/event_string.cc
- src/core/lib/surface/filter_stack_call.cc
- src/core/lib/surface/init.cc
@ -4680,6 +4684,7 @@ libs:
- src/core/lib/surface/client_call.h
- src/core/lib/surface/completion_queue.h
- src/core/lib/surface/completion_queue_factory.h
- src/core/lib/surface/connection_context.h
- src/core/lib/surface/event_string.h
- src/core/lib/surface/filter_stack_call.h
- src/core/lib/surface/init.h
@ -4984,6 +4989,7 @@ libs:
- src/core/lib/surface/client_call.cc
- src/core/lib/surface/completion_queue.cc
- src/core/lib/surface/completion_queue_factory.cc
- src/core/lib/surface/connection_context.cc
- src/core/lib/surface/event_string.cc
- src/core/lib/surface/filter_stack_call.cc
- src/core/lib/surface/init_internally.cc
@ -9301,7 +9307,6 @@ targets:
build: test
language: c++
headers:
- src/core/lib/surface/connection_context.h
- test/core/test_util/cmdline.h
- test/core/test_util/evaluate_args_test_util.h
- test/core/test_util/fuzzer_util.h
@ -9313,7 +9318,6 @@ targets:
- test/core/test_util/slice_splitter.h
- test/core/test_util/tracer_util.h
src:
- src/core/lib/surface/connection_context.cc
- test/core/surface/connection_context_test.cc
- test/core/test_util/cmdline.cc
- test/core/test_util/fuzzer_util.cc

1
config.m4 generated

@ -677,6 +677,7 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/surface/client_call.cc \
src/core/lib/surface/completion_queue.cc \
src/core/lib/surface/completion_queue_factory.cc \
src/core/lib/surface/connection_context.cc \
src/core/lib/surface/event_string.cc \
src/core/lib/surface/filter_stack_call.cc \
src/core/lib/surface/init.cc \

1
config.w32 generated

@ -642,6 +642,7 @@ if (PHP_GRPC != "no") {
"src\\core\\lib\\surface\\client_call.cc " +
"src\\core\\lib\\surface\\completion_queue.cc " +
"src\\core\\lib\\surface\\completion_queue_factory.cc " +
"src\\core\\lib\\surface\\connection_context.cc " +
"src\\core\\lib\\surface\\event_string.cc " +
"src\\core\\lib\\surface\\filter_stack_call.cc " +
"src\\core\\lib\\surface\\init.cc " +

2
gRPC-C++.podspec generated

@ -1106,6 +1106,7 @@ Pod::Spec.new do |s|
'src/core/lib/surface/client_call.h',
'src/core/lib/surface/completion_queue.h',
'src/core/lib/surface/completion_queue_factory.h',
'src/core/lib/surface/connection_context.h',
'src/core/lib/surface/event_string.h',
'src/core/lib/surface/filter_stack_call.h',
'src/core/lib/surface/init.h',
@ -2397,6 +2398,7 @@ Pod::Spec.new do |s|
'src/core/lib/surface/client_call.h',
'src/core/lib/surface/completion_queue.h',
'src/core/lib/surface/completion_queue_factory.h',
'src/core/lib/surface/connection_context.h',
'src/core/lib/surface/event_string.h',
'src/core/lib/surface/filter_stack_call.h',
'src/core/lib/surface/init.h',

3
gRPC-Core.podspec generated

@ -1712,6 +1712,8 @@ Pod::Spec.new do |s|
'src/core/lib/surface/completion_queue.h',
'src/core/lib/surface/completion_queue_factory.cc',
'src/core/lib/surface/completion_queue_factory.h',
'src/core/lib/surface/connection_context.cc',
'src/core/lib/surface/connection_context.h',
'src/core/lib/surface/event_string.cc',
'src/core/lib/surface/event_string.h',
'src/core/lib/surface/filter_stack_call.cc',
@ -3250,6 +3252,7 @@ Pod::Spec.new do |s|
'src/core/lib/surface/client_call.h',
'src/core/lib/surface/completion_queue.h',
'src/core/lib/surface/completion_queue_factory.h',
'src/core/lib/surface/connection_context.h',
'src/core/lib/surface/event_string.h',
'src/core/lib/surface/filter_stack_call.h',
'src/core/lib/surface/init.h',

2
grpc.gemspec generated

@ -1598,6 +1598,8 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/surface/completion_queue.h )
s.files += %w( src/core/lib/surface/completion_queue_factory.cc )
s.files += %w( src/core/lib/surface/completion_queue_factory.h )
s.files += %w( src/core/lib/surface/connection_context.cc )
s.files += %w( src/core/lib/surface/connection_context.h )
s.files += %w( src/core/lib/surface/event_string.cc )
s.files += %w( src/core/lib/surface/event_string.h )
s.files += %w( src/core/lib/surface/filter_stack_call.cc )

2
package.xml generated

@ -1580,6 +1580,8 @@
<file baseinstalldir="/" name="src/core/lib/surface/completion_queue.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/surface/completion_queue_factory.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/surface/completion_queue_factory.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/surface/connection_context.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/surface/connection_context.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/surface/event_string.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/surface/event_string.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/surface/filter_stack_call.cc" role="src" />

@ -3692,6 +3692,7 @@ grpc_cc_library(
srcs = ["lib/surface/connection_context.cc"],
hdrs = ["lib/surface/connection_context.h"],
deps = [
"no_destruct",
"//:gpr",
"//:gpr_platform",
"//:orphanable",

@ -33,7 +33,9 @@
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/resource_quota/arena.h"
#include "src/core/lib/security/credentials/credentials.h" // IWYU pragma: keep
#include "src/core/lib/surface/connection_context.h"
#include "src/core/util/debug_location.h"
#include "src/core/util/orphanable.h"
#include "src/core/util/ref_counted.h"
#include "src/core/util/ref_counted_ptr.h"
#include "src/core/util/useful.h"
@ -77,6 +79,7 @@ struct grpc_auth_context
if (chained_ != nullptr) {
peer_identity_property_name_ = chained_->peer_identity_property_name_;
}
connection_context_ = grpc_core::ConnectionContext::Create();
}
~grpc_auth_context() {
@ -98,6 +101,10 @@ struct grpc_auth_context
const grpc_auth_context* chained() const { return chained_.get(); }
const grpc_auth_property_array& properties() const { return properties_; }
grpc_core::ConnectionContext* connection_context() const {
return connection_context_.get();
}
bool is_authenticated() const {
return peer_identity_property_name_ != nullptr;
}
@ -120,6 +127,7 @@ struct grpc_auth_context
grpc_auth_property_array properties_;
const char* peer_identity_property_name_ = nullptr;
std::unique_ptr<Extension> extension_;
grpc_core::OrphanablePtr<grpc_core::ConnectionContext> connection_context_;
};
// --- grpc_security_context_extension ---

@ -25,6 +25,7 @@
#include <cstdint>
#include <vector>
#include "src/core/util/no_destruct.h"
#include "src/core/util/orphanable.h"
namespace grpc_core {
@ -68,8 +69,8 @@ class BaseConnectionContextPropertiesTraits {
// Allocate a new context id and register the destruction function.
static std::vector<void (*)(void*)>& RegisteredTraits() {
static std::vector<void (*)(void*)> registered_traits;
return registered_traits;
static NoDestruct<std::vector<void (*)(void*)>> registered_traits;
return *registered_traits;
}
};

@ -651,6 +651,7 @@ CORE_SOURCE_FILES = [
'src/core/lib/surface/client_call.cc',
'src/core/lib/surface/completion_queue.cc',
'src/core/lib/surface/completion_queue_factory.cc',
'src/core/lib/surface/connection_context.cc',
'src/core/lib/surface/event_string.cc',
'src/core/lib/surface/filter_stack_call.cc',
'src/core/lib/surface/init.cc',

@ -2562,6 +2562,8 @@ src/core/lib/surface/completion_queue.cc \
src/core/lib/surface/completion_queue.h \
src/core/lib/surface/completion_queue_factory.cc \
src/core/lib/surface/completion_queue_factory.h \
src/core/lib/surface/connection_context.cc \
src/core/lib/surface/connection_context.h \
src/core/lib/surface/event_string.cc \
src/core/lib/surface/event_string.h \
src/core/lib/surface/filter_stack_call.cc \

@ -2373,6 +2373,8 @@ src/core/lib/surface/completion_queue.cc \
src/core/lib/surface/completion_queue.h \
src/core/lib/surface/completion_queue_factory.cc \
src/core/lib/surface/completion_queue_factory.h \
src/core/lib/surface/connection_context.cc \
src/core/lib/surface/connection_context.h \
src/core/lib/surface/event_string.cc \
src/core/lib/surface/event_string.h \
src/core/lib/surface/filter_stack_call.cc \

Loading…
Cancel
Save