grpc 1.85.0 → 1.86.0.pre1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (634) hide show
  1. checksums.yaml +4 -4
  2. data/Makefile +13 -9
  3. data/etc/roots.pem +0 -583
  4. data/include/grpc/channel_factory.h +78 -0
  5. data/include/grpc/credentials.h +21 -0
  6. data/include/grpc/grpc.h +7 -0
  7. data/include/grpc/grpc_security_constants.h +2 -0
  8. data/include/grpc/module.modulemap +1 -0
  9. data/src/core/call/call_filters.cc +4 -1
  10. data/src/core/call/call_filters.h +3 -1
  11. data/src/core/call/call_spine.h +12 -6
  12. data/src/core/call/call_state.h +3 -3
  13. data/src/core/call/client_call.cc +4 -1
  14. data/src/core/call/client_call.h +1 -0
  15. data/src/core/call/evaluate_args.cc +15 -14
  16. data/src/core/call/filter_fusion.h +2 -15
  17. data/src/core/call/interception_chain.h +2 -7
  18. data/src/core/call/metadata_batch.cc +5 -0
  19. data/src/core/call/metadata_batch.h +34 -3
  20. data/src/core/call/request_buffer.cc +1 -1
  21. data/src/core/call/server_call.cc +3 -3
  22. data/src/core/call/server_call.h +15 -0
  23. data/src/core/channelz/channelz_registry.cc +4 -4
  24. data/src/core/channelz/ztrace_collector.h +11 -2
  25. data/src/core/client_channel/backup_poller.cc +1 -2
  26. data/src/core/client_channel/channel_factory.cc +110 -0
  27. data/src/core/client_channel/channel_factory.h +45 -0
  28. data/src/core/client_channel/global_subchannel_pool.cc +2 -2
  29. data/src/core/client_channel/lame_channel.cc +59 -0
  30. data/src/core/client_channel/lame_channel.h +86 -0
  31. data/src/core/credentials/call/external/aws_request_signer.cc +2 -1
  32. data/src/core/credentials/call/external/url_external_account_credentials.cc +6 -17
  33. data/src/core/credentials/call/external/url_external_account_credentials.h +0 -1
  34. data/src/core/credentials/call/jwt/jwt_verifier.cc +25 -13
  35. data/src/core/credentials/call/oauth2/oauth2_credentials.cc +6 -4
  36. data/src/core/credentials/call/regional_access_boundary_fetcher.cc +16 -0
  37. data/src/core/credentials/call/regional_access_boundary_fetcher.h +6 -2
  38. data/src/core/credentials/transport/tls/grpc_tls_credentials_options.cc +14 -0
  39. data/src/core/credentials/transport/tls/grpc_tls_credentials_options.h +12 -2
  40. data/src/core/credentials/transport/tls/ssl_utils.cc +20 -0
  41. data/src/core/credentials/transport/tls/ssl_utils.h +4 -0
  42. data/src/core/credentials/transport/tls/tls_security_connector.cc +6 -2
  43. data/src/core/ext/filters/http/server/http_server_filter.cc +6 -1
  44. data/src/core/ext/filters/rbac/rbac_filter.cc +3 -41
  45. data/src/core/ext/filters/rbac/rbac_filter.h +2 -11
  46. data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +2 -2
  47. data/src/core/ext/transport/chttp2/server/chttp2_server.cc +31 -24
  48. data/src/core/ext/transport/chttp2/server/chttp2_server.h +1 -2
  49. data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +69 -102
  50. data/src/core/ext/transport/chttp2/transport/chttp2_transport.h +1 -1
  51. data/src/core/ext/transport/chttp2/transport/flow_control.h +2 -2
  52. data/src/core/ext/transport/chttp2/transport/flow_control_manager.h +1 -1
  53. data/src/core/ext/transport/chttp2/transport/frame.cc +15 -19
  54. data/src/core/ext/transport/chttp2/transport/frame.h +1 -1
  55. data/src/core/ext/transport/chttp2/transport/frame_goaway.cc +18 -61
  56. data/src/core/ext/transport/chttp2/transport/frame_goaway.h +0 -4
  57. data/src/core/ext/transport/chttp2/transport/frame_security.cc +1 -2
  58. data/src/core/ext/transport/chttp2/transport/frame_settings.cc +9 -0
  59. data/src/core/ext/transport/chttp2/transport/goaway.cc +1 -1
  60. data/src/core/ext/transport/chttp2/transport/goaway.h +0 -5
  61. data/src/core/ext/transport/chttp2/transport/header_assembler.h +1 -5
  62. data/src/core/ext/transport/chttp2/transport/hpack_parse_result.cc +3 -0
  63. data/src/core/ext/transport/chttp2/transport/hpack_parse_result.h +8 -0
  64. data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +33 -0
  65. data/src/core/ext/transport/chttp2/transport/http2_client_transport.cc +34 -19
  66. data/src/core/ext/transport/chttp2/transport/http2_client_transport.h +5 -2
  67. data/src/core/ext/transport/chttp2/transport/http2_server_transport.cc +134 -82
  68. data/src/core/ext/transport/chttp2/transport/http2_server_transport.h +30 -15
  69. data/src/core/ext/transport/chttp2/transport/http2_settings_promises.h +4 -3
  70. data/src/core/ext/transport/chttp2/transport/http2_transport.cc +9 -33
  71. data/src/core/ext/transport/chttp2/transport/http2_transport.h +1 -6
  72. data/src/core/ext/transport/chttp2/transport/http2_transport_stats.h +60 -0
  73. data/src/core/ext/transport/chttp2/transport/internal.h +6 -1
  74. data/src/core/ext/transport/chttp2/transport/keepalive.h +1 -4
  75. data/src/core/ext/transport/chttp2/transport/parsing.cc +4 -8
  76. data/src/core/ext/transport/chttp2/transport/ping_promise.cc +35 -11
  77. data/src/core/ext/transport/chttp2/transport/ping_promise.h +52 -47
  78. data/src/core/ext/transport/chttp2/transport/read_context.h +19 -5
  79. data/src/core/ext/transport/chttp2/transport/security_frame.h +7 -6
  80. data/src/core/ext/transport/chttp2/transport/stream_data_queue.h +7 -5
  81. data/src/core/ext/transport/chttp2/transport/transport_common.cc +47 -0
  82. data/src/core/ext/transport/chttp2/transport/transport_common.h +29 -0
  83. data/src/core/ext/transport/chttp2/transport/writable_streams.h +1 -1
  84. data/src/core/ext/transport/inproc/legacy_inproc_transport.cc +1 -7
  85. data/src/core/ext/upb-gen/envoy/admin/v3/clusters.upb.h +16 -0
  86. data/src/core/ext/upb-gen/envoy/admin/v3/clusters.upb_minitable.c +4 -3
  87. data/src/core/ext/upb-gen/envoy/admin/v3/server_info.upb.h +129 -81
  88. data/src/core/ext/upb-gen/envoy/admin/v3/server_info.upb_minitable.c +50 -39
  89. data/src/core/ext/upb-gen/envoy/config/bootstrap/v3/bootstrap.upb.h +411 -163
  90. data/src/core/ext/upb-gen/envoy/config/bootstrap/v3/bootstrap.upb_minitable.c +95 -44
  91. data/src/core/ext/upb-gen/envoy/config/bootstrap/v3/bootstrap.upb_minitable.h +3 -0
  92. data/src/core/ext/upb-gen/envoy/config/cluster/v3/circuit_breaker.upb.h +41 -8
  93. data/src/core/ext/upb-gen/envoy/config/cluster/v3/circuit_breaker.upb_minitable.c +8 -5
  94. data/src/core/ext/upb-gen/envoy/config/cluster/v3/cluster.upb.h +427 -222
  95. data/src/core/ext/upb-gen/envoy/config/cluster/v3/cluster.upb_minitable.c +97 -66
  96. data/src/core/ext/upb-gen/envoy/config/cluster/v3/cluster.upb_minitable.h +1 -0
  97. data/src/core/ext/upb-gen/envoy/config/cluster/v3/outlier_detection.upb.h +130 -99
  98. data/src/core/ext/upb-gen/envoy/config/cluster/v3/outlier_detection.upb_minitable.c +29 -27
  99. data/src/core/ext/upb-gen/envoy/config/core/v3/address.upb.h +49 -33
  100. data/src/core/ext/upb-gen/envoy/config/core/v3/address.upb_minitable.c +19 -8
  101. data/src/core/ext/upb-gen/envoy/config/core/v3/base.upb.h +95 -3
  102. data/src/core/ext/upb-gen/envoy/config/core/v3/base.upb_minitable.c +33 -6
  103. data/src/core/ext/upb-gen/envoy/config/core/v3/base.upb_minitable.h +1 -0
  104. data/src/core/ext/upb-gen/envoy/config/core/v3/http_service.upb.h +93 -11
  105. data/src/core/ext/upb-gen/envoy/config/core/v3/http_service.upb_minitable.c +8 -5
  106. data/src/core/ext/upb-gen/envoy/config/core/v3/protocol.upb.h +656 -134
  107. data/src/core/ext/upb-gen/envoy/config/core/v3/protocol.upb_minitable.c +117 -51
  108. data/src/core/ext/upb-gen/envoy/config/core/v3/protocol.upb_minitable.h +2 -0
  109. data/src/core/ext/upb-gen/envoy/config/core/v3/socket_option.upb.h +45 -23
  110. data/src/core/ext/upb-gen/envoy/config/core/v3/socket_option.upb_minitable.c +19 -10
  111. data/src/core/ext/upb-gen/envoy/config/endpoint/v3/endpoint_components.upb.h +99 -34
  112. data/src/core/ext/upb-gen/envoy/config/endpoint/v3/endpoint_components.upb_minitable.c +12 -7
  113. data/src/core/ext/upb-gen/envoy/config/listener/v3/listener.upb.h +344 -273
  114. data/src/core/ext/upb-gen/envoy/config/listener/v3/listener.upb_minitable.c +62 -69
  115. data/src/core/ext/upb-gen/envoy/config/listener/v3/listener.upb_minitable.h +1 -3
  116. data/src/core/ext/upb-gen/envoy/config/metrics/v3/stats.upb.h +53 -22
  117. data/src/core/ext/upb-gen/envoy/config/metrics/v3/stats.upb_minitable.c +9 -7
  118. data/src/core/ext/upb-gen/envoy/config/overload/v3/overload.upb.h +108 -0
  119. data/src/core/ext/upb-gen/envoy/config/overload/v3/overload.upb_minitable.c +26 -2
  120. data/src/core/ext/upb-gen/envoy/config/overload/v3/overload.upb_minitable.h +1 -0
  121. data/src/core/ext/upb-gen/envoy/config/route/v3/route_components.upb.h +809 -231
  122. data/src/core/ext/upb-gen/envoy/config/route/v3/route_components.upb_minitable.c +183 -77
  123. data/src/core/ext/upb-gen/envoy/config/route/v3/route_components.upb_minitable.h +3 -0
  124. data/src/core/ext/upb-gen/envoy/config/trace/v3/opentelemetry.upb.h +151 -26
  125. data/src/core/ext/upb-gen/envoy/config/trace/v3/opentelemetry.upb_minitable.c +17 -9
  126. data/src/core/ext/upb-gen/envoy/config/trace/v3/zipkin.upb.h +24 -8
  127. data/src/core/ext/upb-gen/envoy/config/trace/v3/zipkin.upb_minitable.c +6 -5
  128. data/src/core/ext/upb-gen/envoy/data/accesslog/v3/accesslog.upb.h +2 -1
  129. data/src/core/ext/upb-gen/envoy/extensions/filters/http/composite/v3/composite.upb.h +224 -16
  130. data/src/core/ext/upb-gen/envoy/extensions/filters/http/composite/v3/composite.upb_minitable.c +83 -10
  131. data/src/core/ext/upb-gen/envoy/extensions/filters/http/composite/v3/composite.upb_minitable.h +2 -0
  132. data/src/core/ext/upb-gen/envoy/extensions/filters/http/ext_proc/v3/ext_proc.upb.h +95 -79
  133. data/src/core/ext/upb-gen/envoy/extensions/filters/http/ext_proc/v3/ext_proc.upb_minitable.c +23 -22
  134. data/src/core/ext/upb-gen/envoy/extensions/filters/http/fault/v3/fault.upb.h +34 -18
  135. data/src/core/ext/upb-gen/envoy/extensions/filters/http/fault/v3/fault.upb_minitable.c +10 -9
  136. data/src/core/ext/upb-gen/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.upb.h +243 -2
  137. data/src/core/ext/upb-gen/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.upb_minitable.c +53 -5
  138. data/src/core/ext/upb-gen/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.upb_minitable.h +3 -0
  139. data/src/core/ext/upb-gen/envoy/extensions/filters/http/router/v3/router.upb.h +53 -22
  140. data/src/core/ext/upb-gen/envoy/extensions/filters/http/router/v3/router.upb_minitable.c +9 -7
  141. data/src/core/ext/upb-gen/envoy/extensions/filters/http/stateful_session/v3/stateful_session.upb.h +23 -7
  142. data/src/core/ext/upb-gen/envoy/extensions/filters/http/stateful_session/v3/stateful_session.upb_minitable.c +9 -4
  143. data/src/core/ext/upb-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.h +516 -215
  144. data/src/core/ext/upb-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb_minitable.c +99 -60
  145. data/src/core/ext/upb-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb_minitable.h +1 -0
  146. data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.upb.h +60 -28
  147. data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.upb_minitable.c +12 -10
  148. data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/common/v3/common.upb.h +109 -0
  149. data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/common/v3/common.upb_minitable.c +32 -2
  150. data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/common/v3/common.upb_minitable.h +1 -0
  151. data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/http_11_proxy/v3/upstream_http_11_connect.upb.h +37 -4
  152. data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/http_11_proxy/v3/upstream_http_11_connect.upb_minitable.c +7 -4
  153. data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/common.upb.h +65 -47
  154. data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/common.upb_minitable.c +29 -12
  155. data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upb.h +20 -4
  156. data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upb_minitable.c +6 -3
  157. data/src/core/ext/upb-gen/envoy/service/ext_proc/v3/external_processor.upb.h +776 -88
  158. data/src/core/ext/upb-gen/envoy/service/ext_proc/v3/external_processor.upb_minitable.c +195 -35
  159. data/src/core/ext/upb-gen/envoy/service/ext_proc/v3/external_processor.upb_minitable.h +5 -0
  160. data/src/core/ext/upb-gen/envoy/type/matcher/v3/address.upb.h +23 -7
  161. data/src/core/ext/upb-gen/envoy/type/matcher/v3/address.upb_minitable.c +10 -3
  162. data/src/core/ext/upb-gen/envoy/type/matcher/v3/status_code_input.upb.h +44 -0
  163. data/src/core/ext/upb-gen/envoy/type/matcher/v3/status_code_input.upb_minitable.c +11 -2
  164. data/src/core/ext/upb-gen/envoy/type/matcher/v3/status_code_input.upb_minitable.h +1 -0
  165. data/src/core/ext/upb-gen/envoy/type/v3/scope.upb.h +218 -0
  166. data/src/core/ext/upb-gen/envoy/type/v3/scope.upb_minitable.c +70 -0
  167. data/src/core/ext/upb-gen/envoy/type/v3/scope.upb_minitable.h +31 -0
  168. data/src/core/ext/upbdefs-gen/envoy/admin/v3/clusters.upbdefs.c +30 -24
  169. data/src/core/ext/upbdefs-gen/envoy/admin/v3/server_info.upbdefs.c +166 -152
  170. data/src/core/ext/upbdefs-gen/envoy/config/bootstrap/v3/bootstrap.upbdefs.c +467 -422
  171. data/src/core/ext/upbdefs-gen/envoy/config/bootstrap/v3/bootstrap.upbdefs.h +15 -0
  172. data/src/core/ext/upbdefs-gen/envoy/config/cluster/v3/circuit_breaker.upbdefs.c +120 -110
  173. data/src/core/ext/upbdefs-gen/envoy/config/cluster/v3/cluster.upbdefs.c +912 -857
  174. data/src/core/ext/upbdefs-gen/envoy/config/cluster/v3/cluster.upbdefs.h +5 -0
  175. data/src/core/ext/upbdefs-gen/envoy/config/cluster/v3/outlier_detection.upbdefs.c +26 -19
  176. data/src/core/ext/upbdefs-gen/envoy/config/core/v3/address.upbdefs.c +59 -54
  177. data/src/core/ext/upbdefs-gen/envoy/config/core/v3/base.upbdefs.c +356 -346
  178. data/src/core/ext/upbdefs-gen/envoy/config/core/v3/base.upbdefs.h +5 -0
  179. data/src/core/ext/upbdefs-gen/envoy/config/core/v3/http_service.upbdefs.c +49 -37
  180. data/src/core/ext/upbdefs-gen/envoy/config/core/v3/protocol.upbdefs.c +599 -483
  181. data/src/core/ext/upbdefs-gen/envoy/config/core/v3/protocol.upbdefs.h +10 -0
  182. data/src/core/ext/upbdefs-gen/envoy/config/core/v3/socket_option.upbdefs.c +65 -49
  183. data/src/core/ext/upbdefs-gen/envoy/config/endpoint/v3/endpoint_components.upbdefs.c +165 -161
  184. data/src/core/ext/upbdefs-gen/envoy/config/listener/v3/listener.upbdefs.c +369 -327
  185. data/src/core/ext/upbdefs-gen/envoy/config/listener/v3/listener.upbdefs.h +5 -15
  186. data/src/core/ext/upbdefs-gen/envoy/config/metrics/v3/stats.upbdefs.c +129 -121
  187. data/src/core/ext/upbdefs-gen/envoy/config/overload/v3/overload.upbdefs.c +224 -204
  188. data/src/core/ext/upbdefs-gen/envoy/config/overload/v3/overload.upbdefs.h +5 -0
  189. data/src/core/ext/upbdefs-gen/envoy/config/route/v3/route_components.upbdefs.c +2046 -1932
  190. data/src/core/ext/upbdefs-gen/envoy/config/route/v3/route_components.upbdefs.h +15 -0
  191. data/src/core/ext/upbdefs-gen/envoy/config/trace/v3/opentelemetry.upbdefs.c +70 -37
  192. data/src/core/ext/upbdefs-gen/envoy/config/trace/v3/zipkin.upbdefs.c +7 -3
  193. data/src/core/ext/upbdefs-gen/envoy/data/accesslog/v3/accesslog.upbdefs.c +5 -3
  194. data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/composite/v3/composite.upbdefs.c +121 -78
  195. data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/composite/v3/composite.upbdefs.h +10 -0
  196. data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/ext_proc/v3/ext_proc.upbdefs.c +165 -160
  197. data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/fault/v3/fault.upbdefs.c +121 -118
  198. data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.upbdefs.c +68 -37
  199. data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.upbdefs.h +15 -0
  200. data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/router/v3/router.upbdefs.c +48 -40
  201. data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/stateful_session/v3/stateful_session.upbdefs.c +44 -37
  202. data/src/core/ext/upbdefs-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.c +919 -870
  203. data/src/core/ext/upbdefs-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.h +5 -0
  204. data/src/core/ext/upbdefs-gen/envoy/extensions/transport_sockets/http_11_proxy/v3/upstream_http_11_connect.upbdefs.c +26 -14
  205. data/src/core/ext/upbdefs-gen/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.c +44 -36
  206. data/src/core/ext/upbdefs-gen/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.c +372 -371
  207. data/src/core/ext/upbdefs-gen/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upbdefs.c +32 -28
  208. data/src/core/ext/upbdefs-gen/envoy/type/matcher/v3/address.upbdefs.c +17 -15
  209. data/src/core/ext/upbdefs-gen/envoy/type/matcher/v3/status_code_input.upbdefs.c +4 -1
  210. data/src/core/ext/upbdefs-gen/envoy/type/matcher/v3/status_code_input.upbdefs.h +5 -0
  211. data/src/core/ext/upbdefs-gen/envoy/type/v3/scope.upbdefs.c +76 -0
  212. data/src/core/ext/upbdefs-gen/envoy/type/v3/scope.upbdefs.h +37 -0
  213. data/src/core/ext/upbdefs-gen/envoy/type/v3/token_bucket.upbdefs.c +1 -1
  214. data/src/core/filter/ext_proc/ext_proc_filter.cc +537 -259
  215. data/src/core/filter/ext_proc/ext_proc_filter.h +47 -14
  216. data/src/core/filter/ext_proc/ext_proc_messages.cc +38 -17
  217. data/src/core/filter/ext_proc/ext_proc_messages.h +19 -7
  218. data/src/core/filter/filter_args.h +5 -60
  219. data/src/core/handshaker/http_connect/http_connect_client_handshaker.cc +1 -1
  220. data/src/core/handshaker/security/pipelined_secure_endpoint.cc +23 -22
  221. data/src/core/handshaker/security/secure_endpoint.cc +16 -16
  222. data/src/core/lib/channel/channel_stack.cc +0 -12
  223. data/src/core/lib/channel/channel_stack.h +0 -8
  224. data/src/core/lib/channel/promise_based_filter.cc +57 -44
  225. data/src/core/lib/channel/promise_based_filter.h +29 -41
  226. data/src/core/lib/event_engine/ares_resolver.cc +10 -4
  227. data/src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc +1 -1
  228. data/src/core/lib/event_engine/cf_engine/dns_service_resolver.cc +3 -3
  229. data/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc +1 -5
  230. data/src/core/lib/event_engine/posix_engine/ev_poll_posix.cc +10 -12
  231. data/src/core/lib/event_engine/posix_engine/file_descriptor_collection.cc +3 -17
  232. data/src/core/lib/event_engine/posix_engine/grpc_polled_fd_posix.h +21 -1
  233. data/src/core/lib/event_engine/posix_engine/posix_endpoint.cc +5 -5
  234. data/src/core/lib/event_engine/posix_engine/posix_engine.cc +10 -12
  235. data/src/core/lib/event_engine/posix_engine/posix_interface.h +1 -1
  236. data/src/core/lib/event_engine/posix_engine/timer.cc +2 -2
  237. data/src/core/lib/event_engine/shim.cc +1 -6
  238. data/src/core/lib/event_engine/shim.h +0 -5
  239. data/src/core/lib/event_engine/windows/windows_engine.cc +4 -4
  240. data/src/core/lib/event_engine/windows/windows_listener.cc +1 -1
  241. data/src/core/lib/experiments/experiments.cc +144 -261
  242. data/src/core/lib/experiments/experiments.h +48 -120
  243. data/src/core/lib/iomgr/iomgr_windows.cc +1 -6
  244. data/src/core/lib/iomgr/tcp_posix.cc +21 -21
  245. data/src/core/lib/iomgr/tcp_server_posix.cc +64 -242
  246. data/src/core/lib/iomgr/tcp_server_windows.cc +0 -469
  247. data/src/core/lib/promise/activity.cc +8 -8
  248. data/src/core/lib/promise/activity.h +5 -5
  249. data/src/core/lib/promise/inter_activity_pipe.h +3 -3
  250. data/src/core/lib/promise/party.cc +5 -5
  251. data/src/core/lib/promise/status_flag.h +7 -2
  252. data/src/core/lib/resource_quota/memory_quota.cc +2 -2
  253. data/src/core/lib/security/authorization/rbac_policy.h +2 -2
  254. data/src/core/lib/surface/call.cc +13 -3
  255. data/src/core/lib/surface/call.h +23 -6
  256. data/src/core/lib/surface/channel_create.cc +7 -1
  257. data/src/core/lib/surface/channel_init.h +1 -8
  258. data/src/core/lib/surface/filter_stack_call.cc +16 -0
  259. data/src/core/lib/surface/filter_stack_call.h +1 -0
  260. data/src/core/lib/surface/init.cc +3 -3
  261. data/src/core/lib/surface/legacy_channel.cc +4 -1
  262. data/src/core/lib/surface/version.cc +2 -2
  263. data/src/core/lib/transport/transport.cc +15 -8
  264. data/src/core/lib/transport/transport_framing_endpoint_extension.h +8 -2
  265. data/src/core/load_balancing/outlier_detection/outlier_detection.cc +99 -8
  266. data/src/core/load_balancing/outlier_detection/outlier_detection_metrics.cc +38 -0
  267. data/src/core/load_balancing/outlier_detection/outlier_detection_metrics.h +55 -0
  268. data/src/core/load_balancing/ring_hash/ring_hash.cc +2 -1
  269. data/src/core/load_balancing/rls/rls.cc +21 -1
  270. data/src/core/load_balancing/xds/cds.cc +4 -51
  271. data/src/core/plugin_registry/grpc_plugin_registry.cc +10 -13
  272. data/src/core/plugin_registry/grpc_plugin_registry_extra.cc +0 -7
  273. data/src/core/resolver/xds/xds_resolver.cc +1 -1
  274. data/src/core/server/server.cc +60 -4
  275. data/src/core/server/server_config_selector.h +4 -18
  276. data/src/core/server/server_config_selector_filter.cc +20 -146
  277. data/src/core/server/server_config_selector_filter.h +2 -2
  278. data/src/core/server/xds_server_config_fetcher.cc +5 -20
  279. data/src/core/transport/auth_context.cc +15 -5
  280. data/src/core/transport/auth_context.h +5 -0
  281. data/src/core/tsi/ssl_telemetry_utils.cc +9 -1
  282. data/src/core/tsi/ssl_transport_security.cc +158 -52
  283. data/src/core/tsi/ssl_transport_security.h +18 -2
  284. data/src/core/tsi/ssl_transport_security_utils.cc +123 -12
  285. data/src/core/tsi/ssl_transport_security_utils.h +19 -0
  286. data/src/core/util/latent_see.cc +65 -3
  287. data/src/core/util/latent_see.h +57 -12
  288. data/src/core/util/linux/cpu.cc +12 -6
  289. data/src/core/util/mpscq.cc +2 -2
  290. data/src/core/util/sync_abseil.cc +3 -3
  291. data/src/core/util/trie_lookup.h +5 -1
  292. data/src/core/util/windows/env.cc +1 -0
  293. data/src/core/util/work_serializer.cc +1 -1
  294. data/src/core/xds/grpc/file_watcher_certificate_provider_factory.cc +10 -9
  295. data/src/core/xds/grpc/file_watcher_certificate_provider_factory.h +3 -3
  296. data/src/core/xds/grpc/streaming_call_promise_wrapper.cc +5 -2
  297. data/src/core/xds/grpc/streaming_call_promise_wrapper.h +2 -5
  298. data/src/core/xds/grpc/xds_audit_logger_registry.cc +0 -54
  299. data/src/core/xds/grpc/xds_audit_logger_registry.h +0 -8
  300. data/src/core/xds/grpc/xds_bootstrap_grpc_builder.cc +2 -28
  301. data/src/core/xds/grpc/xds_bootstrap_grpc_builder.h +0 -20
  302. data/src/core/xds/grpc/xds_client_grpc.cc +4 -4
  303. data/src/core/xds/grpc/xds_client_grpc.h +1 -1
  304. data/src/core/xds/grpc/xds_cluster_parser.cc +5 -1
  305. data/src/core/xds/grpc/xds_common_types_parser.cc +12 -0
  306. data/src/core/xds/grpc/xds_endpoint_parser.cc +3 -3
  307. data/src/core/xds/grpc/xds_http_composite_filter.cc +0 -5
  308. data/src/core/xds/grpc/xds_http_composite_filter.h +1 -27
  309. data/src/core/xds/grpc/xds_http_ext_proc_filter.cc +1 -5
  310. data/src/core/xds/grpc/xds_http_ext_proc_filter.h +3 -29
  311. data/src/core/xds/grpc/xds_http_fault_filter.cc +0 -4
  312. data/src/core/xds/grpc/xds_http_fault_filter.h +0 -26
  313. data/src/core/xds/grpc/xds_http_filter.h +1 -63
  314. data/src/core/xds/grpc/xds_http_gcp_authn_filter.cc +0 -5
  315. data/src/core/xds/grpc/xds_http_gcp_authn_filter.h +1 -27
  316. data/src/core/xds/grpc/xds_http_rbac_filter.cc +0 -527
  317. data/src/core/xds/grpc/xds_http_rbac_filter.h +0 -15
  318. data/src/core/xds/grpc/xds_http_stateful_session_filter.cc +0 -5
  319. data/src/core/xds/grpc/xds_http_stateful_session_filter.h +0 -26
  320. data/src/core/xds/grpc/xds_listener.cc +0 -2
  321. data/src/core/xds/grpc/xds_listener.h +0 -2
  322. data/src/core/xds/grpc/xds_listener_parser.cc +0 -7
  323. data/src/core/xds/grpc/xds_matcher.cc +17 -11
  324. data/src/core/xds/grpc/xds_matcher.h +2 -1
  325. data/src/core/xds/grpc/xds_matcher_context.cc +11 -0
  326. data/src/core/xds/grpc/xds_matcher_context.h +3 -2
  327. data/src/core/xds/grpc/xds_matcher_input.cc +19 -1
  328. data/src/core/xds/grpc/xds_matcher_parse.cc +3 -2
  329. data/src/core/xds/grpc/xds_route_config.cc +0 -2
  330. data/src/core/xds/grpc/xds_route_config.h +0 -2
  331. data/src/core/xds/grpc/xds_route_config_parser.cc +0 -5
  332. data/src/core/xds/grpc/xds_routing.cc +22 -112
  333. data/src/core/xds/grpc/xds_routing.h +2 -27
  334. data/src/core/xds/grpc/xds_transport_factory_grpc.cc +236 -0
  335. data/src/core/xds/grpc/xds_transport_factory_grpc.h +95 -0
  336. data/src/core/xds/grpc/xds_transport_grpc.cc +78 -241
  337. data/src/core/xds/grpc/xds_transport_grpc.h +41 -51
  338. data/src/core/xds/xds_client/lrs_client.cc +3 -5
  339. data/src/core/xds/xds_client/lrs_client.h +2 -1
  340. data/src/core/xds/xds_client/xds_client.cc +36 -23
  341. data/src/core/xds/xds_client/xds_client.h +6 -5
  342. data/src/core/xds/xds_client/xds_transport.h +110 -108
  343. data/src/core/xds/xds_client/xds_transport_factory.h +43 -0
  344. data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +4 -0
  345. data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +6 -0
  346. data/src/ruby/lib/grpc/generic/rpc_server.rb +2 -2
  347. data/src/ruby/lib/grpc/version.rb +1 -1
  348. data/third_party/boringssl-with-bazel/crypto/asn1/a_type.cc +54 -19
  349. data/third_party/boringssl-with-bazel/crypto/asn1/asn1_lib.cc +1 -1
  350. data/third_party/boringssl-with-bazel/crypto/asn1/internal.h +58 -12
  351. data/third_party/boringssl-with-bazel/crypto/asn1/tasn_dec.cc +13 -13
  352. data/third_party/boringssl-with-bazel/crypto/asn1/tasn_enc.cc +13 -11
  353. data/third_party/boringssl-with-bazel/crypto/asn1/tasn_fre.cc +14 -18
  354. data/third_party/boringssl-with-bazel/crypto/asn1/tasn_new.cc +31 -35
  355. data/third_party/boringssl-with-bazel/crypto/asn1/tasn_typ.cc +0 -2
  356. data/third_party/boringssl-with-bazel/crypto/asn1/tasn_utl.cc +17 -24
  357. data/third_party/boringssl-with-bazel/crypto/bio/bio.cc +0 -1
  358. data/third_party/boringssl-with-bazel/crypto/bio/bio_mem.cc +9 -3
  359. data/third_party/boringssl-with-bazel/crypto/bio/connect.cc +3 -3
  360. data/third_party/boringssl-with-bazel/crypto/bio/fd.cc +0 -1
  361. data/third_party/boringssl-with-bazel/crypto/bio/file.cc +0 -1
  362. data/third_party/boringssl-with-bazel/crypto/bio/internal.h +2 -3
  363. data/third_party/boringssl-with-bazel/crypto/bio/pair.cc +0 -1
  364. data/third_party/boringssl-with-bazel/crypto/bio/socket.cc +1 -1
  365. data/third_party/boringssl-with-bazel/crypto/bytestring/cbb.cc +70 -45
  366. data/third_party/boringssl-with-bazel/crypto/bytestring/cbs.cc +15 -34
  367. data/third_party/boringssl-with-bazel/crypto/bytestring/internal.h +5 -0
  368. data/third_party/boringssl-with-bazel/crypto/cipher/e_aesgcmsiv.cc +20 -165
  369. data/third_party/boringssl-with-bazel/crypto/cipher/e_tls.cc +7 -4
  370. data/third_party/boringssl-with-bazel/crypto/cipher/internal.h +159 -0
  371. data/third_party/boringssl-with-bazel/crypto/curve25519/curve25519.cc +295 -16
  372. data/third_party/boringssl-with-bazel/crypto/curve25519/internal.h +25 -14
  373. data/third_party/boringssl-with-bazel/crypto/dh/params.cc +1 -1
  374. data/third_party/boringssl-with-bazel/crypto/ec/hash_to_curve.cc +208 -36
  375. data/third_party/boringssl-with-bazel/crypto/err/err.cc +3 -2
  376. data/third_party/boringssl-with-bazel/crypto/evp/evp.cc +3 -0
  377. data/third_party/boringssl-with-bazel/crypto/evp/evp_kem.cc +25 -6
  378. data/third_party/boringssl-with-bazel/crypto/evp/internal.h +15 -11
  379. data/third_party/boringssl-with-bazel/crypto/evp/p_ec.cc +121 -0
  380. data/third_party/boringssl-with-bazel/crypto/evp/p_mlkem.cc +34 -9
  381. data/third_party/boringssl-with-bazel/crypto/evp/p_rsa.cc +76 -8
  382. data/third_party/boringssl-with-bazel/crypto/evp/p_xwing.cc +47 -20
  383. data/third_party/boringssl-with-bazel/crypto/ex_data.cc +1 -1
  384. data/third_party/boringssl-with-bazel/crypto/fipsmodule/aes/aes_nohw.cc.inc +1 -1
  385. data/third_party/boringssl-with-bazel/crypto/fipsmodule/aes/gcm.cc.inc +2 -2
  386. data/third_party/boringssl-with-bazel/crypto/fipsmodule/bcm.cc +1 -0
  387. data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/add.cc.inc +9 -4
  388. data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/asm/x86_64-gcc.cc.inc +4 -4
  389. data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/exponentiation.cc.inc +2 -2
  390. data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/internal.h +12 -6
  391. data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/jacobi.cc.inc +1 -1
  392. data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/montgomery_inv.cc.inc +4 -4
  393. data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/prime.cc.inc +3 -3
  394. data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/rsaz_exp.cc.inc +6 -6
  395. data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/sqrt.cc.inc +21 -21
  396. data/third_party/boringssl-with-bazel/crypto/fipsmodule/cipher/aead.cc.inc +4 -2
  397. data/third_party/boringssl-with-bazel/crypto/fipsmodule/cipher/cipher.cc.inc +97 -132
  398. data/third_party/boringssl-with-bazel/crypto/fipsmodule/cipher/internal.h +7 -6
  399. data/third_party/boringssl-with-bazel/crypto/fipsmodule/dh/dh.cc.inc +3 -3
  400. data/third_party/boringssl-with-bazel/crypto/fipsmodule/dh/internal.h +1 -1
  401. data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/ec.cc.inc +77 -17
  402. data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/ec_montgomery.cc.inc +13 -13
  403. data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/felem.cc.inc +117 -34
  404. data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/internal.h +67 -18
  405. data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/oct.cc.inc +29 -151
  406. data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/p256-nistz.cc.inc +740 -0
  407. data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/p256-nistz.h +207 -0
  408. data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/p256.cc.inc +407 -519
  409. data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/simple.cc.inc +27 -28
  410. data/third_party/boringssl-with-bazel/crypto/fipsmodule/ecdsa/ecdsa.cc.inc +1 -1
  411. data/third_party/boringssl-with-bazel/crypto/fipsmodule/entropy/jitter.cc.inc +1 -1
  412. data/third_party/boringssl-with-bazel/crypto/fipsmodule/fips_shared_support.cc +4 -4
  413. data/third_party/boringssl-with-bazel/crypto/fipsmodule/keccak/internal.h +70 -1
  414. data/third_party/boringssl-with-bazel/crypto/fipsmodule/keccak/keccak.cc.inc +292 -52
  415. data/third_party/boringssl-with-bazel/crypto/fipsmodule/mldsa/mldsa.cc.inc +226 -69
  416. data/third_party/boringssl-with-bazel/crypto/fipsmodule/mlkem/mlkem.cc.inc +238 -83
  417. data/third_party/boringssl-with-bazel/crypto/fipsmodule/rsa/rsa_impl.cc.inc +6 -6
  418. data/third_party/boringssl-with-bazel/crypto/fipsmodule/sha/sha1.cc.inc +2 -2
  419. data/third_party/boringssl-with-bazel/crypto/fipsmodule/slhdsa/fors.cc.inc +1 -1
  420. data/third_party/boringssl-with-bazel/crypto/hpke/hpke.cc +327 -272
  421. data/third_party/boringssl-with-bazel/crypto/hrss/hrss.cc +14 -14
  422. data/third_party/boringssl-with-bazel/crypto/internal.h +63 -0
  423. data/third_party/boringssl-with-bazel/crypto/mem_internal.h +38 -3
  424. data/third_party/boringssl-with-bazel/crypto/obj/obj_dat.h +97 -1
  425. data/third_party/boringssl-with-bazel/crypto/pem/internal.h +86 -0
  426. data/third_party/boringssl-with-bazel/crypto/pem/pem_all.cc +8 -5
  427. data/third_party/boringssl-with-bazel/crypto/pem/pem_lib.cc +41 -73
  428. data/third_party/boringssl-with-bazel/crypto/pem/pem_pk8.cc +3 -0
  429. data/third_party/boringssl-with-bazel/crypto/pem/pem_pkey.cc +10 -4
  430. data/third_party/boringssl-with-bazel/crypto/pem/pem_x509.cc +3 -0
  431. data/third_party/boringssl-with-bazel/crypto/pem/pem_xaux.cc +3 -0
  432. data/third_party/boringssl-with-bazel/crypto/pkcs7/pkcs7.cc +1 -1
  433. data/third_party/boringssl-with-bazel/crypto/pkcs7/pkcs7_x509.cc +2 -2
  434. data/third_party/boringssl-with-bazel/crypto/pkcs8/pkcs8_x509.cc +1 -1
  435. data/third_party/boringssl-with-bazel/crypto/poly1305/internal.h +17 -0
  436. data/third_party/boringssl-with-bazel/crypto/poly1305/poly1305_arm.cc +1 -13
  437. data/third_party/boringssl-with-bazel/crypto/poly1305/poly1305_vec.cc +3 -3
  438. data/third_party/boringssl-with-bazel/crypto/slhdsa/slhdsa.cc +23 -6
  439. data/third_party/boringssl-with-bazel/crypto/stack/stack.cc +7 -0
  440. data/third_party/boringssl-with-bazel/crypto/trust_token/internal.h +1 -1
  441. data/third_party/boringssl-with-bazel/crypto/x509/a_verify.cc +14 -7
  442. data/third_party/boringssl-with-bazel/crypto/x509/internal.h +110 -76
  443. data/third_party/boringssl-with-bazel/crypto/x509/name_print.cc +1 -1
  444. data/third_party/boringssl-with-bazel/crypto/x509/rsa_pss.cc +1 -1
  445. data/third_party/boringssl-with-bazel/crypto/x509/t_req.cc +1 -1
  446. data/third_party/boringssl-with-bazel/crypto/x509/t_x509.cc +6 -5
  447. data/third_party/boringssl-with-bazel/crypto/x509/v3_crld.cc +11 -53
  448. data/third_party/boringssl-with-bazel/crypto/x509/v3_ncons.cc +5 -5
  449. data/third_party/boringssl-with-bazel/crypto/x509/v3_purp.cc +16 -39
  450. data/third_party/boringssl-with-bazel/crypto/x509/v3_skey.cc +1 -1
  451. data/third_party/boringssl-with-bazel/crypto/x509/v3_utl.cc +12 -16
  452. data/third_party/boringssl-with-bazel/crypto/x509/x509_cmp.cc +9 -11
  453. data/third_party/boringssl-with-bazel/crypto/x509/x509_mtc.cc +598 -0
  454. data/third_party/boringssl-with-bazel/crypto/x509/x509_obj.cc +9 -8
  455. data/third_party/boringssl-with-bazel/crypto/x509/x509_set.cc +14 -18
  456. data/third_party/boringssl-with-bazel/crypto/x509/x509_vfy.cc +315 -390
  457. data/third_party/boringssl-with-bazel/crypto/x509/x509_vpm.cc +1 -1
  458. data/third_party/boringssl-with-bazel/crypto/x509/x509name.cc +31 -29
  459. data/third_party/boringssl-with-bazel/crypto/x509/x_all.cc +10 -9
  460. data/third_party/boringssl-with-bazel/crypto/x509/x_crl.cc +3 -53
  461. data/third_party/boringssl-with-bazel/crypto/x509/x_name.cc +37 -59
  462. data/third_party/boringssl-with-bazel/crypto/x509/x_pubkey.cc +29 -47
  463. data/third_party/boringssl-with-bazel/crypto/x509/x_req.cc +2 -1
  464. data/third_party/boringssl-with-bazel/crypto/x509/x_x509.cc +53 -53
  465. data/third_party/boringssl-with-bazel/gen/boringssl_prefix_symbols_internal_x86_64_win_asm.inc +24 -0
  466. data/third_party/boringssl-with-bazel/gen/boringssl_prefix_symbols_internal_x86_win_asm.inc +24 -0
  467. data/third_party/boringssl-with-bazel/gen/crypto/err_data.cc +509 -497
  468. data/third_party/boringssl-with-bazel/include/openssl/aead.h +7 -19
  469. data/third_party/boringssl-with-bazel/include/openssl/asm_base.h +1 -1
  470. data/third_party/boringssl-with-bazel/include/openssl/asn1.h +6 -10
  471. data/third_party/boringssl-with-bazel/include/openssl/base.h +43 -16
  472. data/third_party/boringssl-with-bazel/include/openssl/bio.h +25 -10
  473. data/third_party/boringssl-with-bazel/include/openssl/bytestring.h +33 -1
  474. data/third_party/boringssl-with-bazel/include/openssl/cipher.h +11 -9
  475. data/third_party/boringssl-with-bazel/include/openssl/configuration.h +18 -0
  476. data/third_party/boringssl-with-bazel/include/openssl/curve25519.h +36 -0
  477. data/third_party/boringssl-with-bazel/include/openssl/digest.h +4 -4
  478. data/third_party/boringssl-with-bazel/include/openssl/ec.h +35 -1
  479. data/third_party/boringssl-with-bazel/include/openssl/ec_key.h +2 -2
  480. data/third_party/boringssl-with-bazel/include/openssl/evp.h +120 -3
  481. data/third_party/boringssl-with-bazel/include/openssl/evp_errors.h +1 -0
  482. data/third_party/boringssl-with-bazel/include/openssl/hmac.h +2 -2
  483. data/third_party/boringssl-with-bazel/include/openssl/hpke.h +38 -7
  484. data/third_party/boringssl-with-bazel/include/openssl/mem.h +5 -5
  485. data/third_party/boringssl-with-bazel/include/openssl/nid.h +42 -0
  486. data/third_party/boringssl-with-bazel/include/openssl/pem.h +650 -351
  487. data/third_party/boringssl-with-bazel/include/openssl/posix_time.h +4 -4
  488. data/third_party/boringssl-with-bazel/include/openssl/prefix_symbols.h +130 -4
  489. data/third_party/boringssl-with-bazel/include/openssl/prefix_symbols_internal_S.h +48 -0
  490. data/third_party/boringssl-with-bazel/include/openssl/prefix_symbols_internal_c.h +24 -0
  491. data/third_party/boringssl-with-bazel/include/openssl/rsa.h +1 -1
  492. data/third_party/boringssl-with-bazel/include/openssl/slhdsa.h +25 -1
  493. data/third_party/boringssl-with-bazel/include/openssl/ssl.h +256 -87
  494. data/third_party/boringssl-with-bazel/include/openssl/stack.h +9 -0
  495. data/third_party/boringssl-with-bazel/include/openssl/types.h +18 -0
  496. data/third_party/boringssl-with-bazel/include/openssl/x509.h +40 -21
  497. data/third_party/boringssl-with-bazel/ssl/bio_ssl.cc +3 -5
  498. data/third_party/boringssl-with-bazel/ssl/d1_both.cc +146 -81
  499. data/third_party/boringssl-with-bazel/ssl/d1_lib.cc +39 -34
  500. data/third_party/boringssl-with-bazel/ssl/d1_pkt.cc +6 -6
  501. data/third_party/boringssl-with-bazel/ssl/d1_srtp.cc +10 -8
  502. data/third_party/boringssl-with-bazel/ssl/dtls_method.cc +4 -4
  503. data/third_party/boringssl-with-bazel/ssl/dtls_record.cc +15 -14
  504. data/third_party/boringssl-with-bazel/ssl/encrypted_client_hello.cc +41 -25
  505. data/third_party/boringssl-with-bazel/ssl/extensions.cc +153 -171
  506. data/third_party/boringssl-with-bazel/ssl/handoff.cc +79 -64
  507. data/third_party/boringssl-with-bazel/ssl/handshake.cc +15 -16
  508. data/third_party/boringssl-with-bazel/ssl/handshake_client.cc +35 -78
  509. data/third_party/boringssl-with-bazel/ssl/handshake_server.cc +75 -155
  510. data/third_party/boringssl-with-bazel/ssl/internal.h +419 -308
  511. data/third_party/boringssl-with-bazel/ssl/s3_both.cc +17 -150
  512. data/third_party/boringssl-with-bazel/ssl/s3_lib.cc +2 -3
  513. data/third_party/boringssl-with-bazel/ssl/s3_pkt.cc +10 -9
  514. data/third_party/boringssl-with-bazel/ssl/ssl_asn1.cc +13 -13
  515. data/third_party/boringssl-with-bazel/ssl/ssl_buffer.cc +8 -8
  516. data/third_party/boringssl-with-bazel/ssl/ssl_cert.cc +58 -24
  517. data/third_party/boringssl-with-bazel/ssl/ssl_cipher.cc +198 -26
  518. data/third_party/boringssl-with-bazel/ssl/ssl_credential.cc +164 -37
  519. data/third_party/boringssl-with-bazel/ssl/ssl_file.cc +10 -8
  520. data/third_party/boringssl-with-bazel/ssl/ssl_key_share.cc +2 -95
  521. data/third_party/boringssl-with-bazel/ssl/ssl_lib.cc +785 -472
  522. data/third_party/boringssl-with-bazel/ssl/ssl_privkey.cc +78 -67
  523. data/third_party/boringssl-with-bazel/ssl/ssl_session.cc +187 -150
  524. data/third_party/boringssl-with-bazel/ssl/ssl_stat.cc +6 -3
  525. data/third_party/boringssl-with-bazel/ssl/ssl_transcript.cc +1 -1
  526. data/third_party/boringssl-with-bazel/ssl/ssl_versions.cc +25 -19
  527. data/third_party/boringssl-with-bazel/ssl/ssl_x509.cc +148 -114
  528. data/third_party/boringssl-with-bazel/ssl/t1_enc.cc +28 -19
  529. data/third_party/boringssl-with-bazel/ssl/tls13_both.cc +24 -22
  530. data/third_party/boringssl-with-bazel/ssl/tls13_client.cc +30 -30
  531. data/third_party/boringssl-with-bazel/ssl/tls13_enc.cc +17 -16
  532. data/third_party/boringssl-with-bazel/ssl/tls13_server.cc +55 -63
  533. data/third_party/boringssl-with-bazel/ssl/tls_method.cc +12 -12
  534. data/third_party/boringssl-with-bazel/ssl/tls_record.cc +23 -20
  535. data/third_party/boringssl-with-bazel/third_party/fiat/p256_64.h +38 -0
  536. data/third_party/boringssl-with-bazel/third_party/fiat/p256_64_msvc.h +2 -0
  537. data/third_party/boringssl-with-bazel/third_party/fiat/p256_field.c.inc +26 -0
  538. data/third_party/boringssl-with-bazel/third_party/fiat/p256_point.br.c.inc +0 -54
  539. data/third_party/cares/cares/include/ares.h +8 -0
  540. data/third_party/cares/cares/include/ares_dns_record.h +3 -2
  541. data/third_party/cares/cares/include/ares_version.h +3 -3
  542. data/third_party/cares/cares/src/lib/ares_addrinfo_localhost.c +20 -20
  543. data/third_party/cares/cares/src/lib/ares_cancel.c +17 -8
  544. data/third_party/cares/cares/src/lib/ares_close_sockets.c +81 -16
  545. data/third_party/cares/cares/src/lib/ares_conn.c +256 -10
  546. data/third_party/cares/cares/src/lib/ares_conn.h +40 -3
  547. data/third_party/cares/cares/src/lib/ares_cookie.c +2 -2
  548. data/third_party/cares/cares/src/lib/ares_destroy.c +75 -10
  549. data/third_party/cares/cares/src/lib/ares_getaddrinfo.c +85 -10
  550. data/third_party/cares/cares/src/lib/ares_gethostbyaddr.c +5 -0
  551. data/third_party/cares/cares/src/lib/ares_gethostbyname.c +4 -0
  552. data/third_party/cares/cares/src/lib/ares_getnameinfo.c +10 -2
  553. data/third_party/cares/cares/src/lib/ares_hosts_file.c +8 -0
  554. data/third_party/cares/cares/src/lib/ares_inet_net_pton.h +28 -0
  555. data/third_party/cares/cares/src/lib/ares_init.c +55 -10
  556. data/third_party/cares/cares/src/lib/ares_library_init.c +25 -7
  557. data/third_party/cares/cares/src/lib/ares_options.c +38 -10
  558. data/third_party/cares/cares/src/lib/ares_parse_into_addrinfo.c +1 -1
  559. data/third_party/cares/cares/src/lib/ares_private.h +186 -27
  560. data/third_party/cares/cares/src/lib/ares_process.c +604 -112
  561. data/third_party/cares/cares/src/lib/ares_qcache.c +200 -36
  562. data/third_party/cares/cares/src/lib/ares_query.c +5 -0
  563. data/third_party/cares/cares/src/lib/ares_search.c +10 -0
  564. data/third_party/cares/cares/src/lib/ares_send.c +81 -10
  565. data/third_party/cares/cares/src/lib/ares_set_socket_functions.c +3 -1
  566. data/third_party/cares/cares/src/lib/ares_socket.c +28 -0
  567. data/third_party/cares/cares/src/lib/ares_socket.h +23 -0
  568. data/third_party/cares/cares/src/lib/ares_sysconfig.c +6 -3
  569. data/third_party/cares/cares/src/lib/ares_sysconfig_files.c +33 -11
  570. data/third_party/cares/cares/src/lib/ares_sysconfig_win.c +132 -80
  571. data/third_party/cares/cares/src/lib/ares_timeout.c +11 -0
  572. data/third_party/cares/cares/src/lib/ares_update_servers.c +55 -11
  573. data/third_party/cares/cares/src/lib/dsa/ares_array.c +20 -5
  574. data/third_party/cares/cares/src/lib/dsa/ares_htable.c +8 -4
  575. data/third_party/cares/cares/src/lib/dsa/ares_htable_dict.c +2 -0
  576. data/third_party/cares/cares/src/lib/dsa/ares_llist.c +4 -1
  577. data/third_party/cares/cares/src/lib/event/ares_event_configchg.c +5 -2
  578. data/third_party/cares/cares/src/lib/event/ares_event_select.c +14 -1
  579. data/third_party/cares/cares/src/lib/event/ares_event_thread.c +8 -0
  580. data/third_party/cares/cares/src/lib/event/ares_event_wake_pipe.c +7 -1
  581. data/third_party/cares/cares/src/lib/event/ares_event_win32.c +3 -0
  582. data/third_party/cares/cares/src/lib/include/ares_mem.h +3 -0
  583. data/third_party/cares/cares/src/lib/include/ares_str.h +17 -0
  584. data/third_party/cares/cares/src/lib/inet_net_pton.c +37 -28
  585. data/third_party/cares/cares/src/lib/legacy/ares_expand_name.c +1 -1
  586. data/third_party/cares/cares/src/lib/legacy/ares_parse_a_reply.c +5 -2
  587. data/third_party/cares/cares/src/lib/legacy/ares_parse_aaaa_reply.c +5 -2
  588. data/third_party/cares/cares/src/lib/legacy/ares_parse_ns_reply.c +2 -2
  589. data/third_party/cares/cares/src/lib/legacy/ares_parse_ptr_reply.c +2 -2
  590. data/third_party/cares/cares/src/lib/legacy/ares_parse_uri_reply.c +1 -1
  591. data/third_party/cares/cares/src/lib/record/ares_dns_mapping.c +19 -4
  592. data/third_party/cares/cares/src/lib/record/ares_dns_multistring.c +3 -1
  593. data/third_party/cares/cares/src/lib/record/ares_dns_name.c +67 -4
  594. data/third_party/cares/cares/src/lib/record/ares_dns_parse.c +62 -34
  595. data/third_party/cares/cares/src/lib/record/ares_dns_private.h +4 -0
  596. data/third_party/cares/cares/src/lib/record/ares_dns_record.c +47 -7
  597. data/third_party/cares/cares/src/lib/record/ares_dns_write.c +13 -5
  598. data/third_party/cares/cares/src/lib/str/ares_buf.c +33 -16
  599. data/third_party/cares/cares/src/lib/str/ares_str.c +54 -0
  600. data/third_party/cares/cares/src/lib/util/ares_iface_ips.c +22 -10
  601. data/third_party/cares/cares/src/lib/util/ares_iface_ips.h +1 -0
  602. data/third_party/cares/cares/src/lib/util/ares_math.c +17 -2
  603. data/third_party/cares/cares/src/lib/util/ares_math.h +32 -7
  604. data/third_party/cares/cares/src/lib/util/ares_rand.c +4 -4
  605. data/third_party/cares/cares/src/lib/util/ares_threads.c +1 -2
  606. data/third_party/cares/cares/src/lib/util/ares_time.h +1 -0
  607. data/third_party/cares/cares/src/lib/util/ares_uri.c +9 -3
  608. data/third_party/zlib/compress.c +34 -10
  609. data/third_party/zlib/crc32.c +49 -115
  610. data/third_party/zlib/deflate.c +107 -61
  611. data/third_party/zlib/deflate.h +7 -1
  612. data/third_party/zlib/gzguts.h +33 -31
  613. data/third_party/zlib/infback.c +20 -67
  614. data/third_party/zlib/inffast.c +7 -6
  615. data/third_party/zlib/inffixed.h +91 -91
  616. data/third_party/zlib/inflate.c +38 -151
  617. data/third_party/zlib/inflate.h +1 -1
  618. data/third_party/zlib/inftrees.c +134 -9
  619. data/third_party/zlib/inftrees.h +3 -1
  620. data/third_party/zlib/trees.c +14 -12
  621. data/third_party/zlib/uncompr.c +39 -23
  622. data/third_party/zlib/zconf.h +27 -19
  623. data/third_party/zlib/zlib.h +215 -96
  624. data/third_party/zlib/zutil.c +49 -35
  625. data/third_party/zlib/zutil.h +87 -10
  626. metadata +4095 -4049
  627. data/src/core/ext/filters/rbac/rbac_service_config_parser.cc +0 -916
  628. data/src/core/ext/filters/rbac/rbac_service_config_parser.h +0 -84
  629. data/src/core/server/xds_channel_stack_modifier.cc +0 -108
  630. data/src/core/server/xds_channel_stack_modifier.h +0 -62
  631. data/src/core/server/xds_server_config_fetcher_legacy.cc +0 -1340
  632. data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/p256_internal.h +0 -193
  633. data/third_party/boringssl-with-bazel/crypto/kyber/internal.h +0 -165
  634. data/third_party/boringssl-with-bazel/crypto/kyber/kyber.cc +0 -870
