Skip to content

Commit

Permalink
*: authentication using tidb_auth_token plugin (pingcap#38773)
Browse files Browse the repository at this point in the history
  • Loading branch information
CbcWestwolf authored Nov 3, 2022
1 parent d7bd49a commit f9c7bbc
Show file tree
Hide file tree
Showing 169 changed files with 973 additions and 104 deletions.
155 changes: 76 additions & 79 deletions DEPS.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,21 @@ def go_deps():
sum = "h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=",
version = "v1.1.1",
)
go_repository(
name = "com_github_decred_dcrd_crypto_blake256",
build_file_proto_mode = "disable",
importpath = "github.com/decred/dcrd/crypto/blake256",
sum = "h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0=",
version = "v1.0.0",
)
go_repository(
name = "com_github_decred_dcrd_dcrec_secp256k1_v4",
build_file_proto_mode = "disable",
importpath = "github.com/decred/dcrd/dcrec/secp256k1/v4",
sum = "h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4=",
version = "v4.1.0",
)

go_repository(
name = "com_github_denis_tingaikin_go_header",
build_file_proto_mode = "disable",
Expand Down Expand Up @@ -1242,6 +1257,14 @@ def go_deps():
sum = "h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo=",
version = "v1.0.2",
)
go_repository(
name = "com_github_goccy_go_json",
build_file_proto_mode = "disable",
importpath = "github.com/goccy/go-json",
sum = "h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk=",
version = "v0.9.11",
)

go_repository(
name = "com_github_godbus_dbus_v5",
build_file_proto_mode = "disable_global",
Expand Down Expand Up @@ -1490,14 +1513,6 @@ def go_deps():
sum = "h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=",
version = "v1.3.0",
)
go_repository(
name = "com_github_googleapis_enterprise_certificate_proxy",
build_file_proto_mode = "disable",
importpath = "github.com/googleapis/enterprise-certificate-proxy",
sum = "h1:7MYGT2XEMam7Mtzv1yDUYXANedWvwk3HKkR3MyGowy8=",
version = "v0.0.0-20220520183353-fd19c99a87aa",
)

go_repository(
name = "com_github_googleapis_gax_go_v2",
build_file_proto_mode = "disable_global",
Expand All @@ -1512,14 +1527,6 @@ def go_deps():
sum = "h1:l6N3VoaVzTncYYW+9yOz2LJJammFZGBO13sqgEhpy9g=",
version = "v0.2.0",
)
go_repository(
name = "com_github_googleapis_go_type_adapters",
build_file_proto_mode = "disable",
importpath = "github.com/googleapis/go-type-adapters",
sum = "h1:9XdMn+d/G57qq1s8dNc5IesGCXHf6V2HZ2JwRxfA2tA=",
version = "v1.0.0",
)

go_repository(
name = "com_github_gophercloud_gophercloud",
build_file_proto_mode = "disable",
Expand Down Expand Up @@ -2262,6 +2269,49 @@ def go_deps():
sum = "h1:tC2y/ygPbMFSBOs3DcyaEMKnnwH7eYKzohOtRrf0SAg=",
version = "v1.1.0",
)
go_repository(
name = "com_github_lestrrat_go_blackmagic",
build_file_proto_mode = "disable",
importpath = "github.com/lestrrat-go/blackmagic",
sum = "h1:lS5Zts+5HIC/8og6cGHb0uCcNCa3OUt1ygh3Qz2Fe80=",
version = "v1.0.1",
)
go_repository(
name = "com_github_lestrrat_go_httpcc",
build_file_proto_mode = "disable",
importpath = "github.com/lestrrat-go/httpcc",
sum = "h1:ydWCStUeJLkpYyjLDHihupbn2tYmZ7m22BGkcvZZrIE=",
version = "v1.0.1",
)
go_repository(
name = "com_github_lestrrat_go_httprc",
build_file_proto_mode = "disable",
importpath = "github.com/lestrrat-go/httprc",
sum = "h1:bAZymwoZQb+Oq8MEbyipag7iSq6YIga8Wj6GOiJGdI8=",
version = "v1.0.4",
)
go_repository(
name = "com_github_lestrrat_go_iter",
build_file_proto_mode = "disable",
importpath = "github.com/lestrrat-go/iter",
sum = "h1:gMXo1q4c2pHmC3dn8LzRhJfP1ceCbgSiT9lUydIzltI=",
version = "v1.0.2",
)
go_repository(
name = "com_github_lestrrat_go_jwx_v2",
build_file_proto_mode = "disable",
importpath = "github.com/lestrrat-go/jwx/v2",
sum = "h1:RlyYNLV892Ed7+FTfj1ROoF6x7WxL965PGTHso/60G0=",
version = "v2.0.6",
)
go_repository(
name = "com_github_lestrrat_go_option",
build_file_proto_mode = "disable",
importpath = "github.com/lestrrat-go/option",
sum = "h1:WqAWL8kh8VcSoD6xjSH34/1m8yxluXQbDeKNfvFeEO4=",
version = "v1.0.0",
)

go_repository(
name = "com_github_lib_pq",
build_file_proto_mode = "disable",
Expand Down Expand Up @@ -2795,14 +2845,6 @@ def go_deps():
sum = "h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9FV9ix19jjM=",
version = "v2.6.1+incompatible",
)
go_repository(
name = "com_github_pierrec_lz4_v4",
build_file_proto_mode = "disable",
importpath = "github.com/pierrec/lz4/v4",
sum = "h1:MO0/ucJhngq7299dKLwIMtgTfbkoSPF6AoMYDd8Q4q0=",
version = "v4.1.15",
)

go_repository(
name = "com_github_pingcap_badger",
build_file_proto_mode = "disable_global",
Expand Down Expand Up @@ -2880,14 +2922,6 @@ def go_deps():
sum = "h1:49lOXmGaUpV9Fz3gd7TFZY106KVlPVa5jcYD1gaQf98=",
version = "v0.0.0-20180916011732-0a3d74bf9ce4",
)
go_repository(
name = "com_github_pkg_diff",
build_file_proto_mode = "disable",
importpath = "github.com/pkg/diff",
sum = "h1:aoZm08cpOy4WuID//EZDgcC4zIxODThtZNPirFr42+A=",
version = "v0.0.0-20210226163009-20ebb0f2a09e",
)

go_repository(
name = "com_github_pkg_errors",
build_file_proto_mode = "disable_global",
Expand Down Expand Up @@ -3211,14 +3245,6 @@ def go_deps():
sum = "h1:TKdv8HiTLgE5wdJuEML90aBgNWsokNbMijUGhmcoBJc=",
version = "v2.1.4+incompatible",
)
go_repository(
name = "com_github_shopify_toxiproxy_v2",
build_file_proto_mode = "disable",
importpath = "github.com/Shopify/toxiproxy/v2",
sum = "h1:O1e4Jfvr/hefNTNu+8VtdEG5lSeamJRo4aKhMOKNM64=",
version = "v2.4.0",
)

go_repository(
name = "com_github_shopspring_decimal",
build_file_proto_mode = "disable",
Expand Down Expand Up @@ -3579,13 +3605,6 @@ def go_deps():
sum = "h1:hh+/cpIcopyMYbZNVov9iSxvJU3OYQg78Sfaqzi/CzI=",
version = "v0.0.5",
)
go_repository(
name = "com_github_urfave_cli_v2",
build_file_proto_mode = "disable",
importpath = "github.com/urfave/cli/v2",
sum = "h1:qph92Y649prgesehzOrQjdWyxFOp/QVM+6imKHad91M=",
version = "v2.3.0",
)

