Commit Graph

368 Commits

Author SHA1 Message Date
ZHANG Dapeng b8fe968c88
xds: not to use insecure DSA crypto
Although DSA is only used in tests so it's totally no security concern, it's annoying we need some workaround for internal checks to import. So removing the usage.
2020-08-21 11:19:08 -07:00
sanjaypujare f8bd84c755
xds: replace mock(ScheduledFuture) with a TestScheduledFuture implementation (#7346) 2020-08-20 21:19:17 -07:00
ZHANG Dapeng 39450766dd
xds: refactor XdsClientImplTest to use v3 proto only 2020-08-20 13:25:17 -07:00
ZHANG Dapeng 00fee4d141
xds: have LoadReportClient support LRS v3
As noted in the design doc "The LRS protocol has a transport version, just like the xDS protocol itself does. Initially, we will use the server feature in the bootstrap file to determine the version of the LRS transport protocol. This means that there will not be any way to use a different transport protocol for LRS than for xDS."
2020-08-20 10:45:41 -07:00
ZHANG Dapeng c67dcb3b08
xds: refactor LoadReportClient for supporting LRS v3 2020-08-19 20:01:29 -07:00
ZHANG Dapeng cb07b0fb45
xds: add data type for ClusterStats (#7335)
In preparation of LRS v3 support.
2020-08-18 12:30:05 -07:00
sanjaypujare ee9109eced
xds: add CertProviderServerSslContextProvider support (#7331) 2020-08-17 17:06:29 -07:00
sanjaypujare 39c49b0408
xds: add CertProviderSslContextProvider support (#7309) 2020-08-17 09:45:13 -07:00
ZHANG Dapeng 1c269e4289
xds: import LRS v3 proto 2020-08-14 08:49:29 -07:00
cindyxue cd0cc95553
xds: Added a CEL-based Authorization Engine (#7191)
* xds: add a CEL-based authorization engine that uses the mock CEL library
2020-08-13 16:08:35 -07:00
Chengyuan Zhang 7bcfb59ff4
xds: replace verifyNoMoreInteractions with verifyNoInteractions (#7320) 2020-08-12 09:51:50 -07:00
Chengyuan Zhang eb6110cefc
rls, xds: fix parameter comments that do not match the formal parameter name (#7319) 2020-08-12 09:50:54 -07:00
sanjaypujare 40b331e886
xds: increase the RPC timeout to 1-sec to avoid deadline exceeding locally at the client and request never reaching server (#7316) 2020-08-11 16:51:38 -07:00
Chengyuan Zhang f0a0e67e7b
xds: manage load stats for all clusters in XdsClient (#7299)
Move the creation of LoadStatsStore (aka, the stats object) into XdsClient. The XdsClient is responsible for managing the lifetime of stats objects. Creations of LoadStatsStores are reference counted so that multiple EDS policies can retrieve the same stats object for load recording. Counters for recording loads per locality also need to be reference counted, as each EDS policy for the same cluster will receive endpoints for the same group of localities, they will use the same load counters for recording each locality's loads.
2020-08-11 10:58:03 -07:00
sanjaypujare 77c3d21e39
xds: use a compile time constant to address an error (#7311) 2020-08-11 08:57:29 -07:00
sanjaypujare 93b1830838
xds: fix broken references to MeshCa proto objects (#7304) 2020-08-07 17:09:24 -07:00
sanjaypujare 65e7ffc788
xds: implement MeshCACertificateProvider (#7274) 2020-08-07 16:16:22 -07:00
sanjaypujare b749cb6210
xds: get the correct meshca.proto version that has the needed Java annotations (#7298) 2020-08-07 09:22:42 -07:00
Eric Anderson e92b2275f9 Update to Error Prone 2.4
Most of the changes should be semi-clear why they were made. However, BadImport
may not be as obvious: https://errorprone.info/bugpattern/BadImport . That
impacted classes named Type, Entry, and Factory. Also
PublicContructorForAbstractClass:
https://errorprone.info/bugpattern/PublicConstructorForAbstractClass

The JdkObsolete issue is already resolved but is not yet in a release.
2020-08-06 10:56:16 -05:00
Eric Anderson 80d62bfce2 Upgrade to Mockito 3.3.3
verifyZeroInteractions has the same behavior as verifyNoMoreInteractions. It
was deprecated in Mockito 3.0.1 and replaced with verifyNoInteractions, which
does not change behavior depending on previous verify() calls. All instances
were replaced with verifyNoInteractions, except those in
ApplicationThreadDeframerTest which were replaced with verifyNoMoreInteractions
since there is a verify() call in `@Before`.
2020-08-06 10:49:23 -05:00
sanjaypujare d4166f0a02
xds: shade the meshCA proto generated code (#7290) 2020-08-05 14:30:48 -07:00
sanjaypujare 34513d7ed8
xds: add support for cert-providers to bootstrap file (#7285) 2020-08-04 22:32:26 -07:00
sanjaypujare c116d6846b
xds: bring envoy and proto imports up to date for cert-provider-instance protos (#7280) 2020-08-03 09:49:57 -07:00
Chengyuan Zhang 9dc5eec4d7
xds: resolve conflicts by adding timeout field in parsed RouteAction for v2 tests (#7278) 2020-07-31 18:48:52 -07:00
ZHANG Dapeng 5bf68ff28c
xds: support v3 for XdsClient
Duplicated `XdsClientImptTest` for V3. `XdsClientImptTestV2` and all other tests are still using V2. Even for `XdsClientImptTest`, although the protocol is V3, the test xds server still sends V2 resources in its V3 response.
2020-07-31 14:14:10 -07:00
Chengyuan Zhang 14af76cab1
xds: parse timeout from RDS responses (#7257) 2020-07-31 12:12:00 -07:00
cindyxue 800ef216a8
xds: Added IncompleteData interface in mock CEL library (#7243)
* Added the IncompleteData interface in Java Cel library stub
2020-07-31 10:47:19 -07:00
ZHANG Dapeng 22b5480aed
xds: Add server features support to Bootstrapper
In preparation for xds-v3 support.
2020-07-30 18:00:37 -07:00
ZHANG Dapeng 2204beba2e
xds: refactor AdsStream to envoy-proto-and-version-agnostic AbstractAdsStream
In preparation of xds-v3 support.
2020-07-30 13:41:34 -07:00
sanjaypujare 06ca927a64
xds: first part of MeshCaCertificateProvider (#7247) 2020-07-29 09:10:02 -07:00
ZHANG Dapeng 784e804259
xds: refactor usage of Node in Bootstrap to EnvoyProtoData.Node
In preparation for xds-v3 support.
2020-07-28 08:56:41 -07:00
ZHANG Dapeng 7949f65e0f
xds: remove GRPC_XDS_EXPERIMENTAL_ROUTING flag 2020-07-28 08:03:46 -07:00
Ran 61fd6d3ecd
xds: fix missing @RunWith annotation. (#7245) 2020-07-23 12:58:24 -07:00
sanjaypujare c60f5ff95b
xds: implement STS based OAuth 2.0 credentials exchange (#7232) 2020-07-22 16:36:38 -07:00
Chengyuan Zhang e4215b422d
xds: routing policy should immediately update a picker that selects base on updated config (#7233)
The routing LB policy should immediately the Channel's picker that delegates picking to the updated routes. Otherwise, new RPCs will keep being sent through old routes even if they are removed. This change also includes the fix for syncing state change for child balancers in deactivated state.
2020-07-22 01:16:51 -07:00
Chengyuan Zhang 9f49e48237
xds: support load reporting all clusters option and fix actual report interval measurement (#7209)
- Add support for send_all_clusters field in LRS response. When it is set to true, just send load reports for clusters that the client is currently tracking (aka, is sending load to).

- The actual load report interval (in each ClusterStats message, which contains the stats for each cluster:eds_service) should be tracked individually.
2020-07-21 18:03:36 -07:00
Chengyuan Zhang 1e238ee2a0
xds: add header matching special cases for hiding/exposing some gRPC headers (#7224)
Expose "content-type" header (hard-coded) at header matching, pretend it's already there.
2020-07-21 18:02:29 -07:00
ZHANG Dapeng 4edbe245f1
xds: import v3 proto for ADS service 2020-07-20 13:42:57 -07:00
Chengyuan Zhang b9d067677c
xds: implement the top-level LB policy (#7203)
The top-level LB policy, which is an aggregator for CDS policies. It maintains the lifecycle of CDS LB policy instances. The pick argument taken from the Channel contains the information to determine which child CDS policy instance should the picking operation be delegated to.

The implementation is similar to the action part of what we currently have in the routing policy. The existing routing policy will be refactored to two parts, with the route match part moved into ConfigSelector and action part being this top-level LB policy.
2020-07-20 12:12:59 -07:00
ZhenLian e7cd2299c4
xds: change package name for CEL lib (#7235) 2020-07-17 19:46:51 -07:00
sanjaypujare 8ab2c75150
xds: fix DistributorWatcher to send last updates to newly added watchers (#7220) 2020-07-17 11:58:30 -07:00
Chengyuan Zhang 92f4842f0f
xds: perform header matching on concatenated values (#7215)
Combine values of header fields with the same key to a comma-separated string before performing header matching.
2020-07-15 14:06:02 -07:00
sanjaypujare 7047209ba3
xds: add meshca.proto from Istio repo (#7213) 2020-07-15 10:46:14 -07:00
ZHANG Dapeng bacd12ee0a
xds: delete deprecated xds-experimental scheme 2020-07-14 16:46:58 -07:00
Chengyuan Zhang 631e07f090
xds: fix lint (#7210) 2020-07-14 15:25:34 -07:00
cindyxue 47c6bfefe5
xds: Add a mock Cel library used for evaluation in Cel Engine (#7162)
* a mock Cel library used for authorization evaluation
2020-07-14 14:39:44 -07:00
sanjaypujare 016ff64a8b
xds: implement CertificateProviderRegistry & CertificateProviderStore (#7188) 2020-07-10 16:30:17 -07:00
ZHANG Dapeng cd70dcbfae
xds: fix lint 2020-07-08 17:21:16 -07:00
ZHANG Dapeng c756c2db56
xds: parse resources in ADS response to envoy-api v3 objects
Continuation of #7169 to parse all resources in ADS response to v3 objects. In this PR we still only send v2 requests to xDS server (No v3 bootstrap or env flag support).
2020-07-06 21:55:25 -07:00
sanjaypujare 2dc670163f
xds: convert and rename ReferenceCountingSslContextProviderMap to generic ReferenceCountingMap (#7181) 2020-07-06 18:08:25 -07:00