lyuxuan
7268ca41d3
channelz: stage 4 - add security and socket option info with appengine build tags ( #2149 )
2018-06-25 10:32:20 -07:00
Menghan Li
39a411827d
internal: Update proto generated code ( #2133 )
2018-06-08 17:54:26 -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
130c87fa0d
alts: copy handshake address in Clone() ( #2119 )
2018-06-01 15:33:31 -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
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
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
Sean Harger
956d689a24
Use Type() method for OAuth tokens instead of accessing TokenType field. ( #1537 )
...
This covers the case where the TokenType field is empty, and thus
calling the Type() method will return "Bearer".
2017-09-25 11:38:05 -07:00
Menghan Li
59cb69e66d
Fix misspells ( #1531 )
2017-09-20 14:55:57 -07:00
田欧
ca9e0c3458
Add testdata package and unify testdata to only one dir ( #1297 )
2017-07-25 10:24:45 -07:00
Jan Tattermusch
ddbf6c46a6
autofix license notice
2017-06-08 14:42:19 +02:00
dfawley
3419b42955
Reuse Token for serviceAccount credentials ( #1238 )
2017-05-16 12:37:36 -07: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
Peter Sanford
2e56e83e3a
Use tls.Config.Clone() for go1.8
...
go1.8 now has native support for tls.Clone() so for 1.8+ use that for
credentials.cloneTLSConfig.
2017-02-21 12:03:28 -08:00
MakMukhi
50955793b0
Debugging tests for AuthInfo ( #1046 )
...
* debug
* fix
2017-01-11 11:10:52 -08: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
Mike Wiacek
0dd919209f
Fix a spelling mistake.
2016-10-31 19:53:00 -07: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
Chris Broadfoot
d32f94c75e
credentials/oauth: default to Bearer token type
2016-06-24 10:39:34 -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
ca129f5e97
gofmt -w
2015-08-28 17:08:48 -07:00
iamqizhao
6be470f058
Credentials API and jwtAccess implementation tunning
2015-08-28 16:51:45 -07:00
iamqizhao
3af5617830
fix build
2015-08-28 14:07:28 -07:00
iamqizhao
3111577eb2
fix a comment
2015-08-28 13:24:56 -07:00
iamqizhao
87c361b5a5
check transport security when using oauth2-based credentials
2015-08-28 13:19:36 -07:00
iamqizhao
f49ac9d0df
rename Type()
2015-08-26 13:43:04 -07:00
iamqizhao
ef3d58fc04
add test
2015-08-26 13:11:34 -07:00
iamqizhao
c0e23d7ef3
make the tests happy
2015-08-26 12:40:24 -07:00
iamqizhao
b6d240dcce
add comments
2015-08-26 11:34:35 -07:00
iamqizhao
125950284c
separate auth info from normal metadata
2015-08-26 11:30:43 -07:00
iamqizhao
cd205234d7
small polish
2015-08-24 12:00:28 -07:00
iamqizhao
97574c6499
make the test happy
2015-08-24 11:40:40 -07:00
iamqizhao
d12ff72146
allow access of some info of client certificate
2015-08-21 15:49:53 -07:00
yangzhouhan
3df1dd419a
fix
2015-08-14 16:35:32 -07:00
yangzhouhan
1126ae61bf
add a comment
2015-08-14 16:34:09 -07:00
yangzhouhan
c783da2ff9
add a comment
2015-08-14 16:32:38 -07:00
yangzhouhan
25c36604b9
add oauth2 and perrpc interop tests
2015-08-14 16:22:19 -07:00
yangzhouhan
32444cd24d
minor changes
2015-08-14 11:35:15 -07:00
yangzhouhan
41ee26a353
add JWTAccessTokenFromKey
2015-08-14 11:20:13 -07:00
yangzhouhan
5ef857242f
add jwt_token_creds interop test
2015-08-12 18:26:30 -07:00
iamqizhao
075e4a60c3
Switch ALPN/NPN to advertise only h2
2015-07-31 14:21:24 -07:00
Tamir Duberstein
aeca1aff71
Remove OAuth support from `credentials`
...
Fixes #219 .
2015-07-22 22:14:33 -04:00
Tamir Duberstein
c1454617ee
Add credentials/oauth
2015-07-22 20:54:35 -04:00
iamqizhao
ffe2c5d7aa
add h2 into ALPN protocol
2015-05-27 17:33:26 -07:00
iamqizhao
5e4f3d16f2
cleanup2
2015-05-12 18:04:16 -07:00
iamqizhao
3617cd5ab3
revert handshaker changes
2015-05-12 17:59:20 -07:00
Peter Edge
5700d19d0e
Fix golint errors for non-generated code
2015-05-08 21:46:16 +02:00
iamqizhao
54b06c32f6
rename newly added function
2015-05-01 19:12:23 -07:00
iamqizhao
0e38f0687a
provide some info for the gRPC protocol and security protocol
2015-05-01 19:06:46 -07:00
iamqizhao
4078563125
fix comments
2015-05-01 18:53:13 -07:00
iamqizhao
263a0287c9
fix comments
2015-05-01 18:52:19 -07:00
iamqizhao
3b8eba3a28
fix a comment
2015-04-21 17:28:46 -07:00
iamqizhao
dfe197d91f
remove dialing work from TransportAuthenticator
2015-04-21 17:22:15 -07:00
iamqizhao
2cf2d0871b
remove WithNetwork and add WithDialer to have more flexibility on dialing
2015-04-21 16:19:29 -07:00
iamqizhao
3259049490
fix some typos and run gofmt
2015-04-17 13:50:18 -07:00
iamqizhao
94a47542e0
Add application default credentials
2015-04-15 17:24:37 -07:00
iamqizhao
d52d8e2d40
gofmt
2015-04-15 15:42:15 -07:00
iamqizhao
3130172948
fix some comments
2015-04-15 15:40:58 -07:00
iamqizhao
93e2f8140e
add missing comments
2015-04-15 15:37:42 -07:00
iamqizhao
dea407f640
Refactor tlsCreds so that the caller can confgiure a tls.Config completely by itself
2015-04-15 15:35:42 -07:00
David Symonds
f2936c474c
Export a credentials.TokenSource type that wraps an oauth2.TokenSource as a credentials.Credentials.
...
Fixes #153 .
2015-04-08 11:01:03 +10:00
iamqizhao
ac2cbeb2e7
Merge branch 'master' of https://github.com/grpc/grpc-go
2015-03-05 01:47:08 -08:00
Andrew Gerrand
fa9ecddd2c
drop usage of obsolete oauth2.Context
2015-03-05 14:46:56 +11:00
iamqizhao
8304bc408e
addressed some comments
2015-03-04 13:20:21 -08:00
iamqizhao
a5ca6e56d2
Support timeout for grpc.Dial
2015-03-03 17:08:39 -08:00
iamqizhao
07a87c63f2
fix typo
2015-02-26 13:56:10 -08:00
Matt T. Proud
a720ae6f48
Make error conveyance more idiomatic.
...
This commit applies two bulk changes to the grpc error reporting
mechanisms:
(1.) Error strings for errors that originate within grpc are prefixed
with the package name for better clarity for where they originate
since they could percolate up in the users call chains to the
originator.
(2.) Errors that are, in fact, singletons have been converted from
fmt.Errorf to errors.New and assigned as package-level variables.
This bodes particularly well for enabling API customers to elect to
handle these errors upon receipt via equality comparison. This had
been previous impossible with the original API.
Supplementarily, ``gofmt -w -s=true`` has been run on the repository to
cleanup residual defects, and it has detected and repaired a few.
TEST=Manual go test ./...
2015-02-19 13:17:17 +01:00
iamqizhao
1ebe2fc5be
remove a TODO which is not needed
2015-02-18 13:54:39 -08:00
iamqizhao
6148d0a55d
Migrated to the latest google.org/x/oauth2 package and added support for JWT.
2015-02-18 12:02:43 -08:00
David Symonds
3981839a52
Add import comments to grpc packages.
...
This enforces that these packages are used with these import paths.
See http://golang.org/cmd/go/#hdr-Import_path_checking for documentation.
2015-02-09 13:46:16 +11:00
David Symonds
e71095e0ec
Move source files up one level.
...
The top-level directory in this repository is going to be
the main "grpc" package.
2015-02-09 11:33:38 +11:00