зеркало из https://github.com/github/vitess-gh.git
Not authorizing any bson protocol by default.
This commit is contained in:
Родитель
07a866e4e7
Коммит
62da287c77
|
@ -36,7 +36,6 @@ var (
|
|||
|
||||
func init() {
|
||||
servenv.RegisterDefaultFlags()
|
||||
servenv.InitServiceMapForBsonRpcService("vtctl")
|
||||
}
|
||||
|
||||
func httpErrorf(w http.ResponseWriter, r *http.Request, format string, args ...interface{}) {
|
||||
|
|
|
@ -35,8 +35,6 @@ var initFakeZK func()
|
|||
|
||||
func init() {
|
||||
servenv.RegisterDefaultFlags()
|
||||
servenv.InitServiceMapForBsonRpcService("toporeader")
|
||||
servenv.InitServiceMapForBsonRpcService("vtgateservice")
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -38,7 +38,6 @@ var schemaOverrides []tabletserver.SchemaOverride
|
|||
|
||||
func init() {
|
||||
servenv.RegisterDefaultFlags()
|
||||
servenv.InitServiceMapForBsonRpcService("queryservice")
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -42,9 +42,6 @@ var (
|
|||
|
||||
func init() {
|
||||
servenv.RegisterDefaultFlags()
|
||||
servenv.InitServiceMapForBsonRpcService("tabletmanager")
|
||||
servenv.InitServiceMapForBsonRpcService("queryservice")
|
||||
servenv.InitServiceMapForBsonRpcService("updatestream")
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -35,15 +35,6 @@ func InitServiceMap(protocol, name string) {
|
|||
serviceMap[protocol+"-"+name] = true
|
||||
}
|
||||
|
||||
// InitServiceMapForBsonRpcService will set the default entries for a
|
||||
// bson rpc to serve the service.
|
||||
func InitServiceMapForBsonRpcService(name string) {
|
||||
serviceMap["bsonrpc-vt-"+name] = true
|
||||
serviceMap["bsonrpc-auth-vt-"+name] = true
|
||||
serviceMap["bsonrpc-unix-"+name] = true
|
||||
serviceMap["bsonrpc-auth-unix-"+name] = true
|
||||
}
|
||||
|
||||
// updateServiceMap takes the command line parameter, and updates the
|
||||
// ServiceMap accordingly
|
||||
func updateServiceMap() {
|
||||
|
|
|
@ -43,10 +43,15 @@ class GoRpcProtocolsFlavor(protocols_flavor.ProtocolsFlavor):
|
|||
|
||||
def service_map(self):
|
||||
return [
|
||||
'bsonrpc-auth-vt-queryservice',
|
||||
'bsonrpc-vt-queryservice',
|
||||
'bsonrpc-vt-tabletmanager',
|
||||
'bsonrpc-vt-toporeader',
|
||||
'bsonrpc-vt-updatestream',
|
||||
'bsonrpc-vt-vtctl',
|
||||
'bsonrpc-vt-vtgateservice',
|
||||
'grpc-vtworker',
|
||||
'grpc-queryservice',
|
||||
# enabled for vtgate_python_protocol
|
||||
'bsonrpc-vt-vtgateservice',
|
||||
]
|
||||
|
||||
protocols_flavor.register_flavor('gorpc', GoRpcProtocolsFlavor)
|
||||
|
|
|
@ -41,14 +41,14 @@ class GRpcProtocolsFlavor(protocols_flavor.ProtocolsFlavor):
|
|||
|
||||
def service_map(self):
|
||||
return [
|
||||
'bsonrpc-vt-toporeader',
|
||||
'bsonrpc-vt-vtgateservice',
|
||||
'grpc-queryservice',
|
||||
'grpc-updatestream',
|
||||
'grpc-vtctl',
|
||||
'grpc-vtworker',
|
||||
'grpc-tabletmanager',
|
||||
'grpc-vtgateservice',
|
||||
# enabled for vtgate_python_protocol
|
||||
'bsonrpc-vt-vtgateservice',
|
||||
]
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче