-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gRPC conversions - SSO Auth Connectors #13073
Conversation
dba3cb6
to
eee64e6
Compare
Thank you for this @Joerger, this set of changes is even larger than I expected it to be. It looks good though. Some unit tests are failing, but this is easily fixable stuff:
|
e4f6f8f
to
3585a6e
Compare
6f86540
to
a2c6180
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good just one concern.
d9c58ee
to
91da847
Compare
I think this breaks backward compatibility. I'm unable to login via GitHub when running v10 auth and v9.3.6 proxy. 2022-06-16T10:30:47-04:00 ERRO [WEB] Error creating auth request. auth:github error:[
ERROR REPORT:
Original Error: *trace.BadParameterError request: json: cannot unmarshal number into Go value of type string
Stack Trace:
Caught:
/private/tmp/build-darwin-amd64/go/src/github.com/gravitational/teleport/lib/httplib/httplib.go:155 github.com/gravitational/teleport/lib/httplib.ConvertResponse
/private/tmp/build-darwin-amd64/go/src/github.com/gravitational/teleport/lib/auth/clt.go:278 github.com/gravitational/teleport/lib/auth.(*Client).PostJSON
/private/tmp/build-darwin-amd64/go/src/github.com/gravitational/teleport/lib/auth/clt.go:1244 github.com/gravitational/teleport/lib/auth.(*Client).CreateGithubAuthRequest
/private/tmp/build-darwin-amd64/go/src/github.com/gravitational/teleport/lib/web/apiserver.go:1063 github.com/gravitational/teleport/lib/web.(*Handler).githubLoginWeb
/private/tmp/build-darwin-amd64/go/src/github.com/gravitational/teleport/lib/web/apiserver.go:2551 github.com/gravitational/teleport/lib/web.(*Handler).WithRedirect.func1
/tmp/build-darwin-amd64/go/pkg/mod/github.com/gravitational/[email protected]/router.go:399 github.com/julienschmidt/httprouter.(*Router).ServeHTTP
/var/folders/ys/8czjjsys38x504kj8172pd_m0000gp/T/drone-MH8sayoNWmwkJaEN/home/drone/build-12784-1655249166-toolchains/go/src/net/http/server.go:2090 net/http.StripPrefix.func1
/var/folders/ys/8czjjsys38x504kj8172pd_m0000gp/T/drone-MH8sayoNWmwkJaEN/home/drone/build-12784-1655249166-toolchains/go/src/net/http/server.go:2047 net/http.HandlerFunc.ServeHTTP
/private/tmp/build-darwin-amd64/go/src/github.com/gravitational/teleport/lib/web/apiserver.go:454 github.com/gravitational/teleport/lib/web.NewHandler.func1
/var/folders/ys/8czjjsys38x504kj8172pd_m0000gp/T/drone-MH8sayoNWmwkJaEN/home/drone/build-12784-1655249166-toolchains/go/src/net/http/server.go:2047 net/http.HandlerFunc.ServeHTTP
/tmp/build-darwin-amd64/go/pkg/mod/github.com/gravitational/[email protected]/router.go:460 github.com/julienschmidt/httprouter.(*Router).ServeHTTP
/private/tmp/build-darwin-amd64/go/src/github.com/gravitational/teleport/lib/web/apiserver.go:215 github.com/gravitational/teleport/lib/web.(*APIHandler).ServeHTTP
/tmp/build-darwin-amd64/go/pkg/mod/github.com/gravitational/[email protected]/ratelimit/tokenlimiter.go:118 github.com/gravitational/oxy/ratelimit.(*TokenLimiter).ServeHTTP
/tmp/build-darwin-amd64/go/pkg/mod/github.com/gravitational/[email protected]/connlimit/connlimit.go:75 github.com/gravitational/oxy/connlimit.(*ConnLimiter).ServeHTTP
/var/folders/ys/8czjjsys38x504kj8172pd_m0000gp/T/drone-MH8sayoNWmwkJaEN/home/drone/build-12784-1655249166-toolchains/go/src/net/http/server.go:2879 net/http.serverHandler.ServeHTTP
/var/folders/ys/8czjjsys38x504kj8172pd_m0000gp/T/drone-MH8sayoNWmwkJaEN/home/drone/build-12784-1655249166-toolchains/go/src/net/http/server.go:3480 net/http.initALPNRequest.ServeHTTP
/var/folders/ys/8czjjsys38x504kj8172pd_m0000gp/T/drone-MH8sayoNWmwkJaEN/home/drone/build-12784-1655249166-toolchains/go/src/net/http/h2_bundle.go:5849 net/http.(*http2serverConn).runHandler
/var/folders/ys/8czjjsys38x504kj8172pd_m0000gp/T/drone-MH8sayoNWmwkJaEN/home/drone/build-12784-1655249166-toolchains/go/src/runtime/asm_amd64.s:1581 runtime.goexit
User Message: request: json: cannot unmarshal number into Go value of type string
] web/apiserver.go:1071 This looks to be caused by casting the CertTTL to a teleport/api/types/types.proto Lines 2714 to 2715 in 78c1450
The custom marshalling/unmarshalling is expecting to be working with a string which is no longer the case teleport/api/types/duration.go Lines 48 to 66 in 78c1450
|
Converts the following http endpoints to gRPC:
Since the last 4 endpoints are brand new and are being released in v10, they do not need http fallback logic.
See #12783 (comment) for motivation behind this PR.
e PR - https://github.com/gravitational/teleport.e/pull/458
Updates #6394