Commit Graph

145 Commits

Author SHA1 Message Date
Easwar Swaminathan 836e5de556
credentials/alts: update handshaker.pb.go (#6857) 2023-12-14 11:57:40 -08:00
Matthew Stevenson 6e14274d00
Revert "alts: Reduce ALTS counter overflow length from 5 to 4. (#6699)" (#6746)
This reverts commit 7b8d0fde07.
2023-10-24 15:13:54 -07:00
Matthew Stevenson 7b8d0fde07
alts: Reduce ALTS counter overflow length from 5 to 4. (#6699) 2023-10-24 14:39:35 -07:00
Mike Maloney 313861efe5
Explicitly specify the `dns` schema for the ALTS hand-shaker. (#6686)
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.
2023-10-10 09:30:27 -07:00
Easwar Swaminathan d524b40946
multiple: update dependencies after 1.57 branch cut (#6452) 2023-07-18 14:09:46 -07:00
Matthew Stevenson 907bdaa1eb
alts: Read max number of concurrent ALTS handshakes from environment variable. (#6267)
* 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.
2023-06-07 18:54:06 -07:00
Matthew Stevenson e325737cac
alts: Fix flaky ALTS TestFullHandshake test. (#6300)
* 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.
2023-05-25 15:05:50 -07:00
Matthew Stevenson 5a50b970cc
Revert "Revert "credentials/alts: defer ALTS stream creation until handshake …" (#6179) 2023-04-11 14:56:13 -07:00
Matthew Stevenson 06de8f851e
alts: Add retry loop when making RPC in ALTS's TestFullHandshake. (#6183) 2023-04-11 11:36:21 -07:00
Matthew Stevenson 17b693d784
alts: Perform full handshake in ALTS tests. (#6177) 2023-04-10 08:59:12 -07:00
Easwar Swaminathan 415ccdf154
go.mod: update all dependencies after 1.54 branch cut (#6132) 2023-03-28 16:03:41 -07:00
Zach Reyes 277bb6429a
Revert "credentials/alts: defer ALTS stream creation until handshake time (#6077)" (#6148)
This reverts commit c84a5005d9.
2023-03-23 19:34:27 -04:00
Matthew Stevenson c84a5005d9
credentials/alts: defer ALTS stream creation until handshake time (#6077) 2023-03-17 09:09:42 -07:00
Arvind Bright 8ba23be961
cmd/protoc-gen-go-grpc: bump -version to 1.3.0 for release (#6064) 2023-03-01 09:58:20 -08:00
Borja Lazaro Toralles 3151e834fa
cmd/protoc-gen-go-grpc: export consts for full method names (#5886) 2023-02-01 13:20:35 -08:00
Doug Fawley 3011eaf70e
test/tools: update staticcheck version to latest (#5806) 2022-11-18 13:51:43 -08:00
Doug Fawley fefb3ec0c0
test/tools: update everything to latest versions except staticcheck (#5805) 2022-11-18 11:26:37 -08:00
Doug Fawley 778860e606
testing: update Go to 1.19 (#5717) 2022-10-17 15:04:34 -07:00
RedHawker 182e9df160
Grab comment from proto file, similar to protoc-gen-go (#5540) 2022-09-06 12:35:40 -07:00
Easwar Swaminathan 60a3a7e969
cleanup: fixes for issues surfaced by vet (#5617) 2022-09-02 14:09:10 -07:00
Easwar Swaminathan ddcda5f76a
alts: do not set WaitForReady on handshaker RPCs (#5620) 2022-08-31 14:37:02 -07:00
赵延 c44f627fd1
cleanup: replace grpc.WithInsecure with insecure.NewCredentials (#5177) 2022-02-09 11:17:46 -08:00
Doug Fawley c285fc70e0
cmd/protoc-gen-go-grpc: update version for release (#5070) 2021-12-20 15:40:38 -08:00
Cesar Ghali 4e07a14b4e
credentials/ALTS: Ensure ALTS record protocol names are consistent (#4754) 2021-09-10 13:58:12 -07:00
Doug Fawley d074cae66b
github: fold security tests into 'tests'; update testing to 1.17-1.15 (#4708) 2021-08-26 11:21:36 -07:00
lzhfromustc 41676e61b1
Fix goroutine leaks (#4214) 2021-04-19 09:49:37 -07:00
Aliaksandr Mianzhynski d6abfb4598
cmd/protoc-gen-go-grpc: add protoc and protoc-gen-go-grpc versions to top comment (#4313) 2021-04-09 16:30:59 -07:00
Doug Fawley b331a48e06
alts: re-add vmOnGCP and once globals for easier testing (#4284) 2021-03-23 10:42:27 -07:00
Menghan Li f168a3cb3b
c2p: add google-c2p resolver (#4204) 2021-03-11 14:17:43 -08:00
Doug Fawley 938f6e2f75
cmd/protoc-gen-go-grpc: add gRPC-Go version comment and update release version (#4152) 2021-01-14 14:28:25 -08:00
Edmond 8f3cc6cc26
protoc-gen-go-grpc: export grpc.ServiceDesc (#4035) 2020-11-23 14:56:57 -08:00
Timothy Gu 20636e76a9
protobuf: update protoc to latest version (#4038)
Presently, protoc 3.3.0 (released in 2017) is still being used. This
commit updates the vet.sh script as well as existing generated files to
use protoc 3.14.0 instead.

The only concrete change this brings is updated import paths of
Timestamp and Duration types. However, in practice this is a no-op,
since the types themselves are already aliased to the new import path:

- https://pkg.go.dev/github.com/golang/protobuf@v1.4.3/ptypes/duration#Duration
- https://pkg.go.dev/github.com/golang/protobuf@v1.4.3/ptypes/timestamp#Timestamp
2020-11-16 16:59:46 -08:00
Gaurav Gahlot d7a7a304ff
testing: Avoid using context.Background (#3949) 2020-11-05 09:25:17 -08:00
Doug Fawley 4e8458e5c6
protobuf: update all generated code to google.golang.org/protobuf (#3932) 2020-10-21 16:05:44 -07:00
Doug Fawley 9519efffeb
cmd/protoc-gen-go-grpc: use grpc.ServiceRegistrar instead of *grpc.Server (#3968) 2020-10-20 13:02:25 -07:00
Doug Fawley 02cd07d9bb
cmd/protoc-gen-go-grpc: revert to interface-based service registration (#3911) 2020-09-29 15:17:06 -07:00
Menghan Li 659b82911d
internal: regenerate pb.go (#3893) 2020-09-22 15:17:47 -07:00
Doug Fawley ff9dd65c90
protoc-gen-go-grpc: generate interfaces optionally; remove NewFooService (#3876) 2020-09-16 10:15:56 -07:00
Easwar Swaminathan a3e63e87bd
alts: Specify the build constraints correctly. (#3877)
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.
2020-09-15 09:53:04 -07:00
Easwar Swaminathan 0b575750a9
credentials/alts: Skip ALTS tests on darwin. (#3859)
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.
2020-09-01 17:43:01 -07:00
Anton Nep 48bf772d0c
credentials/alts: ClientAuthorizationCheck to case-fold compare of peer SA (#3792) 2020-09-01 16:23:56 -07:00
Doug Fawley d31b671000
cmd/protoc-gen-go-grpc: call interceptor even if handler is unset (#3849) 2020-08-26 16:05:36 -07:00
Doug Fawley 44d73dff99
cmd/protoc-gen-go-grpc: rework service registration (#3828) 2020-08-25 09:28:01 -07:00
Ryan Kim 9fcde86ebe
credentials/alts: Change ALTS hsConn to a map (#3741) 2020-07-15 13:08:37 -07:00
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
Doug Fawley ad51f572fd
protoc-gen-go-grpc: add requirement of embedding UnimplementedServer in services (#3657) 2020-06-04 10:56:13 -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
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
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
Jiangtao Li 399ae78064
alts: add trailing dot to metadata.google.internal (#3460) 2020-03-16 10:14:15 -07: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
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
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 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
Cesar Ghali 4b60e3b6a1
credentials/alts: Panic Bug Fix (#2800) 2019-05-03 10:47:23 -07: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
Doug Fawley 04ea82009c
cleanup: replace "x/net/context" import with "context" (#2439) 2018-11-12 13:30:41 -08: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 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
Cesar Ghali 16df5a3328
credentials/alts: Rename core package to internal (#2296) 2018-09-07 10:24:15 -07:00
Cesar Ghali 0150fc5d50
credentials/alts: Move alts/core to alts/internal (#2292) 2018-09-05 15:15:42 -07:00
dfawley 5fe10fccaf
Remove unused symbols (#2287) 2018-09-05 12:29:02 -07:00
dfawley 90f728eaf7
Remove shadowing of built-ins (#2290) 2018-09-05 09:05:40 -07:00
Cesar Ghali a91fb537b1
credentials/alts: Add ALTS AuthInfoFromPeer API (#2269) 2018-08-28 10:44:03 -07:00
Menghan Li 59dd9b3f19
test: add go 1.11 to travis and remove go 1.7 (#2278) 2018-08-27 13:31:20 -07:00
lyuxuan 8e36593ad9 go generate: update proto files (#2236) 2018-07-25 11:40:12 -07:00
Menghan Li 39a411827d
internal: Update proto generated code (#2133) 2018-06-08 17:54:26 -07:00
Menghan Li 130c87fa0d
alts: copy handshake address in Clone() (#2119) 2018-06-01 15:33:31 -07:00
Menghan Li f669235193
internal: update proto generated code (#2093) 2018-05-21 09:59:26 -07:00
Menghan Li 679ceaae57
internal: fix travis failure on alts proto (#2079) 2018-05-16 10:32:11 -07:00
Carl Mastrangelo 9020130bcf credentials/alts: make go:generate rebuild alts protos (#2056) 2018-05-15 15:42:21 -07:00
Cesar Ghali 419de394cf Add AuthInfoFromContext utility API (#2062) 2018-05-11 14:16:43 -07:00
Carl Mastrangelo 17a5d9ce39 credentials/alts: Refer to ALTS gRPC types by a different package (#2028) 2018-04-30 12:57:04 -07:00
Cesar Ghali 75d37eff66
credentials/alts: Add ServiceOption for server-side ALTS creation (#2009)
* Move handshaker_service_address flag to binaries
2018-04-23 11:11:20 -07:00
Cesar Ghali 8124abf74e
credentials/alts: Remove the enable_untrusted_alts flag (#1931) 2018-03-19 18:27:44 -07:00
Cesar Ghali 211a7b7ec0 credentials/alts: Update ALTS "New" APIs (#1921) 2018-03-19 09:07:54 -07:00
Cesar Ghali efcc755fd5
credentials/alts: change ALTS protos to match the golden version (#1908) 2018-03-08 12:12:55 -08:00
Joshua Humphries 0843fd0ee0 credentials/alts: fix infinite recursion bug [in custom error type] (#1906) 2018-03-07 13:50:30 -08:00
Cesar Ghali 5190b068e2 ALTS: Simplify "New" APIs (#1895)
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.
2018-03-07 09:14:47 -08:00
Cesar Ghali a1de3b2bd6 alts: Change ALTS proto package name (#1886) 2018-02-26 18:05:53 -08:00
Cesar Ghali 2e7e633fea Add ALTS code (#1865) 2018-02-26 17:02:59 -08:00