Commit Graph

3873 Commits

Author SHA1 Message Date
Eric Anderson 2caa77d48f netty: Implicitly enable Conscrypt when it is available
This implicit loading is more conservative than the loading for
tcnative, as Conscrypt will only be implicitly loaded if there are no
other options. This means the Java 9+ JSSE is preferred over Conscrypt
without explicit user configuration.

While we would generally prefer Conscrypt over JSSE, we want to allow
the user to configure their security providers. There wasn't a good way
to do that with netty-tcnative and the performance of JSSE at the time
was abysmal.

While generally being a good way to allow adopting Conscrypt, this also
allows easily using App Engine Java 8's provided Conscrypt which can
substantially reduce binary size.

See googleapis/google-cloud-java#6425
2019-10-07 11:37:50 -07:00
Eric Anderson e9921b77f2 Create ConscryptLoader for code sharing 2019-10-07 11:37:50 -07:00
cmagnuso244 f51336f0cc
examples: Modifies documentation (#6253) 2019-10-07 10:52:39 -07:00
sanjaypujare 764d0b852a
COMPILING.md: we don't need shared lib related steps (#6245) 2019-10-07 09:34:27 -07:00
dapengzhang0 5fce838b4e xds: fix wrong class name of XdsNameResolverTest 2019-10-05 10:53:48 -07:00
dapengzhang0 ed220c14b8 xds: fix wrong json key balancerName 2019-10-05 10:53:48 -07:00
Sanjay Pujare be83a3ddc5 xds: fix Javadoc comments and add final qualifier also fix typo 2019-10-04 18:16:02 -07:00
Sanjay Pujare edd9e5a257 define interface for the new TlsContextManager that will replace the SecretManager 2019-10-04 18:16:02 -07:00
Eric Anderson a462a3bc8e COMPILING.md: Reduce dependencies when building protobuf
These changes avoid a dependency on automake, autoconf, and libtool. The
./configure script is only available via the release artifacts, not git.

For example, on Debian Buster only curl and build-essential need to be
installed.
2019-10-04 15:35:05 -07:00
ZHANG Dapeng 31b1da5a8d
xds: bootstrap xDS load balancer with xDS name resolver
`XdsNameResolver` will load bootstrap file and populate `Node` reference to the `XdsLoadBalancer` through attributes of `ResolvedAddresses`. This is only for demo purpose until `XdsClient` is available, whence `XdsNameResolver` will populate `XdsClient` reference to `XdsLoadBalancer` through attributes instead.
2019-10-04 12:13:48 -07:00
Sanjay Pujare ed4f1fbdae Mark XdsAttributes internal 2019-10-04 10:37:34 -07:00
Sanjay Pujare c16b104e61 Adding more attributes to XdsAttributes and making XdsAttributes public to prepare for using *TlsContext in the new SecretManager 2019-10-04 10:37:34 -07:00
Sanjay Pujare 103c2f9858 re-add the grpc-netty dependency 2019-10-03 16:02:22 -07:00
ZHANG Dapeng dba7e9c36f
xds: migrate to restructured xds loadbalancer
* Deleted:
  + XdsLoadBalancer
  + XdsLbState
  + XdsComms
  + Their test classes (except XdsCommsTest)
* Moved/Renamed:
  + AdsStreamCallback -> LookasideChannelCallback
  + AdsStreamCallback2 -> AdsStreamCallback
  + XdsComms.LocalityInfo -> ClusterLoadAssignmentData.LocalityInfo
  + XdsComms.LbEndpoint -> ClusterLoadAssignmentData.LbEndpoint
  + XdsComms.DropOverload -> ClusterLoadAssignmentData.DropOverload
  + XdsLocality -> ClusterLoadAssignmentData.XdsLocality
* XdsComms2 is not renamed because it's temporary.
* XdsLoadBalancer2 is not renamed because otherwise the diff is hard to read.
2019-10-03 15:58:53 -07:00
ZHANG Dapeng 90b3c88fe2
api: avoid infinite loop in handleResolvedAddresses
If a `LoadBalancer` implementation does not override `handleResolvedAddressGroups()`, or overrides `handleResolvedAddressGroups()` but calls `super.handleResolvedAddressGroups()` at the beginning or the end, it will be trapped in an infinite loop.
2019-10-03 15:58:18 -07:00
ZHANG Dapeng 28323e2fb6
xds: plumbing restructured xds loadbalancer
Moved `ManagedChannel initLbChannel(Helper helper, String balancerName)` out of `LookasideChannelLb` because `LoadReportClientImpl` need channel be initialized already. 

Migration will be in an upcoming PR.
2019-10-02 15:13:39 -07:00
Jihun Cho e9ac1b4a76
all: update modules to wait until other module's sourceSet is available (#6232) 2019-10-02 15:05:44 -07:00
Sanjay Pujare 5e814d49d1 xds: remove the inapplicable text from a comment - as pointed out in a previous PR 2019-10-02 14:15:24 -07:00
Sanjay Pujare e1323e46d1 xds: Add tlsCertificate and certificateValidationContext attributes to XdsAttributes: needed for passing those values to the SDS component 2019-10-02 14:15:24 -07:00
sanjaypujare 468d540bc9
SecretManager implementation for file secrets (#6173)
* SecretManager implementation for file secrets (only TlsCertificate in this PR)
2019-10-02 09:36:42 -07:00
ZHANG Dapeng 2bc8c452f3
xds: restructure XdsLoadBalancer Part 4: LookasideChannelLb
Note: XdsComms2 is a temporary refactor of XdsComms, and will be re-implemented with the new XdsClient design.
2019-10-01 16:33:26 -07:00
Chengyuan Zhang e448f9c7d3
xds: reimplement bootstrapping with new bootstrap file format design (#6201)
This change reimplements Bootstrapper with new design of bootstrap file format, with no longer using ApiConfigSource proto. The new JSON format of the bootstrap file contains a top level "node" and a "xds_server" object, which contains a "server_uri" string and a `channel_creds` list for channel credentials.

Unknown fields in the bootstrap file are allowed by ignored so that the implementation does not break when new fields are added in the future. Therefore, we cannot simply create a custom proto file and use proto util to parse it.
2019-10-01 14:48:28 -07:00
Przemek Piotrowski 9668102f05 netty: bump to 4.1.42 (#6175)
netty: bump to 4.1.42
2019-10-01 13:41:06 -07:00
Eric Anderson c5c7755d3f repositories.bzl: Fix typo in maven_install override_targets
The typo was present in the initial version added in 9d6f532
2019-10-01 12:57:08 -07:00
Chengyuan Zhang 881594100b
andriod-interop-testing: fix InteropTask construction failure with wrong parameters (#6223) 2019-09-30 15:26:01 -07:00
Eric Anderson ad159cea96 Remove vestigial SuppressWarnings("LiteralClassName")
Error Prone 2.1.2 removed the warning.
2019-09-30 14:02:46 -07:00
Eric Anderson 65b495c6bc benchmarks: Remove unnecessary unchecked casts 2019-09-30 14:02:24 -07:00
Eric Anderson 0be86a5731
alts: Use Conscrypt when available
We depend on Conscrypt to help ensure Conscrypt 2.1.0 or newer is used.
It's not 100% clear this is the best approach, but it is the simplest at
present. If Conscrypt is not available then we will just use the JDK's
slower implementation of AES-GCM.

Fixes #6213
2019-09-30 13:39:22 -07:00
Jihun Cho a8137dc18f bom: specify pom type for protoc-gen-grpc-java 2019-09-30 13:05:57 -07:00
Jihun Cho caf54fb66f bom: format(tab->space) build.gradle 2019-09-30 13:05:57 -07:00
Jihun Cho 3f11b27a22 alts: make AltsHandshakerClient#close can be called multiple times 2019-09-27 14:42:40 -07:00
Jihun Cho 15295c75ae examples: add mavenCentral build.gradle without jcenter repo 2019-09-27 14:33:21 -07:00
Jihun Cho 5afba81806 build: add mavenCentral to repositories 2019-09-27 14:33:21 -07:00
Chengyuan Zhang 18a9671ea0
core: move check Json object methods to JsonUtil (#6214) 2019-09-27 14:29:26 -07:00
Chengyuan Zhang d3e86da6b6
core: move generic Json util methods out of ServiceConfigUtil (#6211) 2019-09-27 11:45:38 -07:00
sanjaypujare 7435221629
Make grpc-xds dependent on grpc-netty - needed for TLS related protocolNegotiator implementations in grpc-xds (#6206) 2019-09-27 11:21:58 -07:00
Chengyuan Zhang 214eaae3ba
android-interop-testing: remove settings for using GET via setting MethodDescriptor to safe (#6203)
* Removed client interceptor that sets safe in method descriptor.

* Removed useGet checkbox in UI.
2019-09-27 11:10:47 -07:00
Jihun Cho e3be6a6bfa
compiler: add license header for cpp codes (#6208) 2019-09-27 09:22:42 -07:00
Chengyuan Zhang 68eba768c9
cronet: do not include internal accessors in Javadoc (#6205) 2019-09-26 15:27:47 -07:00
Jihun Cho e67fdb3af9
github: wrap question template in comment blocks (#6199) 2019-09-26 14:21:18 -07:00
Chengyuan Zhang 4ec5be387e
Update README etc to reference 1.24.0 (#6197) 2019-09-25 16:40:09 -07:00
Carl Mastrangelo ab2aff48dc netty,okhttp,cronet: add option to use get/put when methods are safe/idempotent
This change adds two booleans to the ChannelBuilders to
allow transports to use get and put.   These are currently defaulted to
on, but unset on the method descriptors.   This change is 1/2 that will
allow the safe / idempotent bits to be set on generated proto code.
Part 2/2 will actually enable it.

The use case for this is for interceptors that implement caching logic.
They need to be able to access the safe/idempotent bits on the MD in
order to decide to how to handle the request, even if gRPC doesn't use
GET / PUT HTTP methods.
2019-09-25 14:57:17 -07:00
Eric Anderson bd48891dab netty: Check for TE header after checking Content-Type
Checking too early leads to false-positives, like if a non-gRPC client
contacts the server or a grpc-web client.
2019-09-25 14:04:19 -07:00
Jihun Cho 5912d62019
github: update issue templates (#6191) 2019-09-25 13:44:01 -07:00
Jihun Cho 1ab651073d
alts: add close to TsiHandshaker to avoid resource leak for some impls (#6186)
* alts: add close to TsiHandshaker to avoid resource leak for some implementations

* fix linter error
2019-09-25 13:23:52 -07:00
ZHANG Dapeng 694de41107
xds: add server name in EDS request resource_names field 2019-09-25 12:48:03 -07:00
Chengyuan Zhang e281c75b2a
cronet: update README for using published grpc-cronet with play service Cronet implementation (#6178)
* cronet: update README for using published grpc-cronet with play service Cronet implementation.

* doc: Added cronet/README.md version update to RELEASING.md.
2019-09-24 13:24:59 -07:00
ZHANG Dapeng f9ba620309
xds: shade gogoproto 2019-09-24 09:52:03 -07:00
ZHANG Dapeng 5bc1309c87
xds: Priority failover
- Implementing priority failover
- Removed `localityWeight` field from `LocalityLbInfo` because this is always available and up to date in `edsResponsLocalityInfo`, otherwise need to create a new instance of `LocalityLbInfo` each time weight is updated.
- Introduced `PriorityManager` that manages all the priority failover logic.
2019-09-23 18:32:43 -07:00
ZHANG Dapeng cd8dbd306b
xds: use PGV dependency from maven artifact
Resolves #6016
2019-09-23 18:09:38 -07:00