Skip to content

feat: sensitive data encryption - #1849

Merged
fuyuwei01 merged 2 commits into
Tencent:2021from
fuyuwei01:2021
Oct 27, 2026
Merged

fuyuwei01 merged 2 commits into
Tencent:2021from
fuyuwei01:2021

Conversation

@fuyuwei01

Copy link
Copy Markdown
Collaborator
  • feat: mask encrypted config values in SCT logs

Keep plaintext out of refresh and group-load logs by tracking encrypted keys and replacing values with length plus a per-process salted fingerprint.

  • fix: keep config fallback and polarisconfig endpoint usable

Serialize actuator polarisconfig as safe DTOs so ClientId is reachable, honor local-file-root-path for remote cache, and continue startup from existing cache when the config server is unreachable.

  • fix: attribute encrypted config by file for logs and ACK

Pass EffectiveValue.sourceFile to the SDK, register keys from ConfigKVFile.isEncrypted() on group add, and omit group DEBUG maps only when the composite file is encrypted.

  • fix: mark non-Polaris effective values as EXTERNAL

Tell the SDK that command-line and env overrides are not config-center files, so ACK can keep those effective values when an encrypted file is also watched.

  • chore(docs): 更新 CHANGELOG 链接至 PR 1818

  • refactor: hide test-only encrypted key set reset

Keep clearEncryptedPropertyKeys() package-private so it is not part of the public API.


PR Type

Describe what this PR does for and how you did.

Adding the issue link (#xxx) if possible.

Note

Checklist

  • Add information of this PR to CHANGELOG.md in root of project.
  • Add documentation in javadoc or comment below the PR if necessary.

* feat: mask encrypted config values in SCT logs

Keep plaintext out of refresh and group-load logs by tracking encrypted keys and replacing values with length plus a per-process salted fingerprint.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: keep config fallback and polarisconfig endpoint usable

Serialize actuator polarisconfig as safe DTOs so ClientId is reachable, honor local-file-root-path for remote cache, and continue startup from existing cache when the config server is unreachable.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: attribute encrypted config by file for logs and ACK

Pass EffectiveValue.sourceFile to the SDK, register keys from ConfigKVFile.isEncrypted() on group add, and omit group DEBUG maps only when the composite file is encrypted.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: mark non-Polaris effective values as EXTERNAL

Tell the SDK that command-line and env overrides are not config-center files, so ACK can keep those effective values when an encrypted file is also watched.

Co-authored-by: Cursor <cursoragent@cursor.com>

* chore(docs): 更新 CHANGELOG 链接至 PR 1818

Signed-off-by: evelynwei <evelynwei@tencent.com>

* refactor: hide test-only encrypted key set reset

Keep clearEncryptedPropertyKeys() package-private so it is not part of the public API.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Signed-off-by: evelynwei <evelynwei@tencent.com>
Co-authored-by: evelynwei <evelynwei@tencent.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
peerless1024
peerless1024 previously approved these changes Oct 26, 2026

@peerless1024 peerless1024 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

Co-Authored-By: Codex
Signed-off-by: fuyuwei01 <fuyuwei01@qq.com>
@codecov

codecov Bot commented Oct 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.14607% with 30 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.50%. Comparing base (9482b26) to head (1198a3d).

Files with missing lines Patch % Lines
...polaris/config/endpoint/PolarisConfigEndpoint.java 83.09% 7 Missing and 5 partials ⚠️
...nt/cloud/polaris/config/ConfigurationModifier.java 60.86% 2 Missing and 7 partials ⚠️
...ig/adapter/PolarisConfigPropertyAutoRefresher.java 85.41% 2 Missing and 5 partials ⚠️
...ig/adapter/SpringConfigEffectiveValueProvider.java 92.85% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               2021    #1849      +/-   ##
============================================
+ Coverage     56.23%   56.50%   +0.27%     
  Complexity      149      149              
============================================
  Files           481      481              
  Lines         14074    14226     +152     
  Branches       1754     1783      +29     
============================================
+ Hits           7914     8038     +124     
- Misses         5520     5531      +11     
- Partials        640      657      +17     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@peerless1024 peerless1024 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@fuyuwei01
fuyuwei01 merged commit 2778787 into Tencent:2021 Oct 27, 2026
13 checks passed
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.

2 participants