Commit Graph

6324 Commits

Author SHA1 Message Date
apolcyn 7af5efcfd3
Revert "[TLS - Revocation] Crl Provider (#33786)" (#34713)
This reverts commit 0f0396ae92.
2023-10-17 13:53:36 -07:00
Craig Tiller 975184f04b
[channel-stack] Make ordering explicit (#32852)
Ditch the old priority scheme for ordering filters, instead explicitly
mark up before/after constraints.

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-10-17 13:52:58 -07:00
Gregory Cooke 0f0396ae92
[TLS - Revocation] Crl Provider (#33786)
The basic APIs for the CRL Reloading features.
This adds external types to represent CRL Providers, CRLs, and
CertificateInfo.
Internally we will use `CrlImpl` - this layer is needed to hide OpenSSL
details from the user.

GRFC - https://github.com/grpc/proposal/pull/382

Things Done
* Add external API for `CrlProvider`, `Crl`, `CertInfo` (`CertInfo` is
used during CRL lookup rather than passing the entire certificate).
* Add code paths in `ssl_transport_security` to utilize CRL providers
* Add `StaticCrlProvider`
* Refactor `crl_ssl_transport_security_test.cc` so it is more extensible
and can be used with providers
2023-10-17 13:03:52 -04:00
Yash Tibrewal 5fd09c1aff
[CSM C++] Fix behavior when peer does not send metadata (#34692)
@stanley-cheung noticed a bug where CSM labels were not being added on
metrics if the peer was not also CSM Observability enabled.

This PR fixes the behavior to add in the local labels in this case, as
well as add the remote workload type label with the value of unknown.
2023-10-16 18:13:36 -07:00
nanahpang 601aaf80b7
Revert "[Security] Move ownership of tsi_ssl_client_handshaker_factory to grpc_ssl_credentials, version 2." (#34701)
Reverts grpc/grpc#34408
2023-10-16 18:18:44 +00:00
Craig Tiller c9df0ca470
[cpp] Reland removal of channel_filter code (#34598)
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-10-12 09:44:11 -07:00
Yash Tibrewal 7a97b35d9b
[CSM] Google Cloud C++ libraries now allow bazel layering checks (#34664)
With the latest cloud C++ release - 
1) The opentelemetry bazel target is no longer experimental.
2) layering checks now work with bazel
2023-10-11 17:14:59 -07:00
Yijie Ma bae0c705aa
[Deps] Update to Clang-16 (#34492)
<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
2023-10-11 16:26:32 -07:00
Mark D. Roth bb6a6faa69
[SSA] support multiple addresses per endpoint (#34472) 2023-10-06 15:23:33 -07:00
Eugene Ostroukhov 3ed72c0c60
[reflection] Add v1 reflection (#34599) 2023-10-06 11:40:31 -07:00
Craig Tiller 3b0916fc0a
Revert "[reflection] Add v1 reflection" (#34594)
Reverts grpc/grpc#34535
2023-10-04 19:06:58 -07:00
Matthew Stevenson 539e912ef8
[ssl] Do not crash if ssl session cache capacity is zero. (#34539)
This behavior is dangerous because we will crash when the cache is
created, which is not necessarily on application startup and is likely
when you first try to establish an SSL connection. Instead, we log an
error. If the SSL library attempts to put a session ticket in the cache
it will fail to do so, but everything else will continue as normal. In
particular, we will always seamlessly fall back to a full SSL handshake.

Along the way, we also ensure that you cannot put a null `SSL_SESSION`
into the cache, which would lead to a segfault when it is fetched from
the cache.
2023-10-04 12:45:09 -07:00
Eugene Ostroukhov 5817f0f6c1
[reflection] Add v1 reflection (#34535) 2023-10-04 11:09:59 -07:00
Mark D. Roth 7044af2691
[tests] fix flakes caused by dualstack changes (#34575)
Fix chttp2 too_many_pings test to use only one of IPv4 or IPv6,
depending on test environment.

Also fix dumb reversed conditional bug in some other tests that was
accidentally introduced in #34426.
2023-10-02 13:48:43 -07:00
Mark D. Roth 883ec58237
[client_lb_e2e_test] fix flake in RR HealthChecking test (#34572) 2023-10-02 13:08:32 -07:00
Mark D. Roth 24f995538c
[xDS] add support for multiple addresses per endpoint (#34506)
Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2023-09-29 09:46:45 -07:00
Craig Tiller 7b17e4aa92
Revert "[cpp] Remove legacy channel filter C++ wrapper" (#34541)
Reverts grpc/grpc#34522
2023-09-28 22:29:53 -07:00
Craig Tiller 727c92a15c
[cpp] Remove legacy channel filter C++ wrapper (#34522)
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-09-28 20:59:56 -07:00
Mark D. Roth 7a06614f95
[resolver and LB policy APIs] reland: change address list to support multiple addresses per endpoint (#34531)
Re-land #33567, which was reverted in #34527.

First commit is a pure revert, second commit is a small fix needed to
avoid breaking internal callers.
2023-09-28 15:40:05 -07:00
Mark D. Roth 41f26de3b6
Revert "[resolver and LB policy APIs] change address list to support multiple addresses per endpoint" (#34527)
Reverts grpc/grpc#33567 due to import problems.
2023-09-28 12:15:35 -07:00
Mark D. Roth fd2e8c9462
[resolver and LB policy APIs] change address list to support multiple addresses per endpoint (#33567)
More changes as part of the dualstack design:
- Change resolver and LB policy APIs to support multiple addresses per
endpoint. Specifically, replace `ServerAddress` with
`EndpointAddresses`, which encodes more than one address. Per-address
channel args are retained at the same level, so they are now
per-endpoint. For now, `EndpointAddress` provides a single-address ctor
and a single-address accessor for backward compatibility, so
`ServerAdress` is an alias for `EndpointAddresses`; eventually, this
alias and the single-address methods will be removed.
- Add an `EndpointAddressSet` class, which represents an unordered set
of addresses to be used as a map key. This will be used in a number of
LB policies that need to store per-endpoint state.
- Change the LB policy API's `ChannelControlHelper::CreateSubchannel()`
method to take the address and per-endpoint channel args as separate
parameters, so that we don't need to construct a legacy `ServerAddress`
object as we create a new subchannel for each address in the endpoint.
- Change pick_first to flatten the address list.
- Change ring_hash to use `EndpointAddressSet` as the key for its
endpoint map, and to use the first address of the endpoint as the hash
key.
- Change WRR to use `EndpointAddressSet` as the key for its endpoint
weight map.

Note that support for multiple addresses per endpoint is guarded in RR
by the existing `round_robin_delegate_to_pick_fist` experiment and in
WRR by the existing `wrr_delegate_to_pick_first` experiment.

This PR does *not* include support for multiple addresses per endpoint
for the outlier_detection or xds_override_host LB policies; those will
come in subsequent PRs.
2023-09-28 09:32:36 -07:00
Mark D. Roth 835775e347
[pick_first] implement Happy Eyeballs (#34426) 2023-09-27 11:10:53 -07:00
Craig Tiller 59d886cb5c
[fuzzing] Expose random number generator to some fuzzers (#34415)
Expand our fuzzing capabilities by allowing fuzzers to choose the bits
that go into random number distribution generators.

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-09-25 10:17:58 -07:00
Yash Tibrewal a0e3794f4b
[OTel C++] Method attribute filtering (#34350)
Implements method attribute filtering as defined by the gRFC
https://github.com/grpc/proposal/pull/380
2023-09-22 23:48:01 +00:00
Yash Tibrewal 06b55bdaa4
[RegisteredMethod] Set information on initial metadata about whether method is registered or not (#34432)
Summary - 
On the server-side, we are changing the point at which we decide whether
a method is registered or not from the surface to the transport at the
point where we are done receiving initial metadata and before we invoke
the recv_initial_metadata_ready closures from the filters. The main
motivation for this is to allow filters to check whether the incoming
method is a registered or not. The exact use-case is for observability
where we only want to record the method if it is registered. We store
the information about the registered method in the initial metadata.

On the client-side, we also set information about whether the method is
registered or not in the outgoing initial metadata.

Since we are effectively changing the lookup point of the registered
method, there are slight concerns of this being a potentially breaking
change, so we are guarding this with an experiment to be safe.

Changes - 
* Transport API changes -
* Along with `accept_stream_fn`, a new callback
`registered_method_matcher_cb` will be sent down as a transport op on
the server side. When initial metadata is received on the server side,
this callback is invoked. This happens before invoking the
`recv_initial_metadata_ready` closure.
* Metadata changes -
* We add a new non-serializable metadata trait `GrpcRegisteredMethod()`.
On the client-side, the value is a uintptr_t with a value of 1 if the
call has a registered/known method, or 0, if it's not known. On the
server side, the value is a (ChannelRegisteredMethod*). This metadata
information can be used throughout the stack to check whether a call is
registered or not.
* Server Changes -
* When a new transport connection is accepted, the server sets
`registered_method_matcher_cb` along with `accept_stream_fn`. This
function checks whether the method is registered or not and sets the
RegisteredMethod matcher in the metadata for use later.
* Client Changes -
* Set the metadata on call creation on whether the method is registered
or not.
2023-09-22 13:13:16 -07:00
Eugene Ostroukhov 2f78fffa37
[xds ssa] Remove environment variable protection for stateful affinity (#34435) 2023-09-22 13:06:51 -07:00
Craig Tiller 1dabdfbe6f
[per-cpu] Change up the cpu caching mechanism (#34421)
Lets us sever the dependency between stats & exec ctx (finally).

More work likely needs to go into the *mechanism* used here (I'm not a
fan of the per thread index), but that's also something we can address
later.
2023-09-22 11:23:11 -07:00
Yash Tibrewal 1091cc3211
[CSM] Update labels (#34412)
Changes - 
* Remove `csm.remote_workload_pod_name` and
`csm.remote_workload_container_name`.
* Add `csm.remote_workload_name`, the value for which is sent through
MetadataExchange, from the `CSM_WORKLOAD_NAME` env var. (Note that this
is not added in local labels.)
* Add a local `csm.canonical_service` (@markdroth, please verify the key
that we want here) that is read from `CSM_CANONICAL_SERVICE_NAME` env
var, and we continue to send it over via MetadataExchange
2023-09-21 16:02:03 -07:00
Gregory Cooke aa17285f8e
[Security] Move ownership of tsi_ssl_client_handshaker_factory to grpc_ssl_credentials, version 2. (#34408)
Revert the reversion of the SSL_CTX_new change (#34355 reverted #34180 )
with a fix.

There was an issue with using `strcpy` on a `new[] string` in the
constructor of `ssl_credentials`. An ASAN test caught this in some CI
down the line - `ERROR: AddressSanitizer: alloc-dealloc-mismatch
(operator new [] vs free)`

That `strcpy` call was changed to `grp_strdup` which duplicates a string
in a way that can be freed by `gpr_free` and should resolve the ASAN
failure.
2023-09-21 10:07:18 -07:00
Yash Tibrewal 112fffcdb4
[OTel] Minor test cleanup (#34353)
<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
2023-09-21 09:23:47 -07:00
Eugene Ostroukhov 98ac00d7d2
[interop test] Fix the test (#34424) 2023-09-20 11:53:08 -07:00
Eugene Ostroukhov 490f6a3ee9
[test interop] Add HookService to the maintenence server (#34413)
This pull request adds another hook service on the maintenance server.
This will enable clients to gradually migrate from the standalone hook
server.

Changes:
1. Hook service can now be used separately.
2. Copied latest protos and updated the hook service to new API.
3. Added the hook service to the maintenance server.
2023-09-19 18:06:31 -07:00
Stanley Cheung fc159a6901
[Observability Testing] register prometheus exporter (#34380)
Working towards testing against CSM Observability. Added ability to
register a prometheus exporter with our Opentelemetry plugin. This will
allow our metrics to be available at the standard prometheus port
`:9464`.
2023-09-19 16:54:58 -07:00
AJ Heller 3707b42bec
[reland][EventEngine] Move combiner executor usage to EventEngine (#34396)
Relands #31713
2023-09-19 14:41:17 -07:00
Mark D. Roth 0bffb766ff
[grpclb e2e test] increase RPC deadlines to fix flakes (#34403) 2023-09-19 11:29:34 -07:00
apolcyn 87eed73a47
[dns] unskip c-ares tests on arm (#34232)
Now that we have https://github.com/grpc/grpc/pull/33942 (and another
follow-up [fix](https://github.com/grpc/grpc/pull/34185)), I think the
issue from https://github.com/grpc/grpc/issues/25289 is likely fixed
2023-09-18 12:18:29 -07:00
Craig Tiller 0375a585e2
[work-serializer] Fix synchronous test assumption (#34392)
This test assumed synchronous work serializer execution (or at least
faster async than we always get)... make a trivial change to keep the
test semantics but allow for the implementation to be more async.
2023-09-18 09:27:49 -07:00
Yash Tibrewal d670ffa92c
[CSM] Create an experimental target (#34381) 2023-09-15 17:51:33 -07:00
Craig Tiller 86b931c354
[work-serializer] Dispatch on run experiment (relanding) (#34372)
Reverts grpc/grpc#34371
2023-09-15 12:46:04 -07:00
Craig Tiller d589caa679
Revert "[work-serializer] Dispatch on run experiment" (#34371)
Reverts grpc/grpc#34274

(needs some changes internally)
2023-09-15 09:10:31 -07:00
Craig Tiller 1705470950
[work-serializer] Dispatch on run experiment (#34274)
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
Co-authored-by: Mark D. Roth <roth@google.com>
2023-09-15 07:49:42 -07:00
Yash Tibrewal 037979c0d8
[CSM] Remaining cleanup from GSM to CSM renaming (#34352)
<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
2023-09-14 16:58:23 -07:00
nanahpang a4ac80c394
Revert "[Security] Move ownership of tsi_ssl_client_handshaker_factory to grpc_ssl_credentials." (#34355)
Reverts grpc/grpc#34180
2023-09-14 14:54:17 -07:00
Gregory Cooke 36dc5e7391
[Security] Move ownership of tsi_ssl_client_handshaker_factory to grpc_ssl_credentials. (#34180)
Move the SSL_CTX to the level of the credentials rather than the
subchannel.
The SSL_CTX should only get created once per credential rather than once
per subchannel.

We should observe no behavior change with this PR, only efficiency
gains.
2023-09-14 17:00:23 -04:00
Gregory Cooke 8d62fc2b0b
[Test] Add concurrent test for session reuse (#34293)
Add a test that runs concurrent requests using session caching.
2023-09-14 14:43:43 -04:00
Mark D. Roth 1986007e1e
[round_robin] 4th attempt: delegate to pick_first as per dualstack design (#34337)
Most recent attempt was #34320, reverted in #34335.

The first commit here is a pure revert. The second commit fixes the
outlier_detection unit test to pass both with and without the
experiment.
2023-09-14 08:55:51 -07:00
Eugene Ostroukhov 77f80f3de5
[ssa test] Test TTL attribute on cookie (#34326) 2023-09-13 14:09:44 -07:00
Mark D. Roth 6534f0a6bf
Revert "[round_robin] third attempt: delegate to pick_first as per dualstack design" (#34335)
Reverts grpc/grpc#34320
2023-09-13 11:14:54 -07:00
Eugene Ostroukhov 59bab7f27f
[ssa test] Add test for per-route SSA configuration (#34313) 2023-09-12 21:02:13 -07:00
Yash Tibrewal ee6ed6ab4f
[CSM] Add target selector for csm channels (#34311)
<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
2023-09-12 18:43:36 -07:00