Skip to content

[Fix-7713] Handling the sensitive data in the log#7728

Merged
zhuangchong merged 4 commits intoapache:devfrom
calvinjiang:f-datasource-passowrd
Dec 30, 2021
Merged

[Fix-7713] Handling the sensitive data in the log#7728
zhuangchong merged 4 commits intoapache:devfrom
calvinjiang:f-datasource-passowrd

Conversation

@calvinjiang
Copy link
Copy Markdown
Contributor

Purpose of the pull request

This PR will close #7713 .

Brief change log

When requesting api interface, the class AccessLogAspect will output the logs about the request parameters. But somtimes the request parameters includes a few sensitive data like password. So I add a function to deal with the writing logs that contains 'password' , and then it will convert the value of 'password' into '****'.

Verify this pull request

This change added tests and can be verified as follows:

  • Manually verified the change by testing locally.
    I manually verify the new function, and it can successfully pass through the test case.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

Merging #7728 (6c1184a) into dev (68906f1) will increase coverage by 0.00%.
The diff coverage is 37.50%.

Impacted file tree graph

@@            Coverage Diff            @@
##                dev    #7728   +/-   ##
=========================================
  Coverage     41.09%   41.10%           
- Complexity     3675     3677    +2     
=========================================
  Files           642      642           
  Lines         26662    26678   +16     
  Branches       2992     2995    +3     
=========================================
+ Hits          10957    10965    +8     
- Misses        14658    14661    +3     
- Partials       1047     1052    +5     
Impacted Files Coverage Δ
...e/dolphinscheduler/api/aspect/AccessLogAspect.java 67.24% <37.50%> (-11.34%) ⬇️
...dolphinscheduler/remote/future/ResponseFuture.java 81.96% <0.00%> (-1.64%) ⬇️
...e/dolphinscheduler/remote/NettyRemotingClient.java 53.52% <0.00%> (+1.40%) ⬆️
...org/apache/dolphinscheduler/remote/utils/Host.java 40.00% <0.00%> (+2.22%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 68906f1...6c1184a. Read the comment docs.

@sonarqubecloud
Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 2 Security Hotspots
Code Smell A 4 Code Smells

45.5% 45.5% Coverage
0.0% 0.0% Duplication

Copy link
Copy Markdown
Contributor

@zhuangchong zhuangchong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@zhuangchong zhuangchong merged commit 73993e9 into apache:dev Dec 30, 2021
caishunfeng pushed a commit to caishunfeng/dolphinscheduler that referenced this pull request Jan 13, 2022
lenboo pushed a commit that referenced this pull request Jan 13, 2022
* finished issue#7527 (#7561)

Co-authored-by: 时光 <caizhedong@cai-inc.com>

* [Fix-7713] Handling the sensitive data in the log (#7728)

* add a feature to handle sensitive data

* [cherry-pick-2.0.3]fix-#7740-upgrade_sql #7761

* [cherry-pick-2.0.3][Fix-7203] Remedy the issue about importing a process json file

* [cherry-pick-2.0.3][Fix-7857] The user won't be allowed to disable their own account

Co-authored-by: 时光 <41109695+yikeshiguang@users.noreply.github.com>
Co-authored-by: 时光 <caizhedong@cai-inc.com>
Co-authored-by: calvin <jianghuachinacom@163.com>
Co-authored-by: uh001 <96870549+uh001@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] [Log] The data source password in the log is not encrypted

3 participants