Граф коммитов

90 Коммитов

Автор SHA1 Сообщение Дата
Doug Fawley 87eb5b7502
credentials/google: remove unnecessary dependency on xds protos (#4339) 2021-04-13 16:19:17 -07:00
yihuaz aeb04798c5
credentials: fix PerRPCCredentials w/RequireTransportSecurity and security levels (#3995) 2020-11-09 15:33:53 -08: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
Easwar Swaminathan 6a3c03883d
Pass address attributes from balancer to creds handshaker. (#3548) 2020-04-23 11:03:42 -07:00
Garrett Gutierrez a10661dd0a
credentials: deprecate ProtocolInfo.SecurityVersion (#3372)
credentials: deprecate ProtocolInfo.SecurityVersion (#3372)
2020-02-14 10:10:00 -08:00
yihuaz 4346c5926d credentials: create API for transport security level information (#3214) 2020-01-07 15:38:45 -08:00
Doug Fawley 9f02faeffa
credentials: move TLS implementation to a separate file (#3243) 2019-12-11 13:11:24 -08: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 b7325a3150
Update go.mod for golang/x/tools and staticcheck (#2832) 2019-05-24 11:13:46 -07:00
Menghan Li 4abb3622b0
tls: append h2 to tlsconfig.NextProtos (#2744) 2019-04-08 09:56:02 -07: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 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
dfawley 2106e3b393
credentials: cleanup version-specific files (#2178) 2018-06-27 15:49:04 -07:00
lyuxuan 7268ca41d3
channelz: stage 4 - add security and socket option info with appengine build tags (#2149) 2018-06-25 10:32:20 -07:00
lyuxuan 96cefb43cf Revert " channelz: stage 4 - add security and socket option info" (#2124)
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)
2018-06-05 18:04:12 -07:00
lyuxuan c1a21e22a6
channelz: stage 4 - add security and socket option info (#2098) 2018-06-05 13:50:19 -07:00
Menghan Li d33a923190
Revert "channelz: stage 4 - add security and socket option info" (#2096)
This reverts commit 7cc2837209.

The PR breaks darwin builds

src/google.golang.org/grpc/channelz/types_unix.go:35:15: undefined: unix.TCPInfo
2018-05-22 15:31:57 -07:00
lyuxuan 7cc2837209
channelz: stage 4 - add security and socket option info (#1965) 2018-05-22 13:32:02 -07:00
Jean de Klerk 7aea499f91 credentials: return Unavailable instead of Internal for per-RPC creds errors (#1776)
Or if `PerRPCCredentials` returns a `status` error, honor that instead.
2018-01-03 09:47:07 -08:00
dfawley 4318e6475c
server: apply deadline to new connections until all handshaking is completed (#1646) 2017-11-03 13:53:17 -07:00
Menghan Li 1687ce5770 ClientHandshake should get the dialing endpoint as the authority (#1607) 2017-10-23 11:40:43 -07:00
田欧 faebfcb7bf Remove single-entry var blocks (#1589) 2017-10-18 09:59:23 -07:00
Jan Tattermusch ddbf6c46a6 autofix license notice 2017-06-08 14:42:19 +02:00
Adele Zhou 7ddf89f9b7 Fix doc 2017-05-04 10:30:28 -07:00
Menghan Li ccdf270424 add document to ClientHandshake about returning temporary error (#1125) 2017-03-28 11:12:50 -07:00
MakMukhi 4ed348913c ClientHandshake to return AuthInfo (#956)
* 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
2017-01-09 13:29:20 -08:00
Menghan Li e63e0d4095 Add Clone() and OverrideServerName() to TransportCredentials 2016-09-26 15:18:51 -07:00
Menghan Li a00cbfeab5 Overwrite authority if creds servername is specified 2016-09-06 11:23:30 -07:00
Menghan Li 0c58a17d6f Add credentials ErrConnDispatch 2016-08-24 16:20:57 -07:00
Alex Mullins 32bc9f2357 Remove conn.Close() in tlsCred.ServerHandshake()
Removes the responsibility from tlsCred.ServerHandshake() of calling Close() on the underlying connection. Returning an error is enough to close the connection: https://github.com/grpc/grpc-go/blob/master/server.go#L370.
2016-08-08 07:11:07 -05:00
Alex Mullins efa105d0d2 Cleanup conn.Close() handling in newHTTP2Client()
Removes the need to close the underlying connection in tlsCreds.ClientHandshake().
2016-08-08 03:49:40 -05:00
Tamir Duberstein 5c7ed938f9
credentials: plumb cancellation into ClientHandshake
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.
2016-08-01 16:29:56 -04:00
Menghan Li 824221d52d add clone to avoid modifying passed-in tls.Config 2016-07-26 21:21:43 -07:00
Anthony Romano 9a97937ed3 credentials: don't overwrite ServerName in given config
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.
2016-07-14 11:17:40 -07:00
Menghan Li 78e558bbc1 fix Info passes lock by value 2016-06-29 14:08:23 -07:00
Idcmp 74a71a17ac Fix typo. 2016-06-27 20:52:25 -07:00
Menghan Li 69487bb54a Address comments 2016-06-09 11:44:26 -07:00
Menghan Li 59486d9c17 Rename TransportAuthenticator to TransportCredentials 2016-06-08 11:19:25 -07:00
Menghan Li 3ffbd8e030 Rename Credentials to PerRPCCredentials 2016-06-06 17:28:10 -07:00
Menghan Li 6404c49192 Make TransportAuthenticator not embed Credentials 2016-06-06 16:24:46 -07:00
iamqizhao 76515fa9fd Remove context related functions in credentials 2016-01-06 18:26:33 -08:00
iamqizhao b36c5c6fd9 Expose peer info 2016-01-06 18:20:01 -08:00
Tamir Duberstein a6fe03ae2e credentials.TLSInfo: export State 2015-09-08 14:30:17 -04:00
iamqizhao cf890d694e rename audience 2015-08-28 17:32:25 -07:00
iamqizhao 6be470f058 Credentials API and jwtAccess implementation tunning 2015-08-28 16:51:45 -07:00