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.
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
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
Reverts grpc/grpc-go#2098
Appengine will fail with the error below:
```
go-app-builder: Failed parsing input: parser: bad import "syscall" in google.golang.org/grpc/channelz/funcs.go from GOPATH
```
The root cause of it is in type_linux.go.
629f6bc5e5/channelz/types_linux.go (L21-L25)
* Initial commit
* Initial commit 2
* minor update
* goimport update
* resolved race condition
* added test for TLSInfo on server side
* Post review updates
* port review changes
debug
debug
* refactoring and added third function
* post review changes
* post review changes
* post review updates
* post review commit
* post review commit
* post review update
* post review update
* post review update
* post review update
* post review commit
* post review update
This is a minor breaking change to `TransportCredentials`, however
it should not be a problem in practice as not many users are using
custom implementations. In particular, users of `NewTLS` will not
be affected.
This change also replaces the earlier `Timeout` and `Cancel` fields
with a `context.Context`, which is plumbed all the way down from
`grpc.Dial`, laying the ground work for a user-provided context.
Also, support for Go 1.7 is added.
The first endpoint will set the ServerName which will then be used by
the second endpoint, causing the transport to reject the second endpoint
since the server cert won't match the server name.