@@ -20,72 +20,63 @@
20
20
  #include <grpc/grpc.h>
21
21
  #include <grpc/slice.h>
22
22
  #include <grpc/status.h>
23
- #include <grpc/support/port_platform.h>
24
23
 
25
- #include <functional>
26
24
  #include <memory>
27
25
  #include <string>
28
26
  #include <utility>
29
27
  #include <vector>
30
28
 
31
- #include "src/core/lib/channel/channel_args.h"
32
29
  #include "src/core/lib/iomgr/closure.h"
33
30
  #include "src/core/lib/iomgr/error.h"
34
31
  #include "src/core/lib/iomgr/iomgr_fwd.h"
35
32
  #include "src/core/lib/surface/channel.h"
36
33
  #include "src/core/util/orphanable.h"
34
+ #include "src/core/util/ref_counted.h"
37
35
  #include "src/core/util/ref_counted_ptr.h"
38
36
  #include "src/core/util/sync.h"
39
37
  #include "src/core/util/time.h"
40
- #include "src/core/xds/grpc/certificate_provider_store_interface.h"
41
- #include "src/core/xds/grpc/xds_server_grpc_interface.h"
42
- #include "src/core/xds/xds_client/xds_bootstrap.h"
43
38
  #include "src/core/xds/xds_client/xds_transport.h"
