grpc 1.78.1 → 1.80.0

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 (426) hide show
  1. checksums.yaml +4 -4
  2. data/Makefile +22 -8
  3. data/include/grpc/credentials.h +47 -37
  4. data/include/grpc/credentials_cpp.h +39 -0
  5. data/include/grpc/event_engine/event_engine.h +8 -3
  6. data/include/grpc/grpc.h +4 -0
  7. data/include/grpc/impl/call.h +9 -0
  8. data/include/grpc/impl/channel_arg_names.h +7 -0
  9. data/include/grpc/module.modulemap +2 -0
  10. data/include/grpc/private_key_signer.h +104 -0
  11. data/include/grpc/support/port_platform.h +6 -0
  12. data/src/core/call/call_filters.h +101 -78
  13. data/src/core/call/call_spine.h +91 -68
  14. data/src/core/call/call_state.h +60 -4
  15. data/src/core/call/client_call.cc +9 -9
  16. data/src/core/call/client_call.h +1 -1
  17. data/src/core/call/metadata_batch.cc +2 -0
  18. data/src/core/call/metadata_batch.h +48 -1
  19. data/src/core/call/metadata_info.cc +35 -0
  20. data/src/core/call/metadata_info.h +2 -0
  21. data/src/core/call/simple_slice_based_metadata.h +2 -1
  22. data/src/core/channelz/channelz.cc +9 -6
  23. data/src/core/channelz/channelz.h +7 -4
  24. data/src/core/channelz/property_list.h +5 -0
  25. data/src/core/channelz/v2tov1/convert.cc +1 -1
  26. data/src/core/channelz/v2tov1/legacy_api.cc +164 -307
  27. data/src/core/client_channel/buffered_call.cc +7 -3
  28. data/src/core/client_channel/buffered_call.h +11 -5
  29. data/src/core/client_channel/client_channel.cc +106 -44
  30. data/src/core/client_channel/client_channel.h +3 -6
  31. data/src/core/client_channel/client_channel_filter.cc +90 -64
  32. data/src/core/client_channel/client_channel_filter.h +3 -6
  33. data/src/core/client_channel/client_channel_internal.h +5 -0
  34. data/src/core/client_channel/config_selector.h +17 -12
  35. data/src/core/client_channel/dynamic_filters.cc +8 -7
  36. data/src/core/client_channel/dynamic_filters.h +7 -5
  37. data/src/core/client_channel/retry_filter.cc +1 -1
  38. data/src/core/client_channel/retry_filter.h +2 -2
  39. data/src/core/client_channel/subchannel.cc +1682 -266
  40. data/src/core/client_channel/subchannel.h +411 -134
  41. data/src/core/client_channel/subchannel_stream_client.cc +22 -18
  42. data/src/core/client_channel/subchannel_stream_client.h +8 -9
  43. data/src/core/client_channel/subchannel_stream_limiter.cc +76 -0
  44. data/src/core/client_channel/subchannel_stream_limiter.h +51 -0
  45. data/src/core/config/config_vars.cc +9 -1
  46. data/src/core/config/config_vars.h +6 -0
  47. data/src/core/credentials/call/call_creds_registry.h +51 -22
  48. data/src/core/credentials/call/call_creds_registry_init.cc +86 -2
  49. data/src/core/credentials/call/external/aws_external_account_credentials.cc +2 -2
  50. data/src/core/credentials/call/external/external_account_credentials.cc +11 -4
  51. data/src/core/credentials/call/external/file_external_account_credentials.cc +2 -2
  52. data/src/core/credentials/transport/channel_creds_registry.h +71 -20
  53. data/src/core/credentials/transport/channel_creds_registry_init.cc +338 -29
  54. data/src/core/credentials/transport/ssl/ssl_credentials.cc +43 -24
  55. data/src/core/credentials/transport/ssl/ssl_credentials.h +7 -1
  56. data/src/core/credentials/transport/ssl/ssl_security_connector.cc +2 -8
  57. data/src/core/credentials/transport/ssl/ssl_security_connector.h +4 -3
  58. data/src/core/credentials/transport/tls/grpc_tls_certificate_distributor.cc +25 -5
  59. data/src/core/credentials/transport/tls/grpc_tls_certificate_distributor.h +7 -5
  60. data/src/core/credentials/transport/tls/grpc_tls_certificate_provider.cc +181 -109
  61. data/src/core/credentials/transport/tls/grpc_tls_certificate_provider.h +55 -42
  62. data/src/core/credentials/transport/tls/grpc_tls_credentials_options.cc +28 -23
  63. data/src/core/credentials/transport/tls/grpc_tls_credentials_options.h +26 -23
  64. data/src/core/credentials/transport/tls/spiffe_utils.cc +2 -2
  65. data/src/core/credentials/transport/tls/ssl_utils.cc +18 -18
  66. data/src/core/credentials/transport/tls/ssl_utils.h +12 -10
  67. data/src/core/credentials/transport/tls/tls_security_connector.cc +106 -74
  68. data/src/core/credentials/transport/tls/tls_security_connector.h +12 -8
  69. data/src/core/credentials/transport/xds/xds_credentials.cc +76 -32
  70. data/src/core/credentials/transport/xds/xds_credentials.h +4 -2
  71. data/src/core/ext/filters/fault_injection/fault_injection_filter.cc +117 -35
  72. data/src/core/ext/filters/fault_injection/fault_injection_filter.h +42 -4
  73. data/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.cc +58 -29
  74. data/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.h +19 -11
  75. data/src/core/ext/filters/stateful_session/stateful_session_filter.cc +82 -25
  76. data/src/core/ext/filters/stateful_session/stateful_session_filter.h +28 -3
  77. data/src/core/ext/filters/stateful_session/stateful_session_service_config_parser.cc +9 -7
  78. data/src/core/ext/filters/stateful_session/stateful_session_service_config_parser.h +1 -1
  79. data/src/core/ext/transport/chttp2/transport/call_tracer_wrapper.h +7 -1
  80. data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +117 -67
  81. data/src/core/ext/transport/chttp2/transport/chttp2_transport.h +2 -0
  82. data/src/core/ext/transport/chttp2/transport/flow_control.h +11 -1
  83. data/src/core/ext/transport/chttp2/transport/frame.cc +2 -15
  84. data/src/core/ext/transport/chttp2/transport/frame.h +0 -4
  85. data/src/core/ext/transport/chttp2/transport/goaway.cc +17 -2
  86. data/src/core/ext/transport/chttp2/transport/goaway.h +27 -6
  87. data/src/core/ext/transport/chttp2/transport/header_assembler.h +8 -21
  88. data/src/core/ext/transport/chttp2/transport/hpack_encoder.cc +101 -40
  89. data/src/core/ext/transport/chttp2/transport/hpack_encoder.h +95 -0
  90. data/src/core/ext/transport/chttp2/transport/http2_client_transport.cc +923 -772
  91. data/src/core/ext/transport/chttp2/transport/http2_client_transport.h +406 -423
  92. data/src/core/ext/transport/chttp2/transport/http2_settings.cc +1 -0
  93. data/src/core/ext/transport/chttp2/transport/http2_settings.h +8 -1
  94. data/src/core/ext/transport/chttp2/transport/http2_settings_promises.h +25 -13
  95. data/src/core/ext/transport/chttp2/transport/http2_transport.cc +71 -24
  96. data/src/core/ext/transport/chttp2/transport/http2_transport.h +25 -49
  97. data/src/core/ext/transport/chttp2/transport/http2_ztrace_collector.h +2 -2
  98. data/src/core/ext/transport/chttp2/transport/incoming_metadata_tracker.h +29 -9
  99. data/src/core/ext/transport/chttp2/transport/internal.h +6 -2
  100. data/src/core/ext/transport/chttp2/transport/keepalive.cc +14 -20
  101. data/src/core/ext/transport/chttp2/transport/keepalive.h +9 -6
  102. data/src/core/ext/transport/chttp2/transport/parsing.cc +11 -0
  103. data/src/core/ext/transport/chttp2/transport/ping_promise.cc +34 -74
  104. data/src/core/ext/transport/chttp2/transport/ping_promise.h +123 -79
  105. data/src/core/ext/transport/chttp2/transport/security_frame.h +233 -3
  106. data/src/core/ext/transport/chttp2/transport/stream.h +152 -73
  107. data/src/core/ext/transport/chttp2/transport/stream_data_queue.h +155 -85
  108. data/src/core/ext/transport/chttp2/transport/transport_common.h +0 -5
  109. data/src/core/ext/transport/chttp2/transport/writable_streams.h +8 -7
  110. data/src/core/ext/transport/chttp2/transport/write_cycle.cc +86 -0
  111. data/src/core/ext/transport/chttp2/transport/write_cycle.h +355 -0
  112. data/src/core/ext/transport/chttp2/transport/writing.cc +31 -29
  113. data/src/core/ext/upb-gen/cel/expr/checked.upb.h +1875 -0
  114. data/src/core/ext/upb-gen/cel/expr/checked.upb_minitable.c +409 -0
  115. data/src/core/ext/upb-gen/cel/expr/checked.upb_minitable.h +56 -0
  116. data/src/core/ext/upb-gen/cel/expr/syntax.upb.h +2223 -0
  117. data/src/core/ext/upb-gen/cel/expr/syntax.upb_minitable.c +489 -0
  118. data/src/core/ext/upb-gen/cel/expr/syntax.upb_minitable.h +60 -0
  119. data/src/core/ext/upb-gen/envoy/config/accesslog/v3/accesslog.upb.h +2 -1
  120. data/src/core/ext/upb-gen/envoy/config/bootstrap/v3/bootstrap.upb.h +130 -18
  121. data/src/core/ext/upb-gen/envoy/config/bootstrap/v3/bootstrap.upb_minitable.c +18 -13
  122. data/src/core/ext/upb-gen/envoy/config/cluster/v3/cluster.upb.h +70 -38
  123. data/src/core/ext/upb-gen/envoy/config/cluster/v3/cluster.upb_minitable.c +20 -17
  124. data/src/core/ext/upb-gen/envoy/config/common/matcher/v3/matcher.upb.h +26 -10
  125. data/src/core/ext/upb-gen/envoy/config/common/matcher/v3/matcher.upb_minitable.c +8 -7
  126. data/src/core/ext/upb-gen/envoy/config/common/mutation_rules/v3/mutation_rules.upb.h +495 -0
  127. data/src/core/ext/upb-gen/envoy/config/common/mutation_rules/v3/mutation_rules.upb_minitable.c +114 -0
  128. data/src/core/ext/upb-gen/envoy/config/common/mutation_rules/v3/mutation_rules.upb_minitable.h +36 -0
  129. data/src/core/ext/upb-gen/envoy/config/core/v3/address.upb.h +26 -10
  130. data/src/core/ext/upb-gen/envoy/config/core/v3/address.upb_minitable.c +8 -7
  131. data/src/core/ext/upb-gen/envoy/config/core/v3/cel.upb.h +121 -0
  132. data/src/core/ext/upb-gen/envoy/config/core/v3/cel.upb_minitable.c +54 -0
  133. data/src/core/ext/upb-gen/envoy/config/core/v3/cel.upb_minitable.h +32 -0
  134. data/src/core/ext/upb-gen/envoy/config/core/v3/grpc_service.upb.h +143 -9
  135. data/src/core/ext/upb-gen/envoy/config/core/v3/grpc_service.upb_minitable.c +18 -6
  136. data/src/core/ext/upb-gen/envoy/config/core/v3/protocol.upb.h +112 -11
  137. data/src/core/ext/upb-gen/envoy/config/core/v3/protocol.upb_minitable.c +22 -9
  138. data/src/core/ext/upb-gen/envoy/config/core/v3/proxy_protocol.upb.h +276 -0
  139. data/src/core/ext/upb-gen/envoy/config/core/v3/proxy_protocol.upb_minitable.c +60 -5
  140. data/src/core/ext/upb-gen/envoy/config/core/v3/proxy_protocol.upb_minitable.h +4 -0
  141. data/src/core/ext/upb-gen/envoy/config/endpoint/v3/endpoint_components.upb.h +72 -0
  142. data/src/core/ext/upb-gen/envoy/config/endpoint/v3/endpoint_components.upb_minitable.c +23 -2
  143. data/src/core/ext/upb-gen/envoy/config/endpoint/v3/endpoint_components.upb_minitable.h +2 -0
  144. data/src/core/ext/upb-gen/envoy/config/listener/v3/listener.upb.h +129 -13
  145. data/src/core/ext/upb-gen/envoy/config/listener/v3/listener.upb_minitable.c +36 -10
  146. data/src/core/ext/upb-gen/envoy/config/listener/v3/listener.upb_minitable.h +2 -0
  147. data/src/core/ext/upb-gen/envoy/config/listener/v3/quic_config.upb.h +30 -0
  148. data/src/core/ext/upb-gen/envoy/config/listener/v3/quic_config.upb_minitable.c +5 -3
  149. data/src/core/ext/upb-gen/envoy/config/metrics/v3/metrics_service.upb.h +16 -0
  150. data/src/core/ext/upb-gen/envoy/config/metrics/v3/metrics_service.upb_minitable.c +4 -3
  151. data/src/core/ext/upb-gen/envoy/config/metrics/v3/stats.upb.h +31 -0
  152. data/src/core/ext/upb-gen/envoy/config/metrics/v3/stats.upb_minitable.c +5 -3
  153. data/src/core/ext/upb-gen/envoy/config/overload/v3/overload.upb.h +2 -1
  154. data/src/core/ext/upb-gen/envoy/config/rbac/v3/rbac.upb.h +63 -0
  155. data/src/core/ext/upb-gen/envoy/config/rbac/v3/rbac.upb_minitable.c +12 -7
  156. data/src/core/ext/upb-gen/envoy/config/route/v3/route.upb.h +97 -81
  157. data/src/core/ext/upb-gen/envoy/config/route/v3/route.upb_minitable.c +40 -23
  158. data/src/core/ext/upb-gen/envoy/config/route/v3/route_components.upb.h +604 -228
  159. data/src/core/ext/upb-gen/envoy/config/route/v3/route_components.upb_minitable.c +146 -100
  160. data/src/core/ext/upb-gen/envoy/config/tap/v3/common.upb.h +30 -0
  161. data/src/core/ext/upb-gen/envoy/config/tap/v3/common.upb_minitable.c +5 -3
  162. data/src/core/ext/upb-gen/envoy/config/trace/v3/opentelemetry.upb.h +35 -3
  163. data/src/core/ext/upb-gen/envoy/config/trace/v3/opentelemetry.upb_minitable.c +7 -4
  164. data/src/core/ext/upb-gen/envoy/config/trace/v3/zipkin.upb.h +66 -14
  165. data/src/core/ext/upb-gen/envoy/config/trace/v3/zipkin.upb_minitable.c +22 -11
  166. data/src/core/ext/upb-gen/envoy/extensions/clusters/aggregate/v3/cluster.upb.h +87 -0
  167. data/src/core/ext/upb-gen/envoy/extensions/clusters/aggregate/v3/cluster.upb_minitable.c +29 -2
  168. data/src/core/ext/upb-gen/envoy/extensions/clusters/aggregate/v3/cluster.upb_minitable.h +2 -0
  169. data/src/core/ext/upb-gen/envoy/extensions/filters/http/rbac/v3/rbac.upb.h +0 -1
  170. data/src/core/ext/upb-gen/envoy/extensions/filters/http/rbac/v3/rbac.upb_minitable.c +0 -1
  171. data/src/core/ext/upb-gen/envoy/extensions/filters/http/stateful_session/v3/stateful_session.upb.h +20 -4
  172. data/src/core/ext/upb-gen/envoy/extensions/filters/http/stateful_session/v3/stateful_session.upb_minitable.c +5 -4
  173. data/src/core/ext/upb-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.h +239 -60
  174. data/src/core/ext/upb-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb_minitable.c +59 -28
  175. data/src/core/ext/upb-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb_minitable.h +2 -0
  176. data/src/core/ext/upb-gen/envoy/extensions/grpc_service/call_credentials/access_token/v3/access_token_credentials.upb.h +89 -0
  177. data/src/core/ext/upb-gen/envoy/extensions/grpc_service/call_credentials/access_token/v3/access_token_credentials.upb_minitable.c +50 -0
  178. data/src/core/ext/upb-gen/envoy/extensions/grpc_service/call_credentials/access_token/v3/access_token_credentials.upb_minitable.h +32 -0
  179. data/src/core/ext/upb-gen/envoy/extensions/grpc_service/channel_credentials/tls/v3/tls_credentials.upb.h +135 -0
  180. data/src/core/ext/upb-gen/envoy/extensions/grpc_service/channel_credentials/tls/v3/tls_credentials.upb_minitable.c +53 -0
  181. data/src/core/ext/upb-gen/envoy/extensions/grpc_service/channel_credentials/tls/v3/tls_credentials.upb_minitable.h +32 -0
  182. data/src/core/ext/upb-gen/envoy/extensions/grpc_service/channel_credentials/xds/v3/xds_credentials.upb.h +105 -0
  183. data/src/core/ext/upb-gen/envoy/extensions/grpc_service/channel_credentials/xds/v3/xds_credentials.upb_minitable.c +51 -0
  184. data/src/core/ext/upb-gen/envoy/extensions/grpc_service/channel_credentials/xds/v3/xds_credentials.upb_minitable.h +32 -0
  185. data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.upb.h +32 -0
  186. 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 +6 -3
  187. data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/common/v3/common.upb.h +206 -0
  188. data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/common/v3/common.upb_minitable.c +41 -8
  189. data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/common/v3/common.upb_minitable.h +2 -0
  190. data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/common.upb.h +64 -0
  191. data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/common.upb_minitable.c +4 -3
  192. data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/secret.upb.h +64 -0
  193. data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/secret.upb_minitable.c +31 -5
  194. data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/secret.upb_minitable.h +2 -0
  195. data/src/core/ext/upb-gen/envoy/extensions/upstreams/http/v3/http_protocol_options.upb.h +283 -14
  196. data/src/core/ext/upb-gen/envoy/extensions/upstreams/http/v3/http_protocol_options.upb_minitable.c +48 -11
  197. data/src/core/ext/upb-gen/envoy/extensions/upstreams/http/v3/http_protocol_options.upb_minitable.h +2 -0
  198. data/src/core/ext/upb-gen/envoy/type/http/v3/cookie.upb.h +144 -6
  199. data/src/core/ext/upb-gen/envoy/type/http/v3/cookie.upb_minitable.c +35 -7
  200. data/src/core/ext/upb-gen/envoy/type/http/v3/cookie.upb_minitable.h +2 -0
  201. data/src/core/ext/upb-gen/envoy/type/tracing/v3/custom_tag.upb.h +42 -21
  202. data/src/core/ext/upb-gen/envoy/type/tracing/v3/custom_tag.upb_minitable.c +9 -8
  203. data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/promise.upb.h +164 -1
  204. data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/promise.upb_minitable.c +37 -6
  205. data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/promise.upb_minitable.h +2 -0
  206. data/src/core/ext/upb-gen/xds/type/matcher/v3/cel.upb.h +0 -1
  207. data/src/core/ext/upb-gen/xds/type/matcher/v3/cel.upb_minitable.c +0 -1
  208. data/src/core/ext/upb-gen/xds/type/matcher/v3/http_inputs.upb.h +0 -1
  209. data/src/core/ext/upb-gen/xds/type/matcher/v3/http_inputs.upb_minitable.c +0 -1
  210. data/src/core/ext/upb-gen/xds/type/matcher/v3/matcher.upb.h +26 -11
  211. data/src/core/ext/upb-gen/xds/type/matcher/v3/matcher.upb_minitable.c +8 -8
  212. data/src/core/ext/upb-gen/xds/type/matcher/v3/string.upb.h +33 -0
  213. data/src/core/ext/upb-gen/xds/type/matcher/v3/string.upb_minitable.c +14 -3
  214. data/src/core/ext/upb-gen/xds/type/v3/cel.upb.h +90 -10
  215. data/src/core/ext/upb-gen/xds/type/v3/cel.upb_minitable.c +18 -7
  216. data/src/core/ext/upbdefs-gen/cel/expr/checked.upbdefs.c +248 -0
  217. data/src/core/ext/upbdefs-gen/cel/expr/checked.upbdefs.h +97 -0
  218. data/src/core/ext/upbdefs-gen/cel/expr/syntax.upbdefs.c +283 -0
  219. data/src/core/ext/upbdefs-gen/cel/expr/syntax.upbdefs.h +107 -0
  220. data/src/core/ext/upbdefs-gen/envoy/config/accesslog/v3/accesslog.upbdefs.c +213 -211
  221. data/src/core/ext/upbdefs-gen/envoy/config/bootstrap/v3/bootstrap.upbdefs.c +635 -614
  222. data/src/core/ext/upbdefs-gen/envoy/config/cluster/v3/cluster.upbdefs.c +1012 -1000
  223. data/src/core/ext/upbdefs-gen/envoy/config/common/matcher/v3/matcher.upbdefs.c +276 -273
  224. data/src/core/ext/upbdefs-gen/envoy/config/common/mutation_rules/v3/mutation_rules.upbdefs.c +152 -0
  225. data/src/core/ext/upbdefs-gen/envoy/config/common/mutation_rules/v3/mutation_rules.upbdefs.h +47 -0
  226. data/src/core/ext/upbdefs-gen/envoy/config/core/v3/address.upbdefs.c +149 -144
  227. data/src/core/ext/upbdefs-gen/envoy/config/core/v3/base.upbdefs.c +367 -370
  228. data/src/core/ext/upbdefs-gen/envoy/config/core/v3/cel.upbdefs.c +63 -0
  229. data/src/core/ext/upbdefs-gen/envoy/config/core/v3/cel.upbdefs.h +37 -0
  230. data/src/core/ext/upbdefs-gen/envoy/config/core/v3/grpc_service.upbdefs.c +297 -284
  231. data/src/core/ext/upbdefs-gen/envoy/config/core/v3/protocol.upbdefs.c +492 -469
  232. data/src/core/ext/upbdefs-gen/envoy/config/core/v3/proxy_protocol.upbdefs.c +74 -43
  233. data/src/core/ext/upbdefs-gen/envoy/config/core/v3/proxy_protocol.upbdefs.h +10 -0
  234. data/src/core/ext/upbdefs-gen/envoy/config/core/v3/substitution_format_string.upbdefs.c +60 -59
  235. data/src/core/ext/upbdefs-gen/envoy/config/endpoint/v3/endpoint_components.upbdefs.c +202 -184
  236. data/src/core/ext/upbdefs-gen/envoy/config/endpoint/v3/endpoint_components.upbdefs.h +5 -0
  237. data/src/core/ext/upbdefs-gen/envoy/config/listener/v3/listener.upbdefs.c +354 -339
  238. data/src/core/ext/upbdefs-gen/envoy/config/listener/v3/listener.upbdefs.h +5 -0
  239. data/src/core/ext/upbdefs-gen/envoy/config/listener/v3/quic_config.upbdefs.c +28 -19
  240. data/src/core/ext/upbdefs-gen/envoy/config/metrics/v3/metrics_service.upbdefs.c +30 -27
  241. data/src/core/ext/upbdefs-gen/envoy/config/metrics/v3/stats.upbdefs.c +71 -66
  242. data/src/core/ext/upbdefs-gen/envoy/config/overload/v3/overload.upbdefs.c +94 -91
  243. data/src/core/ext/upbdefs-gen/envoy/config/rbac/v3/rbac.upbdefs.c +386 -369
  244. data/src/core/ext/upbdefs-gen/envoy/config/route/v3/route.upbdefs.c +60 -57
  245. data/src/core/ext/upbdefs-gen/envoy/config/route/v3/route_components.upbdefs.c +1974 -1884
  246. data/src/core/ext/upbdefs-gen/envoy/config/tap/v3/common.upbdefs.c +119 -112
  247. data/src/core/ext/upbdefs-gen/envoy/config/trace/v3/opentelemetry.upbdefs.c +62 -51
  248. data/src/core/ext/upbdefs-gen/envoy/config/trace/v3/zipkin.upbdefs.c +109 -88
  249. data/src/core/ext/upbdefs-gen/envoy/extensions/clusters/aggregate/v3/cluster.upbdefs.c +54 -36
  250. data/src/core/ext/upbdefs-gen/envoy/extensions/clusters/aggregate/v3/cluster.upbdefs.h +5 -0
  251. data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/rbac/v3/rbac.upbdefs.c +78 -84
  252. data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/stateful_session/v3/stateful_session.upbdefs.c +48 -46
  253. data/src/core/ext/upbdefs-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.c +1041 -984
  254. data/src/core/ext/upbdefs-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.h +5 -0
  255. data/src/core/ext/upbdefs-gen/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.c +304 -290
  256. data/src/core/ext/upbdefs-gen/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.c +94 -77
  257. data/src/core/ext/upbdefs-gen/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.h +5 -0
  258. data/src/core/ext/upbdefs-gen/envoy/extensions/upstreams/http/v3/http_protocol_options.upbdefs.c +246 -193
  259. data/src/core/ext/upbdefs-gen/envoy/extensions/upstreams/http/v3/http_protocol_options.upbdefs.h +5 -0
  260. data/src/core/ext/upbdefs-gen/envoy/type/http/v3/cookie.upbdefs.c +37 -23
  261. data/src/core/ext/upbdefs-gen/envoy/type/http/v3/cookie.upbdefs.h +5 -0
  262. data/src/core/ext/upbdefs-gen/envoy/type/tracing/v3/custom_tag.upbdefs.c +5 -3
  263. data/src/core/ext/upbdefs-gen/google/api/http.upbdefs.c +4 -4
  264. data/src/core/ext/upbdefs-gen/google/api/httpbody.upbdefs.c +4 -5
  265. data/src/core/ext/upbdefs-gen/src/proto/grpc/channelz/v2/promise.upbdefs.c +113 -87
  266. data/src/core/ext/upbdefs-gen/src/proto/grpc/channelz/v2/promise.upbdefs.h +5 -0
  267. data/src/core/ext/upbdefs-gen/udpa/annotations/migrate.upbdefs.c +5 -5
  268. data/src/core/ext/upbdefs-gen/udpa/annotations/security.upbdefs.c +6 -5
  269. data/src/core/ext/upbdefs-gen/udpa/annotations/sensitive.upbdefs.c +5 -5
  270. data/src/core/ext/upbdefs-gen/udpa/annotations/status.upbdefs.c +5 -5
  271. data/src/core/ext/upbdefs-gen/udpa/annotations/versioning.upbdefs.c +5 -5
  272. data/src/core/ext/upbdefs-gen/xds/type/matcher/v3/cel.upbdefs.c +25 -30
  273. data/src/core/ext/upbdefs-gen/xds/type/matcher/v3/http_inputs.upbdefs.c +14 -20
  274. data/src/core/ext/upbdefs-gen/xds/type/matcher/v3/matcher.upbdefs.c +180 -183
  275. data/src/core/ext/upbdefs-gen/xds/type/matcher/v3/string.upbdefs.c +56 -47
  276. data/src/core/ext/upbdefs-gen/xds/type/v3/cel.upbdefs.c +69 -47
  277. data/src/core/filter/filter_chain.h +95 -0
  278. data/src/core/handshaker/http_connect/{http_connect_handshaker.cc → http_connect_client_handshaker.cc} +32 -31
  279. data/src/core/handshaker/http_connect/{http_connect_handshaker.h → http_connect_client_handshaker.h} +4 -4
  280. data/src/core/handshaker/http_connect/http_proxy_mapper.cc +1 -1
  281. data/src/core/handshaker/http_connect/xds_http_proxy_mapper.cc +1 -1
  282. data/src/core/handshaker/security/pipelined_secure_endpoint.cc +14 -13
  283. data/src/core/handshaker/security/secure_endpoint.cc +282 -68
  284. data/src/core/handshaker/security/secure_endpoint.h +0 -7
  285. data/src/core/lib/channel/channel_args.h +1 -1
  286. data/src/core/lib/channel/promise_based_filter.cc +17 -4
  287. data/src/core/lib/channel/promise_based_filter.h +3 -2
  288. data/src/core/lib/debug/trace_flags.cc +2 -0
  289. data/src/core/lib/debug/trace_flags.h +1 -0
  290. data/src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc +35 -8
  291. data/src/core/lib/event_engine/cf_engine/dns_service_resolver.h +1 -2
  292. data/src/core/lib/event_engine/event_engine.cc +9 -0
  293. data/src/core/lib/event_engine/extensions/tcp_trace.h +0 -3
  294. data/src/core/lib/event_engine/posix_engine/ev_poll_posix.cc +2 -2
  295. data/src/core/lib/event_engine/posix_engine/posix_endpoint.h +1 -1
  296. data/src/core/lib/event_engine/posix_engine/posix_engine.cc +34 -9
  297. data/src/core/lib/event_engine/posix_engine/posix_engine.h +24 -2
  298. data/src/core/lib/event_engine/posix_engine/posix_engine_listener.cc +1 -3
  299. data/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.cc +141 -14
  300. data/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.h +19 -2
  301. data/src/core/lib/event_engine/posix_engine/posix_interface.h +7 -0
  302. data/src/core/lib/event_engine/posix_engine/posix_interface_posix.cc +21 -3
  303. data/src/core/lib/event_engine/posix_engine/posix_interface_windows.cc +16 -0
  304. data/src/core/lib/experiments/experiments.cc +309 -201
  305. data/src/core/lib/experiments/experiments.h +141 -80
  306. data/src/core/lib/iomgr/event_engine_shims/endpoint.cc +2 -2
  307. data/src/core/lib/iomgr/resolve_address.h +0 -2
  308. data/src/core/lib/iomgr/resolved_address.h +0 -2
  309. data/src/core/lib/iomgr/tcp_posix.cc +13 -5
  310. data/src/core/lib/iomgr/tcp_server.cc +0 -5
  311. data/src/core/lib/iomgr/tcp_server.h +0 -7
  312. data/src/core/lib/iomgr/tcp_server_posix.cc +0 -17
  313. data/src/core/lib/iomgr/tcp_server_utils_posix.h +0 -3
  314. data/src/core/lib/iomgr/tcp_server_windows.cc +12 -51
  315. data/src/core/lib/promise/all_ok.h +17 -12
  316. data/src/core/lib/promise/cancel_callback.h +12 -13
  317. data/src/core/lib/promise/detail/join_state.h +626 -0
  318. data/src/core/lib/promise/detail/promise_factory.h +14 -14
  319. data/src/core/lib/promise/for_each.h +32 -8
  320. data/src/core/lib/promise/if.h +9 -7
  321. data/src/core/lib/promise/loop.h +18 -16
  322. data/src/core/lib/promise/map.h +54 -47
  323. data/src/core/lib/promise/mpsc.h +11 -10
  324. data/src/core/lib/promise/observable.h +6 -6
  325. data/src/core/lib/promise/party.h +25 -19
  326. data/src/core/lib/promise/poll.h +5 -5
  327. data/src/core/lib/promise/prioritized_race.h +10 -7
  328. data/src/core/lib/promise/promise.h +16 -11
  329. data/src/core/lib/promise/race.h +6 -5
  330. data/src/core/lib/promise/seq.h +109 -74
  331. data/src/core/lib/promise/try_join.h +14 -6
  332. data/src/core/lib/promise/try_seq.h +76 -60
  333. data/src/core/lib/resource_quota/api.cc +7 -0
  334. data/src/core/lib/resource_quota/arena.h +1 -1
  335. data/src/core/lib/resource_quota/memory_quota.cc +4 -1
  336. data/src/core/lib/resource_quota/resource_quota.cc +2 -1
  337. data/src/core/lib/resource_quota/resource_quota.h +3 -0
  338. data/src/core/lib/resource_quota/stream_quota.cc +77 -1
  339. data/src/core/lib/resource_quota/stream_quota.h +64 -1
  340. data/src/core/lib/resource_quota/telemetry.h +1 -1
  341. data/src/core/lib/surface/call.cc +13 -0
  342. data/src/core/lib/surface/call_utils.h +58 -43
  343. data/src/core/lib/surface/channel.h +1 -4
  344. data/src/core/lib/surface/completion_queue.cc +13 -6
  345. data/src/core/lib/surface/validate_metadata.cc +20 -15
  346. data/src/core/lib/surface/validate_metadata.h +3 -1
  347. data/src/core/lib/surface/version.cc +2 -2
  348. data/src/core/lib/transport/promise_endpoint.cc +1 -1
  349. data/src/core/lib/transport/promise_endpoint.h +1 -1
  350. data/src/core/lib/transport/transport.h +5 -0
  351. data/src/core/load_balancing/health_check_client.cc +1 -15
  352. data/src/core/load_balancing/health_check_client_internal.h +0 -2
  353. data/src/core/load_balancing/oob_backend_metric.cc +1 -5
  354. data/src/core/load_balancing/oob_backend_metric_internal.h +0 -1
  355. data/src/core/load_balancing/xds/xds_cluster_impl.cc +12 -9
  356. data/src/core/plugin_registry/grpc_plugin_registry.cc +3 -2
  357. data/src/core/resolver/xds/xds_resolver.cc +162 -116
  358. data/src/core/server/server.cc +18 -1
  359. data/src/core/server/server.h +2 -0
  360. data/src/core/server/xds_server_config_fetcher.cc +4 -4
  361. data/src/core/telemetry/call_tracer.cc +87 -2
  362. data/src/core/telemetry/call_tracer.h +46 -8
  363. data/src/core/telemetry/instrument.cc +102 -40
  364. data/src/core/telemetry/instrument.h +246 -65
  365. data/src/core/tsi/fake_transport_security.cc +3 -1
  366. data/src/core/tsi/ssl_transport_security.cc +516 -137
  367. data/src/core/tsi/ssl_transport_security.h +28 -22
  368. data/src/core/tsi/ssl_transport_security_utils.cc +2 -2
  369. data/src/core/tsi/ssl_transport_security_utils.h +2 -2
  370. data/src/core/util/bitset.h +6 -0
  371. data/src/core/util/function_signature.h +3 -1
  372. data/src/core/util/http_client/httpcli_security_connector.cc +2 -1
  373. data/src/core/util/json/json_reader.cc +0 -4
  374. data/src/core/xds/grpc/certificate_provider_store.cc +2 -1
  375. data/src/core/xds/grpc/certificate_provider_store.h +3 -17
  376. data/src/core/xds/grpc/certificate_provider_store_interface.h +61 -0
  377. data/src/core/xds/grpc/xds_bootstrap_grpc.cc +48 -0
  378. data/src/core/xds/grpc/xds_bootstrap_grpc.h +18 -0
  379. data/src/core/xds/grpc/xds_certificate_provider.cc +7 -2
  380. data/src/core/xds/grpc/xds_certificate_provider.h +13 -2
  381. data/src/core/xds/grpc/xds_client_grpc.cc +13 -6
  382. data/src/core/xds/grpc/xds_client_grpc.h +10 -7
  383. data/src/core/xds/grpc/xds_cluster.cc +18 -4
  384. data/src/core/xds/grpc/xds_cluster.h +17 -2
  385. data/src/core/xds/grpc/xds_cluster_parser.cc +36 -11
  386. data/src/core/xds/grpc/xds_common_types.cc +45 -0
  387. data/src/core/xds/grpc/xds_common_types.h +31 -0
  388. data/src/core/xds/grpc/xds_common_types_parser.cc +274 -16
  389. data/src/core/xds/grpc/xds_common_types_parser.h +12 -0
  390. data/src/core/xds/grpc/xds_http_fault_filter.cc +128 -24
  391. data/src/core/xds/grpc/xds_http_fault_filter.h +19 -10
  392. data/src/core/xds/grpc/xds_http_filter.cc +38 -0
  393. data/src/core/xds/grpc/xds_http_filter.h +70 -47
  394. data/src/core/xds/grpc/xds_http_filter_registry.cc +48 -14
  395. data/src/core/xds/grpc/xds_http_filter_registry.h +29 -15
  396. data/src/core/xds/grpc/xds_http_gcp_authn_filter.cc +88 -22
  397. data/src/core/xds/grpc/xds_http_gcp_authn_filter.h +22 -11
  398. data/src/core/xds/grpc/xds_http_rbac_filter.cc +36 -20
  399. data/src/core/xds/grpc/xds_http_rbac_filter.h +19 -10
  400. data/src/core/xds/grpc/xds_http_stateful_session_filter.cc +143 -26
  401. data/src/core/xds/grpc/xds_http_stateful_session_filter.h +19 -10
  402. data/src/core/xds/grpc/xds_listener.cc +4 -1
  403. data/src/core/xds/grpc/xds_listener.h +10 -2
  404. data/src/core/xds/grpc/xds_listener_parser.cc +23 -18
  405. data/src/core/xds/grpc/xds_matcher.cc +40 -5
  406. data/src/core/xds/grpc/xds_matcher.h +13 -0
  407. data/src/core/xds/grpc/xds_matcher_action.h +1 -1
  408. data/src/core/xds/grpc/xds_matcher_parse.cc +60 -40
  409. data/src/core/xds/grpc/xds_matcher_parse.h +2 -1
  410. data/src/core/xds/grpc/xds_route_config.cc +12 -1
  411. data/src/core/xds/grpc/xds_route_config.h +15 -2
  412. data/src/core/xds/grpc/xds_route_config_parser.cc +11 -5
  413. data/src/core/xds/grpc/xds_routing.cc +181 -6
  414. data/src/core/xds/grpc/xds_routing.h +57 -0
  415. data/src/core/xds/grpc/xds_server_grpc.cc +55 -43
  416. data/src/core/xds/grpc/xds_server_grpc.h +13 -6
  417. data/src/core/xds/grpc/xds_server_grpc_interface.h +3 -2
  418. data/src/core/xds/grpc/xds_transport_grpc.cc +12 -6
  419. data/src/core/xds/grpc/xds_transport_grpc.h +5 -1
  420. data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +12 -8
  421. data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +18 -12
  422. data/src/ruby/lib/grpc/version.rb +1 -1
  423. data/src/ruby/pb/generate_proto_ruby.sh +1 -1
  424. metadata +42 -6
  425. data/src/core/ext/transport/chttp2/transport/security_frame.cc +0 -31
  426. data/src/core/handshaker/security/legacy_secure_endpoint.cc +0 -597
