From 781049fbd6d4a69c9d2314f4ed3036e68f598fc2 Mon Sep 17 00:00:00 2001 From: WizardXiao <89761062+WizardXiao@users.noreply.github.com> Date: Fri, 13 May 2022 10:12:35 +0800 Subject: [PATCH] DM/Openapi: improve password input mechanism source (#5369) ref pingcap/tiflow#4986 --- dm/dm/config/source_config.go | 4 + dm/dm/config/source_converter.go | 12 +- dm/dm/master/openapi_controller.go | 6 + dm/dm/master/openapi_controller_test.go | 36 +++- dm/dm/master/openapi_view_test.go | 38 +++- dm/dm/master/server.go | 4 +- dm/openapi/gen.server.go | 196 +++++++++---------- dm/openapi/gen.types.go | 2 +- dm/openapi/spec/dm.yaml | 3 +- dm/tests/openapi/client/openapi_source_check | 16 ++ dm/tests/openapi/run.sh | 3 + 11 files changed, 208 insertions(+), 112 deletions(-) diff --git a/dm/dm/config/source_config.go b/dm/dm/config/source_config.go index d45cb69fe33..4cfb5bc6049 100644 --- a/dm/dm/config/source_config.go +++ b/dm/dm/config/source_config.go @@ -53,6 +53,10 @@ var getAllServerIDFunc = utils.GetAllServerID //go:embed source.yaml var SampleSourceConfig string +// ObfuscatedPasswordForFeedback is the source encryption password that returns to the foreground. +// PM's requirement, we always return obfuscated password to users. +var ObfuscatedPasswordForFeedback string = "******" + // PurgeConfig is the configuration for Purger. type PurgeConfig struct { Interval int64 `yaml:"interval" toml:"interval" json:"interval"` // check whether need to purge at this @Interval (seconds) diff --git a/dm/dm/config/source_converter.go b/dm/dm/config/source_converter.go index 7e6eaaaeff6..b39ec997aa2 100644 --- a/dm/dm/config/source_converter.go +++ b/dm/dm/config/source_converter.go @@ -23,7 +23,7 @@ func SourceCfgToOpenAPISource(cfg *SourceConfig) openapi.Source { Enable: cfg.Enable, EnableGtid: cfg.EnableGTID, Host: cfg.From.Host, - Password: "******", // PM's requirement, we always return obfuscated password to user + Password: &ObfuscatedPasswordForFeedback, // PM's requirement, we always return obfuscated password to users Port: cfg.From.Port, SourceName: cfg.SourceID, User: cfg.From.User, @@ -55,10 +55,12 @@ func SourceCfgToOpenAPISource(cfg *SourceConfig) openapi.Source { func OpenAPISourceToSourceCfg(source openapi.Source) *SourceConfig { cfg := NewSourceConfig() from := DBConfig{ - Host: source.Host, - Port: source.Port, - User: source.User, - Password: source.Password, + Host: source.Host, + Port: source.Port, + User: source.User, + } + if source.Password != nil { + from.Password = *source.Password } if source.Security != nil { from.Security = &Security{ diff --git a/dm/dm/master/openapi_controller.go b/dm/dm/master/openapi_controller.go index 4b43c6b5a0c..831ac1d7a36 100644 --- a/dm/dm/master/openapi_controller.go +++ b/dm/dm/master/openapi_controller.go @@ -137,6 +137,12 @@ func (s *Server) updateSource(ctx context.Context, sourceName string, req openap return nil, terror.ErrSchedulerSourceCfgNotExist.Generate(sourceName) } newCfg := config.OpenAPISourceToSourceCfg(req.Source) + + // update's request will be no password when user doesn't input password and wants to use old password. + if req.Source.Password == nil { + newCfg.From.Password = oldCfg.From.Password + } + if err := checkAndAdjustSourceConfigFunc(ctx, newCfg); err != nil { return nil, err } diff --git a/dm/dm/master/openapi_controller_test.go b/dm/dm/master/openapi_controller_test.go index 336960c98bc..cfb314027fc 100644 --- a/dm/dm/master/openapi_controller_test.go +++ b/dm/dm/master/openapi_controller_test.go @@ -50,7 +50,7 @@ func (s *OpenAPIControllerSuite) SetupSuite() { Enable: true, EnableGtid: false, Host: dbCfg.Host, - Password: dbCfg.Password, + Password: &dbCfg.Password, Port: dbCfg.Port, User: dbCfg.User, } @@ -221,6 +221,40 @@ func (s *OpenAPIControllerSuite) TestSourceController() { s.Nil(err) s.Len(sourceList, 0) } + + // create and update no password source + { + // no password will use "" as password + source := *s.testSource + source.Password = nil + createReq := openapi.CreateSourceRequest{Source: source} + resp, err := server.createSource(ctx, createReq) + s.NoError(err) + s.EqualValues(source, *resp) + config := server.scheduler.GetSourceCfgByID(source.SourceName) + s.NotNil(config) + s.Equal("", config.From.Password) + + // update to have password + updateReq := openapi.UpdateSourceRequest{Source: *s.testSource} + sourceAfterUpdated, err := server.updateSource(ctx, source.SourceName, updateReq) + s.NoError(err) + s.EqualValues(s.testSource, sourceAfterUpdated) + + // update without password will use old password + source = *s.testSource + source.Password = nil + updateReq = openapi.UpdateSourceRequest{Source: source} + sourceAfterUpdated, err = server.updateSource(ctx, source.SourceName, updateReq) + s.NoError(err) + s.Equal(source, *sourceAfterUpdated) + // password is old + config = server.scheduler.GetSourceCfgByID(source.SourceName) + s.NotNil(config) + s.Equal(*s.testSource.Password, config.From.Password) + + s.Nil(server.deleteSource(ctx, s.testSource.SourceName, false)) + } } func (s *OpenAPIControllerSuite) TestTaskController() { diff --git a/dm/dm/master/openapi_view_test.go b/dm/dm/master/openapi_view_test.go index 13f57349e08..0225616d43a 100644 --- a/dm/dm/master/openapi_view_test.go +++ b/dm/dm/master/openapi_view_test.go @@ -372,7 +372,7 @@ func (s *OpenAPIViewSuite) TestTaskTemplatesAPI() { SourceName: source1Name, EnableGtid: false, Host: dbCfg.Host, - Password: dbCfg.Password, + Password: &dbCfg.Password, Port: dbCfg.Port, User: dbCfg.User, } @@ -471,7 +471,7 @@ func (s *OpenAPIViewSuite) TestSourceAPI() { Enable: true, EnableGtid: false, Host: dbCfg.Host, - Password: dbCfg.Password, + Password: &dbCfg.Password, Port: dbCfg.Port, User: dbCfg.User, Purge: &openapi.Purge{Interval: &purgeInterVal}, @@ -702,6 +702,38 @@ func (s *OpenAPIViewSuite) TestSourceAPI() { s.NoError(result.UnmarshalBodyToObject(&resultListSource2)) s.Len(resultListSource2.Data, 0) s.Equal(0, resultListSource2.Total) + + // create with no password + sourceNoPassword := source1 + sourceNoPassword.Password = nil + createReqNoPassword := openapi.CreateSourceRequest{Source: sourceNoPassword} + result = testutil.NewRequest().Post(baseURL).WithJsonBody(createReqNoPassword).GoWithHTTPHandler(s.T(), s1.openapiHandles) + s.Equal(http.StatusCreated, result.Code()) + s.NoError(result.UnmarshalBodyToObject(&resultSource)) + s.Nil(resultSource.Password) + + // update to have password + sourceHasPassword := source1 + updateReqHasPassword := openapi.UpdateSourceRequest{Source: sourceHasPassword} + result = testutil.NewRequest().Put(source1URL).WithJsonBody(updateReqHasPassword).GoWithHTTPHandler(s.T(), s1.openapiHandles) + s.Equal(http.StatusOK, result.Code()) + s.NoError(result.UnmarshalBodyToObject(&source1FromHTTP)) + s.Equal(source1FromHTTP.Password, sourceHasPassword.Password) + + // update with no password, will use old password + updateReqNoPassword := openapi.UpdateSourceRequest{Source: sourceNoPassword} + result = testutil.NewRequest().Put(source1URL).WithJsonBody(updateReqNoPassword).GoWithHTTPHandler(s.T(), s1.openapiHandles) + s.Equal(http.StatusOK, result.Code()) + s.NoError(result.UnmarshalBodyToObject(&source1FromHTTP)) + s.Nil(source1FromHTTP.Password) + // password is old + conf := s1.scheduler.GetSourceCfgByID(source1FromHTTP.SourceName) + s.NotNil(conf) + s.Equal(*sourceHasPassword.Password, conf.From.Password) + + // delete source with --force + result = testutil.NewRequest().Delete(fmt.Sprintf("%s/%s?force=true", baseURL, source1.SourceName)).GoWithHTTPHandler(s.T(), s1.openapiHandles) + s.Equal(http.StatusNoContent, result.Code()) } func (s *OpenAPIViewSuite) testImportTaskTemplate(task *openapi.Task, s1 *Server) { @@ -774,7 +806,7 @@ func (s *OpenAPIViewSuite) TestTaskAPI() { SourceName: source1Name, EnableGtid: false, Host: dbCfg.Host, - Password: dbCfg.Password, + Password: &dbCfg.Password, Port: dbCfg.Port, User: dbCfg.User, } diff --git a/dm/dm/master/server.go b/dm/dm/master/server.go index c8c87d186ff..45db6b790f6 100644 --- a/dm/dm/master/server.go +++ b/dm/dm/master/server.go @@ -2316,7 +2316,7 @@ func (s *Server) GetCfg(ctx context.Context, req *pb.GetCfgRequest) (*pb.GetCfgR // For the get-config command, we want to filter out fields that are not easily readable by humans, // such as SSLXXBytes field in `Security` struct taskCfg := config.SubTaskConfigsToTaskConfig(subCfgList...) - taskCfg.TargetDB.Password = "******" + taskCfg.TargetDB.Password = config.ObfuscatedPasswordForFeedback if taskCfg.TargetDB.Security != nil { taskCfg.TargetDB.Security.ClearSSLBytesData() } @@ -2420,7 +2420,7 @@ func (s *Server) GetCfg(ctx context.Context, req *pb.GetCfgRequest) (*pb.GetCfgR return resp2, nil } - sourceCfg.From.Password = "******" + sourceCfg.From.Password = config.ObfuscatedPasswordForFeedback if sourceCfg.From.Security != nil { sourceCfg.From.Security.ClearSSLBytesData() } diff --git a/dm/openapi/gen.server.go b/dm/openapi/gen.server.go index 849b393b386..dd4cc1725fe 100644 --- a/dm/openapi/gen.server.go +++ b/dm/openapi/gen.server.go @@ -1249,107 +1249,107 @@ func RegisterHandlersWithOptions(router *gin.Engine, si ServerInterface, options // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ "H4sIAAAAAAAC/+w9XXPbOJJ/Bae7h5kpyZJsx0l8tQ9J7Mn6zvko21NzW1M5BSJBCWsSYADQHm3K/30L", - "HyRBEiAp23KssfdhxxFBoNHf3Wg0vw8CmqSUICL44PD7gAdLlED155sYMfEBErhA7IKmNKaLlfw9ZTRF", + "HyRBEiAp23KssfdhxxFBoNHo7240vw8CmqSUICL44PD7gAdLlED155sYMfEBErhA7IKmNKaLlfw9ZTRF", "TGCkRi0pF/K/6E+YpDEaHA6muy93JjuTnelgOBCrVP7EBcNkMbgZDlLKqsNfT17vFeMwEWiB2ODmZjhg", "6FuGGQoHh3/oRczLX4rRdP5PFAg567s44wKxD1D+fxNGGIbq1xDxgOFUYEoGh+pXxDmgERBLBIKMMUQE", "SNQkgNAQDYaubR2+2j1w7g3G+Ao116EkxgQBLqDIzGqYm2XsFQTLUDHrnNIYQSKnjREMkQN+zO2Z1B7M", - "0B6TEpigKtn0NI6N1Wih3sw3W0A31EhuIY6fhaBktFmiOW0mrHH/xVA0OBz857hk0rHh0LGTPW+GgwWD", - "ESSw9zzv9Xh7Co2KYoZZjDWPY4ES3jWfZkJ7OoMRyBhU/04ZTZBYooz3BvJz8Yo98TVll7eG83f1sh/O", - "Gz8p9as/TM7mNCPhjNOMBWiWM3J1TTUE6CFADinkT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nq2Dbk8W31WLvHVq+GrUsZZ3bHfpc7jFBSw9nWJfe7+trpvz36yuC/DeynJ7jmny", + "5AR7U1+3Hbm3QK68Y/186FtTmtb33Bvy+3ZS+7FSRFuxtYIBXSECcKS61AOezXO3jxW9ip7LrX2efg81", + "sTV08QCx0h8hnWpO5L6vM15LUbX/9LtKqh8zAWy0ivpuAcbJUw8wFtXVPQOMlsry5OfyHnx5f80+4aBK", + "306+NYLswYsjnDkW3SXadCce+Ioefuk/o24k3T6hGvPLw+fEm9SydZlxlauzqysgCU03WvMDo5kwd9Fw", + "5WLx7bmydy1ZUUX2diVx/YaEt8ugPxGmfK5ua6Nvd4nbnal4zZK3otjtmaSfi/C2lpeclXj3zEryvXmM", + "1gxJzGN0LlgWiIw989Rj46mhv6OtD+U5BfTGuftbUdsfvq9wHrdIfN3gzDOHPHPI9Mc4S1Xi235nqZUN", + "/VGyIjzzzIprL/5UGPH+Q5RWULDOh3+tWmzNcWuqzXarVcDOOpfiu9ZPLPLd+J73tt7HVYd8y+Bzv5tF", + "1ocMt1DYFy3Nt722fksvMZlrFZp61qNOmnYKL/2Z+icnu6pf599e0UVTv+RSHx9hV/mJVpvPr2i2E9IE", + "YqJazw8kqs0Eblkw6Op2H9Kgd4t709N+/C3DweVISeCRLksdlV3BKjJm4LLM1LY3C9U1FstRmFjwqGWb", + "0ORdYItx+Q83X27+HQAA//9o+0ohqLUAAA==", } // GetSwagger returns the content of the embedded swagger specification file diff --git a/dm/openapi/gen.types.go b/dm/openapi/gen.types.go index 2ae5fc92214..5a3bd34fcc7 100644 --- a/dm/openapi/gen.types.go +++ b/dm/openapi/gen.types.go @@ -356,7 +356,7 @@ type Source struct { Host string `json:"host"` // source password - Password string `json:"password"` + Password *string `json:"password"` // source port Port int `json:"port"` diff --git a/dm/openapi/spec/dm.yaml b/dm/openapi/spec/dm.yaml index 0b3dc5ddcae..0f88624b28e 100644 --- a/dm/openapi/spec/dm.yaml +++ b/dm/openapi/spec/dm.yaml @@ -1376,7 +1376,7 @@ components: type: string example: "123456" description: "source password" - nullable: false + nullable: true enable_gtid: type: boolean example: false @@ -1410,7 +1410,6 @@ components: - "host" - "port" - "user" - - "password" - "enable_gtid" - "enable" ShardingGroup: diff --git a/dm/tests/openapi/client/openapi_source_check b/dm/tests/openapi/client/openapi_source_check index fc81248785f..df47f3cad8e 100755 --- a/dm/tests/openapi/client/openapi_source_check +++ b/dm/tests/openapi/client/openapi_source_check @@ -53,6 +53,21 @@ def create_source2_success(): print("create_source1_success resp=", resp.json()) assert resp.status_code == 201 +def update_source1_without_password_success(): + req = { + "source": { + "case_sensitive": False, + "enable": True, + "enable_gtid": False, + "host": "127.0.0.1", + "port": 3306, + "source_name": SOURCE1_NAME, + "user": "root", + } + } + resp = requests.put(url=API_ENDPOINT + "/" + SOURCE1_NAME, json=req) + print("update_source1_without_password_success resp=", resp.json()) + assert resp.status_code == 200 def list_source_success(source_count): resp = requests.get(url=API_ENDPOINT) @@ -220,6 +235,7 @@ if __name__ == "__main__": "create_source_failed": create_source_failed, "create_source1_success": create_source1_success, "create_source2_success": create_source2_success, + "update_source1_without_password_success": update_source1_without_password_success, "list_source_success": list_source_success, "list_source_with_redirect": list_source_with_redirect, "list_source_with_status_success": list_source_with_status_success, diff --git a/dm/tests/openapi/run.sh b/dm/tests/openapi/run.sh index 8dece3028bf..f2e95d1caaf 100644 --- a/dm/tests/openapi/run.sh +++ b/dm/tests/openapi/run.sh @@ -65,6 +65,9 @@ function test_source() { # recreate source will failed openapi_source_check "create_source_failed" + # update source1 without password success + openapi_source_check "update_source1_without_password_success" + # get source list success openapi_source_check "list_source_success" 1