39
+ #include "absl/base/thread_annotations.h"
44
40
  #include "absl/container/flat_hash_map.h"
45
41
  #include "absl/container/inlined_vector.h"
46
- #include "absl/status/status.h"
42
+ #include "absl/strings/string_view.h"
47
43
 
48
44
  namespace grpc_core {
49
45
 
50
- class GrpcXdsTransportFactory final : public XdsTransportFactory {
46
+ // An XdsTransport that uses a gRPC channel. It has no xDS-specific
47
+ // dependencies: the factory that creates it does all of the work with
48
+ // server targets and credential registries, and hands the transport
49
+ // everything it needs.
50
+ class GrpcXdsTransport final : public XdsTransport {
51
51
  public:
52
- class GrpcXdsTransport;
52
+ // Wraps a channel that more than one transport can use. Transports
53
+ // that differ only in per-call settings (call creds, initial metadata,
54
+ // and timeout) share the same SharedChannel. Each transport factory
55
+ // supplies its own implementation.
56
+ class SharedChannel : public RefCounted<SharedChannel> {
57
+ public:
58
+ // Returns the underlying channel. Never null.
59
+ virtual Channel* channel() const = 0;
60
+
61
+ // Returns the pollset_set to use for calls on the channel. Must
62
+ // stay valid while this object is alive.
63
+ virtual grpc_pollset_set* interested_parties() const = 0;
64
+
65
+ // Called when a transport that uses this channel is orphaned, so that
66
+ // the owning factory can remove the transport from its cache.
67
+ virtual void OnTransportOrphaned(absl::string_view key,
68
+ GrpcXdsTransport* transport) = 0;
69
+ };
53
70
 
54
- GrpcXdsTransportFactory(const ChannelArgs& args,
55
- RefCountedPtr<CertificateProviderStoreInterface>
56
- certificate_provider_store);
57
- ~GrpcXdsTransportFactory() override;
58
-
59
- void Orphaned() override {}
60
-
61
- RefCountedPtr<XdsTransport> GetTransport(
62
- const XdsBootstrap::XdsServerTarget& server,
63
- absl::Status* status) override;
64
-
65
- grpc_pollset_set* interested_parties() const { return interested_parties_; }
66
-
67
- private:
68
- class SharedChannel;
69
-
70
- ChannelArgs args_;
71
- RefCountedPtr<CertificateProviderStoreInterface> certificate_provider_store_;
72
- grpc_pollset_set* interested_parties_;
73
-
74
- Mutex mu_;
75
- absl::flat_hash_map<std::string /*XdsServerTarget key*/, GrpcXdsTransport*>
76
- transports_ ABSL_GUARDED_BY(&mu_);
77
- absl::flat_hash_map<std::string /*Channel key*/, SharedChannel*> channels_
78
- ABSL_GUARDED_BY(&mu_);
79
- };
80
-
81
- class GrpcXdsTransportFactory::GrpcXdsTransport final
82
- : public XdsTransportFactory::XdsTransport {
83
- public:
84
71
  class GrpcStreamingCall;
85
72
 
86
- GrpcXdsTransport(WeakRefCountedPtr<GrpcXdsTransportFactory> factory,
87
- RefCountedPtr<SharedChannel> channel,
88
- const GrpcXdsServerInterface& server, absl::Status* status);
73
+ // key is an opaque cache key that is passed back to
74
+ // SharedChannel::OnTransportOrphaned().
75
+ GrpcXdsTransport(
76
+ std::string key, RefCountedPtr<SharedChannel> channel,
77
+ RefCountedPtr<grpc_call_credentials> call_creds,
78
+ std::vector<std::pair<std::string, std::string>> initial_metadata,
79
+ Duration timeout);
89
80
  ~GrpcXdsTransport() override;
90
81
 
91
82
  void Orphaned() override;
@@ -105,9 +96,6 @@ class GrpcXdsTransportFactory::GrpcXdsTransport final
105
96
  Channel* channel() const;
106
97
 
107
98
  private:
108
- class StateWatcher;
109
-
110
- WeakRefCountedPtr<GrpcXdsTransportFactory> factory_;
111
99
  std::string key_;
112
100
  RefCountedPtr<SharedChannel> channel_;
113
101
  RefCountedPtr<grpc_call_credentials> call_creds_;
@@ -115,16 +103,18 @@ class GrpcXdsTransportFactory::GrpcXdsTransport final
115
103
  Duration timeout_;
116
104
 
117
105
  Mutex mu_;
118
- absl::flat_hash_map<RefCountedPtr<ConnectivityFailureWatcher>, StateWatcher*>
106
+ absl::flat_hash_map<RefCountedPtr<ConnectivityFailureWatcher>,
107
+ AsyncConnectivityStateWatcherInterface*>
119
108
  watchers_ ABSL_GUARDED_BY(&mu_);
120
109
  };
121
110
 
122
- class GrpcXdsTransportFactory::GrpcXdsTransport::GrpcStreamingCall final
123
- : public XdsTransportFactory::XdsTransport::StreamingCall {
111
+ class GrpcXdsTransport::GrpcStreamingCall final
112
+ : public XdsTransport::StreamingCall {
124
113
  public:
114
+ // Holds a ref to channel for the life of the call, which keeps the
115
+ // channel and its pollset_set alive.
125
116
  GrpcStreamingCall(
126
- WeakRefCountedPtr<GrpcXdsTransportFactory> factory, Channel* channel,
127
- const char* method,
117
+ RefCountedPtr<SharedChannel> channel, const char* method,
128
118
  std::unique_ptr<StreamingCall::EventHandler> event_handler,
129
119
  grpc_call_credentials* call_creds,
130
120
  const std::vector<std::pair<std::string, std::string>>& initial_metadata,
@@ -156,7 +146,7 @@ class GrpcXdsTransportFactory::GrpcXdsTransport::GrpcStreamingCall final
156
146
  static void OnResponseReceived(void* arg, grpc_error_handle /*error*/);
157
147
  static void OnStatusReceived(void* arg, grpc_error_handle /*error*/);
158
148
 
159
- WeakRefCountedPtr<GrpcXdsTransportFactory> factory_;
149
+ RefCountedPtr<SharedChannel> channel_;
160
150
 
161
151
  std::unique_ptr<StreamingCall::EventHandler> event_handler_;
162
152
 
@@ -301,7 +301,7 @@ class LrsClient::LrsChannel::LrsCall final
301
301
 
302
302
  private:
303
303
  class StreamEventHandler final
304
- : public XdsTransportFactory::XdsTransport::StreamingCall::EventHandler {
304
+ : public XdsTransport::StreamingCall::EventHandler {
305
305
  public:
306
306
  explicit StreamEventHandler(RefCountedPtr<LrsCall> lrs_call)
307
307
  : lrs_call_(std::move(lrs_call)) {}
@@ -365,8 +365,7 @@ class LrsClient::LrsChannel::LrsCall final
365
365
  // The owning RetryableCall<>.
366
366
  RefCountedPtr<RetryableCall<LrsCall>> retryable_call_;
367
367
 
368
- OrphanablePtr<XdsTransportFactory::XdsTransport::StreamingCall>
369
- streaming_call_;
368
+ OrphanablePtr<XdsTransport::StreamingCall> streaming_call_;
370
369
 
371
370
  bool seen_response_ = false;
372
371
  bool send_message_pending_ ABSL_GUARDED_BY(&LrsClient::mu_) = false;
@@ -574,8 +573,7 @@ LrsClient::LrsChannel::LrsCall::LrsCall(
574
573
  // Passing the initial ref here. This ref will go away when
575
574
  // the StreamEventHandler is destroyed.
576
575
  RefCountedPtr<LrsCall>(this)),
577
- XdsTransportFactory::XdsTransport::CallOptions().set_wait_for_ready(
578
- true));
576
+ XdsTransport::CallOptions().set_wait_for_ready(true));
579
577
  GRPC_CHECK(streaming_call_ != nullptr);
580
578
  // Start the call.
581
579
  GRPC_TRACE_LOG(xds_client, INFO)
@@ -44,6 +44,7 @@
44
44
  #include "src/core/xds/xds_client/xds_metrics.h"
45
45
  #include "src/core/xds/xds_client/xds_resource_type.h"
46
46
  #include "src/core/xds/xds_client/xds_transport.h"
47
+ #include "src/core/xds/xds_client/xds_transport_factory.h"
47
48
  #include "upb/reflection/def.hpp"
48
49
  #include "absl/base/thread_annotations.h"
49
50
  #include "absl/status/status.h"
@@ -291,7 +292,7 @@ class LrsClient : public DualRefCounted<LrsClient> {
291
292
 
292
293
  std::shared_ptr<const XdsBootstrap::XdsServerTarget> server_;
293
294
 
294
- RefCountedPtr<XdsTransportFactory::XdsTransport> transport_;
295
+ RefCountedPtr<XdsTransport> transport_;
295
296
 
296
297
  // The retryable LRS call.
297
298
  OrphanablePtr<RetryableCall<LrsCall>> lrs_call_;
@@ -279,7 +279,7 @@ class XdsClient::XdsChannel::AdsCall final
279
279
  };
280
280
 
281
281
  class StreamEventHandler final
282
- : public XdsTransportFactory::XdsTransport::StreamingCall::EventHandler {
282
+ : public XdsTransport::StreamingCall::EventHandler {
283
283
  public:
284
284
  explicit StreamEventHandler(RefCountedPtr<AdsCall> ads_call)
285
285
  : ads_call_(std::move(ads_call)) {}
@@ -359,8 +359,7 @@ class XdsClient::XdsChannel::AdsCall final
359
359
  // The owning RetryableCall<>.
360
360
  RefCountedPtr<RetryableCall<AdsCall>> retryable_call_;
361
361
 
362
- OrphanablePtr<XdsTransportFactory::XdsTransport::StreamingCall>
363
- streaming_call_;
362
+ OrphanablePtr<XdsTransport::StreamingCall> streaming_call_;
364
363
 
365
364
  bool sent_initial_message_ = false;
366
365
  bool seen_response_ = false;
@@ -380,7 +379,7 @@ class XdsClient::XdsChannel::AdsCall final
380
379
  //
381
380
 
382
381
  class XdsClient::XdsChannel::ConnectivityFailureWatcher
383
- : public XdsTransportFactory::XdsTransport::ConnectivityFailureWatcher {
382
+ : public XdsTransport::ConnectivityFailureWatcher {
384
383
  public:
385
384
  explicit ConnectivityFailureWatcher(WeakRefCountedPtr<XdsChannel> xds_channel)
386
385
  : xds_channel_(std::move(xds_channel)) {}
@@ -502,7 +501,7 @@ bool XdsClient::XdsChannel::MaybeFallbackLocked(
502
501
  }
503
502
  }
504
503
  if (!fallback_on_reachability_only &&
505
- !xds_client_->HasUncachedResources(authority_state)) {
504
+ !authority_state.HasUncachedResources()) {
506
505
  return false;
507
506
  }
508
507
  if (xds_servers.empty()) xds_servers = xds_client_->bootstrap().servers();
@@ -730,8 +729,7 @@ XdsClient::XdsChannel::AdsCall::AdsCall(
730
729
  // Passing the initial ref here. This ref will go away when
731
730
  // the StreamEventHandler is destroyed.
732
731
  RefCountedPtr<AdsCall>(this)),
733
- XdsTransportFactory::XdsTransport::CallOptions().set_wait_for_ready(
734
- true));
732
+ XdsTransport::CallOptions().set_wait_for_ready(true));
735
733
  GRPC_CHECK(streaming_call_ != nullptr);
736
734
  // Start the call.
737
735
  GRPC_TRACE_LOG(xds_client, INFO)
@@ -743,11 +741,9 @@ XdsClient::XdsChannel::AdsCall::AdsCall(
743
741
  // already in the cache.
744
742
  for (auto& [authority, authority_state] :
745
743
  xds_client()->authority_state_map_) {
746
- auto it = std::find(authority_state.xds_channels.begin(),
747
- authority_state.xds_channels.end(), xds_channel());
748
744
  // Skip authorities that are not using this xDS channel. The channel can be
749
745
  // anywhere in the list.
750
- if (it == authority_state.xds_channels.end()) continue;
746
+ if (!authority_state.ContainsChannel(xds_channel())) continue;
751
747
  for (const auto& [type, resource_map] : authority_state.type_map) {
752
748
  for (const auto& [resource_key, resource_state] : resource_map) {
753
749
  if (resource_state.HasWatchers()) {
@@ -1032,6 +1028,9 @@ void XdsClient::XdsChannel::AdsCall::ParseResource(
1032
1028
  return; // Skip resource -- we don't have a subscription for it.
1033
1029
  }
1034
1030
  AuthorityState& authority_state = authority_it->second;
1031
+ // Make sure we're receiving the resource from a server that is
1032
+ // configured for this authority.
1033
+ if (!authority_state.ContainsChannel(xds_channel())) return;
1035
1034
  // Found authority, so look up type.
1036
1035
  auto type_it = authority_state.type_map.find(context->type);
1037
1036
  if (type_it == authority_state.type_map.end()) {
@@ -1143,6 +1142,9 @@ void XdsClient::XdsChannel::AdsCall::HandleServerReportedResourceError(
1143
1142
  return; // Skip resource -- we don't have a subscription for it.
1144
1143
  }
1145
1144
  AuthorityState& authority_state = authority_it->second;
1145
+ // Make sure we're receiving the resource error from a server that is
1146
+ // configured for this authority.
1147
+ if (!authority_state.ContainsChannel(xds_channel())) return;
1146
1148
  // Found authority, so look up type.
1147
1149
  auto type_it = authority_state.type_map.find(context->type);
1148
1150
  if (type_it == authority_state.type_map.end()) {
@@ -1586,6 +1588,30 @@ void XdsClient::ResourceState::FillGenericXdsConfig(
1586
1588
  }
1587
1589
  }
1588
1590
 
1591
+ //
1592
+ // XdsClient::AuthorityState
1593
+ //
1594
+
1595
+ bool XdsClient::AuthorityState::HasUncachedResources() const {
1596
+ for (const auto& [_, resource_map] : type_map) {
1597
+ for (const auto& [_, resource_state] : resource_map) {
1598
+ if (resource_state.HasWatchers() &&
1599
+ resource_state.client_status() ==
1600
+ ResourceState::ClientResourceStatus::REQUESTED) {
1601
+ return true;
1602
+ }
1603
+ }
1604
+ }
1605
+ return false;
1606
+ }
1607
+
1608
+ bool XdsClient::AuthorityState::ContainsChannel(XdsChannel* xds_channel) const {
1609
+ for (const auto& channel : xds_channels) {
1610
+ if (channel.get() == xds_channel) return true;
1611
+ }
1612
+ return false;
1613
+ }
1614
+
1589
1615
  //
1590
1616
  // XdsClient
1591
1617
  //
@@ -1654,19 +1680,6 @@ RefCountedPtr<XdsClient::XdsChannel> XdsClient::GetOrCreateXdsChannelLocked(
1654
1680
  return xds_channel;
1655
1681
  }
1656
1682
 
1657
- bool XdsClient::HasUncachedResources(const AuthorityState& authority_state) {
1658
- for (const auto& [_, resource_map] : authority_state.type_map) {
1659
- for (const auto& [_, resource_state] : resource_map) {
1660
- if (resource_state.HasWatchers() &&
1661
- resource_state.client_status() ==
1662
- ResourceState::ClientResourceStatus::REQUESTED) {
1663
- return true;
1664
- }
1665
- }
1666
- }
1667
- return false;
1668
- }
1669
-
1670
1683
  void XdsClient::WatchResource(const XdsResourceType* type,
1671
1684
  absl::string_view name,
1672
1685
  RefCountedPtr<ResourceWatcherInterface> watcher) {
@@ -44,6 +44,7 @@
44
44
  #include "src/core/xds/xds_client/xds_metrics.h"
45
45
  #include "src/core/xds/xds_client/xds_resource_type.h"
46
46
  #include "src/core/xds/xds_client/xds_transport.h"
47
+ #include "src/core/xds/xds_client/xds_transport_factory.h"
47
48
  #include "upb/reflection/def.hpp"
48
49
  #include "absl/base/thread_annotations.h"
49
50
  #include "absl/container/flat_hash_set.h"
@@ -240,9 +241,8 @@ class XdsClient : public DualRefCounted<XdsClient> {
240
241
 
241
242
  const XdsBootstrap::XdsServer& server_; // Owned by bootstrap.
242
243
 
243
- RefCountedPtr<XdsTransportFactory::XdsTransport> transport_;
244
- RefCountedPtr<XdsTransportFactory::XdsTransport::ConnectivityFailureWatcher>
245
- failure_watcher_;
244
+ RefCountedPtr<XdsTransport> transport_;
245
+ RefCountedPtr<XdsTransport::ConnectivityFailureWatcher> failure_watcher_;
246
246
 
247
247
  bool shutting_down_ = false;
248
248
 
@@ -360,6 +360,9 @@ class XdsClient : public DualRefCounted<XdsClient> {
360
360
  std::vector<RefCountedPtr<XdsChannel>> xds_channels;
361
361
  std::map<const XdsResourceType*, std::map<XdsResourceKey, ResourceState>>
362
362
  type_map;
363
+
364
+ bool HasUncachedResources() const;
365
+ bool ContainsChannel(XdsChannel* xds_channel) const;
363
366
  };
364
367
 
365
368
  absl::Status AppendNodeToStatus(const absl::Status& status) const;
@@ -390,8 +393,6 @@ class XdsClient : public DualRefCounted<XdsClient> {
390
393
  const XdsResourceType* GetResourceTypeLocked(absl::string_view resource_type)
391
394
  ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_);
392
395
 
393
- bool HasUncachedResources(const AuthorityState& authority_state);
394
-
395
396
  void MaybeRemoveUnsubscribedCacheEntriesForTypeLocked(
396
397
  XdsChannel* xds_channel, const XdsResourceType* type)
397
398
  ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_);
@@ -22,130 +22,132 @@
22
22
 
23
23
  #include "src/core/util/dual_ref_counted.h"
24
24
  #include "src/core/util/orphanable.h"
25
- #include "src/core/xds/xds_client/xds_bootstrap.h"
25
+ #include "src/core/util/ref_counted.h"
26
+ #include "src/core/util/ref_counted_ptr.h"
26
27
  #include "absl/status/status.h"
27
28
  #include "absl/strings/string_view.h"
28
29
 
30
+ struct census_context;
31
+
29
32
  namespace grpc_core {
30
33
 
31
- // A factory for creating new XdsTransport instances.
32
- class XdsTransportFactory : public DualRefCounted<XdsTransportFactory> {
34
+ // Represents a transport for xDS communication (e.g., a gRPC channel).
35
+ class XdsTransport : public DualRefCounted<XdsTransport> {
33
36
  public:
34
- // Represents a transport for xDS communication (e.g., a gRPC channel).
35
- class XdsTransport : public DualRefCounted<XdsTransport> {
36
- public:
37
- // Options for creating a streaming call.
38
- struct CallOptions {
39
- // If true, the send_initial_metadata op is not started when the call
40
- // is created; instead, it is started by the first call to
41
- // SendMessage(). This allows a unary call to send initial metadata,
42
- // the request message, and the half-close in a single batch:
43
- // auto call = transport->CreateStreamingCall(
44
- // method, std::move(handler),
45
- // CallOptions().set_start_upon_send_message(true));
46
- // call->SendMessage(payload, /*send_half_close=*/true);
47
- bool start_upon_send_message = false;
48
-
49
- // If true, the call will be queued until the transport is connected
50
- // instead of failing fast when the transport is not connected.
51
- bool wait_for_ready = false;
52
-
53
- CallOptions& set_start_upon_send_message(bool value) {
54
- start_upon_send_message = value;
55
- return *this;
56
- }
57
-
58
- CallOptions& set_wait_for_ready(bool value) {
59
- wait_for_ready = value;
60
- return *this;
61
- }
62
- };
37
+ // Options for creating a streaming call.
38
+ struct CallOptions {
39
+ // If true, the send_initial_metadata op is not started when the call
40
+ // is created; instead, it is started by the first call to
41
+ // SendMessage(). This allows a unary call to send initial metadata,
42
+ // the request message, and the half-close in a single batch:
43
+ // auto call = transport->CreateStreamingCall(
44
+ // method, std::move(handler),
45
+ // CallOptions().set_start_upon_send_message(true));
46
+ // call->SendMessage(payload, /*send_half_close=*/true);
47
+ bool start_upon_send_message = false;
48
+
49
+ // If true, the call will be queued until the transport is connected
50
+ // instead of failing fast when the transport is not connected.
51
+ bool wait_for_ready = false;
52
+
53
+ // If set, the tracing context of the call that this call is being made
54
+ // on behalf of (e.g., the data plane RPC that an ext_proc or ext_authz
55
+ // side-channel call is made for). It is set as the census_context of
56
+ // the new call, so that tracing systems record the new call as a child
57
+ // of that call. Tracing systems read it only when the new call is
58
+ // created, so it needs to remain valid only until CreateStreamingCall()
59
+ // returns.
60
+ census_context* parent_census_context = nullptr;
61
+
62
+ CallOptions& set_start_upon_send_message(bool value) {
63
+ start_upon_send_message = value;
64
+ return *this;
65
+ }
63
66
 
64
- // Represents a bidi streaming RPC call.
65
- class StreamingCall : public InternallyRefCounted<StreamingCall> {
66
- public:
67
- // An interface for handling events on a streaming call.
68
- class EventHandler {
69
- public:
70
- virtual ~EventHandler() = default;
71
-
72
- // Called when a SendMessage() operation completes.
73
- virtual void OnRequestSent(bool ok) = 0;
74
- // Called when a message is received on the stream.
75
- virtual void OnRecvMessage(absl::string_view payload) = 0;
76
- // Called when status is received on the stream.
77
- virtual void OnStatusReceived(absl::Status status) = 0;
78
- };
79
-
80
- // Sends a message on the stream. When the message has been sent,
81
- // the EventHandler::OnRequestSent() method will be called.
82
- // Only one message will be in flight at a time; subsequent
83
- // messages will not be sent until this one is done.
84
- //
85
- // If send_half_close is true, the client-side half-close is sent in
86
- // the same batch as the message, in which case SendHalfClose() must
87
- // not be called afterwards.
88
- void SendMessage(std::string payload) {
89
- SendMessage(std::move(payload), /*send_half_close=*/false);
90
- }
91
- virtual void SendMessage(std::string payload, bool send_half_close) = 0;
92
-
93
- // Starts a recv_message operation on the stream.
94
- virtual void StartRecvMessage() = 0;
95
-
96
- // Half-closes the stream from the client side.
97
- virtual void SendHalfClose() = 0;
98
- };
67
+ CallOptions& set_wait_for_ready(bool value) {
68
+ wait_for_ready = value;
69
+ return *this;
70
+ }
99
71
 
100
- // A watcher for connectivity failures.
101
- class ConnectivityFailureWatcher
102
- : public RefCounted<ConnectivityFailureWatcher> {
72
+ CallOptions& set_parent_census_context(census_context* value) {
73
+ parent_census_context = value;
74
+ return *this;
75
+ }
76
+ };
77
+
78
+ // Represents a bidi streaming RPC call.
79
+ class StreamingCall : public InternallyRefCounted<StreamingCall> {
80
+ public:
81
+ // An interface for handling events on a streaming call.
82
+ class EventHandler {
103
83
  public:
104
- // Will be invoked whenever there is a connectivity failure on the
105
- // transport.
106
- virtual void OnConnectivityFailure(absl::Status status) = 0;
84
+ virtual ~EventHandler() = default;
85
+
86
+ // Called when a SendMessage() operation completes.
87
+ virtual void OnRequestSent(bool ok) = 0;
88
+ // Called when a message is received on the stream.
89
+ virtual void OnRecvMessage(absl::string_view payload) = 0;
90
+ // Called when status is received on the stream.
91
+ virtual void OnStatusReceived(absl::Status status) = 0;
107
92
  };
108
93
 
109
- explicit XdsTransport(const char* trace = nullptr)
110
- : DualRefCounted(trace) {}
111
-
112
- // Starts a connectivity failure watcher on the transport.
113
- virtual void StartConnectivityFailureWatch(
114
- RefCountedPtr<ConnectivityFailureWatcher> watcher) = 0;
115
- // Stops a connectivity failure watcher on the transport.
116
- virtual void StopConnectivityFailureWatch(
117
- const RefCountedPtr<ConnectivityFailureWatcher>& watcher) = 0;
118
-
119
- // Create a streaming call on this transport for the specified method
120
- // using default CallOptions.
121
- // Events on the stream will be reported to event_handler.
122
- OrphanablePtr<StreamingCall> CreateStreamingCall(
123
- const char* method,
124
- std::unique_ptr<StreamingCall::EventHandler> event_handler) {
125
- return CreateStreamingCall(method, std::move(event_handler),
126
- CallOptions());
94
+ // Sends a message on the stream. When the message has been sent,
95
+ // the EventHandler::OnRequestSent() method will be called.
96
+ // Only one message will be in flight at a time; subsequent
97
+ // messages will not be sent until this one is done.
98
+ //
99
+ // If send_half_close is true, the client-side half-close is sent in
100
+ // the same batch as the message, in which case SendHalfClose() must
101
+ // not be called afterwards.
102
+ void SendMessage(std::string payload) {
103
+ SendMessage(std::move(payload), /*send_half_close=*/false);
127
104
  }
105
+ virtual void SendMessage(std::string payload, bool send_half_close) = 0;
128
106
 
129
- // Create a streaming call on this transport for the specified method
130
- // with custom options.
131
- // Events on the stream will be reported to event_handler.
132
- virtual OrphanablePtr<StreamingCall> CreateStreamingCall(
133
- const char* method,
134
- std::unique_ptr<StreamingCall::EventHandler> event_handler,
135
- CallOptions options) = 0;
107
+ // Starts a recv_message operation on the stream.
108
+ virtual void StartRecvMessage() = 0;
136
109
 
137
- // Resets connection backoff for the transport.
138
- virtual void ResetBackoff() = 0;
110
+ // Half-closes the stream from the client side.
111
+ virtual void SendHalfClose() = 0;
112
+ };
113
+
114
+ // A watcher for connectivity failures.
115
+ class ConnectivityFailureWatcher
116
+ : public RefCounted<ConnectivityFailureWatcher> {
117
+ public:
118
+ // Will be invoked whenever there is a connectivity failure on the
119
+ // transport.
120
+ virtual void OnConnectivityFailure(absl::Status status) = 0;
139
121
  };
140
122
 
141
- // Returns a transport for the specified server. If there is already
142
- // a transport for the server, returns a new ref to that transport;
143
- // otherwise, creates a new transport.
144
- //
145
- // *status will be set if there is an error creating the channel,
146
- // although the returned channel must still accept calls (which may fail).
147
- virtual RefCountedPtr<XdsTransport> GetTransport(
148
- const XdsBootstrap::XdsServerTarget& server, absl::Status* status) = 0;
123
+ explicit XdsTransport(const char* trace = nullptr) : DualRefCounted(trace) {}
124
+
125
+ // Starts a connectivity failure watcher on the transport.
126
+ virtual void StartConnectivityFailureWatch(
127
+ RefCountedPtr<ConnectivityFailureWatcher> watcher) = 0;
128
+ // Stops a connectivity failure watcher on the transport.
129
+ virtual void StopConnectivityFailureWatch(
130
+ const RefCountedPtr<ConnectivityFailureWatcher>& watcher) = 0;
131
+
132
+ // Create a streaming call on this transport for the specified method
133
+ // using default CallOptions.
134
+ // Events on the stream will be reported to event_handler.
135
+ OrphanablePtr<StreamingCall> CreateStreamingCall(
136
+ const char* method,
137
+ std::unique_ptr<StreamingCall::EventHandler> event_handler) {
138
+ return CreateStreamingCall(method, std::move(event_handler), CallOptions());
139
+ }
140
+
141
+ // Create a streaming call on this transport for the specified method
142
+ // with custom options.
143
+ // Events on the stream will be reported to event_handler.
144
+ virtual OrphanablePtr<StreamingCall> CreateStreamingCall(
145
+ const char* method,
146
+ std::unique_ptr<StreamingCall::EventHandler> event_handler,
147
+ CallOptions options) = 0;
148
+
149
+ // Resets connection backoff for the transport.
150
+ virtual void ResetBackoff() = 0;
149
151
  };
150
152
 
151
153
  } // namespace grpc_core
@@ -0,0 +1,43 @@
1
+ //
2
+ // Copyright 2022 gRPC authors.
3
+ //
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // you may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ //
8
+ // http://www.apache.org/licenses/LICENSE-2.0
9
+ //
10
+ // Unless required by applicable law or agreed to in writing, software
11
+ // distributed under the License is distributed on an "AS IS" BASIS,
12
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ // See the License for the specific language governing permissions and
14
+ // limitations under the License.
15
+ //
16
+
17
+ #ifndef GRPC_SRC_CORE_XDS_XDS_CLIENT_XDS_TRANSPORT_FACTORY_H
18
+ #define GRPC_SRC_CORE_XDS_XDS_CLIENT_XDS_TRANSPORT_FACTORY_H
19
+
20
+ #include "src/core/util/dual_ref_counted.h"
21
+ #include "src/core/util/ref_counted_ptr.h"
22
+ #include "src/core/xds/xds_client/xds_bootstrap.h"
23
+ #include "src/core/xds/xds_client/xds_transport.h"
24
+ #include "absl/status/status.h"
25
+
26
+ namespace grpc_core {
27
+
28
+ // A factory for creating new XdsTransport instances.
29
+ class XdsTransportFactory : public DualRefCounted<XdsTransportFactory> {
30
+ public:
31
+ // Returns a transport for the specified server. If there is already
32
+ // a transport for the server, returns a new ref to that transport;
33
+ // otherwise, creates a new transport.
34
+ //
35
+ // *status will be set if there is an error creating the channel,
36
+ // although the returned channel must still accept calls (which may fail).
37
+ virtual RefCountedPtr<XdsTransport> GetTransport(
38
+ const XdsBootstrap::XdsServerTarget& server, absl::Status* status) = 0;
39
+ };
40
+
41
+ } // namespace grpc_core
42
+
43
+ #endif // GRPC_SRC_CORE_XDS_XDS_CLIENT_XDS_TRANSPORT_FACTORY_H