go_repository(
name = "com_github_urfave_negroni",
Expand Down Expand Up @@ -3660,28 +3679,6 @@ def go_deps():
sum = "h1:9DDCDwOyEy/gId+IEMrFHLuQ5R/WV0KNxWLler8X2OY=",
version = "v0.0.0-20161129230411-ed8402a42d5f",
)
go_repository(
name = "com_github_xdg_go_pbkdf2",
build_file_proto_mode = "disable",
importpath = "github.com/xdg-go/pbkdf2",
sum = "h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c=",
version = "v1.0.0",
)
go_repository(
name = "com_github_xdg_go_scram",
build_file_proto_mode = "disable",
importpath = "github.com/xdg-go/scram",
sum = "h1:VOMT+81stJgXW3CpHyqHN3AXDYIMsx56mEFrB37Mb/E=",
version = "v1.1.1",
)
go_repository(
name = "com_github_xdg_go_stringprep",
build_file_proto_mode = "disable",
importpath = "github.com/xdg-go/stringprep",
sum = "h1:kdwGpVNwPFtjs98xCGkHjQtGKh86rDcRZN17QEMCOIs=",
version = "v1.0.3",
)

go_repository(
name = "com_github_xdg_scram",
build_file_proto_mode = "disable_global",
Expand Down Expand Up @@ -4334,8 +4331,8 @@ def go_deps():
name = "org_golang_x_crypto",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/crypto",
sum = "h1:kUhD7nTDoI3fVd9G4ORWrbV5NY0liEs/Jg2pv5f+bBA=",
version = "v0.0.0-20220411220226-7b82a4e95df4",
sum = "h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU=",
version = "v0.1.0",
)
go_repository(
name = "org_golang_x_exp",
Expand Down Expand Up @@ -4384,8 +4381,8 @@ def go_deps():
name = "org_golang_x_net",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/net",
sum = "h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0=",
version = "v0.0.0-20220722155237-a158d28d115b",
sum = "h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0=",
version = "v0.1.0",
)
go_repository(
name = "org_golang_x_oauth2",
Expand All @@ -4405,22 +4402,22 @@ def go_deps():
name = "org_golang_x_sys",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/sys",
sum = "h1:BkDtF2Ih9xZ7le9ndzTA7KJow28VbQW3odyk/8drmuI=",
version = "v0.0.0-20220928140112-f11e5e49a4ec",
sum = "h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U=",
version = "v0.1.0",
)
go_repository(
name = "org_golang_x_term",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/term",
sum = "h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=",
version = "v0.0.0-20210927222741-03fcf44c2211",
sum = "h1:g6Z6vPFA9dYBAF7DWcH6sCcOntplXsDKcliusYijMlw=",
version = "v0.1.0",
)
go_repository(
name = "org_golang_x_text",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/text",
sum = "h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=",
version = "v0.3.7",
sum = "h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg=",
version = "v0.4.0",
)
go_repository(
name = "org_golang_x_time",
Expand Down
1 change: 1 addition & 0 deletions bindinfo/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func TestMain(m *testing.M) {
testsetup.SetupForCommonTest()
opts := []goleak.Option{
goleak.IgnoreTopFunction("github.com/golang/glog.(*loggingT).flushDaemon"),
goleak.IgnoreTopFunction("github.com/lestrrat-go/httprc.runFetchWorker"),
goleak.IgnoreTopFunction("go.etcd.io/etcd/client/pkg/v3/logutil.(*MergeLogger).outputLoop"),
goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"),
}
Expand Down
1 change: 1 addition & 0 deletions br/pkg/backup/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func TestMain(m *testing.M) {
testsetup.SetupForCommonTest()
opts := []goleak.Option{
goleak.IgnoreTopFunction("github.com/golang/glog.(*loggingT).flushDaemon"),
goleak.IgnoreTopFunction("github.com/lestrrat-go/httprc.runFetchWorker"),
goleak.IgnoreTopFunction("github.com/klauspost/compress/zstd.(*blockDec).startDecoder"),
goleak.IgnoreTopFunction("github.com/pingcap/goleveldb/leveldb.(*DB).mpoolDrain"),
goleak.IgnoreTopFunction("go.etcd.io/etcd/client/pkg/v3/logutil.(*MergeLogger).outputLoop"),
Expand Down
1 change: 1 addition & 0 deletions br/pkg/checksum/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
func TestMain(m *testing.M) {
opts := []goleak.Option{
goleak.IgnoreTopFunction("github.com/golang/glog.(*loggingT).flushDaemon"),
goleak.IgnoreTopFunction("github.com/lestrrat-go/httprc.runFetchWorker"),
goleak.IgnoreTopFunction("github.com/klauspost/compress/zstd.(*blockDec).startDecoder"),
goleak.IgnoreTopFunction("go.etcd.io/etcd/client/pkg/v3/logutil.(*MergeLogger).outputLoop"),
}
Expand Down
1 change: 1 addition & 0 deletions br/pkg/conn/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
func TestMain(m *testing.M) {
opts := []goleak.Option{
goleak.IgnoreTopFunction("github.com/golang/glog.(*loggingT).flushDaemon"),
goleak.IgnoreTopFunction("github.com/lestrrat-go/httprc.runFetchWorker"),
goleak.IgnoreTopFunction("go.etcd.io/etcd/client/pkg/v3/logutil.(*MergeLogger).outputLoop"),
goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"),
}
Expand Down
1 change: 1 addition & 0 deletions br/pkg/lightning/checkpoints/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func TestMain(m *testing.M) {
testsetup.SetupForCommonTest()
opts := []goleak.Option{
goleak.IgnoreTopFunction("github.com/golang/glog.(*loggingT).flushDaemon"),
goleak.IgnoreTopFunction("github.com/lestrrat-go/httprc.runFetchWorker"),
goleak.IgnoreTopFunction("github.com/klauspost/compress/zstd.(*blockDec).startDecoder"),
goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"),
}
Expand Down
1 change: 1 addition & 0 deletions br/pkg/lightning/common/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func TestMain(m *testing.M) {
testsetup.SetupForCommonTest()
opts := []goleak.Option{
goleak.IgnoreTopFunction("github.com/golang/glog.(*loggingT).flushDaemon"),
goleak.IgnoreTopFunction("github.com/lestrrat-go/httprc.runFetchWorker"),
goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"),
}
goleak.VerifyTestMain(m, opts...)
Expand Down
1 change: 1 addition & 0 deletions br/pkg/lightning/mydump/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func TestMain(m *testing.M) {
testsetup.SetupForCommonTest()
opts := []goleak.Option{
goleak.IgnoreTopFunction("github.com/golang/glog.(*loggingT).flushDaemon"),
goleak.IgnoreTopFunction("github.com/lestrrat-go/httprc.runFetchWorker"),
goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"),
goleak.IgnoreTopFunction("github.com/klauspost/compress/zstd.(*blockDec).startDecoder"),
}
Expand Down
1 change: 1 addition & 0 deletions br/pkg/metautil/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
func TestMain(m *testing.M) {
opts := []goleak.Option{
goleak.IgnoreTopFunction("github.com/golang/glog.(*loggingT).flushDaemon"),
goleak.IgnoreTopFunction("github.com/lestrrat-go/httprc.runFetchWorker"),
goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"),
}
testsetup.SetupForCommonTest()
Expand Down
4 changes: 3 additions & 1 deletion br/pkg/mock/mock_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ func TestSmoke(t *testing.T) {
defer goleak.VerifyNone(
t,
goleak.IgnoreTopFunction("github.com/golang/glog.(*loggingT).flushDaemon"),
goleak.IgnoreTopFunction("github.com/lestrrat-go/httprc.runFetchWorker"),
goleak.IgnoreTopFunction("github.com/klauspost/compress/zstd.(*blockDec).startDecoder"),
goleak.IgnoreTopFunction("go.etcd.io/etcd/client/pkg/v3/logutil.(*MergeLogger).outputLoop"),
goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"))
goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"),
)
m, err := mock.NewCluster()
require.NoError(t, err)
require.NoError(t, m.Start())
Expand Down
1 change: 1 addition & 0 deletions br/pkg/pdutil/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func TestMain(m *testing.M) {
testsetup.SetupForCommonTest()
opts := []goleak.Option{
goleak.IgnoreTopFunction("github.com/golang/glog.(*loggingT).flushDaemon"),
goleak.IgnoreTopFunction("github.com/lestrrat-go/httprc.runFetchWorker"),
goleak.IgnoreTopFunction("go.etcd.io/etcd/client/pkg/v3/logutil.(*MergeLogger).outputLoop"),
goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"),
}
Expand Down
1 change: 1 addition & 0 deletions br/pkg/restore/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func TestMain(m *testing.M) {
testsetup.SetupForCommonTest()
opts := []goleak.Option{
goleak.IgnoreTopFunction("github.com/golang/glog.(*loggingT).flushDaemon"),
goleak.IgnoreTopFunction("github.com/lestrrat-go/httprc.runFetchWorker"),
goleak.IgnoreTopFunction("github.com/klauspost/compress/zstd.(*blockDec).startDecoder"),
goleak.IgnoreTopFunction("go.etcd.io/etcd/client/pkg/v3/logutil.(*MergeLogger).outputLoop"),
goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"),
Expand Down
1 change: 1 addition & 0 deletions br/pkg/rtree/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func TestMain(m *testing.M) {
testsetup.SetupForCommonTest()
opts := []goleak.Option{
goleak.IgnoreTopFunction("github.com/golang/glog.(*loggingT).flushDaemon"),
goleak.IgnoreTopFunction("github.com/lestrrat-go/httprc.runFetchWorker"),
goleak.IgnoreTopFunction("go.etcd.io/etcd/client/pkg/v3/logutil.(*MergeLogger).outputLoop"),
goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"),
}
Expand Down
1 change: 1 addition & 0 deletions br/pkg/summary/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func TestMain(m *testing.M) {
testsetup.SetupForCommonTest()
opts := []goleak.Option{
goleak.IgnoreTopFunction("github.com/golang/glog.(*loggingT).flushDaemon"),
goleak.IgnoreTopFunction("github.com/lestrrat-go/httprc.runFetchWorker"),
goleak.IgnoreTopFunction("go.etcd.io/etcd/client/pkg/v3/logutil.(*MergeLogger).outputLoop"),
goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"),
}
Expand Down
1 change: 1 addition & 0 deletions br/pkg/trace/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func TestMain(m *testing.M) {
testsetup.SetupForCommonTest()
opts := []goleak.Option{
goleak.IgnoreTopFunction("github.com/golang/glog.(*loggingT).flushDaemon"),
goleak.IgnoreTopFunction("github.com/lestrrat-go/httprc.runFetchWorker"),
goleak.IgnoreTopFunction("go.etcd.io/etcd/client/pkg/v3/logutil.(*MergeLogger).outputLoop"),
goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"),
}
Expand Down
1 change: 1 addition & 0 deletions br/pkg/utils/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
func TestMain(m *testing.M) {
opts := []goleak.Option{
goleak.IgnoreTopFunction("github.com/golang/glog.(*loggingT).flushDaemon"),
goleak.IgnoreTopFunction("github.com/lestrrat-go/httprc.runFetchWorker"),
goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"),
}
testsetup.SetupForCommonTest()
Expand Down
1 change: 1 addition & 0 deletions cmd/ddltest/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ func TestMain(m *testing.M) {
}
opts := []goleak.Option{
goleak.IgnoreTopFunction("github.com/golang/glog.(*loggingT).flushDaemon"),
goleak.IgnoreTopFunction("github.com/lestrrat-go/httprc.runFetchWorker"),
goleak.IgnoreTopFunction("go.etcd.io/etcd/client/pkg/v3/logutil.(*MergeLogger).outputLoop"),
goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"),
goleak.IgnoreTopFunction("internal/poll.runtime_pollWait"),
Expand Down
Loading

0 comments on commit f9c7bbc

Please sign in to comment.