Commit Graph

164 Commits

Author SHA1 Message Date
Garrett Gutierrez 506b773066
Implemented component logging (#3617) 2020-06-26 12:04:47 -07:00
d-reidenbach 9a46550357
alts: Added peer attributes accessor for alts context and updated test method (#3675) 2020-06-16 21:11:41 -07:00
Easwar Swaminathan dfc058c6d9
credentials: Add certificate provider plugin APIs. (#3654)
Also add an implementation for the `Distributor` type which makes it easier to implement new `Provider` types.
2020-06-16 13:57:33 -07:00
Menghan Li b6d6ede3e0
xds: use google default creds (#3673)
- use google default creds, so the client works not only on GCE (e.g. it also reads env variable for creds).
- Change google default creds to use jwt directly if scope is not set.

- Leak check is disabled temporarily due to https://github.com/googleapis/google-cloud-go/issues/2417
2020-06-11 09:48:55 -07:00
Doug Fawley ad51f572fd
protoc-gen-go-grpc: add requirement of embedding UnimplementedServer in services (#3657) 2020-06-04 10:56:13 -07:00
yihuaz a085b3e7f6
credentials/local: fix incorrect binding of listener port (#3656) 2020-06-01 14:55:19 -07:00
Damien Neil f818fd2a02
all: regenerate .pb.go files using cmd/protoc-gen-go-grpc (#3646)
Change regenerate.sh to use cmd/protoc-gen-go-grpc and rerun it.
This splits the gRPC service definitions into separate files, but
otherwise has no changes.
2020-05-28 13:52:49 -07:00
Ryan Kim 5e50693410
credentials/alts: Fix ALTS record crypto interface comments (#3638) 2020-05-21 13:56:55 -07:00
yihuaz 9eb3e7ddf3
credentials: local creds implementation (#3517)
Local credentials should be used in either a UDS and local TCP connection. The former will be associated with the security level PrigvacyAndIntegrity while the latter is associated with NoSecurity. Local credentials should be used instead of WithInsecure for localhost connections.
2020-05-20 15:43:38 -07:00
Damien Neil 15653fec60
all: refactor .pb.go generation (#3451)
Replace various //go:generate lines and regenerate.sh scripts with a
single, top-level regenerate.sh that regenerates all .pb.go files.

Placing generation in a single script ensures that all files are
generated with similar parameters. The new regenerate.sh uses the
protoc-gen-go version defined in test/tools/go.mod and automatically
handles new .proto files as they are added.

Do some minor refactoring on .proto files: Every file now has a
go_package option (which will be required by a future version of the
code generator), and file imports are all relative to the repository
root.
2020-04-24 08:54:03 -07:00
Easwar Swaminathan 6a3c03883d
Pass address attributes from balancer to creds handshaker. (#3548) 2020-04-23 11:03:42 -07:00
Cesar Ghali f9ac13d469
credentials/alts: Properly release server InBytes buffer after the handshake is complete. (#3529) 2020-04-16 15:09:15 -07:00
Menghan Li c97e1d3b72
Revert "credentials/alts: Properly release server InBytes buffer after the handshake is complete. (#3513)" (#3528)
This reverts commit 7c3fd13027.
2020-04-14 15:09:23 -07:00
Cesar Ghali 7c3fd13027
credentials/alts: Properly release server InBytes buffer after the handshake is complete. (#3513) 2020-04-09 22:35:28 -07:00
Easwar Swaminathan 85e3a6fdd7
credentials: Update doc strings for NewClientTLSFromCert et. al. (#3508) 2020-04-08 11:05:45 -07:00
Jiangtao Li 399ae78064
alts: add trailing dot to metadata.google.internal (#3460) 2020-03-16 10:14:15 -07:00
Garrett Gutierrez a10661dd0a
credentials: deprecate ProtocolInfo.SecurityVersion (#3372)
credentials: deprecate ProtocolInfo.SecurityVersion (#3372)
2020-02-14 10:10:00 -08:00
Garrett Gutierrez 132187f04c
Modified tests to use tlogger. (#3343)
* Modified tests to use tlogger.

* Fail on errors, with error expectations.

* Added expects and MixedCapsed grpclb_config tests

* Moved tlogger to grpctest, moved leakcheck tester to grpctest.go

* Added ExpectErrorN()

* Removed redundant leak checks

* Fixed new test

* Made tlogger globals into tlogger methods

* ErrorsLeft -> EndTest

* Removed some redundant lines

* Fixed error in test and empty map in EndTest
2020-02-06 13:03:20 -08:00
Doug Fawley b88d2d7465
protobuf: update protoc-gen-go version and generated code (#3345) 2020-01-30 10:23:21 -08:00
ZhenLian 69baa3f192 credentials: close tls.Conn on failure (#3300) 2020-01-10 13:41:22 -08:00
yihuaz 4346c5926d credentials: create API for transport security level information (#3214) 2020-01-07 15:38:45 -08:00
Cesar Ghali a2a5ae5d4d
credentials/alts: Add Client Authorization Utility API (#3271)
Add client authorization util API
2019-12-20 10:01:56 -08:00
Doug Fawley 9f02faeffa
credentials: move TLS implementation to a separate file (#3243) 2019-12-11 13:11:24 -08:00
Cesar Ghali 14426e9c3a
credentials/alts: Ensure that GetBytesConsumed is in-bound (#3225) 2019-12-03 22:21:17 -08:00
Cesar Ghali 22854c88e0
credentials/alts: Simplify ALTS acquire and release APIs (#3221) 2019-12-03 15:43:33 -08:00
Easwar Swaminathan 645dd12f13
alts: Update handshaker.pb.go 2019-12-03 15:28:59 -08:00
Cesar Ghali 1e36139a79
credentials/alts: Set the handshake extra slice correctly (#3222) 2019-12-03 11:01:32 -08:00
Doug Fawley d5ab7434d4
credentials: accept another listen error as lack of support in test (#3097) 2019-10-14 16:16:11 -07:00
Joe Betz f07f2cffa0 credentials: Use net.SplitHostPort safely parse IPv6 authorities in ClientHandshake (#3082) 2019-10-09 10:48:24 -07:00
Shane Liebling 47d3cfe042 Adding a RequestInfo struct for propagating request data to Get… (#3057)
Add a RequestInfo struct which initially is used for passing the full request method (though could later be expanded to pass more info) so that things like GetRequestMetadata can be used to apply logic based on that data.

This is a fix for #3019
2019-10-04 09:27:09 -07:00
Doug Fawley e2cfd1c28f
internal: update proto library version (#3025)
Also, two fixes:

- Fix long-standing `.travis.yml` bug where `VET_SKIP_PROTO` was not `export`ed (so not seen by `vet.sh`).
- Update `vet.sh` to work with new `goimports -l` that does not print a `:` after filenames.
2019-09-17 13:49:26 -07:00
Michael Hudson-Doyle d5a36f00e6 credentials/alts: Assume not running on GCP if DMI not present (#2996)
fixes #2995
2019-08-26 17:06:13 -07:00
Doug Fawley b7325a3150
Update go.mod for golang/x/tools and staticcheck (#2832) 2019-05-24 11:13:46 -07:00
Cesar Ghali 4b60e3b6a1
credentials/alts: Panic Bug Fix (#2800) 2019-05-03 10:47:23 -07:00
Menghan Li 4abb3622b0
tls: append h2 to tlsconfig.NextProtos (#2744) 2019-04-08 09:56:02 -07:00
apolcyn 6d8271a06c credentials: add compute engine channel creds (#2708) 2019-03-25 14:47:12 -07:00
Ian Lance Taylor 0e8a6f931c credentials: add TLS 1.3 cipher suites (#2596)
This lets the tests pass with Go1.12beta2.
2019-01-25 08:47:38 -08:00
Doug Fawley 9572bbe0f9
cleanup: remove unused symbols (#2581) 2019-01-17 10:14:45 -08:00
Can Guler 29a7ac4deb
client: deprecates FailFast & replaces its use by WaitForReady. 2018-12-13 15:15:11 -08:00
lyuxuan ca62c6b92c
channelz: fix GetSecurityValue function name. (#2450) 2018-11-30 06:01:10 +08:00
Menghan Li ef2b8e2f53
internal: move syscall.Conn wrapper into a separate package (#2457)
Also skip wrapping if `rawConn` doesn't implement `syscall.Conn`.
2018-11-15 13:29:39 -08:00
Doug Fawley 04ea82009c
cleanup: replace "x/net/context" import with "context" (#2439) 2018-11-12 13:30:41 -08:00
Doug Fawley 59a2cfbdf9
Remove support for Go1.6-1.8 (#2428) 2018-11-01 15:43:42 -07:00
Menghan Li 36ef35ddb6
internal: add doc to tlsConn wrapper for channelz (#2421) 2018-11-01 14:31:51 -07:00
Menghan Li 13b2b26aae internal: update proto generated code (#2386) 2018-10-18 15:45:22 -07:00
Cesar Ghali 945824a2e5
credentials/alts: Minor typo fix (#2344) 2018-10-02 10:00:23 -07:00
Menghan Li fdc936c6b5
lint: add package comment for package google (#2343) 2018-10-01 10:44:27 -07:00
Menghan Li 4dedfdc82c
credentials: support google default creds (#2315)
Google default creds is a combo of ALTS, TLS and OAuth2. The right set of creds will be picked to use based on environment.

This PR contains:
 - A new `creds.Bundle` type
   - changes to use it in ClientConn and transport
   - dial option to set the bundle for a ClientConn
   - balancer options and NewSubConnOption to set it for SubConn
 - Google default creds implementation by @cesarghali 
 - grpclb changes to use different creds mode for different servers
 - interop client changes for google default creds testing
2018-09-25 13:17:25 -07:00
Cesar Ghali 8997b5fa08
credentials/alts: Pass the target name to ALTS handshaker (#2319) 2018-09-20 16:48:47 -07:00
Cesar Ghali 5fe5ce74bb
credentials/alts: Export test APIs (#2293) 2018-09-07 11:05:56 -07:00