kyoty opened a new pull request #5638:
URL: https://github.com/apache/dolphinscheduler/pull/5638


   ## Purpose of the pull request
   Some password  attributes can be viewd directly in the log,It may leads to 
the leakage of sensitive data :
   ### 1.
   
![image](https://user-images.githubusercontent.com/52202080/122084708-a6621880-ce34-11eb-9f6b-a40319feb323.png)
   ### 2.
   
![image](https://user-images.githubusercontent.com/52202080/122084815-bc6fd900-ce34-11eb-8b21-83d170817414.png)
   ### 3.
   
![image](https://user-images.githubusercontent.com/52202080/122084920-d3aec680-ce34-11eb-9e82-fecc6fedeec5.png)
   
   ## Brief change log
   
   1. Enhanced the regex pattern of password
   >+ **The previous regex matches only lowercase, we can now match case 
insensitive letters**
   >+ **The previous regex matches only double quote, we can now also match 
single quote**
   >+ **The previous regex only matched to individual words of password, and 
words like userPassword did not match successfully**
   2. Move the SensitiveDataConverter and related testcase from module 
`dolphinscheduler-server` to project `dolphinscheduler-service` so that all 
modules('MasterServer', 'WorkerServer', 'APIServer' and 'AlertServer') can use 
this function in the log xml.  
   
   3. The way in test cases to create` ILoggingEven`t cannot be reused.  So I 
**use The `Function<String, ILoggingEvent>` interface of JDK8 to simplify the 
Creation of `ILoggingEvent`, to make it easier to add new testCases in the 
future**.  
   
   
   ## Verify this pull request
   refactor the existed UTS and munutal test works well, like below:
   
   ### 1.after modified
   
![image](https://user-images.githubusercontent.com/52202080/122087653-88e27e00-ce37-11eb-8f71-a6ef9896c0ea.png)
   
   ### 2.after modified
   
![image](https://user-images.githubusercontent.com/52202080/122087928-da8b0880-ce37-11eb-9a32-d144b51d1a31.png)
   
   ### 3.after modified 
   
![image](https://user-images.githubusercontent.com/52202080/122088019-f2fb2300-ce37-11eb-9055-5a722a407df0.png)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to