Skip to content

[Audit] Fix password audit Sonar issues - #18367

Open
Caideyipi wants to merge 2 commits into
apache:masterfrom
Caideyipi:fix/tree-access-check-null-username
Open

[Audit] Fix password audit Sonar issues#18367
Caideyipi wants to merge 2 commits into
apache:masterfrom
Caideyipi:fix/tree-access-check-null-username

Conversation

@Caideyipi

@Caideyipi Caideyipi commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Description

Follow-up to #18357.

  • Compare tree-model usernames null-safely.
  • Replace the password-redaction regex with a simple prefix matcher and linear quoted-literal scan.
  • Use pattern variables for password-change statement extraction.
  • Stop catching Error in the audit task wrapper.
  • Merge equivalent privilege switch labels and make early audit fields final.
  • Document the intentionally exhaustive relational authorization switch instead of high-risk restructuring.
  • Suppress the unavoidable generated-i18n line-length warning in the tree authorization helper.

Tests

  • mvn -pl iotdb-core/datanode -Dtest=DNAuditLoggerTest,PasswordChangeAuditContextTest -Ddevelocity.off=true test (18 tests)
  • mvn -pl iotdb-core/datanode -Dtest=DNAuditLoggerTest -Ddevelocity.off=true test (5 tests, final redaction implementation)
  • DataNode compile, Checkstyle, and Spotless checks included in the Maven runs
  • git diff --check

@Caideyipi Caideyipi changed the title Use null-safe user comparison in tree access check [Audit] Fix password audit Sonar issues Jul 31, 2026
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.

1 participant