Commit Graph

5126 Commits

Author SHA1 Message Date
Mohan Li a2398ce5db
alts: Make GoogleDefaultChannelCredentials take a CallCredentials (#8548)
DirectPath is going to support non-default service account. This commit
allows users to pass CallCredentials to GoogleDefaultChannelCredentials.
See design in go/directpath-file-credential-google-default-creds
2021-11-15 15:46:56 -08:00
sanjaypujare b746bab97b
buildscripts: rename xds-k8s to psm-security as part of tech-debt cleanup and name clarity (#8695) 2021-11-12 17:40:07 -08:00
yifeizhuang 71c5eb07d3
Update README etc to reference 1.42.1 (#8694) 2021-11-12 16:54:35 -08:00
yifeizhuang 881747a63d
xds: migrate udpa proto to xds directory (#8686)
fix https://github.com/grpc/grpc-java/issues/8631:
1. import udpa protos form new git repo `https://github.com/cncf/xds.git` instead of  `https://github.com/cncf/udpa.git`
2. use proto from xds directory not udpa directory in `https://github.com/cncf/xds.git`, details was here https://github.com/cncf/xds/issues/2#issuecomment-875838155
3. support both versions of TypeStruct
4. remove v1 orca service in old directory and use the new one v3, and refer to v3 in ORCA related area
2021-11-11 10:07:14 -08:00
ZHANG Dapeng ad0971ef5f
xds: fix parsing RouteLookupClusterSpecifier mistake (#8641)
- Partially revert the change of RlsProtoData.java  in #8612  by removing `public` accessor
- Have grpc-xds no longer strongly depend on grpc-rls. The application will need grpc-rls as runtime dependencies if they need route lookup feature in xds.
- Parse RouteLookupServiceClusterSpecifierPlugin config to the Json/Map representation of `io.grpc.lookup.v1.RouteLookupClusterSpecifier` instead of `io.grpc.rls.RlsProtoData.RouteLookupConfig`
2021-11-10 11:27:42 -08:00
ZHANG Dapeng b3579db574
xds: Migrate away deprecated fields in CsdsService (#8675)
Migrate deprecate `xds_config` field to `generic_xds_configs` 

https://www.envoyproxy.io/docs/envoy/latest/api-v3/service/status/v3/csds.proto#service-status-v3-clientconfig

As per grpc/proposal#267.

The c++ version is grpc/grpc#27794
2021-11-10 08:38:44 -08:00
ZHANG Dapeng 389b865b9b
xds: populate LRS ServerInfo to CdsUpdate (#8676)
Replace `String lrsServerName` with `ServerInfo lrsServerInfo` in `CdsUpdate`.

See http://go/grpc-xds-federation#heading=h.gh3gjftay27x for details.

This PR is only refactoring. Federation support is not implemented until the TODO [here](a5c526c12f/xds/src/main/java/io/grpc/xds/ClientXdsClient.java (L2280)) is addressed.

Resolves #8628
2021-11-09 16:37:54 -08:00
Kevin Wooten 6518d7bd6d
Copy macOS x86 artifacts to aarch during upload (#8680) 2021-11-09 10:36:04 -08:00
Eric Anderson b6eafbe695 netty: Add system property to disable Connection header check
A user has a proxy that is sending "Connection: close", which is against
the HTTP/2 spec, but will take time to fix.

Fixes #8674
2021-11-09 09:26:18 -08:00
yifeizhuang 0b0079c8a1
xds: fix xdsClient resource not exist for invalid resource, fix xdsServerWrapper start on resource not exist (#8660)
Fix bugs:
1. Invalid resource at xdsClient, the watcher should have been delivered an error instead of resource not found.
2. If the resource is properly determined to not exist, it shouldn't cause start() to fail. From A36 xDS for Servers:
"XdsServer's start must not fail due to transient xDS issues, like missing xDS configuration from the xDS server."
2021-11-08 15:21:59 -08:00
cfredri4 ab7f867a4a
xds: Fix incorrect (old) javadoc for BootstrapperImpl (#8671) 2021-11-08 10:25:03 -08:00
Eric Anderson fe9026ed8a kokoro: Increase xds-k8s timeout to 3 hours
The addition of the authz tests in 0d345721 is causing the tests to
exceed their timeout. By itself, the authz test takes about an hour in
this environment. Before the authz tests, xds-k8s was taking an hour
and a half.
2021-11-05 10:04:48 -07:00
Sergii Tkachenko d548a35ab9 Update README etc to reference 1.42.0 2021-11-05 13:01:50 -04:00
Eric Anderson 0d34572149 kokoro: Enable xds authz_test
It is successfully passing against prod:
https://source.cloud.google.com/results/invocations/e2be0996-ed4d-4a4c-90ad-20bc706f9f70/targets
2021-11-04 16:31:16 -07:00
yifeizhuang a5c526c12f
xds: remove filter chain uuid name generator (#8663)
Generating a uuid in filterChain breaks the de-duplication detection which causes XdsServer to cycle connections, so removing it.
An empty name is now allowed. The name is currently only used for debug purpose.
2021-11-04 14:10:03 -07:00
sanjaypujare c0b8eff984
interop-testing: assign server as soon as it is built instead of after start (#8662) 2021-11-04 12:31:11 -07:00
Sergii Tkachenko efec994f4c Update MAINTAINERS.md 2021-11-04 14:50:34 -04:00
yifeizhuang 93a77a78a9
Revert "xds: add xds end to end interop test (#8618)" (#8656)
This reverts commit 0000cba665.
2021-11-03 12:13:05 -07:00
Eric Anderson bc12a1eb66 RELEASING.md: Individual OSSRH account is no longer needed
Most of the OSSRH interactions are performed by a robot.
2021-11-03 11:26:27 -07:00
yifeizhuang 0000cba665
xds: add xds end to end interop test (#8618)
Add AbstractXdsInteropTest, XdsTestControlPlaneService and only ping-pong testcase in initial implementation.
AbstractXdsInteropTest sets up the test control plane, create xdsClient and xdServer using bootstrap override, test case extending AbstractXdsInteropTest is supposed to override the control plane config and run the verification.

XdsTestControlPlaneService only has static xds configurations, not able to keep states.

How to run:
 ./gradlew :grpc-interop-testing:installDist -PskipCodegen=true
 ./interop-testing/build/install/grpc-interop-testing/bin/xds-e2e-test-client
2021-11-02 13:20:41 -07:00
Terry Wilson c1e19af86d
grpclb: fallback timer only when not already using fallback backends. (#8646)
Addresses a problem where we initially only resolve addresses to the backends, but not the load balancer and then later resolve addresses to both. In this situation the fallback timer was started during the second instance even if it resulted in the timer later failing as we were already using fallback backends.

This change assures that a fallback time is only ever started if we are not already using the fallback backends.

This is a follow-up fix to #8253.
2021-11-02 12:47:47 -07:00
markb74 746501dff6
binder: SecurityPolicy updates (take 2). (#8637)
The previous attempt at this CL relied on guava's Hashing class which
is still in beta. This update compares Signature objects directly instead
of SHA256 hashs, removing the need for the Hashing class.

Add additional comments to the security policy class, to mention that
implementing new policies requires significant care.

With that in mind, add security policies to check the peer app's
signature, so people can create cross-app communication without
having to implement their own policy.

Finally, add the UntrustedSecurityPolicies class, since that's
inevitably a policy which is sometimes needed.
2021-11-01 18:57:30 +01:00
ZHANG Dapeng a46560e4fc
xds: refactor XdsClient in preparation to support federation (#8630)
See go/java-xds-client-api-for-federation for detailed description
2021-11-01 09:44:58 -07:00
markb74 14eb3b265f
Support BinderChannelBuilder.forTarget. (#8633)
Allows this class to be used with custom name resolvers.
2021-11-01 14:01:56 +01:00
ZHANG Dapeng 59c6b49fd4
xds: lazily init MessagePrinter (#8639)
Just for cleanup. The printer might be used in other class e.g. to convert RLS proto to string/Map.
2021-10-29 11:46:00 -07:00
ZHANG Dapeng 602624887f
rls: sync latest rls protos from grpc-proto (#8638) 2021-10-29 10:12:38 -07:00
Eric Anderson ee395e0e43 Revert "binder: SecurityPolicy updates. (#8632)"
This reverts commit 997592192b.

Hashing is a Beta API in Guava, so we can't use it as-is.
2021-10-28 13:18:14 -07:00
markb74 997592192b
binder: SecurityPolicy updates. (#8632)
Add additional comments to the security policy class, to mention that implementing new policies requires significant care.

Also add security policies which check the Sha256 of a peer apps's signature, so people can do trusted cross-app communication without having to implement their own policy.

Finally, add the UntrustedSecurityPolicies class, since that's inevitably a policy you sometimes need as well.
2021-10-28 11:30:43 +02:00
ZHANG Dapeng f30d07dc2d
xds: add RlsClusterSpecifierPlugin for RLS-in-xDS (#8612)
Add RlsClusterSpecifierPlugin as per the [design doc](http://go/grpc-rls-in-xds#heading=h.dmyrvi6ohebx)

The structure of `ClusterSpecifierPlugin` is very similar to `io.grpc.xds.Filter`.

The following changes to the existing code are made:

- move `ConfigOrError` class out of `Filter` class to be shared with `ClusterSpecifierPlugin`
- make `io.grpc.rls.RlsProtoData` public to be accessible by `io.grpc.xds`
- treat empty defaultTarget in `io.grpc.rls.RlsProtoData.RouteLookupConfig` as null to support both json and proto config without defaultTarget field specified.
2021-10-27 09:07:15 -07:00
Sergii Tkachenko e0ecd5cfde
RELEASING.md: remove Travis; check milestones before the cut
* Update RELEASING.md

1) Remove Travis Job
2) Add a note to check milestones before cutting the branch
2021-10-25 15:34:28 -04:00
markb74 607362a7d2
Add support for anonymous in-process servers. (#8589)
Support anonymous in-process servers, and InProcessChannelBuilder.forTarget.

Anonymous servers aren't registered statically, meaning they can't be looked up by name.
Only the AnonymousInProcessSocketAddress passed to InProcessServerBuilder.forAddress(),
(or subsequently fetched from Server.getListenSockets()) can be used to connect to the server.

Supporting InProcessChannelBuilder.forTarget is particularly useful for production
Android usage of in-process servers, where process startup latency is crucial.
A custom name resolver can be used to create the server instance on demand
without directly impacting the startup latency of in-process gRPC clients.

Together, these features support a more-standard approach to "OnDeviceServer" referenced in gRFC L73.
https://github.com/grpc/proposal/blob/master/L73-java-binderchannel.md#ondeviceserver
2021-10-25 20:59:48 +02:00
ZHANG Dapeng 203515dd3d
rls: fix connectivity state aggregation (#8625)
Fix connectivity state aggregation as per http://go/grpc-rls-lb-policy-design#heading=h.6e8tt7xcwcdn

> Note that, for the purposes of aggregation, when a child policy reports TRANSIENT_FAILURE, we consider it to continue to be in that state until it reports READY (i.e., we ignore CONNECTING in between the two, no matter how many times it bounces back and forth between TRANSIENT_FAILURE and CONNECTING).
2021-10-21 21:24:51 -07:00
ZHANG Dapeng 00bb283090
xds: add protection flag for federation (#8619)
See https://github.com/grpc/proposal/pull/268/files#diff-e68147af61f13db5bd497e86ffd970fef6af29b88f4f23fb486deefdb35dfea3R659 for detail.
2021-10-20 17:59:21 -07:00
ZHANG Dapeng 2e87cd6ae3
Update README for Android API level (#8620)
We dropped support for Android API levels <19 in #8583
2021-10-20 17:56:53 -07:00
Benjamin Peterson 1fe62dd417
Fix sentences with a missing "be". (#8613) 2021-10-20 15:14:10 -07:00
yifeizhuang b86f4eba55
xds: fix non permanent link to envoy rbac doc #8615 2021-10-20 11:13:57 -07:00
Sergii Tkachenko 6d41b4283a Start 1.43.0 development cycle 2021-10-20 13:47:03 -04:00
ZhenLian d2b9151e7b
core: remove DSA check in CertificateUtils 2021-10-19 19:50:33 -04:00
ZHANG Dapeng 1f90e0e28d
xds: add and parse new bootstrap fields for federation (#8608)
Made changes as per "Bootstrap File Changes" section in go/grpc-xds-federation and implemented bootstrap file parsing logic for the change.
2021-10-18 16:19:34 -07:00
ZhenLian e9b0c2e851
Make CertificateUtils to use other key algorithms (#8609) 2021-10-15 14:42:14 -07:00
Sergii Tkachenko 0376de15b8
Fix AbstractManagedChannelImplBuilder#maxInboundMessageSize(int) ABI (#8607)
In refactoring described in #7211, the implementation of #maxInboundMessageSize(int)
(and its corresponding field) were pulled down from internal AbstractManagedChannelImplBuilder
to concrete classes that actually enforce this setting. For the same reason, it wasn't ported
to ManagedChannelImplBuilder (the #delegate()).

Then AbstractManagedChannelImplBuilder was brought back to fix ABI backward compatibility,
and temporarily turned into a ForwardingChannelBuilder, ref PR #7564. Eventually it will
be deleted, after a period with "bridge" ABI solution introduced in #7834.

However, restoring AbstractManagedChannelImplBuilder unintentionally made ABI of
pre-refactoring builds expect it to be a method of AbstractManagedChannelImplBuilder,
and not concrete classes, ref #8313.

The end goal is to keep #maxInboundMessageSize(int) only in concrete classes that enforce it.
To fix method's ABI, we temporary reintroduce it to the original layer it was removed from:
AbstractManagedChannelImplBuilder. This class' only intention is to provide short-term
ABI compatibility. Once we move forward with dropping the ABI, both fixes are no longer
necessary, and both will perish with removing AbstractManagedChannelImplBuilder.
2021-10-14 17:25:06 -07:00
ZHANG Dapeng 9f644a0861
xds: migrate Bootstrapper data classes to use AutoValue (#8594)
As many new fields will be added to `BootstrapInfo` for xds federation support, refactor `Bootstrapper.java` to use `AutoValue`. All the other files are just mechanical changes due to the refactoring.
2021-10-14 11:55:29 -07:00
yifeizhuang 8e5c18819c
enable rbac by default (#8604) 2021-10-14 11:14:48 -07:00
ZHANG Dapeng 48e3bafb11
rls: limit cache_size in rls config to 5M (#8603)
In the latest grpc-rls-lb-policy-design, if the value of cache_size_bytes is greater than 5M, we cap it at 5M.
2021-10-14 10:01:56 -07:00
Eric Anderson 7cf0578176 .github/workflows: Bump codecov-action to v2
The codecov bash uploader is being replaced (supposedly partially for
security reasons, but it seems maintenance reasons are the real goal).
https://about.codecov.io/blog/codecov-uploader-deprecation-plan/

v1 uses the bash uploader. v2 uses the new uploader. The bash uploader
will begin seeing brownouts soon.
2021-10-13 10:37:31 -07:00
markb74 9266174812
Fix code & javadoc warnings in the binder package. (#8588)
Note: I didn't fix all javadoc warnings mentioned in #8585, since
they're not generated with a modern java version, and the fix feels
worse than the warning.

Specifically, {@link X.Y} generates a warning if only X is imported,
and {@link Z} generates a warning if Z is declared later in the class.

In particular, attempting to fix the first issue by importing X.Y results
in a code-readability warning suggesting I shouldn't do that.
2021-10-09 12:27:01 +02:00
Ivo List bb51bb6dfa
java_grpc_library.bzl: Fix parameters of java_common.compile (#7598)
Parameter host_javabase is removed.

This is preparation for flipping incompatible_java_common_parameters in
Bazel 5. See https://github.com/bazelbuild/bazel/issues/12373

Bazel versions prior to 4 require host_javabase, so are no longer supported.
2021-10-08 13:48:22 -07:00
markb74 0d25d8f7d6
Publish binder in releases. (#8585) 2021-10-08 12:03:44 +02:00
yifeizhuang a2e2f56565
xds: override bootstrap for xds server (#8575)
added xdsServerBuilder method `overrideBootstrapForTest()`. Fix issue https://github.com/grpc/grpc-java/issues/7819
2021-10-07 16:17:08 -07:00
Terry Wilson 83d36104e1
Source k8s test driver install script from core repo (#8573)
The test driver install script is read directly from the core repo master branch and the copy in the Java repo is deleted.
2021-10-07 13:05:03 -07:00