@@ -190,9 +190,177 @@ std::optional<absl::string_view> XdsRouting::GetHeaderValue(
190
190
  return initial_metadata->GetStringValue(header_name, concatenated_value);
191
191
  }
192
192
 
193
+ XdsRouting::PerRouteFilterChainBuilder::PerRouteFilterChainBuilder(
194
+ const std::vector<XdsListenerResource::HttpConnectionManager::HttpFilter>&
195
+ hcm_filter_configs,
196
+ const XdsHttpFilterRegistry& http_filter_registry,
197
+ const XdsRouteConfigResource::VirtualHost& vhost,
198
+ FilterChainBuilder& builder,
199
+ absl::AnyInvocable<void(FilterChainBuilder&)> add_last_filter,
200
+ const Blackboard* old_blackboard, Blackboard* new_blackboard)
201
+ : hcm_filter_configs_(hcm_filter_configs),
202
+ vhost_(vhost),
203
+ builder_(builder),
204
+ add_last_filter_(std::move(add_last_filter)),
205
+ old_blackboard_(old_blackboard),
206
+ new_blackboard_(new_blackboard) {
207
+ filter_impls_.reserve(hcm_filter_configs.size());
208
+ for (const auto& http_filter : hcm_filter_configs) {
209
+ // Find filter. This is guaranteed to succeed, because it's checked
210
+ // at config validation time.
211
+ const XdsHttpFilterImpl* filter_impl =
212
+ http_filter_registry.GetFilterForTopLevelType(
213
+ http_filter.config_proto_type);
214
+ GRPC_CHECK_NE(filter_impl, nullptr);
215
+ // Add filter to list.
216
+ filter_impls_.push_back(filter_impl);
217
+ }
218
+ }
219
+
220
+ namespace {
221
+
222
+ RefCountedPtr<const FilterConfig> GetOverrideConfig(
223
+ const XdsHttpFilterImpl* filter_impl,
224
+ const XdsRouteConfigResource::TypedPerFilterConfig& typed_per_filter_config,
225
+ const std::string& name) {
226
+ auto it = typed_per_filter_config.find(name);
227
+ if (it == typed_per_filter_config.end()) return nullptr;
228
+ if (it->second.config_proto_type != filter_impl->OverrideConfigProtoName()) {
229
+ return nullptr;
230
+ }
231
+ return it->second.filter_config;
232
+ }
233
+
234
+ } // namespace
235
+
236
+ absl::StatusOr<RefCountedPtr<const FilterChain>>
237
+ XdsRouting::PerRouteFilterChainBuilder::GetDefaultFilterChain() {
238
+ if (default_filter_chain_.ok() && *default_filter_chain_ == nullptr) {
239
+ GRPC_TRACE_LOG(xds_resolver, INFO) << "Building default filter chain:";
240
+ for (size_t i = 0; i < filter_impls_.size(); ++i) {
241
+ auto* filter_impl = filter_impls_[i];
242
+ const auto& filter_config = hcm_filter_configs_[i];
243
+ RefCountedPtr<const FilterConfig> config;
244
+ if (filter_config.filter_config != nullptr) {
245
+ auto vhost_override_config = GetOverrideConfig(
246
+ filter_impl, vhost_.typed_per_filter_config, filter_config.name);
247
+ config = filter_impl->MergeConfigs(filter_config.filter_config,
248
+ std::move(vhost_override_config),
249
+ nullptr, nullptr);
250
+ filter_impl->UpdateBlackboard(*config, old_blackboard_,
251
+ new_blackboard_);
252
+ }
253
+ GRPC_TRACE_LOG(xds_resolver, INFO)
254
+ << " Adding filter=" << filter_config.name
255
+ << " config=" << (config == nullptr ? "<null>" : config->ToString());
256
+ filter_impl->AddFilter(builder_, std::move(config));
257
+ }
258
+ if (add_last_filter_ != nullptr) add_last_filter_(builder_);
259
+ default_filter_chain_ = builder_.Build();
260
+ GRPC_TRACE_LOG(xds_resolver, INFO)
261
+ << "Filter chain creation status: " << default_filter_chain_.status();
262
+ }
263
+ return default_filter_chain_;
264
+ }
265
+
266
+ absl::StatusOr<RefCountedPtr<const FilterChain>>
267
+ XdsRouting::PerRouteFilterChainBuilder::BuildFilterChainForRoute(
268
+ const XdsRouteConfigResource::Route& route) {
269
+ GRPC_TRACE_LOG(xds_resolver, INFO)
270
+ << "Building filter chain for route:" << route.ToString();
271
+ // If there are no per-route overrides, use the default filter chain.
272
+ if (route.typed_per_filter_config.empty()) return GetDefaultFilterChain();
273
+ // Otherwise, build a new filter chain for the route.
274
+ for (size_t i = 0; i < filter_impls_.size(); ++i) {
275
+ auto* filter_impl = filter_impls_[i];
276
+ const auto& filter_config = hcm_filter_configs_[i];
277
+ RefCountedPtr<const FilterConfig> config;
278
+ if (filter_config.filter_config != nullptr) {
279
+ auto vhost_override_config = GetOverrideConfig(
280
+ filter_impl, vhost_.typed_per_filter_config, filter_config.name);
281
+ auto route_override_config = GetOverrideConfig(
282
+ filter_impl, route.typed_per_filter_config, filter_config.name);
283
+ config = filter_impl->MergeConfigs(
284
+ filter_config.filter_config, std::move(vhost_override_config),
285
+ std::move(route_override_config), nullptr);
286
+ filter_impl->UpdateBlackboard(*config, old_blackboard_, new_blackboard_);
287
+ }
288
+ GRPC_TRACE_LOG(xds_resolver, INFO)
289
+ << " Adding filter=" << filter_config.name
290
+ << " config=" << (config == nullptr ? "<null>" : config->ToString());
291
+ filter_impl->AddFilter(builder_, std::move(config));
292
+ }
293
+ if (add_last_filter_ != nullptr) add_last_filter_(builder_);
294
+ absl::StatusOr<RefCountedPtr<const FilterChain>> route_filter_chain =
295
+ builder_.Build();
296
+ GRPC_TRACE_LOG(xds_resolver, INFO)
297
+ << "Filter chain creation status: " << route_filter_chain.status();
298
+ return route_filter_chain;
299
+ }
300
+
301
+ void XdsRouting::PerRouteFilterChainBuilder::
302
+ BuildFilterChainForRouteWithWeightedClusters(
303
+ const XdsRouteConfigResource::Route& route,
304
+ absl::FunctionRef<
305
+ void(size_t, absl::StatusOr<RefCountedPtr<const FilterChain>>)>
306
+ set_filter_chain_for_cluster_weight) {
307
+ // If any cluster weight does not have any filter config overrides,
308
+ // we'll reuse the route-level filter chain. We construct it lazily
309
+ // and cache it so that we never construct it more than we need to.
310
+ absl::StatusOr<RefCountedPtr<const FilterChain>> route_filter_chain = nullptr;
311
+ const auto& route_action =
312
+ std::get<XdsRouteConfigResource::Route::RouteAction>(route.action);
313
+ const auto& cluster_weights = std::get<
314
+ std::vector<XdsRouteConfigResource::Route::RouteAction::ClusterWeight>>(
315
+ route_action.action);
316
+ for (size_t j = 0; j < cluster_weights.size(); ++j) {
317
+ const auto& cluster_weight = cluster_weights[j];
318
+ if (cluster_weight.typed_per_filter_config.empty()) {
319
+ // No per-ClusterWeight overrides, so use the route-level filter chain.
320
+ if (route_filter_chain.ok() && *route_filter_chain == nullptr) {
321
+ route_filter_chain = BuildFilterChainForRoute(route);
322
+ }
323
+ set_filter_chain_for_cluster_weight(j, route_filter_chain);
324
+ } else {
325
+ GRPC_TRACE_LOG(xds_resolver, INFO)
326
+ << "Building filter chain for route:" << route.ToString()
327
+ << " ClusterWeight:" << cluster_weight.ToString();
328
+ for (size_t i = 0; i < filter_impls_.size(); ++i) {
329
+ auto* filter_impl = filter_impls_[i];
330
+ const auto& filter_config = hcm_filter_configs_[i];
331
+ RefCountedPtr<const FilterConfig> config;
332
+ if (filter_config.filter_config != nullptr) {
333
+ auto vhost_override_config = GetOverrideConfig(
334
+ filter_impl, vhost_.typed_per_filter_config, filter_config.name);
335
+ auto route_override_config = GetOverrideConfig(
336
+ filter_impl, route.typed_per_filter_config, filter_config.name);
337
+ auto cluster_weight_override_config = GetOverrideConfig(
338
+ filter_impl, cluster_weight.typed_per_filter_config,
339
+ filter_config.name);
340
+ config = filter_impl->MergeConfigs(
341
+ filter_config.filter_config, std::move(vhost_override_config),
342
+ std::move(route_override_config),
343
+ std::move(cluster_weight_override_config));
344
+ filter_impl->UpdateBlackboard(*config, old_blackboard_,
345
+ new_blackboard_);
346
+ }
347
+ GRPC_TRACE_LOG(xds_resolver, INFO)
348
+ << " Adding filter=" << filter_config.name << " config="
349
+ << (config == nullptr ? "<null>" : config->ToString());
350
+ filter_impl->AddFilter(builder_, std::move(config));
351
+ }
352
+ if (add_last_filter_ != nullptr) add_last_filter_(builder_);
353
+ auto filter_chain = builder_.Build();
354
+ GRPC_TRACE_LOG(xds_resolver, INFO)
355
+ << "Filter chain creation status: " << filter_chain.status();
356
+ set_filter_chain_for_cluster_weight(j, std::move(filter_chain));
357
+ }
358
+ }
359
+ }
360
+
193
361
  namespace {
194
362
 
195
- const XdsHttpFilterImpl::FilterConfig* FindFilterConfigOverride(
363
+ const XdsRouteConfigResource::FilterConfigOverride* FindFilterConfigOverride(
196
364
  const std::string& instance_name,
197
365
  const XdsRouteConfigResource::VirtualHost& vhost,
198
366
  const XdsRouteConfigResource::Route& route,
@@ -229,8 +397,8 @@ GeneratePerHTTPFilterConfigs(
229
397
  // Find filter. This is guaranteed to succeed, because it's checked
230
398
  // at config validation time in the listener parsing code.
231
399
  const XdsHttpFilterImpl* filter_impl =
232
- http_filter_registry.GetFilterForType(
233
- http_filter.config.config_proto_type_name);
400
+ http_filter_registry.GetFilterForTopLevelType(
401
+ http_filter.config_proto_type);
234
402
  GRPC_CHECK_NE(filter_impl, nullptr);
235
403
  // If there is not actually any C-core filter associated with this
236
404
  // xDS filter, then it won't need any config, so skip it.
@@ -270,9 +438,16 @@ XdsRouting::GeneratePerHTTPFilterConfigsForMethodConfig(
270
438
  [&](const XdsHttpFilterImpl& filter_impl,
271
439
  const XdsListenerResource::HttpConnectionManager::HttpFilter&
272
440
  http_filter) {
273
- const XdsHttpFilterImpl::FilterConfig* config_override =
274
- FindFilterConfigOverride(http_filter.name, vhost, route,
275
- cluster_weight);
441
+ // Find override config, if any.
442
+ const XdsRouteConfigResource::FilterConfigOverride*
443
+ filter_config_override = FindFilterConfigOverride(
444
+ http_filter.name, vhost, route, cluster_weight);
445
+ const Json* config_override = nullptr;
446
+ if (filter_config_override != nullptr &&
447
+ filter_config_override->config_proto_type ==
448
+ filter_impl.OverrideConfigProtoName()) {
449
+ config_override = &filter_config_override->config;
450
+ }
276
451
  // Generate service config for filter.
277
452
  return filter_impl.GenerateMethodConfig(http_filter.config,
278
453
  config_override);
@@ -80,6 +80,63 @@ class XdsRouting final {
80
80
  grpc_metadata_batch* initial_metadata, absl::string_view header_name,
81
81
  std::string* concatenated_value);
82
82
 
83
+ // Logic for building a filter chain for a given route. Caching is
84
+ // done to avoid unnecessary work while iterating over the list of
85
+ // routes in a given VirtualHost.
86
+ //
87
+ // TODO(roth): Currently, this class uses the xds_resolver tracer for
88
+ // logging. When we change the server side to use the new filter
89
+ // config structure, add a new tracer and use that instead, so that it
90
+ // can be used on both the client and server side.
91
+ class PerRouteFilterChainBuilder {
92
+ public:
93
+ // The add_last_filter() callback is called on the builder after
94
+ // adding all of the xDS HTTP filters and right before building the
95
+ // filter chain. May be null if not needed.
96
+ PerRouteFilterChainBuilder(
97
+ const std::vector<
98
+ XdsListenerResource::HttpConnectionManager::HttpFilter>&
99
+ hcm_filter_configs,
100
+ const XdsHttpFilterRegistry& http_filter_registry,
101
+ const XdsRouteConfigResource::VirtualHost& vhost,
102
+ FilterChainBuilder& builder,
103
+ absl::AnyInvocable<void(FilterChainBuilder&)> add_last_filter,
104
+ const Blackboard* old_blackboard, Blackboard* new_blackboard);
105
+
106
+ // Builds a filter chain for a route that has an individual cluster
107
+ // or a ClusterSpecifierPlugin.
108
+ absl::StatusOr<RefCountedPtr<const FilterChain>> BuildFilterChainForRoute(
109
+ const XdsRouteConfigResource::Route& route);
110
+
111
+ // Builds a filter chain for a route that uses WeightedClusters.
112
+ // The set_filter_chain_for_cluster_weight() function will be called
113
+ // once for each index in the WeightedClusters list.
114
+ void BuildFilterChainForRouteWithWeightedClusters(
115
+ const XdsRouteConfigResource::Route& route,
116
+ absl::FunctionRef<
117
+ void(size_t, absl::StatusOr<RefCountedPtr<const FilterChain>>)>
118
+ set_filter_chain_for_cluster_weight);
119
+
120
+ private:
121
+ absl::StatusOr<RefCountedPtr<const FilterChain>> GetDefaultFilterChain();
122
+
123
+ const std::vector<XdsListenerResource::HttpConnectionManager::HttpFilter>&
124
+ hcm_filter_configs_;
125
+ const XdsRouteConfigResource::VirtualHost& vhost_;
126
+ FilterChainBuilder& builder_;
127
+ absl::AnyInvocable<void(FilterChainBuilder&)> add_last_filter_;
128
+ const Blackboard* old_blackboard_;
129
+ Blackboard* new_blackboard_;
130
+
131
+ // Same size as hcm_filter_configs_.
132
+ std::vector<const XdsHttpFilterImpl*> filter_impls_;
133
+
134
+ // Cached default filter chain, to be used for any route that does
135
+ // not have any filter config overrides.
136
+ absl::StatusOr<RefCountedPtr<const FilterChain>> default_filter_chain_ =
137
+ nullptr;
138
+ };
139
+
83
140
  struct GeneratePerHttpFilterConfigsResult {
84
141
  // Map of service config field name to list of elements for that field.
85
142
  std::map<std::string, std::vector<std::string>> per_filter_configs;
@@ -109,56 +109,68 @@ bool XdsBootstrapCallCredsEnabled() {
109
109
 
110
110
  } // namespace
111
111
 
112
- void GrpcXdsServer::JsonPostLoad(const Json& json, const JsonArgs& args,
113
- ValidationErrors* errors) {
114
- // Parse "channel_creds".
115
- RefCountedPtr<ChannelCredsConfig> channel_creds_config;
116
- {
117
- auto channel_creds_list =
118
- LoadJsonObjectField<std::vector<ChannelOrCallCreds>>(
119
- json.object(), args, "channel_creds", errors);
120
- if (channel_creds_list.has_value()) {
121
- ValidationErrors::ScopedField field(errors, ".channel_creds");
122
- for (size_t i = 0; i < channel_creds_list->size(); ++i) {
123
- ValidationErrors::ScopedField field(errors, absl::StrCat("[", i, "]"));
124
- auto& creds = (*channel_creds_list)[i];
125
- // Select the first channel creds type that we support, but
126
- // validate all entries.
127
- if (CoreConfiguration::Get().channel_creds_registry().IsSupported(
128
- creds.type)) {
129
- ValidationErrors::ScopedField field(errors, ".config");
130
- auto config =
131
- CoreConfiguration::Get().channel_creds_registry().ParseConfig(
132
- creds.type, Json::FromObject(creds.config), args, errors);
133
- if (channel_creds_config == nullptr) {
134
- channel_creds_config = std::move(config);
135
- }
112
+ RefCountedPtr<const ChannelCredsConfig> ParseXdsBootstrapChannelCreds(
113
+ const Json& json, const JsonArgs& args, ValidationErrors* errors) {
114
+ RefCountedPtr<const ChannelCredsConfig> channel_creds_config;
115
+ auto channel_creds_list =
116
+ LoadJsonObjectField<std::vector<ChannelOrCallCreds>>(
117
+ json.object(), args, "channel_creds", errors);
118
+ if (channel_creds_list.has_value()) {
119
+ ValidationErrors::ScopedField field(errors, ".channel_creds");
120
+ for (size_t i = 0; i < channel_creds_list->size(); ++i) {
121
+ ValidationErrors::ScopedField field(errors, absl::StrCat("[", i, "]"));
122
+ auto& creds = (*channel_creds_list)[i];
123
+ // Select the first channel creds type that we support, but
124
+ // validate all entries.
125
+ if (CoreConfiguration::Get().channel_creds_registry().IsSupported(
126
+ creds.type)) {
127
+ ValidationErrors::ScopedField field(errors, ".config");
128
+ auto config =
129
+ CoreConfiguration::Get().channel_creds_registry().ParseConfig(
130
+ creds.type, Json::FromObject(creds.config), args, errors);
131
+ if (channel_creds_config == nullptr) {
132
+ channel_creds_config = std::move(config);
136
133
  }
137
134
  }
138
- if (channel_creds_config == nullptr) {
139
- errors->AddError("no known creds type found");
135
+ }
136
+ if (channel_creds_config == nullptr) {
137
+ errors->AddError("no known creds type found");
138
+ }
139
+ }
140
+ return channel_creds_config;
141
+ }
142
+
143
+ std::vector<RefCountedPtr<const CallCredsConfig>> ParseXdsBootstrapCallCreds(
144
+ const Json& json, const JsonArgs& args, ValidationErrors* errors) {
145
+ std::vector<RefCountedPtr<const CallCredsConfig>> call_creds_configs;
146
+ auto call_creds_list = LoadJsonObjectField<std::vector<ChannelOrCallCreds>>(
147
+ json.object(), args, "call_creds", errors, /*required=*/false);
148
+ if (call_creds_list.has_value()) {
149
+ ValidationErrors::ScopedField field(errors, ".call_creds");
150
+ for (size_t i = 0; i < call_creds_list->size(); ++i) {
151
+ ValidationErrors::ScopedField field(errors, absl::StrCat("[", i, "]"));
152
+ auto& creds = (*call_creds_list)[i];
153
+ if (CoreConfiguration::Get().call_creds_registry().IsSupported(
154
+ creds.type)) {
155
+ ValidationErrors::ScopedField field(errors, ".config");
156
+ call_creds_configs.push_back(
157
+ CoreConfiguration::Get().call_creds_registry().ParseConfig(
158
+ creds.type, Json::FromObject(creds.config), args, errors));
140
159
  }
141
160
  }
142
161
  }
162
+ return call_creds_configs;
163
+ }
164
+
165
+ void GrpcXdsServer::JsonPostLoad(const Json& json, const JsonArgs& args,
166
+ ValidationErrors* errors) {
167
+ // Parse "channel_creds".
168
+ RefCountedPtr<const ChannelCredsConfig> channel_creds_config =
169
+ ParseXdsBootstrapChannelCreds(json, args, errors);
143
170
  // Parse "call_creds".
144
- std::vector<RefCountedPtr<CallCredsConfig>> call_creds_configs;
171
+ std::vector<RefCountedPtr<const CallCredsConfig>> call_creds_configs;
145
172
  if (XdsBootstrapCallCredsEnabled()) {
146
- auto call_creds_list = LoadJsonObjectField<std::vector<ChannelOrCallCreds>>(
147
- json.object(), args, "call_creds", errors);
148
- if (call_creds_list.has_value()) {
149
- ValidationErrors::ScopedField field(errors, ".call_creds");
150
- for (size_t i = 0; i < call_creds_list->size(); ++i) {
151
- ValidationErrors::ScopedField field(errors, absl::StrCat("[", i, "]"));
152
- auto& creds = (*call_creds_list)[i];
153
- if (CoreConfiguration::Get().call_creds_registry().IsSupported(
154
- creds.type)) {
155
- ValidationErrors::ScopedField field(errors, ".config");
156
- call_creds_configs.push_back(
157
- CoreConfiguration::Get().call_creds_registry().ParseConfig(
158
- creds.type, Json::FromObject(creds.config), args, errors));
159
- }
160
- }
161
- }
173
+ call_creds_configs = ParseXdsBootstrapCallCreds(json, args, errors);
162
174
  }
163
175
  // Parse "server_features".
164
176
  {
@@ -32,12 +32,18 @@
32
32
 
33
33
  namespace grpc_core {
34
34
 
35
+ RefCountedPtr<const ChannelCredsConfig> ParseXdsBootstrapChannelCreds(
36
+ const Json& json, const JsonArgs& args, ValidationErrors* errors);
37
+
38
+ std::vector<RefCountedPtr<const CallCredsConfig>> ParseXdsBootstrapCallCreds(
39
+ const Json& json, const JsonArgs& args, ValidationErrors* errors);
40
+
35
41
  class GrpcXdsServerTarget final : public GrpcXdsServerInterface {
36
42
  public:
37
43
  explicit GrpcXdsServerTarget(
38
44
  std::string server_uri,
39
- RefCountedPtr<ChannelCredsConfig> channel_creds_config,
40
- std::vector<RefCountedPtr<CallCredsConfig>> call_creds_configs)
45
+ RefCountedPtr<const ChannelCredsConfig> channel_creds_config,
46
+ std::vector<RefCountedPtr<const CallCredsConfig>> call_creds_configs)
41
47
  : server_uri_(std::move(server_uri)),
42
48
  channel_creds_config_(std::move(channel_creds_config)),
43
49
  call_creds_configs_(std::move(call_creds_configs)) {}
@@ -45,18 +51,19 @@ class GrpcXdsServerTarget final : public GrpcXdsServerInterface {
45
51
  bool Equals(const XdsServerTarget& other) const override;
46
52
  std::string Key() const override;
47
53
  const std::string& server_uri() const override { return server_uri_; }
48
- RefCountedPtr<ChannelCredsConfig> channel_creds_config() const override {
54
+ RefCountedPtr<const ChannelCredsConfig> channel_creds_config()
55
+ const override {
49
56
  return channel_creds_config_;
50
57
  }
51
- const std::vector<RefCountedPtr<CallCredsConfig>>& call_creds_configs()
58
+ const std::vector<RefCountedPtr<const CallCredsConfig>>& call_creds_configs()
52
59
  const override {
53
60
  return call_creds_configs_;
54
61
  }
55
62
 
56
63
  private:
57
64
  std::string server_uri_;
58
- RefCountedPtr<ChannelCredsConfig> channel_creds_config_;
59
- std::vector<RefCountedPtr<CallCredsConfig>> call_creds_configs_;
65
+ RefCountedPtr<const ChannelCredsConfig> channel_creds_config_;
66
+ std::vector<RefCountedPtr<const CallCredsConfig>> call_creds_configs_;
60
67
  };
61
68
 
62
69
  class GrpcXdsServer final : public XdsBootstrap::XdsServer {
@@ -26,9 +26,10 @@ namespace grpc_core {
26
26
 
27
27
  class GrpcXdsServerInterface : public XdsBootstrap::XdsServerTarget {
28
28
  public:
29
- virtual RefCountedPtr<ChannelCredsConfig> channel_creds_config() const = 0;
29
+ virtual RefCountedPtr<const ChannelCredsConfig> channel_creds_config()
30
+ const = 0;
30
31
 
31
- virtual const std::vector<RefCountedPtr<CallCredsConfig>>&
32
+ virtual const std::vector<RefCountedPtr<const CallCredsConfig>>&
32
33
  call_creds_configs() const = 0;
33
34
  };
34
35
 
@@ -252,11 +252,13 @@ class GrpcXdsTransportFactory::GrpcXdsTransport::StateWatcher final
252
252
 
253
253
  namespace {
254
254
 
255
- RefCountedPtr<Channel> CreateXdsChannel(const ChannelArgs& args,
256
- const GrpcXdsServerInterface& server) {
255
+ RefCountedPtr<Channel> CreateXdsChannel(
256
+ const ChannelArgs& args,
257
+ CertificateProviderStoreInterface& certificate_provider_store,
258
+ const GrpcXdsServerInterface& server) {
257
259
  RefCountedPtr<grpc_channel_credentials> channel_creds =
258
260
  CoreConfiguration::Get().channel_creds_registry().CreateChannelCreds(
259
- server.channel_creds_config());
261
+ server.channel_creds_config(), certificate_provider_store);
260
262
  RefCountedPtr<grpc_call_credentials> call_creds;
261
263
  for (const auto& call_creds_config : server.call_creds_configs()) {
262
264
  RefCountedPtr<grpc_call_credentials> creds =
@@ -289,8 +291,9 @@ GrpcXdsTransportFactory::GrpcXdsTransport::GrpcXdsTransport(
289
291
  key_(server.Key()) {
290
292
  GRPC_TRACE_LOG(xds_client, INFO)
291
293
  << "[GrpcXdsTransport " << this << "] created";
292
- channel_ = CreateXdsChannel(factory_->args_,
293
- DownCast<const GrpcXdsServerInterface&>(server));
294
+ channel_ =
295
+ CreateXdsChannel(factory_->args_, *factory_->certificate_provider_store_,
296
+ DownCast<const GrpcXdsServerInterface&>(server));
294
297
  GRPC_CHECK(channel_ != nullptr);
295
298
  if (channel_->IsLame()) {
296
299
  *status = absl::UnavailableError("xds client has a lame channel");
@@ -374,8 +377,11 @@ ChannelArgs ModifyChannelArgs(const ChannelArgs& args) {
374
377
 
375
378
  } // namespace
376
379
 
377
- GrpcXdsTransportFactory::GrpcXdsTransportFactory(const ChannelArgs& args)
380
+ GrpcXdsTransportFactory::GrpcXdsTransportFactory(
381
+ const ChannelArgs& args,
382
+ RefCountedPtr<CertificateProviderStoreInterface> certificate_provider_store)
378
383
  : args_(ModifyChannelArgs(args)),
384
+ certificate_provider_store_(std::move(certificate_provider_store)),
379
385
  interested_parties_(grpc_pollset_set_create()) {
380
386
  // Calling grpc_init to ensure gRPC does not shut down until the XdsClient is
381
387
  // destroyed.
@@ -34,6 +34,7 @@
34
34
  #include "src/core/util/orphanable.h"
35
35
  #include "src/core/util/ref_counted_ptr.h"
36
36
  #include "src/core/util/sync.h"
37
+ #include "src/core/xds/grpc/certificate_provider_store_interface.h"
37
38
  #include "src/core/xds/xds_client/xds_bootstrap.h"
38
39
  #include "src/core/xds/xds_client/xds_transport.h"
39
40
  #include "absl/container/flat_hash_map.h"
@@ -45,7 +46,9 @@ class GrpcXdsTransportFactory final : public XdsTransportFactory {
45
46
  public:
46
47
  class GrpcXdsTransport;
47
48
 
48
- explicit GrpcXdsTransportFactory(const ChannelArgs& args);
49
+ GrpcXdsTransportFactory(const ChannelArgs& args,
50
+ RefCountedPtr<CertificateProviderStoreInterface>
51
+ certificate_provider_store);
49
52
  ~GrpcXdsTransportFactory() override;
50
53
 
51
54
  void Orphaned() override {}
@@ -58,6 +61,7 @@ class GrpcXdsTransportFactory final : public XdsTransportFactory {
58
61
 
59
62
  private:
60
63
  ChannelArgs args_;
64
+ RefCountedPtr<CertificateProviderStoreInterface> certificate_provider_store_;
61
65
  grpc_pollset_set* interested_parties_;
62
66
 
63
67
  Mutex mu_;
@@ -76,18 +76,19 @@ grpc_alts_server_credentials_create_type grpc_alts_server_credentials_create_imp
76
76
  grpc_tls_identity_pairs_create_type grpc_tls_identity_pairs_create_import;
77
77
  grpc_tls_identity_pairs_add_pair_type grpc_tls_identity_pairs_add_pair_import;
78
78
  grpc_tls_identity_pairs_destroy_type grpc_tls_identity_pairs_destroy_import;
79
- grpc_tls_certificate_provider_static_data_create_type grpc_tls_certificate_provider_static_data_create_import;
80
79
  grpc_tls_certificate_provider_file_watcher_create_type grpc_tls_certificate_provider_file_watcher_create_import;
80
+ grpc_tls_certificate_provider_in_memory_create_type grpc_tls_certificate_provider_in_memory_create_import;
81
+ grpc_tls_certificate_provider_in_memory_set_root_certificate_type grpc_tls_certificate_provider_in_memory_set_root_certificate_import;
82
+ grpc_tls_certificate_provider_in_memory_set_identity_certificate_type grpc_tls_certificate_provider_in_memory_set_identity_certificate_import;
81
83
  grpc_tls_certificate_provider_release_type grpc_tls_certificate_provider_release_import;
82
84
  grpc_tls_credentials_options_create_type grpc_tls_credentials_options_create_import;
83
85
  grpc_tls_credentials_options_set_min_tls_version_type grpc_tls_credentials_options_set_min_tls_version_import;
84
86
  grpc_tls_credentials_options_set_max_tls_version_type grpc_tls_credentials_options_set_max_tls_version_import;
85
87
  grpc_tls_credentials_options_copy_type grpc_tls_credentials_options_copy_import;
86
88
  grpc_tls_credentials_options_destroy_type grpc_tls_credentials_options_destroy_import;
87
- grpc_tls_credentials_options_set_certificate_provider_type grpc_tls_credentials_options_set_certificate_provider_import;
88
- grpc_tls_credentials_options_watch_root_certs_type grpc_tls_credentials_options_watch_root_certs_import;
89
+ grpc_tls_credentials_options_set_identity_certificate_provider_type grpc_tls_credentials_options_set_identity_certificate_provider_import;
90
+ grpc_tls_credentials_options_set_root_certificate_provider_type grpc_tls_credentials_options_set_root_certificate_provider_import;
89
91
  grpc_tls_credentials_options_set_root_cert_name_type grpc_tls_credentials_options_set_root_cert_name_import;
90
- grpc_tls_credentials_options_watch_identity_key_cert_pairs_type grpc_tls_credentials_options_watch_identity_key_cert_pairs_import;
91
92
  grpc_tls_credentials_options_set_identity_cert_name_type grpc_tls_credentials_options_set_identity_cert_name_import;
92
93
  grpc_tls_credentials_options_set_cert_request_type_type grpc_tls_credentials_options_set_cert_request_type_import;
93
94
  grpc_tls_credentials_options_set_crl_directory_type grpc_tls_credentials_options_set_crl_directory_import;
@@ -175,6 +176,7 @@ grpc_resource_quota_ref_type grpc_resource_quota_ref_import;
175
176
  grpc_resource_quota_unref_type grpc_resource_quota_unref_import;
176
177
  grpc_resource_quota_resize_type grpc_resource_quota_resize_import;
177
178
  grpc_resource_quota_set_max_threads_type grpc_resource_quota_set_max_threads_import;
179
+ grpc_resource_quota_set_max_outstanding_streams_type grpc_resource_quota_set_max_outstanding_streams_import;
178
180
  grpc_dump_xds_configs_type grpc_dump_xds_configs_import;
179
181
  grpc_resource_quota_arg_vtable_type grpc_resource_quota_arg_vtable_import;
180
182
  grpc_channelz_get_top_channels_type grpc_channelz_get_top_channels_import;
@@ -362,18 +364,19 @@ void grpc_rb_load_imports(HMODULE library) {
362
364
  grpc_tls_identity_pairs_create_import = (grpc_tls_identity_pairs_create_type) GetProcAddress(library, "grpc_tls_identity_pairs_create");
363
365
  grpc_tls_identity_pairs_add_pair_import = (grpc_tls_identity_pairs_add_pair_type) GetProcAddress(library, "grpc_tls_identity_pairs_add_pair");
364
366
  grpc_tls_identity_pairs_destroy_import = (grpc_tls_identity_pairs_destroy_type) GetProcAddress(library, "grpc_tls_identity_pairs_destroy");
365
- grpc_tls_certificate_provider_static_data_create_import = (grpc_tls_certificate_provider_static_data_create_type) GetProcAddress(library, "grpc_tls_certificate_provider_static_data_create");
366
367
  grpc_tls_certificate_provider_file_watcher_create_import = (grpc_tls_certificate_provider_file_watcher_create_type) GetProcAddress(library, "grpc_tls_certificate_provider_file_watcher_create");
368
+ grpc_tls_certificate_provider_in_memory_create_import = (grpc_tls_certificate_provider_in_memory_create_type) GetProcAddress(library, "grpc_tls_certificate_provider_in_memory_create");
369
+ grpc_tls_certificate_provider_in_memory_set_root_certificate_import = (grpc_tls_certificate_provider_in_memory_set_root_certificate_type) GetProcAddress(library, "grpc_tls_certificate_provider_in_memory_set_root_certificate");
370
+ grpc_tls_certificate_provider_in_memory_set_identity_certificate_import = (grpc_tls_certificate_provider_in_memory_set_identity_certificate_type) GetProcAddress(library, "grpc_tls_certificate_provider_in_memory_set_identity_certificate");
367
371
  grpc_tls_certificate_provider_release_import = (grpc_tls_certificate_provider_release_type) GetProcAddress(library, "grpc_tls_certificate_provider_release");
368
372
  grpc_tls_credentials_options_create_import = (grpc_tls_credentials_options_create_type) GetProcAddress(library, "grpc_tls_credentials_options_create");
369
373
  grpc_tls_credentials_options_set_min_tls_version_import = (grpc_tls_credentials_options_set_min_tls_version_type) GetProcAddress(library, "grpc_tls_credentials_options_set_min_tls_version");
370
374
  grpc_tls_credentials_options_set_max_tls_version_import = (grpc_tls_credentials_options_set_max_tls_version_type) GetProcAddress(library, "grpc_tls_credentials_options_set_max_tls_version");
371
375
  grpc_tls_credentials_options_copy_import = (grpc_tls_credentials_options_copy_type) GetProcAddress(library, "grpc_tls_credentials_options_copy");
372
376
  grpc_tls_credentials_options_destroy_import = (grpc_tls_credentials_options_destroy_type) GetProcAddress(library, "grpc_tls_credentials_options_destroy");
373
- grpc_tls_credentials_options_set_certificate_provider_import = (grpc_tls_credentials_options_set_certificate_provider_type) GetProcAddress(library, "grpc_tls_credentials_options_set_certificate_provider");
374
- grpc_tls_credentials_options_watch_root_certs_import = (grpc_tls_credentials_options_watch_root_certs_type) GetProcAddress(library, "grpc_tls_credentials_options_watch_root_certs");
377
+ grpc_tls_credentials_options_set_identity_certificate_provider_import = (grpc_tls_credentials_options_set_identity_certificate_provider_type) GetProcAddress(library, "grpc_tls_credentials_options_set_identity_certificate_provider");
378
+ grpc_tls_credentials_options_set_root_certificate_provider_import = (grpc_tls_credentials_options_set_root_certificate_provider_type) GetProcAddress(library, "grpc_tls_credentials_options_set_root_certificate_provider");
375
379
  grpc_tls_credentials_options_set_root_cert_name_import = (grpc_tls_credentials_options_set_root_cert_name_type) GetProcAddress(library, "grpc_tls_credentials_options_set_root_cert_name");
376
- grpc_tls_credentials_options_watch_identity_key_cert_pairs_import = (grpc_tls_credentials_options_watch_identity_key_cert_pairs_type) GetProcAddress(library, "grpc_tls_credentials_options_watch_identity_key_cert_pairs");
377
380
  grpc_tls_credentials_options_set_identity_cert_name_import = (grpc_tls_credentials_options_set_identity_cert_name_type) GetProcAddress(library, "grpc_tls_credentials_options_set_identity_cert_name");
378
381
  grpc_tls_credentials_options_set_cert_request_type_import = (grpc_tls_credentials_options_set_cert_request_type_type) GetProcAddress(library, "grpc_tls_credentials_options_set_cert_request_type");
379
382
  grpc_tls_credentials_options_set_crl_directory_import = (grpc_tls_credentials_options_set_crl_directory_type) GetProcAddress(library, "grpc_tls_credentials_options_set_crl_directory");
@@ -461,6 +464,7 @@ void grpc_rb_load_imports(HMODULE library) {
461
464
  grpc_resource_quota_unref_import = (grpc_resource_quota_unref_type) GetProcAddress(library, "grpc_resource_quota_unref");
462
465
  grpc_resource_quota_resize_import = (grpc_resource_quota_resize_type) GetProcAddress(library, "grpc_resource_quota_resize");
463
466
  grpc_resource_quota_set_max_threads_import = (grpc_resource_quota_set_max_threads_type) GetProcAddress(library, "grpc_resource_quota_set_max_threads");
467
+ grpc_resource_quota_set_max_outstanding_streams_import = (grpc_resource_quota_set_max_outstanding_streams_type) GetProcAddress(library, "grpc_resource_quota_set_max_outstanding_streams");
464
468
  grpc_dump_xds_configs_import = (grpc_dump_xds_configs_type) GetProcAddress(library, "grpc_dump_xds_configs");
465
469
  grpc_resource_quota_arg_vtable_import = (grpc_resource_quota_arg_vtable_type) GetProcAddress(library, "grpc_resource_quota_arg_vtable");
466
470
  grpc_channelz_get_top_channels_import = (grpc_channelz_get_top_channels_type) GetProcAddress(library, "grpc_channelz_get_top_channels");
@@ -204,12 +204,18 @@ extern grpc_tls_identity_pairs_add_pair_type grpc_tls_identity_pairs_add_pair_im
204
204
  typedef void(*grpc_tls_identity_pairs_destroy_type)(grpc_tls_identity_pairs* pairs);
205
205
  extern grpc_tls_identity_pairs_destroy_type grpc_tls_identity_pairs_destroy_import;
206
206
  #define grpc_tls_identity_pairs_destroy grpc_tls_identity_pairs_destroy_import
207
- typedef grpc_tls_certificate_provider*(*grpc_tls_certificate_provider_static_data_create_type)(const char* root_certificate, grpc_tls_identity_pairs* pem_key_cert_pairs);
208
- extern grpc_tls_certificate_provider_static_data_create_type grpc_tls_certificate_provider_static_data_create_import;
209
- #define grpc_tls_certificate_provider_static_data_create grpc_tls_certificate_provider_static_data_create_import
210
207
  typedef grpc_tls_certificate_provider*(*grpc_tls_certificate_provider_file_watcher_create_type)(const char* private_key_path, const char* identity_certificate_path, const char* root_cert_path, const char* spiffe_bundle_map_path, unsigned int refresh_interval_sec);
211
208
  extern grpc_tls_certificate_provider_file_watcher_create_type grpc_tls_certificate_provider_file_watcher_create_import;
212
209
  #define grpc_tls_certificate_provider_file_watcher_create grpc_tls_certificate_provider_file_watcher_create_import
210
+ typedef grpc_tls_certificate_provider*(*grpc_tls_certificate_provider_in_memory_create_type)();
211
+ extern grpc_tls_certificate_provider_in_memory_create_type grpc_tls_certificate_provider_in_memory_create_import;
212
+ #define grpc_tls_certificate_provider_in_memory_create grpc_tls_certificate_provider_in_memory_create_import
213
+ typedef bool(*grpc_tls_certificate_provider_in_memory_set_root_certificate_type)(grpc_tls_certificate_provider* provider, const char* root_cert);
214
+ extern grpc_tls_certificate_provider_in_memory_set_root_certificate_type grpc_tls_certificate_provider_in_memory_set_root_certificate_import;
215
+ #define grpc_tls_certificate_provider_in_memory_set_root_certificate grpc_tls_certificate_provider_in_memory_set_root_certificate_import
216
+ typedef bool(*grpc_tls_certificate_provider_in_memory_set_identity_certificate_type)(grpc_tls_certificate_provider* provider, grpc_tls_identity_pairs* pem_key_cert_pairs);
217
+ extern grpc_tls_certificate_provider_in_memory_set_identity_certificate_type grpc_tls_certificate_provider_in_memory_set_identity_certificate_import;
218
+ #define grpc_tls_certificate_provider_in_memory_set_identity_certificate grpc_tls_certificate_provider_in_memory_set_identity_certificate_import
213
219
  typedef void(*grpc_tls_certificate_provider_release_type)(grpc_tls_certificate_provider* provider);
214
220
  extern grpc_tls_certificate_provider_release_type grpc_tls_certificate_provider_release_import;
215
221
  #define grpc_tls_certificate_provider_release grpc_tls_certificate_provider_release_import
@@ -228,18 +234,15 @@ extern grpc_tls_credentials_options_copy_type grpc_tls_credentials_options_copy_
228
234
  typedef void(*grpc_tls_credentials_options_destroy_type)(grpc_tls_credentials_options* options);
229
235
  extern grpc_tls_credentials_options_destroy_type grpc_tls_credentials_options_destroy_import;
230
236
  #define grpc_tls_credentials_options_destroy grpc_tls_credentials_options_destroy_import
231
- typedef void(*grpc_tls_credentials_options_set_certificate_provider_type)(grpc_tls_credentials_options* options, grpc_tls_certificate_provider* provider);
232
- extern grpc_tls_credentials_options_set_certificate_provider_type grpc_tls_credentials_options_set_certificate_provider_import;
233
- #define grpc_tls_credentials_options_set_certificate_provider grpc_tls_credentials_options_set_certificate_provider_import
234
- typedef void(*grpc_tls_credentials_options_watch_root_certs_type)(grpc_tls_credentials_options* options);
235
- extern grpc_tls_credentials_options_watch_root_certs_type grpc_tls_credentials_options_watch_root_certs_import;
236
- #define grpc_tls_credentials_options_watch_root_certs grpc_tls_credentials_options_watch_root_certs_import
237
+ typedef void(*grpc_tls_credentials_options_set_identity_certificate_provider_type)(grpc_tls_credentials_options* options, grpc_tls_certificate_provider* provider);
238
+ extern grpc_tls_credentials_options_set_identity_certificate_provider_type grpc_tls_credentials_options_set_identity_certificate_provider_import;
239
+ #define grpc_tls_credentials_options_set_identity_certificate_provider grpc_tls_credentials_options_set_identity_certificate_provider_import
240
+ typedef void(*grpc_tls_credentials_options_set_root_certificate_provider_type)(grpc_tls_credentials_options* options, grpc_tls_certificate_provider* provider);
241
+ extern grpc_tls_credentials_options_set_root_certificate_provider_type grpc_tls_credentials_options_set_root_certificate_provider_import;
242
+ #define grpc_tls_credentials_options_set_root_certificate_provider grpc_tls_credentials_options_set_root_certificate_provider_import
237
243
  typedef void(*grpc_tls_credentials_options_set_root_cert_name_type)(grpc_tls_credentials_options* options, const char* root_cert_name);
238
244
  extern grpc_tls_credentials_options_set_root_cert_name_type grpc_tls_credentials_options_set_root_cert_name_import;
239
245
  #define grpc_tls_credentials_options_set_root_cert_name grpc_tls_credentials_options_set_root_cert_name_import
240
- typedef void(*grpc_tls_credentials_options_watch_identity_key_cert_pairs_type)(grpc_tls_credentials_options* options);
241
- extern grpc_tls_credentials_options_watch_identity_key_cert_pairs_type grpc_tls_credentials_options_watch_identity_key_cert_pairs_import;
242
- #define grpc_tls_credentials_options_watch_identity_key_cert_pairs grpc_tls_credentials_options_watch_identity_key_cert_pairs_import
243
246
  typedef void(*grpc_tls_credentials_options_set_identity_cert_name_type)(grpc_tls_credentials_options* options, const char* identity_cert_name);
244
247
  extern grpc_tls_credentials_options_set_identity_cert_name_type grpc_tls_credentials_options_set_identity_cert_name_import;
245
248
  #define grpc_tls_credentials_options_set_identity_cert_name grpc_tls_credentials_options_set_identity_cert_name_import
@@ -501,6 +504,9 @@ extern grpc_resource_quota_resize_type grpc_resource_quota_resize_import;
501
504
  typedef void(*grpc_resource_quota_set_max_threads_type)(grpc_resource_quota* resource_quota, int new_max_threads);
502
505
  extern grpc_resource_quota_set_max_threads_type grpc_resource_quota_set_max_threads_import;
503
506
  #define grpc_resource_quota_set_max_threads grpc_resource_quota_set_max_threads_import
507
+ typedef void(*grpc_resource_quota_set_max_outstanding_streams_type)(grpc_resource_quota* resource_quota, int new_max_outstanding_streams);
508
+ extern grpc_resource_quota_set_max_outstanding_streams_type grpc_resource_quota_set_max_outstanding_streams_import;
509
+ #define grpc_resource_quota_set_max_outstanding_streams grpc_resource_quota_set_max_outstanding_streams_import
504
510
  typedef grpc_slice(*grpc_dump_xds_configs_type)(void);
505
511
  extern grpc_dump_xds_configs_type grpc_dump_xds_configs_import;
506
512
  #define grpc_dump_xds_configs grpc_dump_xds_configs_import