Before this change applications that override the default resolver may
not be able to talk to the metadata server to start the ALTS Handshake,
resulting in DirectPath not being used.
* Read max number of concurrent ALTS handshakes from environment variable.
* Refactor to use new envconfig file.
* Remove impossible if condition in acquire().
* Use weighted semaphore.
* Add e2e test for concurrent ALTS handshakes.
* Separate into client and server semaphores.
* Use TryAcquire instead of Acquire.
* Attempt to fix go.sum error.
* Run go mod tidy compat=1.17.
* Update go.mod for examples subdirectory.
* Run go mod tidy -compat=1.17 on examples subdirectory.
* Update go.mod in subdirectories.
* Update go.mod in security/advancedtls/examples.
* Missed another go.mod update.
* Do not upgrade glog because it requires Golang 1.19.
* Fix glog version in examples/go.sum.
* More glog cleanup.
* Fix glog issue in gcp/observability/go.sum.
* Move ALTS env var into envconfig.go.
* Fix go.mod files.
* Revert go.sum files.
* Revert interop/observability/go.mod change.
* Run go mod tidy -compat=1.17 on examples/.
* Run gofmt.
* Add comment describing test init function.
* Fix flaky ALTS FullHandshake test.
* Fix one other flake possibility.
* fix typo in comment
* Wait for full handshake frames to arrive from peer.
* Remove runtime.GOMAXPROCS from the test.
* Only set vmOnGCP once.
From the official docs:
A build constraint is evaluated as the OR of space-separated options.
Each option evaluates as the AND of its comma-separated terms.
Anyways, only linux and windows are supported platforms. Running these
tests on darwin causes a top level `make test` to fail, and one has to
scroll all the way up to realize that it is only these alts tests which
have failed, and not something that one is actively working on.
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.
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.
* 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
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.
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
ALTS NewClientALTS and NewServerALTS APIs are in the grpc/credentials/alts package. Having the term ALTS in the API names is redundant. This PR removes it.